From 01f39fcb06b8713901975153d0a893e86eca6a88 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 07 七月 2025 19:42:26 +0800
Subject: [PATCH] 33.订单历史管理里面增加单据类型选项按钮、单据类型选项按钮 34.单据管理里面增加单据状态选项按钮 35.入库订单全部都入好了,单据状态还是作业中,现在作业中的单据是可以删除的,我不小心把这个单据删除了,怎么恢复? 36.每个界面点下一页都没反应,点第二页是有变化的,之后点任何页面都没反应 37.订单明细点开后的界面改大一点 38.新增出库订单的时候可以输入客户信息(客户名称、收件人、地址、电话等),现在拣货完成后连发给谁都不知道 39.大屏播种界面对应的数量和开单数量不一致

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java |   42 ++++++++++++++++++++++--------------------
 1 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java
index f5628e3..939b96d 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/services/Impl/WcsApiServiceImpl.java
@@ -84,7 +84,7 @@
         if (task == null) {
             return R.error("浠诲姟涓嶅瓨鍦紒锛�");
         }
-        log.info("瀹瑰櫒鍒拌揪鎺ユ敹锛屼换鍔″彿锛歿}锛屽綋鍓嶇姸鎬侊細{}锛屼笂鎶ョ姸鎬侊細{}",task.getTaskNo(),task.getTaskSts$(),TaskStsType.WCS_CONTAINER_RECEIVE.desc);
+        log.info("瀹瑰櫒鍒拌揪鎺ユ敹锛屼换鍔″彿锛歿}锛屽綋鍓嶇姸鎬侊細{}锛屼笂鎶ョ姸鎬侊細{}, 鎺ユ敹鍙傛暟锛歿}",task.getTaskNo(),task.getTaskSts$(),TaskStsType.WCS_CONTAINER_RECEIVE.desc, JSONObject.toJSONString(arrivedParam));
 
         taskType = task.getTaskType() > 100 ? "outStock":"inStock";
 
@@ -107,7 +107,8 @@
             if (task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_ARRIVED.id
             || task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_TASK_DONE.id ) {
                 // 鍒拌揪鎷i�変綅锛屾帶鍒舵挱绉嶅浜伅
-                    List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getBarcode, task.getBarcode()));
+                    List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
+                            .eq(CacheSite::getBarcode, task.getBarcode()));
                     if(cacheSites.size() == 0) {
                         log.error("鏉$爜锛歿}锛屾湭鎵惧埌鎾澧欎寒鐏�",task.getBarcode());
                         throw new CoolException("鏈壘鍒版挱绉嶅");
@@ -115,14 +116,15 @@
                     for (CacheSite cacheSite:cacheSites) {
                         // 鑾峰彇浠诲姟鏄庣粏鏁伴噺
                         List<TaskDetl> taskDetlByTaskId = taskDetlService.getTaskDetlByTaskId(task.getId());
-                        double sum = taskDetlByTaskId.stream().mapToDouble(TaskDetl::getAnfme).sum();
+                        int sum = (int)taskDetlByTaskId.stream().mapToDouble(TaskDetl::getAnfme).sum();
                         SlapLightControlParam slapLightControlParam = new SlapLightControlParam();
                         slapLightControlParam
                                 .setControllerCode(cacheSite.getMemo())
                                 .setTagCode(cacheSite.getSiteNo())
                                 .setColor("GREEN")
+                                .setIndex(cacheSite.getIndex())
                                 .setMode("LIGHT")
-                                .setDisplay(String.valueOf(sum));
+                                .setDisplay(sum + "");
                         // 鍙戣捣浜伅璇锋眰
                         log.info("浠诲姟{}鍒拌揪鎷i�変綅锛屾挱绉嶅浜伅涓嬪彂",task.getTaskNo(), JSONObject.toJSONString(slapLightControlParam));
                         CommonReponse response = HttpEssUtils.post("鍒拌揪鎷i�変綅锛屾挱绉嶅浜伅", HttpEssUtils.PLT_SEND_COMMAND, slapLightControlParam);
@@ -346,7 +348,7 @@
     public R slapLightLogic(Map<String, Object> request) {
         String taskNo = request.get("taskNo").toString();
         String orderNo = request.get("orderNo").toString();
-
+        String siteNo = Objects.isNull(request.get("siteNo")) ? null : request.get("siteNo").toString();
         List<CacheSite> performs = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getOrderNo, orderNo));
         if (Objects.isNull(performs.stream().findFirst().get().getPlatformId())) {
             throw new CoolException("璇锋墦鍗版槑缁嗭紝骞剁粦瀹氱洰鏍囬泦璐у尯");
@@ -375,21 +377,21 @@
 //            }).collect(Collectors.toList());
 
             //鍒ゆ柇鏁伴噺鏄惁涓庤鍗曟槑缁嗙殑闇�姹傞噺鐩稿悓锛岀浉鍚屽垯璁㈠崟瀹屾垚
-            if (one.getPickStatus() == OrderPickStatus.ORDER_PICK_STATUS_DONE.val) {
-                //鎾瀹屾垚锛岄噴鏀剧粦瀹氱珯鐐�
-                List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getOrderNo, orderNo));
-                for (CacheSite cacheSite : cacheSites) {
-                    if (!cacheSite.getSiteStatus().equals(CacheSiteStatusType.O.id)) {
-                        cacheSite.setSiteStatus(CacheSiteStatusType.O.id);
-                        cacheSite.setOrderId(null);
-                        cacheSite.setBarcode(null);
-                        cacheSite.setOrderNo(null);
-                        cacheSite.setPlatformId(null);
-                        cacheSite.setPlatformNo(null);
-                        cacheSite.setUpdateTime(new Date());
-                        if (!cacheSiteService.updateById(cacheSite)) {
-                            throw new CoolException("鎾绔欑偣鏇存柊澶辫触");
-                        }
+            //鎾瀹屾垚锛岄噴鏀剧粦瀹氱珯鐐�
+            List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
+                    .eq(!Objects.isNull(siteNo), CacheSite::getSiteNo, siteNo)
+                    .eq(CacheSite::getOrderNo, orderNo));
+            for (CacheSite cacheSite : cacheSites) {
+                if (!cacheSite.getSiteStatus().equals(CacheSiteStatusType.O.id)) {
+                    cacheSite.setSiteStatus(CacheSiteStatusType.O.id);
+                    cacheSite.setOrderId(null);
+                    cacheSite.setBarcode(null);
+                    cacheSite.setOrderNo(null);
+                    cacheSite.setPlatformId(null);
+                    cacheSite.setPlatformNo(null);
+                    cacheSite.setUpdateTime(new Date());
+                    if (!cacheSiteService.updateById(cacheSite)) {
+                        throw new CoolException("鎾绔欑偣鏇存柊澶辫触");
                     }
                 }
             }

--
Gitblit v1.9.1