|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.aucma.production.service.impl;
|
|
|
|
package com.aucma.production.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import com.aucma.base.domain.BaseOrderInfo;
|
|
|
|
import com.aucma.base.domain.BaseOrderInfo;
|
|
|
@ -125,8 +126,8 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
|
|
|
|
String orderCode = baseOrderInfo.getOrderCode();
|
|
|
|
String orderCode = baseOrderInfo.getOrderCode();
|
|
|
|
String saleOrderCode = baseOrderInfo.getSaleOrderCode();
|
|
|
|
String saleOrderCode = baseOrderInfo.getSaleOrderCode();
|
|
|
|
String saleOrderLineNumber = baseOrderInfo.getSaleOrderLineNumber();
|
|
|
|
String saleOrderLineNumber = baseOrderInfo.getSaleOrderLineNumber();
|
|
|
|
Long orderAmount = baseOrderInfo.getOrderAmount();
|
|
|
|
BigDecimal orderAmount = baseOrderInfo.getOrderAmount();
|
|
|
|
if (StringUtils.isNull(orderAmount) || orderAmount < 1L){
|
|
|
|
if (StringUtils.isNull(orderAmount) || (orderAmount.compareTo(new BigDecimal(1))==-1)){
|
|
|
|
throw new BaseException("该工单计划数量不合法!");
|
|
|
|
throw new BaseException("该工单计划数量不合法!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//获取生产BOM信息
|
|
|
|
//获取生产BOM信息
|
|
|
@ -147,7 +148,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
|
|
|
|
planInfo.setMaterialCode(baseBomInfo.getMaterialCode());
|
|
|
|
planInfo.setMaterialCode(baseBomInfo.getMaterialCode());
|
|
|
|
planInfo.setMaterialName(baseBomInfo.getMaterialName());
|
|
|
|
planInfo.setMaterialName(baseBomInfo.getMaterialName());
|
|
|
|
planInfo.setProductLineCode(baseBomInfo.getProductLineCode());
|
|
|
|
planInfo.setProductLineCode(baseBomInfo.getProductLineCode());
|
|
|
|
planInfo.setPlanAmount(baseBomInfo.getStandardAmount() * orderAmount);
|
|
|
|
planInfo.setPlanAmount(baseBomInfo.getStandardAmount() * orderAmount.longValue());
|
|
|
|
this.insertProductPlanInfo(planInfo);
|
|
|
|
this.insertProductPlanInfo(planInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
baseOrderInfo.setIsRelease(0L);
|
|
|
|
baseOrderInfo.setIsRelease(0L);
|
|
|
|