Sfoglia il codice sorgente

选矿项目 -- 初始化

k 2 anni fa
parent
commit
8cdf645e5a
28 ha cambiato i file con 132 aggiunte e 501 eliminazioni
  1. 0 66
      ruoyi-admin/src/main/java/com/ruoyi/init/StartService.java
  2. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/AutoDoorTestController.java
  3. 1 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/ButtonBoxTestController.java
  4. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/ChargingMachineTestController.java
  5. 0 53
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/RfidReaderTestController.java
  6. 20 15
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/XuanKuangApiController.java
  7. 13 0
      ruoyi-admin/src/main/java/com/ruoyi/xuankuang/controller/test/XuanKuangTestApiController.java
  8. 8 42
      ruoyi-admin/src/main/resources/application-dev.yml
  9. 12 44
      ruoyi-admin/src/main/resources/application-prod.yml
  10. 4 4
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/service/ChargerButtService.java
  11. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/service/impl/StatusUpdateServiceImpl.java
  12. 2 2
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask.java
  13. 0 124
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoRfidReaderTask.java
  14. 1 3
      warewms-ams/src/main/java/com/ruoyi/ams/task/service/impl/WcsTaskServiceImpl.java
  15. 4 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/CallbackTask.java
  16. 4 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/EmptyPalletLocRequest.java
  17. 4 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/ErrorStatusResponse.java
  18. 4 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/LineOpenNotification.java
  19. 4 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/OutboundRequest.java
  20. 4 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/StackingCompletion.java
  21. 4 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/TaskStatusResponse.java
  22. 25 0
      warewms-ams/src/main/java/com/ruoyi/ams/xuankuang/service/WmsDocAsnSubService.java
  23. 0 5
      warewms-hard/pom.xml
  24. 2 2
      warewms-hard/src/main/java/com/ruoyi/hard/modbus/tcp/AutoDoorClient.java
  25. 2 2
      warewms-hard/src/main/java/com/ruoyi/hard/modbus/tcp/ButtonBoxClient.java
  26. 2 2
      warewms-hard/src/main/java/com/ruoyi/hard/modbus/tcp/ChargingMachineClient.java
  27. 0 104
      warewms-hard/src/main/java/com/ruoyi/hard/rfid/RFIDReaderClient.java
  28. 9 0
      warewms-hard/src/main/java/com/ruoyi/hard/xuankang/PorjectClient.java

+ 0 - 66
ruoyi-admin/src/main/java/com/ruoyi/init/StartService.java

@@ -31,8 +31,6 @@ public class StartService implements CommandLineRunner {
     @Autowired
     private AutoTranSitTask autoTranSitTask;
     @Autowired
-    private AutoRfidReaderTask autoRfidReaderTask;
-    @Autowired
     private AutoButtonBoxTask autoButtonBoxTask;
     @Autowired
     private IBaseLocationInfoService baseLocationInfoService;
@@ -51,68 +49,4 @@ public class StartService implements CommandLineRunner {
             thread.start();
         }
     }
-
-
-    /**
-     * 自动接驳位任务
-     * 1.扫描有货的接驳位,如果标记是ASN则进行自动入库
-     * 2.扫描有货的接驳位,如果标记是SO则进行自动出库
-     */
-    public void autoTranSitTask() {
-        autoTranSitTask.run();
-    }
-
-    /**
-     * 自动RFID读取任务(墙外)
-     * 1.带有标签的人工叉车靠近RFID阅读器,开启自动门
-     * 2.带有标签的人工叉车离开RFID阅读器,关闭自动门
-     */
-    public void autoRfidReaderTask() {
-        autoRfidReaderTask.run();
-    }
-
-    /**
-     * 自动RFID读取任务(室内)
-     */
-    public void autoRfidReaderTask01() {
-        autoRfidReaderTask.run01();
-    }
-
-    /**
-     * 自动按钮盒监控任务
-     * 1.人工卸完货之后按下冲边按钮,触发冲边搬运任务
-     * 2.人工卸完货之后按下硫化按钮,触发硫化搬运任务
-     */
-    public void autoButtonBoxTask() {
-        autoButtonBoxTask.run();
-    }
-
-    /**
-     * 空托盘入库测试
-     *
-     * @param locationFrom
-     */
-    public void emptyPalletStorage(String locationFrom) {
-        // 验证起始点是否空闲
-        Boolean isIdle = baseLocationInfoService.verifyLocationIsIdle(locationFrom,Constant.WAREHOUSE_ID);
-        if (!isIdle) {
-            return;
-        }
-        // 下发任务
-        AgvCallDTO agvCallDTO = new AgvCallDTO();
-        agvCallDTO.setWarehouseId(Constant.WAREHOUSE_ID);
-        agvCallDTO.setLocationFrom(locationFrom);
-        List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
-        AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
-        agvCallItemDTO.setSku("EMPTY_TRAY");
-        agvCallItemDTO.setQty(1d);
-        agvCallItemDTO.setWeight(1d);
-        LotattDTO lotattDTO = new LotattDTO();
-        lotattDTO.setLotatt01("EMPTY_TRAY");
-        lotattDTO.setLotatt05("90");
-        agvCallItemDTO.setLotattDTO(lotattDTO);
-        agvCallItemDTOList.add(agvCallItemDTO);
-        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
-        businessService.agvCall(Constant.IN_TRAN_FLOW_ID, agvCallDTO);
-    }
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/AutoDoorTestController.java

