|
|
|
@ -230,6 +230,7 @@ public class BaseBomInfoServiceImpl implements IBaseBomInfoService {
|
|
|
|
|
info.setStandardAmount(new BigDecimal(1));
|
|
|
|
|
info.setPlantCode(baseMaterialInfo.getPlantCode());
|
|
|
|
|
info.setCreatedTime(DateUtils.getNowDate());
|
|
|
|
|
info.setAncestors(baseMaterialInfo.getMaterialCode());
|
|
|
|
|
try {
|
|
|
|
|
this.insertBaseBomInfo(info);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -247,6 +248,7 @@ public class BaseBomInfoServiceImpl implements IBaseBomInfoService {
|
|
|
|
|
}
|
|
|
|
|
//根据成品产品BOM存箱体、门体
|
|
|
|
|
for (OrderBomInfo orderBomInfo : orderBomInfos) {
|
|
|
|
|
orderBomInfo.setAncestors(baseMaterialInfo.getMaterialCode());
|
|
|
|
|
//箱体
|
|
|
|
|
if (orderBomInfo.getMaterialType().equals(MaterialConstants.BOX_MATERIAL_TYPE)) {
|
|
|
|
|
this.saveBaseBomInfoByMaterialType(orderBomInfo, MaterialConstants.BOX_MATERIAL_TYPE);
|
|
|
|
@ -266,8 +268,18 @@ public class BaseBomInfoServiceImpl implements IBaseBomInfoService {
|
|
|
|
|
OrderBomInfo selectBomInfo = new OrderBomInfo();
|
|
|
|
|
selectBomInfo.setParentId(boxBomInfo.getMaterialCode());
|
|
|
|
|
List<OrderBomInfo> bomInfoList = orderBomInfoService.selectOrderBomInfoList(selectBomInfo);
|
|
|
|
|
//Boolean flag = false; // 判断BOM是否含有预装箱体
|
|
|
|
|
/* Boolean isYZXTFlag = false; // 判断BOM是否含有预装箱体
|
|
|
|
|
for (OrderBomInfo orderBomInfo : bomInfoList) {
|
|
|
|
|
if (orderBomInfo.getMaterialName().contains("预装箱体")){
|
|
|
|
|
isYZXTFlag = true;//此BOM有预装箱体
|
|
|
|
|
//围板
|
|
|
|
|
if (orderBomInfo.getMaterialType().equals(MaterialConstants.COAMING_MATERIAL_TYPE)) {
|
|
|
|
|
this.saveBaseBomInfoByMaterialType(orderBomInfo, MaterialConstants.COAMING_MATERIAL_TYPE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
for (OrderBomInfo orderBomInfo : bomInfoList) {
|
|
|
|
|
orderBomInfo.setAncestors(boxBomInfo.getAncestors());
|
|
|
|
|
//内胆
|
|
|
|
|
if (orderBomInfo.getMaterialType().equals(MaterialConstants.LINER_MATERIAL_TYPE)) {
|
|
|
|
|
this.saveBaseBomInfoByMaterialType(orderBomInfo, MaterialConstants.LINER_MATERIAL_TYPE);
|
|
|
|
@ -288,6 +300,7 @@ public class BaseBomInfoServiceImpl implements IBaseBomInfoService {
|
|
|
|
|
selectBomInfo.setParentId(boxBomInfo.getMaterialCode());
|
|
|
|
|
List<OrderBomInfo> bomInfoList = orderBomInfoService.selectOrderBomInfoList(selectBomInfo);
|
|
|
|
|
for (OrderBomInfo orderBomInfo : bomInfoList) {
|
|
|
|
|
orderBomInfo.setAncestors(boxBomInfo.getAncestors());
|
|
|
|
|
//前板
|
|
|
|
|
if (orderBomInfo.getMaterialType().equals(MaterialConstants.FORMER_MATERIAL_TYPE)) {
|
|
|
|
|
this.saveBaseBomInfoByMaterialType(orderBomInfo, MaterialConstants.FORMER_MATERIAL_TYPE);
|
|
|
|
@ -323,6 +336,7 @@ public class BaseBomInfoServiceImpl implements IBaseBomInfoService {
|
|
|
|
|
info.setParentId(orderBomInfo.getParentId());
|
|
|
|
|
info.setStandardAmount(orderBomInfo.getStandardAmount());
|
|
|
|
|
info.setPlantCode(orderBomInfo.getFactoryCode());
|
|
|
|
|
info.setAncestors(orderBomInfo.getAncestors());
|
|
|
|
|
try {
|
|
|
|
|
info.setCreatedTime(DateUtils.getNowDate());
|
|
|
|
|
baseBomInfoMapper.insertBaseBomInfo(info);
|
|
|
|
|