|
|
|
@ -375,11 +375,6 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
}
|
|
|
|
|
//查询base_product的report_rate//箱子-大盒-小盒
|
|
|
|
|
BigDecimal reportRate = mesReportWorkMapper.getReportRate(workOrders.get(0).getProductCode());
|
|
|
|
|
if(reportRate != null){
|
|
|
|
|
BigDecimal newQuantity = sHzWorks.getQuantityFeedback().divide(reportRate,2, RoundingMode.HALF_UP);
|
|
|
|
|
sHzWorks.setQuantityFeedback(newQuantity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//子工单报工
|
|
|
|
|
logger.info("==========================子工单报工开始");
|
|
|
|
|
sapRson = this.reportHzToSap(sHzWorks);
|
|
|
|
@ -398,7 +393,13 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
|
|
|
|
|
}
|
|
|
|
|
//母工单报工
|
|
|
|
|
logger.info("==========================母工单报工开始");
|
|
|
|
|
pHzWork.setQuantityFeedback(sHzWorks.getQuantityFeedback());
|
|
|
|
|
if(reportRate != null){
|
|
|
|
|
BigDecimal newQuantity = sHzWorks.getQuantityFeedback().divide(reportRate,2, RoundingMode.HALF_UP);
|
|
|
|
|
pHzWork.setQuantityFeedback(newQuantity);
|
|
|
|
|
}else{
|
|
|
|
|
pHzWork.setQuantityFeedback(sHzWorks.getQuantityFeedback());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//pHzWork.setSac2("4");//母单报工固定值(上位机插入数据时候默认4)
|
|
|
|
|
R sapR = this.reportHzToSap(pHzWork);
|
|
|
|
|
logger.info("==========================母工单报工结束"+JSONObject.toJSONString(sapR));
|
|
|
|
|