From 760b4f0509bbdc0605ea51060f4b844b315b625f Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 06 五月 2025 15:45:42 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java |   24 ++++++++++++------------
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java        |    8 +++++---
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
index d0df993..44bba6e 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
@@ -447,7 +447,8 @@
      */
     @Override
     public R getDeltByCode(Map<String, Object> params) {
-        String code = params.get("code").toString();
+        Object code = params.get("code");
+        Object matnrCode = params.get("matnrCode");
         String batch = null;
         if (!Objects.isNull(params.get("batch"))) {
             batch = params.get("batch").toString();
@@ -455,10 +456,11 @@
         //TODO 鍚庣画闇�鏍规嵁绛栫暐閰嶇疆锛岃幏鍙栫粍鎷栨暟鎹�傚锛氭贩瑁咃紝鎸夋壒娆℃贩瑁呯瓑
         LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new QueryWrapper<WarehouseAreasItem>()
                 .select("SUM(anfme) as anfme, track_code, asn_code, id, splr_batch, ispt_result, plat_item_id, batch,unit, stock_unit,  qty, work_qty, matnr_code, matnr_id, maktx").lambda()
-                .eq(StringUtils.isNotBlank(code), WarehouseAreasItem::getTrackCode, code)
+                .eq(!Objects.isNull(code), WarehouseAreasItem::getTrackCode, code)
                 .eq(StringUtils.isNotBlank(batch), WarehouseAreasItem::getSplrBatch, batch)
+                .eq(!Objects.isNull(matnrCode), WarehouseAreasItem::getMatnrCode, matnrCode)
                 .groupBy(WarehouseAreasItem::getSplrBatch, WarehouseAreasItem::getAsnId, WarehouseAreasItem::getAreaId, WarehouseAreasItem::getMatnrId);
-        return R.ok(warehouseAreasItemService.getOne(queryWrapper, false));
+        return R.ok(warehouseAreasItemService.list(queryWrapper));
     }
 
     /**
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
index d236929..aa9d7f9 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
@@ -44,7 +44,7 @@
      * @param userId
      * @return
      * @author Ryan
-     * @description 缁勬嫋
+     * @description 缁勬墭
      * @time 2025/3/29 14:42
      */
     @Override
@@ -61,13 +61,13 @@
                 .notIn(WaitPakin::getIoStatus, asList)
                 .eq(WaitPakin::getBarcode, waitPakin.getBarcode()));
         if (!Objects.isNull(list)) {
-            throw new CoolException("鎷栫洏鐮侊細" + waitPakin.getBarcode() + "宸茶缁勬嫋鍗曪細" + list.getCode() + "浣跨敤锛侊紒");
+            throw new CoolException("鎵樼洏鐮侊細" + waitPakin.getBarcode() + "宸茶缁勬墭鍗曪細" + list.getCode() + "浣跨敤锛侊紒");
         }
         List<Loc> locs = locService.list(new LambdaQueryWrapper<Loc>().eq(Loc::getBarcode, waitPakin.getBarcode()));
         if (!locs.isEmpty()) {
             List<String> locCodes = locs.stream().map(Loc::getCode).collect(Collectors.toList());
             String join = StringUtils.join(locCodes, ",");
-            throw new CoolException("鎷栫洏鐮侊細" + waitPakin.getBarcode() + "宸茶搴撲綅锛�" + join + "浣跨敤锛侊紒");
+            throw new CoolException("鎵樼洏鐮侊細" + waitPakin.getBarcode() + "宸茶搴撲綅锛�" + join + "浣跨敤锛侊紒");
         }
         double sum = waitPakin.getItems().stream().mapToDouble(PakinItem::getReceiptQty).sum();
 
