Selaa lähdekoodia

1.镍盐搬运业务接口:
(1)空托上料(硫酸镍|氯化镍)
(2)废料搬运(硫酸镍|氯化镍)
(3)废料退空(硫酸镍|氯化镍)
(4)成品下线(硫酸镍|氯化镍)
(5)成品出库(硫酸镍|氯化镍)
2.复称逻辑添加

k 1 vuosi sitten
vanhempi
commit
2da47918e2

+ 238 - 0
ruoyi-admin/src/main/java/com/ruoyi/nieyan/controller/pda/PdaAgvCallController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.nieyan.controller.pda;
 
+import com.ruoyi.ams.config.domain.dto.AgvCallItemDTO;
 import com.ruoyi.ams.nieyan.domain.form.AgvCallForm;
 import com.ruoyi.ams.nieyan.service.AgvCallProxyService;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -13,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 /**
  * 镍盐PDA接口
  * Created by IntelliJ IDEA.
@@ -48,5 +51,240 @@ public class PdaAgvCallController {
         return agvCallProxyService.supplementEmptyTray(locationFrom, locationTo, createUser);
     }
 
+    /**
+     * 空托上料(硫酸镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("空托上料(硫酸镍)")
+    @PostMapping("emptyFeedingLSN")
+    public AjaxResult emptyFeedingLSN(@RequestBody AgvCallForm agvCallForm) {
+        if (StringUtils.isEmpty(agvCallForm.getLocationTo())) {
+            return AjaxResult.error("目标库位为空!");
+        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.emptyFeedingLSN(locationFrom, locationTo, createUser);
+    }
+
+    /**
+     * 空托上料(氯化镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("空托上料(氯化镍)")
+    @PostMapping("emptyFeedingLHN")
+    public AjaxResult emptyFeedingLHN(@RequestBody AgvCallForm agvCallForm) {
+        if (StringUtils.isEmpty(agvCallForm.getLocationTo())) {
+            return AjaxResult.error("目标库位为空!");
+        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.emptyFeedingLHN(locationFrom, locationTo, createUser);
+    }
+
+    /**
+     * 废料搬运(硫酸镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("废料搬运(硫酸镍)")
+    @PostMapping("accessoriesHandlingLSN")
+    public AjaxResult accessoriesHandlingLSN(@RequestBody AgvCallForm agvCallForm) {
+//        if (StringUtils.isEmpty(agvCallForm.getLocationTo())) {
+//            return AjaxResult.error("目标库位为空!");
+//        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.accessoriesHandlingLSN(locationFrom, locationTo, createUser);
+    }
+
+    /**
+     * 废料退空(硫酸镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("废料退空(硫酸镍)")
+    @PostMapping("accessoriesReturnEmptyLSN")
+    public AjaxResult accessoriesReturnEmptyLSN(@RequestBody AgvCallForm agvCallForm) {
+//        if (StringUtils.isEmpty(agvCallForm.getLocationTo())) {
+//            return AjaxResult.error("目标库位为空!");
+//        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.accessoriesReturnEmptyLSN(locationFrom, locationTo, createUser);
+    }
+
+    /**
+     * 废料搬运(氯化镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("废料搬运(氯化镍)")
+    @PostMapping("accessoriesHandlingLHN")
+    public AjaxResult accessoriesHandlingLHN(@RequestBody AgvCallForm agvCallForm) {
+//        if (StringUtils.isEmpty(agvCallForm.getLocationTo())) {
+//            return AjaxResult.error("目标库位为空!");
+//        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.accessoriesHandlingLHN(locationFrom, locationTo, createUser);
+    }
+
+    /**
+     * 废料退空(氯化镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("废料退空(氯化镍)")
+    @PostMapping("accessoriesReturnEmptyLHN")
+    public AjaxResult accessoriesReturnEmptyLHN(@RequestBody AgvCallForm agvCallForm) {
+        if (StringUtils.isEmpty(agvCallForm.getLocationFrom())) {
+            return AjaxResult.error("起始库位为空!");
+        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.accessoriesReturnEmptyLHN(locationFrom, locationTo, createUser);
+    }
+
+    /**
+     * 成品下线(硫酸镍)
+     * 下线区 > 裹膜区|仓储区
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("成品下线(硫酸镍)(下线区 > 裹膜区|仓储区)")
+    @PostMapping("productsDownLineLSN")
+    public AjaxResult productsDownLineLSN(@RequestBody AgvCallForm agvCallForm) {
+        if (StringUtils.isEmpty(agvCallForm.getLocationFrom())) {
+            return AjaxResult.error("起始库位为空!");
+        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        Boolean theWrapped = agvCallForm.getTheWrapped(); // 是否裹膜
+        Boolean theWeighing = agvCallForm.getTheWeighing(); // 是否复称
+        List<AgvCallItemDTO> agvCallItemDTOList = agvCallForm.getAgvCallItemDTOList();
+        return theWrapped ?
+                agvCallProxyService.productsDownLineLSN(locationFrom, locationTo, createUser
+                        , theWeighing, agvCallItemDTOList)
+                :
+                agvCallProxyService.productsDownLineInvLSN(locationFrom, locationTo, createUser
+                        , theWeighing, agvCallItemDTOList);
+    }
+
+    /**
+     * 成品下线(氯化镍)
+     * 下线区 > 裹膜区|仓储区
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("成品下线(氯化镍)(下线区 > 裹膜区|仓储区)")
+    @PostMapping("productsDownLineLHN")
+    public AjaxResult productsDownLineLHN(@RequestBody AgvCallForm agvCallForm) {
+        if (StringUtils.isEmpty(agvCallForm.getLocationFrom())) {
+            return AjaxResult.error("起始库位为空!");
+        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        Boolean theWrapped = agvCallForm.getTheWrapped();
+        Boolean theWeighing = agvCallForm.getTheWeighing();
+        List<AgvCallItemDTO> agvCallItemDTOList = agvCallForm.getAgvCallItemDTOList();
+        return theWrapped ?
+                agvCallProxyService.productsDownLineLHN(locationFrom, locationTo, createUser
+                        , theWeighing, agvCallItemDTOList)
+                :
+                agvCallProxyService.productsDownLineInvLHN(locationFrom, locationTo, createUser
+                        , theWeighing, agvCallItemDTOList);
+    }
+
+    /**
+     * 成品下线(硫酸镍)
+     * 裹膜区 -> 仓储区
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("成品下线(裹膜区 -> 仓储区)")
+    @PostMapping("productsDownLineWrappingFilmLSN")
+    public AjaxResult productsDownLineWrappingFilmLSN(@RequestBody AgvCallForm agvCallForm) {
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        Boolean theWeighing = agvCallForm.getTheWeighing();
+        return agvCallProxyService.productsDownLineWrappingFilmLSN(locationFrom, locationTo
+                , createUser
+                , theWeighing);
+    }
+
+    /**
+     * 成品下线(氯化镍)
+     * 裹膜区 -> 仓储区
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("成品下线(裹膜区 -> 仓储区)")
+    @PostMapping("productsDownLineWrappingFilmLHN")
+    public AjaxResult productsDownLineWrappingFilmLHN(@RequestBody AgvCallForm agvCallForm) {
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        Boolean theWeighing = agvCallForm.getTheWeighing();
+        return agvCallProxyService.productsDownLineWrappingFilmLHN(locationFrom, locationTo
+                , createUser
+                , theWeighing);
+    }
+
+    /**
+     * 成品出库(硫酸镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("成品出库(硫酸镍)")
+    @PostMapping("productsOutboundLSN")
+    public AjaxResult productsOutboundLSN(@RequestBody AgvCallForm agvCallForm) {
+        if (StringUtils.isEmpty(agvCallForm.getLocationFrom())) {
+            return AjaxResult.error("起始库位为空!");
+        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.productsOutboundLSN(locationFrom, locationTo, createUser);
+    }
+
+    /**
+     * 成品出库(氯化镍)
+     *
+     * @param agvCallForm
+     * @return
+     */
+    @ApiOperation("成品出库(氯化镍)")
+    @PostMapping("productsOutboundLHN")
+    public AjaxResult productsOutboundLHN(@RequestBody AgvCallForm agvCallForm) {
+        if (StringUtils.isEmpty(agvCallForm.getLocationFrom())) {
+            return AjaxResult.error("起始库位为空!");
+        }
+        String locationFrom = agvCallForm.getLocationFrom();
+        String locationTo = agvCallForm.getLocationTo();
+        String createUser = agvCallForm.getCreateUser();
+        return agvCallProxyService.productsOutboundLHN(locationFrom, locationTo, createUser);
+    }
 
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaDocSoController.java