@@ -1,7 +1,7 @@
 package com.ruoyi.web.controller.warewms.test;
 
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.hard.modbus.tcp.AutoDoorClient;
+import com.ruoyi.hard.demo.AutoDoorClient;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/ButtonBoxTestController.java

@@ -1,10 +1,9 @@
 package com.ruoyi.web.controller.warewms.test;
 
-import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
+import com.ruoyi.hard.demo.ButtonBoxClient;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/ChargingMachineTestController.java

@@ -3,7 +3,7 @@ package com.ruoyi.web.controller.warewms.test;
 import cn.hutool.json.JSONUtil;
 import com.jwk.spring.boot.autoconfigure.ModbusTcpMasterTemplate;
 import com.jwk.spring.boot.modbus4j.ModbusMasterUtil;
-import com.ruoyi.hard.modbus.tcp.ChargingMachineClient;
+import com.ruoyi.hard.demo.ChargingMachineClient;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;

+ 0 - 53
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/test/RfidReaderTestController.java

@@ -1,53 +0,0 @@
-package com.ruoyi.web.controller.warewms.test;
-
-import com.ruoyi.hard.rfid.RFIDReaderClient;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * @author JWK
- * @version 1.0
- * @date 2022/11/14 14:52
- */
-@Api("Rfid测试")
-@RestController
-@RequestMapping("/api/rfid")
-public class RfidReaderTestController {
-
-
-    @Autowired(required = false)
-    private RFIDReaderClient rfidReaderClient;
-
-    /**
-     * 读取标签-读一次
-     *
-     * @param con true 墙外 | false 室内
-     */
-    @ApiOperation("读取标签")
-    @PostMapping("/readTags")
-    public List<String> readTags(boolean con) {
-        return con ? rfidReaderClient.readTagsOut() : rfidReaderClient.readTagsIn();
-    }
-
-    /**
-     * 读取标签-循环读
-     *
-     * @param con true 墙外 | false 室内
-     */
-    @ApiOperation("读取标签-循环读")
-    @PostMapping("/readTagsTest")
-    public void readTagsTest(boolean con) {
-        if (con) {
-            rfidReaderClient.readTagsOut();
-        } else {
-            rfidReaderClient.readTagsIn();
-        }
-    }
-
-}

+ 20 - 15
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/XuanKuangApiController.java

@@ -1,7 +1,7 @@
-package com.ruoyi.web.controller.warewms.api;
+package com.ruoyi.xuankuang.controller;
 
