|
|
@ -6,6 +6,7 @@ import com.ruoyi.common.core.page.PageDomain; |
|
|
|
import com.ruoyi.common.core.page.TableSupport; |
|
|
|
import com.ruoyi.common.core.redis.RedisCache; |
|
|
|
import com.ruoyi.common.core.text.Convert; |
|
|
|
import com.ruoyi.common.exception.BusinessException; |
|
|
|
import com.ruoyi.common.service.ICommonService; |
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
import com.ruoyi.common.utils.ShiroUtils; |
|
|
@ -171,6 +172,9 @@ private ISysAttachService attachService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<ErpBom> selectErpBomSubList(ErpBom erpBom) { |
|
|
|
|
|
|
|
// erpBom.setAuditStatus("1");
|
|
|
|
// erpBom.setUseStatus("1");
|
|
|
|
return erpBomMapper.selectErpBomSubList(erpBom); |
|
|
|
} |
|
|
|
|
|
|
@ -371,16 +375,18 @@ private ISysAttachService attachService; |
|
|
|
Long id = erpBom.getId(); |
|
|
|
insertErpBomSub(erpBom); |
|
|
|
ErpMaterial erpMaterial = materialMapper.selectErpMaterialByMaterialNo(erpBom.getMaterialNo()); |
|
|
|
if (!Objects.isNull(erpMaterial)) { |
|
|
|
ErpMaterial erpMaterial1 = new ErpMaterial(); |
|
|
|
erpMaterial1.setMaterialNo(erpBom.getMaterialNo()); |
|
|
|
erpMaterial1.setBomNo(erpBom.getBomNo()); |
|
|
|
materialMapper.updateMaterialBomNo(erpMaterial1); |
|
|
|
} |
|
|
|
// if (!Objects.isNull(erpMaterial)) {
|
|
|
|
// ErpMaterial erpMaterial1 = new ErpMaterial();
|
|
|
|
// erpMaterial1.setMaterialNo(erpBom.getMaterialNo());
|
|
|
|
// erpMaterial1.setBomNo(erpBom.getBomNo());
|
|
|
|
// materialMapper.updateMaterialBomNo(erpMaterial1);
|
|
|
|
// }
|
|
|
|
//添加物料关联的bom信息
|
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 修改bom |
|
|
|
* |
|
|
@ -702,10 +708,15 @@ private ISysAttachService attachService; |
|
|
|
erpBom1.setParentId(id); |
|
|
|
erpBom1.setCreateBy(ShiroUtils.getLoginName()); |
|
|
|
erpBom1.setCreateTime(DateUtils.getNowDate()); |
|
|
|
// 新添加,理论上,刚添加的一阶物料默认审核通过,使用状态为是
|
|
|
|
// erpBom1.setAuditStatus("1");
|
|
|
|
// erpBom1.setUseStatus("1");
|
|
|
|
erpBomMapper.insertErpBom(erpBom1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<ErpBom> selectErpBomList1(){ |
|
|
|
List<ErpBom> bomList = erpBomMapper.selectErpBomList1(); |
|
|
|
return bomList; |
|
|
@ -872,6 +883,9 @@ private ISysAttachService attachService; |
|
|
|
if(roleKeys.contains("gcwyRole")){ |
|
|
|
variables.put("authority",1); |
|
|
|
} |
|
|
|
// else if(roleKeys.contains("yfzjRole") || roleKeys.contains("admin")) {
|
|
|
|
// variables.put("authority",4);
|
|
|
|
// }
|
|
|
|
// else if(roleKeys.contains("gczgRole")){
|
|
|
|
// variables.put("authority",3);
|
|
|
|
// }else if(roleKeys.contains("gcjlRole")){
|
|
|
|