@@ -120,7 +120,7 @@ public class PdaDocSoController {
         agvCallDTO.setWarehouseId(Constant.WAREHOUSE_ID);
         agvCallDTO.setLocationFrom(docOrderHeader.getLocationFrom());
         agvCallDTO.setLocationTo(""); // 目标库位不需要输入
-        agvCallDTO.setToArea(toArea); // 目标区域(货物最终去掉区域)
+//        agvCallDTO.setToArea(toArea); // 目标区域(货物最终去掉区域)
         List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
         AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
         agvCallItemDTO.setSku(docOrderHeader.getSku());

+ 7 - 5
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -141,7 +141,7 @@ public class BusinessServiceImpl implements IBusinessService {
 
                 if (flowConfigHeaderVO.getFlowType().equals("ASN")) {
                     List<BaseLocationInfo> locationFromList = this.convertLocation(paramLocationFrom, agvCallDTO.getWarehouseId(), null);
-                    List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), "shift_no+ 0,shift_index");
+                    List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), null);
                     locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "ASN", asnSoStrategy, token);
                     locationTo = this.zoneLocationAllocation(locationToList, "locationTo", "ASN", asnSoStrategy, token);
                     // 初始化库存
@@ -154,10 +154,11 @@ public class BusinessServiceImpl implements IBusinessService {
 
                 } else if (flowConfigHeaderVO.getFlowType().equals("SO")) {
                     AgvCallItemDTO agvCall = agvCallDTO.getAgvCallItemDTOList().get(0);
+                    List<BaseLocationInfo> locationFromList = this.convertLocation(paramLocationFrom, agvCallDTO.getWarehouseId(), null);
                     List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), null);
