|
|
@ -382,8 +382,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
if(sHzWorks==null){
|
|
|
|
if(sHzWorks==null){
|
|
|
|
return R.fail("未查询到子报工单");
|
|
|
|
return R.fail("未查询到子报工单");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//查询base_product的report_rate//箱子-大盒-小盒
|
|
|
|
|
|
|
|
BigDecimal reportRate = mesReportWorkMapper.getReportRate(workOrders.get(0).getProductCode());
|
|
|
|
|
|
|
|
//子工单报工
|
|
|
|
//子工单报工
|
|
|
|
logger.info("==========================子工单报工开始");
|
|
|
|
logger.info("==========================子工单报工开始");
|
|
|
|
sHzWorks.setMachineCode(mesReportWork.getMachineCode());
|
|
|
|
sHzWorks.setMachineCode(mesReportWork.getMachineCode());
|
|
|
@ -404,6 +403,8 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//母工单报工
|
|
|
|
//母工单报工
|
|
|
|
logger.info("==========================母工单报工开始");
|
|
|
|
logger.info("==========================母工单报工开始");
|
|
|
|
|
|
|
|
//查询base_product的report_rate//箱子-大盒-小盒
|
|
|
|
|
|
|
|
BigDecimal reportRate = mesReportWorkMapper.getReportRate(workOrders.get(1).getProductCode());
|
|
|
|
if(reportRate != null){
|
|
|
|
if(reportRate != null){
|
|
|
|
BigDecimal newQuantity = sHzWorks.getQuantityFeedback().divide(reportRate,2, RoundingMode.HALF_UP);
|
|
|
|
BigDecimal newQuantity = sHzWorks.getQuantityFeedback().divide(reportRate,2, RoundingMode.HALF_UP);
|
|
|
|
pHzWork.setQuantityFeedback(newQuantity);
|
|
|
|
pHzWork.setQuantityFeedback(newQuantity);
|
|
|
|