| | |
| | | @Transactional |
| | | public void pakinOrderCreate(OpenOrderPakinParam param) { |
| | | Order order = orderService.selectByNo(param.getOrderNo()); |
| | | if (!Cools.isEmpty(order) && order.getSettle() !=1) { |
| | | throw new CoolException(param.getOrderNo() + "单据已有工作任务"); |
| | | } |
| | | if (!Cools.isEmpty(order)) { |
| | | throw new CoolException(param.getOrderNo() + "单据已存在,请勿重复提交"); |
| | | boolean orderNo = orderService.delete(new EntityWrapper<Order>().eq("order_no", param.getOrderNo())); |
| | | boolean orderNo1 = orderDetlService.delete(new EntityWrapper<OrderDetl>().eq("order_no", param.getOrderNo())); |
| | | |
| | | } |
| | | DocType docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.TRUE); |
| | | Date now = new Date(); |
| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getOrderDetails(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme()); |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme(), detail.getMark()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch()); |
| | | assert detlDto != null; |
| | |
| | | public List<LocDetlByTimeDTO> selectTimeLocDetl(TimeSelectParam param) { |
| | | ArrayList<LocDetlByTimeDTO> locDetlByTimeDTOS = new ArrayList<>(); |
| | | EntityWrapper<WrkMastLog> wrkMastLogEntityWrapper = new EntityWrapper<>(); |
| | | wrkMastLogEntityWrapper.ge("appe_time",param.getStartTime()); |
| | | wrkMastLogEntityWrapper.le("appe_time",param.getEndTime()); |
| | | wrkMastLogEntityWrapper.ge("modi_time",param.getStartTime()); |
| | | wrkMastLogEntityWrapper.le("modi_time",param.getEndTime()); |
| | | // wrkMastLogEntityWrapper.isNotNull("sheet_no"); |
| | | wrkMastLogService.selectList(wrkMastLogEntityWrapper).forEach(wrkMastLog -> { |
| | | List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectList(new EntityWrapper<WrkDetlLog>() |
| | | .eq("wrk_no", wrkMastLog.getWrkNo()).eq("zpallet", wrkMastLog.getBarcode())); |
| | | wrkDetlLogs.forEach(wrkDetlLog -> { |
| | | LocDetlByTimeDTO locDetlByTimeDTO = new LocDetlByTimeDTO(); |
| | | if (!Cools.isEmpty(wrkDetlLog.getOrderNo())){ |
| | | Order order = orderService.selectByNo(wrkDetlLog.getOrderNo()); |
| | | if (!Cools.isEmpty(order)) { |
| | | locDetlByTimeDTO.setDate(order.getOrderTime()); |
| | | locDetlByTimeDTO.setWarehouse(order.getItemName()); |
| | | locDetlByTimeDTO.setOrderType(order.getDocType().toString()); |
| | | if (wrkMastLog.getWrkSts() == 5 || wrkMastLog.getWrkSts() == 15) { |
| | | List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectList(new EntityWrapper<WrkDetlLog>() |
| | | .eq("wrk_no", wrkMastLog.getWrkNo()).eq("zpallet", wrkMastLog.getBarcode())); |
| | | wrkDetlLogs.forEach(wrkDetlLog -> { |
| | | LocDetlByTimeDTO locDetlByTimeDTO = new LocDetlByTimeDTO(); |
| | | if (!Cools.isEmpty(wrkDetlLog.getOrderNo())){ |
| | | Order order = orderService.selectByNo(wrkDetlLog.getOrderNo()); |
| | | if (!Cools.isEmpty(order)) { |
| | | locDetlByTimeDTO.setDate(order.getOrderTime()); |
| | | locDetlByTimeDTO.setWarehouse(order.getItemName()); |
| | | locDetlByTimeDTO.setOrderType(order.getDocType$()); |
| | | } |
| | | locDetlByTimeDTO.setMatnr(wrkDetlLog.getMatnr()); |
| | | locDetlByTimeDTO.setLocNo(wrkMastLog.getIoType() <100? wrkMastLog.getLocNo(): wrkMastLog.getSourceLocNo()); |
| | | locDetlByTimeDTO.setBatch(wrkDetlLog.getBatch()); |
| | | locDetlByTimeDTO.setAnfme(wrkDetlLog.getAnfme()); |
| | | locDetlByTimeDTO.setOrderNo(wrkDetlLog.getOrderNo()); |
| | | locDetlByTimeDTO.setMark(wrkDetlLog.getManu()); |
| | | locDetlByTimeDTO.setWorkNo(wrkDetlLog.getWrkNo().toString()); |
| | | locDetlByTimeDTOS.add(locDetlByTimeDTO); |
| | | } |
| | | locDetlByTimeDTO.setMatnr(wrkDetlLog.getMatnr()); |
| | | locDetlByTimeDTO.setLocNo(wrkMastLog.getIoType() <100? wrkMastLog.getLocNo(): wrkMastLog.getSourceLocNo()); |
| | | locDetlByTimeDTO.setBatch(wrkDetlLog.getBatch()); |
| | | locDetlByTimeDTO.setAnfme(wrkDetlLog.getAnfme()); |
| | | locDetlByTimeDTO.setOrderNo(wrkDetlLog.getOrderNo()); |
| | | locDetlByTimeDTO.setMark(wrkDetlLog.getManu()); |
| | | locDetlByTimeDTOS.add(locDetlByTimeDTO); |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | // if (!Cools.isEmpty(locDetls)) { |
| | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void syncTag(List<TagParam> param) { |
| | | |
| | | } |
| | | } |