-                    HashMap<String, String> hashMap = JSON.parseObject(JSON.toJSONString(agvCall.getLotattDTO()), HashMap.class);
-                    List<BaseLocationInfo> locationFromList = baseLocationInfoMapper.selectSortedLocationLotattListByZoneIdListOrderBy(zoneIdList
-                            , agvCallDTO.getWarehouseId(), hashMap, agvCall.getSku(), "inv.create_time");
+//                    HashMap<String, String> hashMap = JSON.parseObject(JSON.toJSONString(agvCall.getLotattDTO()), HashMap.class);
+//                    List<BaseLocationInfo> locationFromList = baseLocationInfoMapper.selectSortedLocationLotattListByZoneIdListOrderBy(zoneIdList
+//                            , agvCallDTO.getWarehouseId(), hashMap, agvCall.getSku(), "inv.create_time");
                     locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "SO", asnSoStrategy, token);
                     locationTo = this.zoneLocationAllocation(locationToList, "locationTo", "SO", asnSoStrategy, token);
                     wcsTaskList.addAll(this.genTask(locationFrom, locationTo, flowConfigHeaderVO, agvCallDTO, token));
@@ -440,7 +441,8 @@ public class BusinessServiceImpl implements IBusinessService {
             wcsTask.setTaskType(Constant.TASK_TYPE.FORWARD.getValue());
             wcsTask.setExt8(token.toString());
             wcsTask.setExt7(flowConfigHeaderVO.getId().toString());
-            wcsTask.setExt6(StringUtils.isNotEmpty(agvCallDTO.getToArea()) ? agvCallDTO.getToArea() : "");
+            // 是否复称
+//            wcsTask.setExt3(agvCallDTO == null ? "" : agvCallDTO.getTheWeighing() ? "0001" : "0000");
             wcsTask.setExtParam(agvCallDTO.getExtParam());
             wcsTaskList.add(wcsTask);
             businessService.addTask(wcsTask);

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/config/domain/dto/AgvCallDTO.java

@@ -17,6 +17,6 @@ public class AgvCallDTO {
     private String extParam;
     private Long warehouseId;
     private String createUser;
-    private String toArea;// 目标区域(货物最终去掉区域)
+    private Boolean theWeighing; // 是否复称
     private List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
 }

+ 17 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/domain/form/AgvCallForm.java

@@ -1,7 +1,11 @@
 package com.ruoyi.ams.nieyan.domain.form;
 
+import com.ruoyi.ams.config.domain.dto.AgvCallItemDTO;
 import lombok.Data;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author JWK
  * @version 1.0
@@ -22,4 +26,17 @@ public class AgvCallForm {
      * 创建人
      */
     private String createUser;
+    /**
+     * 是否裹膜
+     */
+    private Boolean theWrapped;
+    /**
+     * 是否复称
+     */
+    private Boolean theWeighing;
+    /**
+     * 物料信息
+     */
+    private List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
+
 }

+ 286 - 1
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/AgvCallProxyService.java

@@ -43,11 +43,296 @@ public class AgvCallProxyService {
         agvCallDTO.setCreateUser(createUser);
         List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
         AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
-        agvCallItemDTO.setSku(Constant.EMPTY_TRAY); //物料号
+        agvCallItemDTO.setSku(Constant.EMPTY_TRAY); // 空托盘
         agvCallItemDTOList.add(agvCallItemDTO);
         agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
         return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.ONE.getValue(), agvCallDTO);
     }
 
