From 3501e5999d41943149974383129f899479d0b3d2 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 29 一月 2026 19:46:08 +0800
Subject: [PATCH] #质检

---
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOtherServiceImpl.java  |   91 +++++++++++++++++++++++++++++
 rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/PdaOtherController.java |   29 +++++++--
 rsf-server/src/main/java/com/vincent/rsf/server/api/entity/params/PdaGeneralParam.java     |    7 ++
 rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/LocStatusType.java           |   30 ++++++++++
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/PdaOtherService.java           |    7 ++
 5 files changed, 155 insertions(+), 9 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/PdaOtherController.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/PdaOtherController.java
index b713eaf..2f27222 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/PdaOtherController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/PdaOtherController.java
@@ -1,18 +1,13 @@
 package com.vincent.rsf.server.api.controller.pda;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.vincent.rsf.framework.common.Cools;
 import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.server.api.entity.params.PdaGeneralParam;
 import com.vincent.rsf.server.api.service.PdaOtherService;
 import com.vincent.rsf.server.manager.entity.WkOrder;
-import com.vincent.rsf.server.manager.enums.OrderType;
 import com.vincent.rsf.server.system.controller.BaseController;
 import io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @Api(tags = "PDA缁煎悎鎿嶄綔鎺ュ彛")
 @RequestMapping("/pda")
@@ -30,4 +25,24 @@
 
         return pdaOtherService.transferPage(orderNo,curr,limit);
     }
+
+
+    @PostMapping(value = "/other/inspectList")
+    public R inspectList(@RequestBody PdaGeneralParam generalParam) {
+
+        return pdaOtherService.inspectList(generalParam);
+    }
+
+    @PostMapping(value = "/other/inspectConfirm")
+    public R inspectConfirm(@RequestBody PdaGeneralParam generalParam) {
+
+        return pdaOtherService.inspectConfirm(generalParam);
+    }
+
+    @PostMapping(value = "/other/inspectConfirm2")
+    public R inspectConfirm2(@RequestBody PdaGeneralParam generalParam) {
+
+        return pdaOtherService.inspectConfirm2(generalParam);
+    }
+
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/entity/params/PdaGeneralParam.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/entity/params/PdaGeneralParam.java
index 0ad33e4..b8218ff 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/entity/params/PdaGeneralParam.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/entity/params/PdaGeneralParam.java
@@ -1,7 +1,10 @@
 package com.vincent.rsf.server.api.entity.params;
 
+import com.vincent.rsf.server.manager.entity.LocItem;
 import lombok.Data;
 import lombok.experimental.Accessors;
+
+import java.util.List;
 
 @Data
 @Accessors(chain = true)
@@ -11,5 +14,9 @@
     private String containerNo;
     // 鎺ラ┏绔欏彿
     private String transferStationNo;
