From 78474bd1c29790ef08919e141acfa12157dbb6cf Mon Sep 17 00:00:00 2001 From: zhangc <zc@123> Date: 星期三, 08 一月 2025 15:49:53 +0800 Subject: [PATCH] 优化异常信息及版本更新 --- src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java index d66fbfc..804514b 100644 --- a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java @@ -46,7 +46,7 @@ private AgvWrkDetlLogService agvWrkDetlLogService; @Autowired - private AgvWrkMastService agvWrkMastService; + private AgvWrkMastLogService agvWrkMastLogService; @Autowired private AgvLocMastService agvLocMastService; @@ -65,7 +65,7 @@ @Transactional public ReturnT<String> start(Order order) { - List<String> docNames = new ArrayList<>(Arrays.asList("閾跺骇閲囪喘鍏ュ簱鍗�", "閾跺骇濮斿鏉愭枡鍑哄簱鍗�", "閾跺骇鐢熶骇鏉愭枡鍑哄簱鍗�")); + List<String> docNames = new ArrayList<>(Arrays.asList("閾跺骇閲囪喘鍏ュ簱鍗�")); DocType docType = docTypeService.selectById(order.getDocType()); if (!docNames.contains(docType.getDocName())) { @@ -96,11 +96,11 @@ return; } - List<String> docNames = new ArrayList<>(Arrays.asList("閾跺骇閲囪喘鍏ュ簱鍗�")); + //List<String> docNames = new ArrayList<>(Arrays.asList("閾跺骇閲囪喘鍏ュ簱鍗�")); //List<String> docNames = new ArrayList<>(Arrays.asList("閾跺骇閲囪喘鍏ュ簱鍗�", "閾跺骇濮斿鏉愭枡鍑哄簱鍗�", "閾跺骇鐢熶骇鏉愭枡鍑哄簱鍗�")); - DocType docType = docTypeService.selectById(order.getDocType()); - if (docNames.contains(docType.getDocName())) { + + //if (docNames.contains(docType.getDocName())) { List<OrderDetl> orderDetlList = orderDetlService.selectByOrderId(order.getId()); List<OrderDetl> report = new ArrayList<>(); for (OrderDetl orderDetl : orderDetlList) { @@ -109,12 +109,14 @@ } } if (Cools.isEmpty(order.getPltType())) { - List<AgvWrkDetlLog> agvWrkDetlLogs = agvWrkDetlLogService.selectList(new EntityWrapper<AgvWrkDetlLog>().eq("order_no", order.getOrderNo()).eq("io_type", 1)); + List<AgvWrkDetlLog> agvWrkDetlLogs = agvWrkDetlLogService.selectList(new EntityWrapper<AgvWrkDetlLog>().eq("order_no", order.getOrderNo()).orderBy("appe_time", false)); if (!Cools.isEmpty(agvWrkDetlLogs)) { - AgvWrkMast agvWrkMast = agvWrkMastService.selectById(agvWrkDetlLogs.get(0).getWrkNo()); - if (agvWrkMast != null) { - AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getLocNo()); + AgvWrkDetlLog agvWrkDetlLog = agvWrkDetlLogs.get(0); + List<AgvWrkMastLog> agvWrkMastLogs = agvWrkMastLogService.selectList(new EntityWrapper<AgvWrkMastLog>().eq("wrk_no", agvWrkDetlLog.getWrkNo()).eq("io_type", 1).orderBy("appe_time", false)); + if (!Cools.isEmpty(agvWrkMastLogs)) { + AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMastLogs.get(0).getLocNo()); if (agvLocMast != null) { + log.info("琛ュ厖閫昏緫鐢熸晥锛歿}", order.getOrderNo()); order.setPltType(agvLocMast.getPltType()); } } @@ -143,7 +145,7 @@ orderDetlService.updateById(orderDetl); } } - } + // } } } -- Gitblit v1.9.1