|
|
|
@ -114,8 +114,6 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean releaseOrderPlan(BaseOrderInfo baseOrderInfo) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String orderCode = baseOrderInfo.getOrderCode();
|
|
|
|
|
String saleOrderCode = baseOrderInfo.getSaleOrderCode();
|
|
|
|
|
String saleOrderLineNumber = baseOrderInfo.getSaleOrderLineNumber();
|
|
|
|
@ -133,7 +131,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService {
|
|
|
|
|
throw new ServiceException("生产BOM信息不完整,请先维护生产BOM信息!");
|
|
|
|
|
}
|
|
|
|
|
bomInfo.setIsPlanToStation(null);
|
|
|
|
|
List<BaseBomInfo> baseBomInfos= baseBomInfoService.selectBaseBomInfoList(bomInfo);
|
|
|
|
|
List<BaseBomInfo> baseBomInfos = baseBomInfoService.selectBaseBomInfoList(bomInfo);
|
|
|
|
|
try {
|
|
|
|
|
for (BaseBomInfo baseBomInfo : baseBomInfos) {
|
|
|
|
|
if (baseBomInfo.getMaterialType().equals(MaterialConstants.BOX_MATERIAL_TYPE)) {
|
|
|
|
@ -150,18 +148,18 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService {
|
|
|
|
|
planInfo.setPlanCode(PlanCodeUtils.getPlanCode());
|
|
|
|
|
planInfo.setProductLineCode("1005");
|
|
|
|
|
this.insertProductPlanInfo(planInfo);
|
|
|
|
|
|
|
|
|
|
if (baseBomInfo.getMaterialType().equals(MaterialConstants.COAMING_MATERIAL_TYPE)) {
|
|
|
|
|
planInfo.setPlanCode(PlanCodeUtils.getPlanCode());
|
|
|
|
|
planInfo.setOrderCode(orderCode);
|
|
|
|
|
planInfo.setSaleOrderCode(saleOrderCode);
|
|
|
|
|
planInfo.setSaleorderLinenumber(saleOrderLineNumber);
|
|
|
|
|
planInfo.setMaterialCode(baseBomInfo.getMaterialCode());
|
|
|
|
|
planInfo.setMaterialName(baseBomInfo.getMaterialName());
|
|
|
|
|
planInfo.setProductLineCode("1001");
|
|
|
|
|
planInfo.setPlanAmount(baseBomInfo.getStandardAmount().longValue() * orderAmount.longValue());
|
|
|
|
|
this.insertProductPlanInfo(planInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (baseBomInfo.getMaterialType().equals(MaterialConstants.COAMING_MATERIAL_TYPE)) {
|
|
|
|
|
ProductPlanInfo plan = new ProductPlanInfo();
|
|
|
|
|
plan.setPlanCode(PlanCodeUtils.getPlanCode());
|
|
|
|
|
plan.setProductLineCode("1001");
|
|
|
|
|
plan.setOrderCode(orderCode);
|
|
|
|
|
plan.setSaleOrderCode(saleOrderCode);
|
|
|
|
|
plan.setSaleorderLinenumber(saleOrderLineNumber);
|
|
|
|
|
plan.setMaterialCode(baseBomInfo.getMaterialCode());
|
|
|
|
|
plan.setMaterialName(baseBomInfo.getMaterialName());
|
|
|
|
|
plan.setPlanAmount(baseBomInfo.getStandardAmount().longValue() * orderAmount.longValue());
|
|
|
|
|
this.insertProductPlanInfo(plan);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
baseOrderInfo.setIsRelease(0L);
|
|
|
|
|