+    //鐗╂枡鍙�
+    private String matnrCode;
+
+    private List<LocItem> matnrList;
 
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/PdaOtherService.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/PdaOtherService.java
index 4d3b7d3..6ef1ad9 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/PdaOtherService.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/PdaOtherService.java
@@ -1,7 +1,14 @@
 package com.vincent.rsf.server.api.service;
 
 import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.server.api.entity.params.PdaGeneralParam;
 
 public interface PdaOtherService {
     R transferPage(String orderNo, Integer curr, Integer limit);
+
+    R inspectList(PdaGeneralParam generalParam);
+
+    R inspectConfirm(PdaGeneralParam generalParam);
+
+    R inspectConfirm2(PdaGeneralParam generalParam);
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOtherServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOtherServiceImpl.java
index 5794a96..9fc64ad 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOtherServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOtherServiceImpl.java
@@ -4,19 +4,32 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.vincent.rsf.framework.common.Cools;
 import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.framework.exception.CoolException;
+import com.vincent.rsf.server.api.entity.params.PdaGeneralParam;
 import com.vincent.rsf.server.api.service.PdaOtherService;
+import com.vincent.rsf.server.manager.entity.Loc;
+import com.vincent.rsf.server.manager.entity.LocItem;
 import com.vincent.rsf.server.manager.entity.Transfer;
-import com.vincent.rsf.server.manager.entity.WkOrder;
-import com.vincent.rsf.server.manager.enums.OrderType;
+import com.vincent.rsf.server.manager.enums.LocStatusType;
+import com.vincent.rsf.server.manager.enums.LocStsType;
+import com.vincent.rsf.server.manager.service.LocItemService;
+import com.vincent.rsf.server.manager.service.LocService;
 import com.vincent.rsf.server.manager.service.TransferService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 @Service
 public class PdaOtherServiceImpl implements PdaOtherService {
 
     @Autowired
     private TransferService transferService;
+
+    @Autowired
+    private LocService locService;
+    @Autowired
+    private LocItemService locItemService;
 
     @Override
     public R transferPage(String orderNo, Integer curr, Integer limit) {
@@ -26,4 +39,78 @@
         Page<Transfer> page1 = transferService.page(page, transferLambdaQueryWrapper);
         return R.ok(page1);
     }
+
+    @Override
+    public R inspectList(PdaGeneralParam generalParam) {
+       if (Cools.isEmpty(generalParam.getContainerNo())) {
+           throw new CoolException("瀹瑰櫒鐮佷负绌�");
+       }
+       Loc loc = null;
+       try {
+           loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getBarcode, generalParam.getContainerNo()));
+       }catch (Exception e){
+           throw new CoolException("鏁版嵁閿欒,鏌ヨ鍒板鏉″簱浣�");
+       }
+       if (Cools.isEmpty(loc)) {
+           throw new CoolException("鏈壘鍒板搴旂殑搴撲綅");
+       }
+       if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_F.type)){
+           throw new CoolException("搴撲綅涓嶄负鍦ㄥ簱鐘舵��");
+       }
+        List<LocItem> list = locItemService.list(new LambdaQueryWrapper<LocItem>()
+                .eq(LocItem::getLocId, loc.getId())
+                .eq(!Cools.isEmpty(generalParam.getMatnrCode()),LocItem::getMatnrCode, generalParam.getMatnrCode())
+        );
+       if (Cools.isEmpty(list)) {
+           throw new CoolException("搴撲綅涓哄湪搴撶姸鎬�,浣嗗簱浣嶄负绌�");
+       }
+       return R.ok(list);
+
+    }
+
+    @Override
+    public R inspectConfirm(PdaGeneralParam generalParam) {
+        if (Cools.isEmpty(generalParam.getMatnrList())){
+            throw new CoolException("鍙傛暟涓虹┖");
+        }
+        for (LocItem locItem : generalParam.getMatnrList()) {
+            LocItem locItem1 = locItemService.getById(locItem.getId());
+            if (Cools.isEmpty(locItem1)) {
+                throw new CoolException("鏁版嵁閿欒");
+            }
+            if (locItem1.getStatus().equals(LocStatusType.FREEZE.type)){
+                continue;
+            }
+            if (locItem.getStatus().equals(LocStatusType.FREEZE.type)){
+                locItem1.setStatus(LocStatusType.FREEZE.type);
+                locItemService.updateById(locItem1);
+            }
+
+
+        }
+        return R.ok();
+    }
+
+    @Override
+    public R inspectConfirm2(PdaGeneralParam generalParam) {
+        if (Cools.isEmpty(generalParam.getMatnrList())){
+            throw new CoolException("鍙傛暟涓虹┖");
+        }
+        for (LocItem locItem : generalParam.getMatnrList()) {
+            LocItem locItem1 = locItemService.getById(locItem.getId());
+            if (Cools.isEmpty(locItem1)) {
+                throw new CoolException("鏁版嵁閿欒");
+            }
+            if (locItem1.getStatus().equals(LocStatusType.NORMAL.type)){
+                continue;
+            }
+            if (locItem.getStatus().equals(LocStatusType.NORMAL.type)){
+                locItem1.setStatus(LocStatusType.NORMAL.type);
+                locItemService.updateById(locItem1);
+            }
+
+
+        }
+        return R.ok();
+    }
 }
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/LocStatusType.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/LocStatusType.java
new file mode 100644
index 0000000..a2774d5
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/LocStatusType.java
@@ -0,0 +1,30 @@
+package com.vincent.rsf.server.manager.enums;
+
+public enum LocStatusType {
+
+    //绌烘澘
+    NORMAL(1, "姝e父"),
+    FREEZE(0,"鍐荤粨"),
+    ;
+
+    public Integer type;
+
+    public String desc;
+
+    LocStatusType(Integer type, String desc) {
+        this.type = type;
+        this.desc = desc;
+    }
+
+
+    public static LocStatusType get(String el) {
+        for (LocStatusType value : LocStatusType.values()) {
+            if (el.equals(value.toString())) {
+                return value;
+            }
+        }
+        return null;
+    }
+
+
+}

--
Gitblit v1.9.1