+import com.ruoyi.ams.xuankuang.domain.form.*;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.web.controller.warewms.api.dto.*;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -23,74 +23,79 @@ public class XuanKuangApiController {
      */
     @ApiOperation("组盘上报")
     @PostMapping("/stackingCompletion")
-    public AjaxResult stackingCompletion(@RequestBody StackingCompletion stackingCompletion) {
+    public AjaxResult stackingCompletion(@RequestBody StackingCompletionForm stackingCompletion) {
         return AjaxResult.success("仓位获取成功");
     }
 
     /**
      * 用于WCS任务完成时回调的接口,通知WMS对应任务完成
      *
-     * @param taskStatusResponse
+     * @param taskStatusForm
      * @return
      */
     @ApiOperation("任务状态反馈")
     @PostMapping("/taskStatusResponse")
-    public AjaxResult taskStatusResponse(@RequestBody TaskStatusResponse taskStatusResponse) {
+    public AjaxResult taskStatusResponse(@RequestBody TaskStatusForm taskStatusForm) {
         return AjaxResult.success("");
     }
 
     /**
      * 用于通知WMS开启破袋机输送线的接口
-     * @param lineOpenNotification
+     *
+     * @param lineOpenNotificationForm
      * @return
      */
     @ApiOperation("破袋机开启通知")
     @PostMapping("/lineOpenNotification")
-    public AjaxResult lineOpenNotification(@RequestBody LineOpenNotification lineOpenNotification) {
+    public AjaxResult lineOpenNotification(@RequestBody LineOpenNotificationForm lineOpenNotificationForm) {
         return AjaxResult.success("");
     }
 
     /**
      * 空托出入库请求仓位接口
-     * @param emptyPalletLocRequest
+     *
+     * @param emptyPalletLocForm
      * @return
      */
     @ApiOperation("空托仓位请求")
     @PostMapping("/emptyPalletLocRequest")
-    public AjaxResult emptyPalletLocRequest(@RequestBody EmptyPalletLocRequest emptyPalletLocRequest) {
+    public AjaxResult emptyPalletLocRequest(@RequestBody EmptyPalletLocForm emptyPalletLocForm) {
         return AjaxResult.success("仓位获取成功");
     }
 
     /**
      * WCS无托盘等异常状况上报接口
-     * @param errorStatusResponse
+     *
+     * @param errorStatusForm
      * @return
      */
     @ApiOperation("异常上报接口")
     @PostMapping("/errorStatusResponse")
-    public AjaxResult errorStatusResponse(@RequestBody ErrorStatusResponse errorStatusResponse) {
+    public AjaxResult errorStatusResponse(@RequestBody ErrorStatusForm errorStatusForm) {
         return AjaxResult.success("");
     }
 
     /**
      * WCS回调AGV安全交握申请结果
-     * @param callbackTask
+     *
+     * @param callbackTaskFrom
      * @return
      */
     @ApiOperation("WCS安全交握AGV")
     @PostMapping("/callback/task")
-    public AjaxResult callbackTask(@RequestBody CallbackTask callbackTask) {
+    public AjaxResult callbackTask(@RequestBody CallbackTaskFrom callbackTaskFrom) {
         return AjaxResult.success("");
     }
 
     /**
      * 当 WCS中存在出库任务时,调用AGV生成搬运任务
-     * @param outboundRequest
+     *
+     * @param outboundForm
      * @return
      */
     @ApiOperation("WCS出库任务下发AGV")
     @PostMapping("/outboundRequest")
-    public AjaxResult outboundRequest(@RequestBody OutboundRequest outboundRequest) {
+    public AjaxResult outboundRequest(@RequestBody OutboundForm outboundForm) {
         return AjaxResult.success("任务创建成功");
     }
 

+ 13 - 0
ruoyi-admin/src/main/java/com/ruoyi/xuankuang/controller/test/XuanKuangTestApiController.java

@@ -0,0 +1,13 @@
+package com.ruoyi.xuankuang.controller.test;
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api("Wcs接口测试")
+@RestController
+@RequestMapping("/test/wcs")
+public class XuanKuangTestApiController {
+
+
+}

+ 8 - 42
ruoyi-admin/src/main/resources/application-dev.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://47.100.220.92:3306/wareams-xuankuang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
+                url: jdbc:mysql://47.100.220.92:3306/warewms-xuankuang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
                 username: warewms
                 password: warewms123
             # 从库数据源
@@ -67,49 +67,15 @@ init-task:
     autosend: false # 自动下发任务
     aciservice: false # ndc通讯
 
+# modbus-tcp
 modbus:
     tcp-master:
-        first: # 自动门(靠马路)
+        first:
             open: false
-            host: 192.168.42.201
-            port: 9000
-        second: # 自动门(靠里面)
+            host: localhost
+            port: 8080
+        second:
             open: false
-            host: 192.168.42.202
-            port: 9000
-        sixth: # 自动门(靠马路-第二层)
-            open: false
-            host: 192.168.42.210
-            port: 9000
-        seventh: # 卷帘门
-            open: false
-            host: 192.168.42.211
-            port: 9000
-        third: # 按钮盒
-            open: false
-            host: 192.168.42.205
-            port: 9000
-        fourth: # 充电机(三向车)
-            open: false
-            host: 192.168.42.208
-            port: 8899
-        fifth: # 充电机(迷你堆垛)
-            open: false
-            host: 192.168.42.209
-            port: 8899
-
-# 注意:这玩意只能跑在window上
-rfid:
-  first:
-      open: false
-      host: 169.168.42.203
-      port: 5084
-      number-of-tags: 3 # 一次读取标签的数量
-      timeout-milliseconds: 5000
-  second: # 靠里面
-      open: false
-      host: 192.168.42.204
-      port: 5084
-      number-of-tags: 3 # 一次读取标签的数量
-      timeout-milliseconds: 5000
+            host: localhost
+            port: 8080
 

+ 12 - 44
ruoyi-admin/src/main/resources/application-prod.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://localhost:3306/warewms-hualan?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
+                url: jdbc:mysql://localhost:3306/warewms-xuankuang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
                 username: warewms
                 password: warewms123
             # 从库数据源
@@ -67,49 +67,17 @@ init-task:
     autosend: true # 自动下发任务
     aciservice: true # ndc通讯
 
-modbus:
-    tcp-master:
-        first: # 自动门(靠马路)
-            open: true
-            host: 192.168.42.201
-            port: 9000
-        second: # 自动门(靠里面)
-            open: true
-            host: 192.168.42.202
-            port: 9000
-        sixth: # 自动门(靠马路-第二层)
-            open: true
-            host: 192.168.42.210
-            port: 9000
-        seventh: # 卷帘门
-            open: true
-            host: 192.168.42.211
-            port: 9000
-        third: # 按钮盒
-            open: true
-            host: 192.168.42.205
-            port: 9000
-        fourth: # 充电机(三向车)
-            open: true
-            host: 192.168.42.208
-            port: 8899
-        fifth: # 充电机(迷你堆垛)
-            open: true
-            host: 192.168.42.209
-            port: 8899
+# modbus-tcp
+#modbus:
+#    tcp-master:
+#        first:
+#            open: true
+#            host: 192.168.42.201
+#            port: 9000
+#        second:
+#            open: true
+#            host: 192.168.42.202
+#            port: 9000
 
 
-rfid:
-    first: # 靠马路
-        open: true
-        host: 192.168.42.203
-        port: 5084
-        number-of-tags: 3 # 一次读取标签的数量
-        timeout-milliseconds: 5000
-    second: # 靠里面
-        open: true
-        host: 192.168.42.204
-        port: 5084
-        number-of-tags: 3 # 一次读取标签的数量
-        timeout-milliseconds: 5000
 

+ 4 - 4
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/service/ChargerButtService.java

@@ -7,7 +7,7 @@ import com.ruoyi.ams.task.domain.WcsTask;
 import com.ruoyi.ams.task.service.IWcsTaskService;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.hard.modbus.tcp.ChargingMachineClient;
+import com.ruoyi.hard.demo.ChargingMachineClient;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -23,8 +23,8 @@ import java.util.stream.Stream;
 
 import static com.ruoyi.ams.agv.ndc.service.ChargerButtService.CHARGER_ASSEMBLY_STATUS.*;
 import static com.ruoyi.ams.agv.ndc.service.FeedbackTS.FEEDBACK_TS_STATUS.*;
-import static com.ruoyi.hard.modbus.tcp.ChargingMachineClient.CHARGER_ADDRESS_MEANING.*;
-import static com.ruoyi.hard.modbus.tcp.ChargingMachineClient.CHARGER_STATUS.*;
+import static com.ruoyi.hard.demo.ChargingMachineClient.CHARGER_ADDRESS_MEANING.*;
+import static com.ruoyi.hard.demo.ChargingMachineClient.CHARGER_STATUS.*;
 
 /**
  * 充电机对接
@@ -351,7 +351,7 @@ public class ChargerButtService {
      * 充电机操作
      *
      * @return
-     * @see com.ruoyi.hard.modbus.tcp.ChargingMachineClient.CHARGER_ADDRESS_MEANING
+     * @see ChargingMachineClient.CHARGER_ADDRESS_MEANING
      */
     private boolean operation(ChargingMachineClient.CHARGER_ADDRESS_MEANING op, boolean xx) {
         boolean con = false;

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/service/impl/StatusUpdateServiceImpl.java

@@ -9,7 +9,7 @@ import com.ruoyi.ams.business.IBusinessService;
 import com.ruoyi.ams.task.service.IWcsTaskService;
 import com.ruoyi.base.constant.Constant;
 import com.ruoyi.common.utils.uuid.SnowflakeIdWorker;
-import com.ruoyi.hard.modbus.tcp.AutoDoorClient;
+import com.ruoyi.hard.demo.AutoDoorClient;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;

+ 2 - 2
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask.java

@@ -6,8 +6,8 @@ import com.ruoyi.ams.config.domain.dto.AgvCallItemDTO;
 import com.ruoyi.ams.config.domain.dto.LotattDTO;
 import com.ruoyi.base.constant.Constant;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.hard.modbus.tcp.AutoDoorClient;
-import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
+import com.ruoyi.hard.demo.AutoDoorClient;
+import com.ruoyi.hard.demo.ButtonBoxClient;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;

+ 0 - 124
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoRfidReaderTask.java

@@ -1,124 +0,0 @@
-package com.ruoyi.ams.agv.ndc.thread;
-
-import com.ruoyi.hard.modbus.tcp.AutoDoorClient;
-import com.ruoyi.hard.rfid.RFIDReaderClient;
-import com.ruoyi.system.service.ISysConfigService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Slf4j
-@Service
-public class AutoRfidReaderTask {
-
-    @Autowired(required = false)
-    private RFIDReaderClient rfidReaderClient;
-    @Autowired(required = false)
-    private AutoDoorClient autoDoorClient;
-    @Autowired
-    private ISysConfigService iSysConfigService;
-
-    /**
-     * redis-key(RFID标签ID,墙外)
-     */
-    public static final String REDIS_KEY_RFID_TAGID_OUT = "sys.rfid.tag.out";
-    /**
-     * redis-key(RFID标签ID,室内)
-     */
-    public static final String REDIS_KEY_RFID_TAGID_IN = "sys.rfid.tag.in";
-
-    /**
-     * 关门次数,每次关门会累加一次,但是开门会初始化为0
-     */
-    private int closeOutDoorNum = 10;
-    private int closeInDoorNum = 10;
-
-    /**
-     * 关门上限,因为大部分时间都是读不到标签的 所以关门的指令不能一直重复下发
-     */
-    private int closeDoorMax = 10;
-
-    /**
-     * RFID读取任务(墙外)
-     */
-    public void run() {
-        String tagId = iSysConfigService.selectConfigByKey(REDIS_KEY_RFID_TAGID_OUT);
-        String[] tagIds = tagId.split(",");
-        List<String> tagList = rfidReaderClient.readTagsOut();
-        execute(tagIds, tagList, AutoDoorClient.AUTO_DOOR_NO.A, true);
-    }
-
-
-    /**
-     * RFID读取任务(室内)
-     */
-    public void run01() {
-        String tagId = iSysConfigService.selectConfigByKey(REDIS_KEY_RFID_TAGID_IN);
-        String[] tagIds = tagId.split(",");
-        List<String> tagList = rfidReaderClient.readTagsIn();
-        execute(tagIds, tagList, AutoDoorClient.AUTO_DOOR_NO.B, false);
-    }
-
-    /**
-     * 执行任务
-     *
-     * @param tagIds     需要校验的标签ID
-     * @param tagList   RFID读取到的tagId
-     * @param doorNo    门编号
-     * @param isOutdoor 是否墙外的自动门
-     */
-    public void execute(String[] tagIds, List<String> tagList, AutoDoorClient.AUTO_DOOR_NO doorNo, boolean isOutdoor) {
-        if (tagList == null) {
-            // 如果没有读到标签 关闭自动门
-            // 因为大部分时间都是读不到标签的 所以关门的指令不能一直重复下发
-            // 记录关门的次数 超过10次 就不再重复关门
-            if (isOutdoor ? closeOutDoorNum < 10 : closeInDoorNum < 10) {
-                autoDoorClient.sendClose(doorNo);
-//                log.info("发送关门指令!{},{}", isOutdoor, isOutdoor ? closeOutDoorNum : closeInDoorNum);
-                if (isOutdoor) {
-                    // 关闭墙外同时 打开墙里第二层自动门
-//                    autoDoorClient.sendOpen(AutoDoorClient.AUTO_DOOR_NO.C);
-                    closeOutDoorNum++;
-                } else {
-                    closeInDoorNum++;
-                }
-            }
-            return;
-        }
-        boolean contains = false;
-        for (String tagId : tagIds) {
-            if (contains = tagList.contains(tagId)) {
-                break;
-            }
-        }
-        // 如果读到标签 打开自动门
-        if (contains) {
-            autoDoorClient.sendOpen(doorNo);
-            if (isOutdoor) {
-                // 打开墙外同时 关闭墙里第二层自动门(应该大部分时间多是关闭的)
-//                autoDoorClient.sendClose(AutoDoorClient.AUTO_DOOR_NO.C);
-                closeOutDoorNum = 0;
-            } else {
-                closeInDoorNum = 0;
-            }
-        } else {
-            // 如果没有读到标签 关闭自动门
-            // 因为大部分时间都是读不到标签的 所以关门的指令不能一直重复下发
-            // 记录关门的次数 超过10次 就不再重复关门
-            if (isOutdoor ? closeOutDoorNum < 10 : closeInDoorNum < 10) {
-                autoDoorClient.sendClose(doorNo);
-//                log.info("发送关门指令!{},{}", isOutdoor, isOutdoor ? closeOutDoorNum : closeInDoorNum);
-                if (isOutdoor) {
-                    // 关闭墙外同时 打开墙里第二层自动门
-//                    autoDoorClient.sendOpen(AutoDoorClient.AUTO_DOOR_NO.C);
-                    closeOutDoorNum++;
-                } else {
-                    closeInDoorNum++;
-                }
-            }
-        }
-
-    }
-}

+ 1 - 3
warewms-ams/src/main/java/com/ruoyi/ams/task/service/impl/WcsTaskServiceImpl.java

@@ -5,12 +5,10 @@ import java.util.Date;
 import java.util.List;
 
 import com.ruoyi.ams.agv.ndc.domain.AmsTask;
-import com.ruoyi.ams.agv.ndc.entity.CallbackResult;
 import com.ruoyi.ams.agv.ndc.service.IAmsTaskService;
 import com.ruoyi.ams.box.service.IWmsBoxInfoService;
 import com.ruoyi.ams.config.domain.FlowConfigEvent;
 import com.ruoyi.ams.config.service.IFlowConfigEventService;
-import com.ruoyi.ams.inv.domain.InvLotAtt;
 import com.ruoyi.ams.inv.domain.InvLotLocId;
 import com.ruoyi.ams.inv.mapper.InvLotLocIdMapper;
 import com.ruoyi.ams.inv.service.IInvLotAttService;
@@ -23,7 +21,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.spring.SpringUtils;
-import com.ruoyi.hard.modbus.tcp.AutoDoorClient;
+import com.ruoyi.hard.demo.AutoDoorClient;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/CallbackTask.java

@@ -1,9 +1,9 @@
-package com.ruoyi.web.controller.warewms.api.dto;
+package com.ruoyi.ams.xuankuang.domain.form;
 
 /**
  * WCS安全交握AGV
  */
-public class CallbackTask {
+public class CallbackTaskFrom {
     /**
      * taskNo:任务号
      * safeCode:安全交握请求结果  1:安全可执行 0:异常不可执行
@@ -19,10 +19,10 @@ public class CallbackTask {
     private int handshakeType;
     private String message;
 
-    public CallbackTask() {
+    public CallbackTaskFrom() {
     }
 
-    public CallbackTask(String taskNo, String safeCode, int handshakeType, String message) {
+    public CallbackTaskFrom(String taskNo, String safeCode, int handshakeType, String message) {
         this.taskNo = taskNo;
         this.safeCode = safeCode;
         this.handshakeType = handshakeType;

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/EmptyPalletLocRequest.java

@@ -1,18 +1,18 @@
-package com.ruoyi.web.controller.warewms.api.dto;
+package com.ruoyi.ams.xuankuang.domain.form;
 
 /**
  * 空托仓位请求
  */
-public class EmptyPalletLocRequest {
+public class EmptyPalletLocForm {
     /**
      * taskType:空托仓位请求类型: 1、入库仓位  2、出库仓位
      */
     private int taskType;
 
-    public EmptyPalletLocRequest() {
+    public EmptyPalletLocForm() {
     }
 
-    public EmptyPalletLocRequest(int taskType) {
+    public EmptyPalletLocForm(int taskType) {
         this.taskType = taskType;
     }
 

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/ErrorStatusResponse.java

@@ -1,16 +1,16 @@
-package com.ruoyi.web.controller.warewms.api.dto;
+package com.ruoyi.ams.xuankuang.domain.form;
 
 /**
  * 异常上报
  */
-public class ErrorStatusResponse {
+public class ErrorStatusForm {
     private int errorCode;
     private String errorMsg;
 
-    public ErrorStatusResponse() {
+    public ErrorStatusForm() {
     }
 
-    public ErrorStatusResponse(int errorCode, String errorMsg) {
+    public ErrorStatusForm(int errorCode, String errorMsg) {
         /**
          * errorCode :异常编码
          * errorMsg :异常描述

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/LineOpenNotification.java

@@ -1,18 +1,18 @@
-package com.ruoyi.web.controller.warewms.api.dto;
+package com.ruoyi.ams.xuankuang.domain.form;
 
 /**
  * 开启破袋机
  */
-public class LineOpenNotification {
+public class LineOpenNotificationForm {
     /**
      * lineId:破袋机输送线id
      */
     private String lineId;
 
-    public LineOpenNotification() {
+    public LineOpenNotificationForm() {
     }
 
-    public LineOpenNotification(String lineId) {
+    public LineOpenNotificationForm(String lineId) {
         this.lineId = lineId;
     }
 

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/OutboundRequest.java

@@ -1,9 +1,9 @@
-package com.ruoyi.web.controller.warewms.api.dto;
+package com.ruoyi.ams.xuankuang.domain.form;
 
 /**
  * 出库任务下发
  */
-public class OutboundRequest {
+public class OutboundForm {
     /**
      * wcsid:WCS任务ID
      * palletNO:托盘号
@@ -11,10 +11,10 @@ public class OutboundRequest {
     private String wcsId;
     private String palletNo;
 
-    public OutboundRequest() {
+    public OutboundForm() {
     }
 
-    public OutboundRequest(String wcsId, String palletNo) {
+    public OutboundForm(String wcsId, String palletNo) {
         this.wcsId = wcsId;
         this.palletNo = palletNo;
     }

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/StackingCompletion.java

@@ -1,9 +1,9 @@
-package com.ruoyi.web.controller.warewms.api.dto;
+package com.ruoyi.ams.xuankuang.domain.form;
 
 /**
  * 组盘上报
  */
-public class StackingCompletion {
+public class StackingCompletionForm {
     /**
      * reportType:上报类型
      * 情况1:桶装货上报信息:托盘号;
@@ -69,7 +69,7 @@ public class StackingCompletion {
         this.taskNo = taskNo;
     }
 
-    public StackingCompletion(int reportType, String palletNo, String materialType, int qty, String relatedWmsNo, String taskNo) {
+    public StackingCompletionForm(int reportType, String palletNo, String materialType, int qty, String relatedWmsNo, String taskNo) {
         this.reportType = reportType;
         this.palletNo = palletNo;
         this.materialType = materialType;
@@ -78,6 +78,6 @@ public class StackingCompletion {
         this.taskNo = taskNo;
     }
 
-    public StackingCompletion() {
+    public StackingCompletionForm() {
     }
 }

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/api/dto/TaskStatusResponse.java

@@ -1,9 +1,9 @@
-package com.ruoyi.web.controller.warewms.api.dto;
+package com.ruoyi.ams.xuankuang.domain.form;
 
 /**
  * 任务状态反馈
  */
-public class TaskStatusResponse {
+public class TaskStatusForm {
     /**
      * taskNo: WCS任务号
      * status: 任务执行状态
@@ -11,10 +11,10 @@ public class TaskStatusResponse {
     private String taskNo;
     private int status;
 
-    public TaskStatusResponse() {
+    public TaskStatusForm() {
     }
 
-    public TaskStatusResponse(String taskNo, int status) {
+    public TaskStatusForm(String taskNo, int status) {
         this.taskNo = taskNo;
         this.status = status;
     }

+ 25 - 0
warewms-ams/src/main/java/com/ruoyi/ams/xuankuang/service/WmsDocAsnSubService.java

@@ -0,0 +1,25 @@
+package com.ruoyi.ams.xuankuang.service;
+
+import com.ruoyi.ams.asn.service.IWmsDocAsnDetailsService;
+import com.ruoyi.ams.asn.service.IWmsDocAsnHeaderService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @author JWK
+ * @version 1.0
+ * @date 2023/3/30 10:51
+ */
+public class WmsDocAsnSubService {
+
+    @Autowired
+    private IWmsDocAsnHeaderService iWmsDocAsnHeaderService;
+    @Autowired
+    private IWmsDocAsnDetailsService iWmsDocAsnDetailsService;
+
+
+
+
+
+
+
+}

+ 0 - 5
warewms-hard/pom.xml

@@ -25,10 +25,5 @@
             <artifactId>modbus-spring-boot-starter</artifactId>
             <version>1.0</version>
         </dependency>
-        <dependency>
-            <groupId>com.jwk</groupId>
-            <artifactId>rfid-zebra-spring-boot-starter</artifactId>
-            <version>1.0</version>
-        </dependency>
     </dependencies>
 </project>

+ 2 - 2
warewms-hard/src/main/java/com/ruoyi/hard/modbus/tcp/AutoDoorClient.java

@@ -1,4 +1,4 @@
-package com.ruoyi.hard.modbus.tcp;
+package com.ruoyi.hard.demo;
 
 import com.jwk.spring.boot.autoconfigure.ModbusTcpMasterTemplate;
 import com.jwk.spring.boot.modbus4j.ModbusMasterUtil;
@@ -12,7 +12,7 @@ import javax.annotation.PostConstruct;
 import java.util.HashMap;
 import java.util.Map;
 
-import static com.ruoyi.hard.modbus.tcp.AutoDoorClient.AUTOMATIC_DOOR_CODE.*;
+import static com.ruoyi.hard.demo.AutoDoorClient.AUTOMATIC_DOOR_CODE.*;
 
 
 /**

+ 2 - 2
warewms-hard/src/main/java/com/ruoyi/hard/modbus/tcp/ButtonBoxClient.java

@@ -1,4 +1,4 @@
-package com.ruoyi.hard.modbus.tcp;
+package com.ruoyi.hard.demo;
 
 import com.jwk.spring.boot.autoconfigure.ModbusTcpMasterTemplate;
 import com.jwk.spring.boot.modbus4j.ModbusMasterUtil;
@@ -7,7 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 
-import static com.ruoyi.hard.modbus.tcp.ButtonBoxClient.BUTTON_BOX_CODE.*;
+import static com.ruoyi.hard.demo.ButtonBoxClient.BUTTON_BOX_CODE.*;
 
 
 /**

+ 2 - 2
warewms-hard/src/main/java/com/ruoyi/hard/modbus/tcp/ChargingMachineClient.java

@@ -1,4 +1,4 @@
-package com.ruoyi.hard.modbus.tcp;
+package com.ruoyi.hard.demo;
 
 import com.jwk.spring.boot.autoconfigure.ModbusTcpMasterTemplate;
 import com.jwk.spring.boot.modbus4j.ModbusMasterUtil;
@@ -12,7 +12,7 @@ import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import static com.ruoyi.hard.modbus.tcp.ChargingMachineClient.CHARGER_ADDRESS_MEANING.*;
+import static com.ruoyi.hard.demo.ChargingMachineClient.CHARGER_ADDRESS_MEANING.*;
 
 
 /**

+ 0 - 104
warewms-hard/src/main/java/com/ruoyi/hard/rfid/RFIDReaderClient.java

@@ -1,104 +0,0 @@
-package com.ruoyi.hard.rfid;
-
-import com.jwk.spring.boot.autoconfigure.RfidReaderTemplate;
-import com.jwk.spring.boot.rfid.RfidReaderUtil;
-import com.mot.rfid.api3.TagData;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-
-/**
- * RFID对接
- *
- * @author JWK
- * @version 1.0
- * @date 2022/12/21 21:04
- */
-@Slf4j
-@Service
-public class RFIDReaderClient {
-
-
-    @Autowired(required = false)
-    @Qualifier("rfidReaderTemplateFirst")
-    private RfidReaderTemplate rfidReaderTemplateFirst;
-    @Autowired(required = false)
-    @Qualifier("rfidReaderTemplateSecond")
-    private RfidReaderTemplate rfidReaderTemplateSecond;
-
-
-    /**
-     * 读取标签 墙外
-     *
-     * @return
-     */
-    public List<String> readTagsOut() {
-        RfidReaderUtil rfidReaderUtil = rfidReaderTemplateFirst.getRfidReaderUtil();
-        TagData[] tagData = rfidReaderUtil.readTags();
-        if (tagData == null) {
-            return null;
-        }
-        return Arrays.stream(tagData).map(v -> v.getTagID()).collect(Collectors.toList());
-    }
-
-    /**
-     * 读取标签 室内
-     *
-     * @return
-     */
-    public List<String> readTagsIn() {
-        RfidReaderUtil rfidReaderUtil = rfidReaderTemplateSecond.getRfidReaderUtil();
-        TagData[] tagData = rfidReaderUtil.readTags();
-        if (tagData == null) {
-            return null;
-        }
-        return Arrays.stream(tagData).map(v -> v.getTagID()).collect(Collectors.toList());
-    }
-
-    /**
-     * 读取标签测试 墙外
-     */
-    public void readTagsOutTest() {
-        RfidReaderUtil rfidReaderUtil = rfidReaderTemplateFirst.getRfidReaderUtil();
-        for (; ; ) {
-            TagData[] tagData = rfidReaderUtil.readTags();
-            if (tagData == null) {
-                log.error("读取标签为空!");
-            } else {
-                List<String> tagIdList = Arrays.stream(tagData).map(v -> v.getTagID()).collect(Collectors.toList());
-                String[] strings = new String[tagIdList.size()];
-                String[] tagIds = tagIdList.toArray(strings);
-                System.out.println("--------------RFID读取标签--------------------");
-                Arrays.stream(tagIds).forEach(v -> System.out.println(v));
-                System.out.println("--------------RFID读取标签--------------------");
-            }
-        }
-    }
-
-    /**
-     * 读取标签测试 室内
-     */
-    public void readTagsInTest() {
-        RfidReaderUtil rfidReaderUtil = rfidReaderTemplateSecond.getRfidReaderUtil();
-        for (; ; ) {
-            TagData[] tagData = rfidReaderUtil.readTags();
-            if (tagData == null) {
-                log.error("读取标签为空!");
-            } else {
-                List<String> tagIdList = Arrays.stream(tagData).map(v -> v.getTagID()).collect(Collectors.toList());
-                String[] strings = new String[tagIdList.size()];
-                String[] tagIds = tagIdList.toArray(strings);
-                System.out.println("--------------RFID读取标签--------------------");
-                Arrays.stream(tagIds).forEach(v -> System.out.println(v));
-                System.out.println("--------------RFID读取标签--------------------");
-            }
-        }
-    }
-}

+ 9 - 0
warewms-hard/src/main/java/com/ruoyi/hard/xuankang/PorjectClient.java

@@ -0,0 +1,9 @@
+package com.ruoyi.hard.xuankang;
+
+/**
+ * @author JWK
+ * @version 1.0
+ * @date 2023/3/30 11:00
+ */
+public class PorjectClient {
+}