@@ -139,7 +139,7 @@
                 for (PakinItem waitPakinItem : waitPakin.getItems()) {
                     if (waitPakinItem.getTrackCode().equals(item.getTrackCode())) {
                         if (waitPakinItem.getReceiptQty() > item.getAnfme() || waitPakinItem.getReceiptQty().compareTo(0.0) >= 0) {
-                            throw new CoolException("缁勬嫋鏁伴噺涓嶈兘澶т簬鏀惰揣鏁伴噺锛侊紒");
+                            throw new CoolException("缁勬墭鏁伴噺涓嶈兘澶т簬鏀惰揣鏁伴噺锛侊紒");
                         }
                         pakinItem.setAnfme(waitPakinItem.getReceiptQty()).setTrackCode(waitPakinItem.getTrackCode());
                     }
@@ -182,7 +182,7 @@
                 for (PakinItem waitPakinItem : waitPakin.getItems()) {
                     if (waitPakinItem.getTrackCode().equals(item.getTrackCode())) {
                         if (waitPakinItem.getReceiptQty() > item.getAnfme() || waitPakinItem.getReceiptQty().compareTo(0.0) <= 0) {
-                            throw new CoolException("缁勬嫋鏁伴噺涓嶈兘澶т簬鏀惰揣鏁伴噺涓斾笉鑳藉皬浜庨浂锛侊紒");
+                            throw new CoolException("缁勬墭鏁伴噺涓嶈兘澶т簬鏀惰揣鏁伴噺涓斾笉鑳藉皬浜庨浂锛侊紒");
                         }
                         pakinItem.setAnfme(waitPakinItem.getReceiptQty()).setTrackCode(waitPakinItem.getTrackCode());
                     }
@@ -195,7 +195,7 @@
         double sum1 = items.stream().mapToDouble(WaitPakinItem::getAnfme).sum();
 
         if (!waitPakinItemService.saveBatch(items)) {
-            throw new CoolException("缁勬嫋鏄庣粏淇濆瓨澶辫触锛侊紒");
+            throw new CoolException("缁勬墭鏄庣粏淇濆瓨澶辫触锛侊紒");
         }
 
         for (WaitPakinItem pakinItem : items) {
@@ -218,17 +218,17 @@
 
         waitPakin1.setAnfme(sum1);
         if (!this.updateById(waitPakin1)) {
-            throw new CoolException("缁勬嫋鏁伴噺淇敼澶辫触锛侊紒");
+            throw new CoolException("缁勬墭鏁伴噺淇敼澶辫触锛侊紒");
         }
 
-        //TODO 缁勬嫋瀹屾垚鍚庯紝鎵e噺鏀惰揣鍖哄簱瀛�
+        //TODO 缁勬墭瀹屾垚鍚庯紝鎵e噺鏀惰揣鍖哄簱瀛�
 
         return pakin;
     }
 
     /**
      * @author Ryan
-     * @description 缁勬嫋瑙g粦
+     * @description 缁勬墭瑙g粦
      * @param
      * @return
      * @time 2025/3/29 14:42
@@ -240,7 +240,7 @@
         if (StringUtils.isNotBlank(barcode)) {
             WaitPakin waitPakins = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, barcode), false);
             if (Objects.isNull(waitPakins)) {
-                throw new CoolException("缁勬嫋涓嶅瓨鍦紒锛�");
+                throw new CoolException("缁勬墭涓嶅瓨鍦紒锛�");
             }
             List<PakinItem> paramItems = param.getItems();
             if (Objects.isNull(paramItems) || paramItems.isEmpty()) {
@@ -251,11 +251,11 @@
                     .eq(WaitPakinItem::getPakinId, waitPakins.getId())
                     .in(WaitPakinItem::getMatnrId, list));
             if (pakinItems.isEmpty()) {
-                throw new CoolException("鏁版嵁閿欒锛氱粍鎷栨槑缁嗕笉瀛樺湪锛侊紒");
+                throw new CoolException("鏁版嵁閿欒锛氱粍鎵樻槑缁嗕笉瀛樺湪锛侊紒");
             }
             List<Long> ids = pakinItems.stream().map(WaitPakinItem::getId).collect(Collectors.toList());
             if (!waitPakinItemService.removeByIds(ids)) {
-                throw new CoolException("缁勬嫋鏄庣粏瑙g粦澶辫触锛侊紒");
+                throw new CoolException("缁勬墭鏄庣粏瑙g粦澶辫触锛侊紒");
             }
             return waitPakins;
         }

--
Gitblit v1.9.1