+    /**
+     * 空托上料(硫酸镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult emptyFeedingLSN(String locationFrom, String locationTo, String createUser) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
+        AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
+        agvCallItemDTO.setSku(Constant.EMPTY_TRAY); // 空托盘
+        agvCallItemDTOList.add(agvCallItemDTO);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.TWO.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 空托上料(氯化镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult emptyFeedingLHN(String locationFrom, String locationTo, String createUser) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
+        AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
+        agvCallItemDTO.setSku(Constant.EMPTY_TRAY); // 空托盘
+        agvCallItemDTOList.add(agvCallItemDTO);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.THREE.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 废料搬运(硫酸镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult accessoriesHandlingLSN(String locationFrom, String locationTo, String createUser) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
+        AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
+        agvCallItemDTO.setSku(Constant.WASTE); // 废料
+        agvCallItemDTOList.add(agvCallItemDTO);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.FOUR.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 废料退空(硫酸镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult accessoriesReturnEmptyLSN(String locationFrom, String locationTo, String createUser) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
+        AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
+        agvCallItemDTO.setSku(Constant.WASTE_BAS); // 废料空篓
+        agvCallItemDTOList.add(agvCallItemDTO);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.FIVE.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 废料搬运(氯化镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult accessoriesHandlingLHN(String locationFrom, String locationTo, String createUser) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
+        AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
+        agvCallItemDTO.setSku(Constant.WASTE); // 废料
+        agvCallItemDTOList.add(agvCallItemDTO);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.SIX.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 废料退空(氯化镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult accessoriesReturnEmptyLHN(String locationFrom, String locationTo, String createUser) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        List<AgvCallItemDTO> agvCallItemDTOList = new ArrayList<>();
+        AgvCallItemDTO agvCallItemDTO = new AgvCallItemDTO();
+        agvCallItemDTO.setSku(Constant.WASTE_BAS); // 废料空篓
+        agvCallItemDTOList.add(agvCallItemDTO);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.SEVEN.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品下线(硫酸镍)->裹膜
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @param theWeighing
+     * @param agvCallItemDTOList
+     * @return
+     */
+    public AjaxResult productsDownLineLSN(String locationFrom, String locationTo, String createUser
+            , Boolean theWeighing
+            , List<AgvCallItemDTO> agvCallItemDTOList) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        agvCallDTO.setTheWeighing(theWeighing);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.EIGHT.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品下线(硫酸镍)->仓储区
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @param theWeighing
+     * @param agvCallItemDTOList
+     * @return
+     */
+    public AjaxResult productsDownLineInvLSN(String locationFrom, String locationTo, String createUser
+            , Boolean theWeighing
+            , List<AgvCallItemDTO> agvCallItemDTOList) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        agvCallDTO.setTheWeighing(theWeighing);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.NINE.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品下线(硫酸镍)-裹膜->仓储区
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @param theWeighing
+     * @return
+     */
+    public AjaxResult productsDownLineWrappingFilmLSN(String locationFrom, String locationTo, String createUser
+            , Boolean theWeighing) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        agvCallDTO.setTheWeighing(theWeighing);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.TEN.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品下线(氯化镍)->裹膜
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @param theWeighing
+     * @param agvCallItemDTOList
+     * @return
+     */
+    public AjaxResult productsDownLineLHN(String locationFrom, String locationTo, String createUser
+            , Boolean theWeighing
+            , List<AgvCallItemDTO> agvCallItemDTOList) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        agvCallDTO.setTheWeighing(theWeighing);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.ELEVEN.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品下线(氯化镍)->仓储区
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @param theWeighing
+     * @param agvCallItemDTOList
+     * @return
+     */
+    public AjaxResult productsDownLineInvLHN(String locationFrom, String locationTo, String createUser
+            , Boolean theWeighing
+            , List<AgvCallItemDTO> agvCallItemDTOList) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        agvCallDTO.setTheWeighing(theWeighing);
+        agvCallDTO.setAgvCallItemDTOList(agvCallItemDTOList);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.TWELVE.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品下线(氯化镍)-裹膜->仓储区
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult productsDownLineWrappingFilmLHN(String locationFrom, String locationTo, String createUser
+            , Boolean theWeighing) {
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        agvCallDTO.setTheWeighing(theWeighing);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.THIRTEEN.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品出库(硫酸镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult productsOutboundLSN(String locationFrom, String locationTo, String createUser) {
+        // todo 判断起始库位库存需要位合格
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.FOURTEEN.getValue(), agvCallDTO);
+    }
+
+    /**
+     * 成品出库(氯化镍)
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @param createUser
+     * @return
+     */
+    public AjaxResult productsOutboundLHN(String locationFrom, String locationTo, String createUser) {
+        // todo 判断起始库位库存需要位合格
+        AgvCallDTO agvCallDTO = new AgvCallDTO();
+        agvCallDTO.setLocationFrom(locationFrom);
+        agvCallDTO.setLocationTo(locationTo);
+        agvCallDTO.setCreateUser(createUser);
+        return iBusinessService.agvCall(Constant.FLOW_CONFIG_ID.FIFTEEN.getValue(), agvCallDTO);
+    }
+
 }
 

+ 4 - 0
warewms-ams/src/main/java/com/ruoyi/ams/task/service/impl/WcsTaskServiceImpl.java

@@ -361,6 +361,10 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
             log.info("已完成的任务无需反馈");
             return AjaxResult.error("已完成的任务无需反馈");
         }
+        if (wcsTask.getState() == 7 && state == 7) {
+            log.info("已取消的任务无需重复取消");
+            return AjaxResult.error("已取消的任务无需重复取消");
+        }
         //转发类型任务才回调
         if (wcsTask.getTaskType().equals(Constant.TASK_TYPE.FORWARD.getValue())) {
             try {