From 825eecad93210119f76dda5348088a055107b721 Mon Sep 17 00:00:00 2001 From: zc <zc> Date: 星期二, 30 七月 2024 18:10:07 +0800 Subject: [PATCH] 订单只传递一种物料的时候,订单皆苦的批量出库查询接口数据返回不对 --- src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java index 574eb94..b31a9fc 100644 --- a/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.Cools; +import com.core.common.DateUtils; import com.zy.asrs.entity.WaitPakin; import com.zy.asrs.entity.WrkDetl; import com.zy.asrs.entity.WrkMast; @@ -14,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; +import java.util.Date; import java.util.Iterator; import java.util.List; @@ -42,19 +44,19 @@ @Transactional public ReturnT<String> start(WrkMast wrkMast) { try { + System.out.println(DateUtils.convert(new Date())); List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); -// // 淇敼璁㈠崟鐘舵�� 浣滀笟涓� ===>> 宸插畬鎴� -// if (!Cools.isEmpty(wrkDetls)) { -// Iterator<WrkDetl> iterator = wrkDetls.iterator(); -// while (iterator.hasNext()) { -// WrkDetl wrkDetl = iterator.next(); -// if (!Cools.isEmpty(wrkDetl.getOrderNo())) { -// orderService.checkComplete(wrkDetl.getOrderNo()); -// iterator.remove(); -// } -// } -// } -// + // 淇敼璁㈠崟鐘舵�� 浣滀笟涓� ===>> 宸插畬鎴� + if (!Cools.isEmpty(wrkDetls)) { + Iterator<WrkDetl> iterator = wrkDetls.iterator(); + while (iterator.hasNext()) { + WrkDetl wrkDetl = iterator.next(); + if (!Cools.isEmpty(wrkDetl.getOrderNo())) { + orderService.checkComplete(wrkDetl.getOrderNo()); + iterator.remove(); + } + } + } // 鍏ュ簱 -------------------------------------------------------------------------------- if (wrkMast.getWrkSts() == 5) { // 鍏ㄦ澘鍏ュ簱 @@ -84,16 +86,15 @@ // } // } } -// -// // 鍑哄簱 -------------------------------------------------------------------------------- -// } else if (wrkMast.getWrkSts() == 15) { + + // 鍑哄簱 -------------------------------------------------------------------------------- + } else if (wrkMast.getWrkSts() == 15) { // if (!Cools.isEmpty(wrkDetls)) { // if (!orderService.saveHandlerOrder(Boolean.FALSE, wrkMast, wrkDetls)) { // exceptionHandle("鐢熸垚鎵嬪姩鍑哄簱鍗曟嵁[workNo={0}]澶辫触", wrkMast.getWrkNo()); // } // } } - // 淇濆瓨宸ヤ綔涓绘。鍘嗗彶妗� if (!wrkMastLogService.save(wrkMast.getWrkNo())) { exceptionHandle("淇濆瓨宸ヤ綔鍘嗗彶妗workNo={0}]澶辫触", wrkMast.getWrkNo()); -- Gitblit v1.9.1