| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.TaskDetlLogServiceImpl; |
| | | import com.zy.asrs.service.impl.TaskDetlServiceImpl; |
| | | import com.zy.asrs.service.impl.WrkDetlLogServiceImpl; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | |
| | | CheckOrderDetlService checkOrderDetlService; |
| | | @Autowired |
| | | private TaskDetlLogService taskDetlLogService; |
| | | @Autowired |
| | | private WrkDetlLogServiceImpl wrkDetlLogService; |
| | | |
| | | |
| | | @Transactional |
| | |
| | | orderDetls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | ReportOrderParams itemParam = new ReportOrderParams(); |
| | | |
| | |
| | | orderDetls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>() |
| | | //TODO 正常完结需要打开 |
| | | // TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>() |
| | | // .eq("matnr", detl.getMatnr()) |
| | | // .eq("supp_code", detl.getStandby1()) |
| | | // .eq("order_no", detl.getOrderNo())); |
| | | // if (Objects.isNull(detlLog)) { |
| | | // throw new CoolException("数据错误 ,请检查AGV任务档是否已完成!!"); |
| | | // } |
| | | WrkDetlLog detlLog = wrkDetlLogService.selectOne(new EntityWrapper<WrkDetlLog>() |
| | | .eq("matnr", detl.getMatnr()) |
| | | .eq("supp_code", detl.getStandby1()) |
| | | .eq("order_no", detl.getOrderNo())); |
| | | if (Objects.isNull(detlLog)) { |
| | | throw new CoolException("数据错误 ,请检查AGV任务档是否已完成!!"); |
| | | throw new CoolException("物料编码:" + detl.getMatnr() + "数据错误 ,请检查堆垛机任务档是否已完成!!"); |
| | | } |
| | | //目标库区 |
| | | orderParam.setTarget_location(detlLog.getAreaType()); |
| | | orderParam.setTarget_location("2"); |
| | | // orderParam.setTarget_location(detlLog.getAreaType()); |
| | | OrderItemsParam itemParam = new OrderItemsParam(); |
| | | // BS Code |
| | | itemParam |
| | |
| | | // // 上报时,默认来源位置是null |
| | | .setLocation_no(detlLog.getZpallet()) |
| | | // 上报时,默认上报数量是订单数量 |
| | | .setPick_qty(detl.getQty().intValue()); |
| | | .setPick_qty(Objects.isNull(detl.getQty()) ? 0 : detl.getQty().intValue()); |
| | | reportOrderParams.add(itemParam); |
| | | }); |
| | | |
| | |
| | | orderDetls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | |
| | | TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>() |
| | | .eq("matnr", detl.getMatnr()) |
| | | .eq("supp_code", detl.getStandby1()) |
| | |
| | | detls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | OrderItemsParam itemParam = new OrderItemsParam(); |
| | | itemParam.setLocation_no(detl.getZpallet()) |