Explorar o código

Merge remote-tracking branch 'origin/master'

Gizmo %!s(int64=2) %!d(string=hai) anos
pai
achega
bfafaa0e4d

+ 24 - 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaController.java

@@ -30,10 +30,7 @@ import com.ruoyi.ams.lineCall.domain.form.LineCallListFrom;
 import com.ruoyi.ams.lineCall.domain.vo.LineCallVO;
 import com.ruoyi.ams.lineCall.service.ILineCallService;
 import com.ruoyi.ams.order.domain.ActAllocationDetails;
-import com.ruoyi.ams.order.form.ArrangeStockForm;
-import com.ruoyi.ams.order.form.CheckOutForm;
-import com.ruoyi.ams.order.form.CheckOutSearchForm;
-import com.ruoyi.ams.order.form.PickForm;
+import com.ruoyi.ams.order.form.*;
 import com.ruoyi.ams.order.service.IActAllocationDetailsService;
 import com.ruoyi.ams.order.service.IWmsDocOrderHeaderService;
 import com.ruoyi.ams.order.vo.CheckOutVO;
@@ -131,6 +128,7 @@ public class PdaController {
 
     /**
      * PDA上架
+     * 物料拉动的时候直接调用
      *
      * @param paForm
      * @return
@@ -150,7 +148,8 @@ public class PdaController {
     }
 
     /**
-     * 物料拉动通用
+     * 物料拉动通用(入库,回库)
+     * flowId:入库5,回库9
      *
      * @param lineCallForm
      * @return
@@ -172,9 +171,9 @@ public class PdaController {
             if (flowConfigHeaderVO.getFlowType().equals("ASN")) {
                 PaForm paForm = new PaForm();
                 paForm.setPalletNo(lform.getPalletNo());
-                paForm.setLocationFrom("900");
+                paForm.setLocationFrom(Constant.LOC_STAGE_CACHE.toString());
                 paForm.setLocationTo(lform.getLocationFrom());
-                wmsDocAsnHeaderService.doPa(paForm);
+                doPa(paForm);
             }
 
             if (flowConfigHeaderVO.getFlowType().equals("ASN") && org.apache.commons.lang3.StringUtils.isEmpty(lform.getLocationFrom())) {
@@ -234,6 +233,7 @@ public class PdaController {
     /**
      * 入库解绑物料
      * PDA先执行-查询备货绑定
+     *
      * @param unlockForm
      * @return
      */
@@ -287,7 +287,7 @@ public class PdaController {
     @GetMapping("/docAsn/info")
     public AjaxResult docAsnInfo(@RequestParam String asnNo) {
         // ERP号转换为wms系统入库单号ASNNO
-        String endAsnNo= wmsDocAsnHeaderService.changeErpNoToAsnNo(asnNo);
+        String endAsnNo = wmsDocAsnHeaderService.changeErpNoToAsnNo(asnNo);
         WmsDocAsnHeader header = wmsDocAsnHeaderService.selectWmsDocAsnHeaderByAsnNo(endAsnNo);
         return AjaxResult.success(header);
     }
@@ -348,7 +348,8 @@ public class PdaController {
     }
 
     /**
-     * 分拣出库(呼叫拣货)
+     * 分拣出库
+     * todo 不确定传进来的参数
      *
      * @param pickForm
      * @return
@@ -358,6 +359,20 @@ public class PdaController {
         return wmsDocOrderHeaderService.toPick(pickForm);
     }
 
+    /**
+     * 组盘
+     *
+     * @return
+     */
+    @PostMapping("/docOrder/groupDisk")
+    public AjaxResult groupDisk(GroupDiskFrom groupDiskFrom) {
+        if (StringUtils.isNotEmpty(groupDiskFrom.getOrderNo())) {
+            String orderNo = wmsDocOrderHeaderService.changeErpNoToOrderNo(groupDiskFrom.getOrderNo());
+            groupDiskFrom.setOrderNo(orderNo);
+        }
+        return wmsDocOrderHeaderService.groupDisk(groupDiskFrom);
+    }
+
     /**
      * 拣货组盘(理货备货)
      *

+ 5 - 3
ruoyi-ui/src/views/wms/box/index.vue

@@ -40,9 +40,9 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="绑定库位" prop="locationId">
+      <el-form-item label="绑定库位" prop="locationNo">
         <el-input
-          v-model="queryParams.locationId"
+          v-model="queryParams.locationNo"
           placeholder="请输入绑定库位"
           clearable
           size="small"
@@ -131,7 +131,7 @@
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isEmpty"/>
         </template>
       </el-table-column>
-      <el-table-column label="绑定库位" align="center" prop="locationId" />
+      <el-table-column label="绑定库位" align="center" prop="locationNo" />
       <el-table-column label="是否满托" align="center" prop="isFull">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isFull"/>
@@ -261,6 +261,7 @@ export default {
         boxState: null,
         isEmpty: null,
         locationId: null,
+        locationNo: null,
         isFull: null
       },
       // 表单参数
@@ -303,6 +304,7 @@ export default {
         updateTime: null,
         userdefine1: null,
         userdefine2: null,
+        locationNo: null,
         locationId: null,
         isFull: null
       };

+ 4 - 4
warewms-ams/src/main/java/com/ruoyi/ams/asn/service/impl/WmsDocAsnHeaderServiceImpl.java

@@ -286,7 +286,7 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
     @Override
     public AjaxResult doStock(StockForm stockForm) {
         LoginUser loginUser = SecurityUtils.getLoginUser();
-        String STAGE01 = "900";
+        Long STAGE01 = Constant.LOC_STAGE_CACHE;
         WmsDocOrderHeader wmsDocOrderHeader;
         List<WmsDocOrderDetails> orderDetails = new ArrayList<>();
         Map<String, List<WmsDocOrderDTO>> orderMap = new HashMap<>();
@@ -303,7 +303,7 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
             wmsBoxInfo.setBoxType("pallet");
             wmsBoxInfo.setIsFull(stockForm.getFullTag());
             wmsBoxInfo.setIsEmpty("N");
-            wmsBoxInfo.setLocationId(Long.parseLong(STAGE01));
+            wmsBoxInfo.setLocationId(STAGE01);
             wmsBoxInfo.setCreateBy(loginUser.getUsername());
             wmsBoxInfo.setCreateTime(new Date());
             wmsBoxInfo.setUpdateBy(loginUser.getUsername());
@@ -317,7 +317,7 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
             wmsBoxInfo.setBoxState(1);//启用状态
             wmsBoxInfo.setIsFull(stockForm.getFullTag());
             wmsBoxInfo.setIsEmpty("N");
-            wmsBoxInfo.setLocationId(Long.parseLong(STAGE01));
+            wmsBoxInfo.setLocationId(STAGE01);
             wmsBoxInfo.setUpdateBy(loginUser.getUsername());
             wmsBoxInfo.setUpdateTime(new Date());
             boxInfoService.updateWmsBoxInfo(wmsBoxInfo);
@@ -498,7 +498,7 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
                             lotattDTO.setLotatt12("Y");
                             lotattDTO.setLotatt13(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD));
                             lotattDTO.setLotatt14(stockForm.getOrderNo());
-                            invLotLocIdService.initInv(STAGE01, codeSkuRelationshipVO.getSku(), Constant.CUSTOMER_ID, current.doubleValue(), lotattDTO, BigDecimal.ZERO);
+                            invLotLocIdService.initInv(STAGE01.toString(), codeSkuRelationshipVO.getSku(), Constant.CUSTOMER_ID, current.doubleValue(), lotattDTO, BigDecimal.ZERO);
                         } else {
                             break;
                         }

+ 51 - 51
warewms-ams/src/main/java/com/ruoyi/ams/box/domain/WmsBoxInfo.java

@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
  * 容器管理对象 wms_box_info
- * 
+ *
  * @author ruoyi
  * @date 2022-11-01
  */
@@ -48,103 +48,102 @@ public class WmsBoxInfo extends BaseEntity
 
     /** 绑定库位 */
     @Excel(name = "绑定库位")
+    private String locationNo;
+
     private Long locationId;
 
     /** 是否满托 */
     @Excel(name = "是否满托")
     private String isFull;
 
-    public void setId(Long id) 
-    {
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
+    public String getBoxNo() {
+        return boxNo;
     }
-    public void setBoxNo(String boxNo) 
-    {
+
+    public void setBoxNo(String boxNo) {
         this.boxNo = boxNo;
     }
 
-    public String getBoxNo() 
-    {
-        return boxNo;
+    public String getBoxType() {
+        return boxType;
     }
-    public void setBoxType(String boxType) 
-    {
+
+    public void setBoxType(String boxType) {
         this.boxType = boxType;
     }
 
-    public String getBoxType() 
-    {
-        return boxType;
+    public String getBoxRemark() {
+        return boxRemark;
     }
-    public void setBoxRemark(String boxRemark) 
-    {
+
+    public void setBoxRemark(String boxRemark) {
         this.boxRemark = boxRemark;
     }
 
-    public String getBoxRemark() 
-    {
-        return boxRemark;
+    public Integer getBoxState() {
+        return boxState;
     }
-    public void setBoxState(Integer boxState) 
-    {
+
+    public void setBoxState(Integer boxState) {
         this.boxState = boxState;
     }
 
-    public Integer getBoxState() 
-    {
-        return boxState;
+    public String getIsEmpty() {
+        return isEmpty;
     }
-    public void setIsEmpty(String isEmpty) 
-    {
+
+    public void setIsEmpty(String isEmpty) {
         this.isEmpty = isEmpty;
     }
 
-    public String getIsEmpty() 
-    {
-        return isEmpty;
+    public String getUserdefine1() {
+        return userdefine1;
     }
-    public void setUserdefine1(String userdefine1) 
-    {
+
+    public void setUserdefine1(String userdefine1) {
         this.userdefine1 = userdefine1;
     }
 
-    public String getUserdefine1() 
-    {
-        return userdefine1;
+    public String getUserdefine2() {
+        return userdefine2;
     }
-    public void setUserdefine2(String userdefine2) 
-    {
+
+    public void setUserdefine2(String userdefine2) {
         this.userdefine2 = userdefine2;
     }
 
-    public String getUserdefine2() 
-    {
-        return userdefine2;
+    public String getLocationNo() {
+        return locationNo;
     }
-    public void setLocationId(Long locationId) 
-    {
-        this.locationId = locationId;
+
+    public void setLocationNo(String locationNo) {
+        this.locationNo = locationNo;
     }
 
-    public Long getLocationId() 
-    {
+    public Long getLocationId() {
         return locationId;
     }
-    public void setIsFull(String isFull) 
-    {
-        this.isFull = isFull;
+
+    public void setLocationId(Long locationId) {
+        this.locationId = locationId;
     }
 
-    public String getIsFull() 
-    {
+    public String getIsFull() {
         return isFull;
     }
 
+    public void setIsFull(String isFull) {
+        this.isFull = isFull;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -160,6 +159,7 @@ public class WmsBoxInfo extends BaseEntity
             .append("updateTime", getUpdateTime())
             .append("userdefine1", getUserdefine1())
             .append("userdefine2", getUserdefine2())
+            .append("locationNo", getLocationNo())
             .append("locationId", getLocationId())
             .append("isFull", getIsFull())
             .toString();

+ 2 - 0
warewms-ams/src/main/java/com/ruoyi/ams/inv/domain/form/InvLotLocIdForm.java

@@ -29,4 +29,6 @@ public class InvLotLocIdForm extends InvLotLocId {
     private String lotatt16;
     private String lotatt17;
     private String lotatt18;
+
+    private String lotnumTo;
 }

+ 29 - 0
warewms-ams/src/main/java/com/ruoyi/ams/order/form/GroupDiskFrom.java

@@ -0,0 +1,29 @@
+package com.ruoyi.ams.order.form;
+
+import lombok.Data;
+
+/**
+ * @author JWK
+ * @version 1.0
+ * @date 2023/3/19 16:04
+ */
+@Data
+public class GroupDiskFrom {
+
+    /**
+     * 起始托盘
+     */
+    private String palletNoFrom;
+    /**
+     * 目标托盘
+     */
+    private String palletNoTo;
+    /**
+     * 条码号
+     */
+    private String sn;
+    /**
+     * 出库单号(理货备货才会传入)
+     */
+    private String orderNo;
+}

+ 0 - 10
warewms-ams/src/main/java/com/ruoyi/ams/order/form/PickForm.java

@@ -7,14 +7,4 @@ import java.util.List;
 @Data
 public class PickForm {
     private List<PickInfoForm> pickInfoFormList;
-    /*private String allocationId;
-    private String qty;
-    private String locationTo;
-    private String orderNo;
-    private String palletNo;
-    private String sn;
-    private String sku;
-    private String qty;
-    private String locationTo;
-    private String fullTag;*/
 }

+ 9 - 0
warewms-ams/src/main/java/com/ruoyi/ams/order/service/IWmsDocOrderHeaderService.java

@@ -28,6 +28,7 @@ public interface IWmsDocOrderHeaderService {
 
     /**
      * 查询出库单头(根据ERP单号)
+     *
      * @param erpNo
      * @return
      */
@@ -186,6 +187,14 @@ public interface IWmsDocOrderHeaderService {
      */
     void checkStatusClose(String asnNo, String status);
 
+    /**
+     * 组盘
+     *
+     * @param groupDiskFrom
+     * @return
+     */
+    AjaxResult groupDisk(GroupDiskFrom groupDiskFrom);
+
     /**
      * 理货
      *

+ 76 - 18
warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/WmsDocOrderHeaderServiceImpl.java

@@ -14,6 +14,8 @@ import com.ruoyi.ams.erp.service.IErpBarcodesService;
 import com.ruoyi.ams.inv.domain.ActTransactionLog;
 import com.ruoyi.ams.inv.domain.InvLotAtt;
 import com.ruoyi.ams.inv.domain.InvLotLocId;
+import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
+import com.ruoyi.ams.inv.domain.form.InvLotLocIdForm;
 import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattVO;
 import com.ruoyi.ams.inv.mapper.InvLotAttMapper;
 import com.ruoyi.ams.inv.mapper.InvLotLocIdMapper;
@@ -39,6 +41,7 @@ import com.ruoyi.base.utils.IdSequenceUtils;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.uuid.SnowflakeIdWorker;
@@ -424,21 +427,6 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
             invLotLocIdService.stockTransfer(actAllocationDetails.getLocationId(), "", Long.parseLong(locationTo));
             //托盘进行绑定修改
             wmsBoxInfoMapper.updateLocationBind(Long.parseLong(location), Long.parseLong(locationTo), null);
-            /*if (!exitsMap.containsKey(location)) {
-                exitsMap.put(location, location);
-                //生成任务退回
-                FlowConfigHeaderVO flowConfigHeader = flowConfigHeaderService.selectFlowConfigHeaderById(4L);
-                AgvCallDTO agvCallDTO = new AgvCallDTO();
-                agvCallDTO.setId(flowConfigHeader.getId());
-                agvCallDTO.setLocationFrom(location);
-                agvCallDTO.setLocationTo(p.getLocationTo());
-                agvCallDTO.setPalletNo(actAllocationDetails.getUserdefine1());
-                agvCallDTO.setWarehouseId(Constant.WAREHOUSE_ID);
-                AjaxResult result = businessService.agvCall(flowConfigHeader, agvCallDTO);
-                if ((int) result.get(AjaxResult.CODE_TAG) == 500) {
-                    throw new ServiceException("任务生成失败");
-                }
-            }*/
         }
         return AjaxResult.success("操作成功");
     }
@@ -483,9 +471,9 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
             wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(wmsDocOrderDetails);*/
 
             //修改出库单状态为完成
-            WmsDocOrderHeader header = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(check.getOrderNo());
-            header.setOrderStatus("99");
-            wmsDocOrderHeaderMapper.updateWmsDocOrderHeader(header);
+//            WmsDocOrderHeader header = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(check.getOrderNo());
+//            header.setOrderStatus("99");
+//            wmsDocOrderHeaderMapper.updateWmsDocOrderHeader(header);
         }
 
 
@@ -549,6 +537,76 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         }
     }
 
+    @Transactional
+    @Override
+    public AjaxResult groupDisk(GroupDiskFrom groupDiskFrom) {
+        String palletNoFrom = groupDiskFrom.getPalletNoFrom(); // 起始托盘
+        String palletNoTo = groupDiskFrom.getPalletNoTo(); // 目标托盘
+        String sn = groupDiskFrom.getSn(); // 条码号
+        String orderNo = ""; // 出库单号(备货才会传入)
+///        String sku = ""; // 物料编码
+        if (StringUtils.isNotEmpty(groupDiskFrom.getOrderNo())) {
+            groupDiskFrom.getOrderNo();
+        }
+        /// 根据条码获取物料号
+//        CodeSkuRelationshipVO codeSkuRelationshipVO = codeSkuRelationshipService.checkIsProduct(sn);
+//        sku = codeSkuRelationshipVO.getSku();
+        // 根据起始托盘,条码号查出库存
+        InvLocIdSearchFrom locIdSearchFrom = new InvLocIdSearchFrom();
+        LotattDTO lotattDTO = new LotattDTO();
+        lotattDTO.setLotatt07(palletNoFrom);
+        lotattDTO.setLotatt02(sn);
+        locIdSearchFrom.setLotattDTO(lotattDTO);
+        List<InvLotLocIdLotattVO> invLotLocIdLotattVOList = invLotLocIdService.selectInvLocIdLotattList(locIdSearchFrom);
+        // 组盘是把出库的库存重新组到一个新的托盘上,所以起始托盘和条码理应可以查询到系统里有对应的库存。
+        if (invLotLocIdLotattVOList.size() == 0) {
+            return AjaxResult.error(String.format("不存在对应库存!起始托盘:%s,条码:%s", palletNoFrom, sn));
+        }
+        // 创建Lotnum和库存对应关系,可能是一对多
+        Map<String, List<InvLotLocIdLotattVO>> lotnumAndInvLocIdMap = new HashMap<>();
+        invLotLocIdLotattVOList.stream().forEach(v -> {
+            if (lotnumAndInvLocIdMap.get(v) == null) {
+                lotnumAndInvLocIdMap.put(v.getLotnum(), Arrays.asList(v));
+            } else {
+                List<InvLotLocIdLotattVO> locIdLotattVOList = lotnumAndInvLocIdMap.get(v.getLotnum());
+                locIdLotattVOList.add(v);
+                lotnumAndInvLocIdMap.put(v.getLotnum(),locIdLotattVOList);
+            }
+        });
+        if (palletNoFrom.equals(palletNoTo) && orderNo.equals("")) {
+            // 起始托盘和目标托盘一样,并且出库单传入为空,不做操作
+            return AjaxResult.success("起始和目标托盘一致,不用组盘!");
+
+        } else {
+            // 根据老Lotnum创建新的Lotnum
+            for (Map.Entry<String, List<InvLotLocIdLotattVO>> lotnumToInvLocId: lotnumAndInvLocIdMap.entrySet()) {
+                String lotnum = lotnumToInvLocId.getKey();
+                List<InvLotLocIdLotattVO> invLocIdList = lotnumToInvLocId.getValue();
+                InvLotAtt invLotAtt = invLotAttMapper.selectInvLotAttByLotnum(lotnum);
+                String newLotnum = idSequenceUtils.generateId("LOTNUMBER");
+                invLotAtt.setLotnum(newLotnum);
+                invLotAtt.setLotatt07(palletNoTo);
+                if (!orderNo.equals("")) {
+                    invLotAtt.setLotatt14(orderNo); // 备货对应的出库单号
+                }
+                invLotAtt.setCreateTime(DateUtils.getNowDate());
+                if (invLotAttMapper.insertInvLotAtt(invLotAtt) > 0) {
+                    for (InvLotLocIdLotattVO v : invLocIdList) {
+                        InvLotLocIdForm invLotLocIdUpdate = new InvLotLocIdForm();
+                        invLotLocIdUpdate.setLotnum(lotnum);
+                        invLotLocIdUpdate.setLocationId(v.getLocationId().toString());
+                        invLotLocIdUpdate.setCustomerId(v.getCustomerId());
+                        invLotLocIdUpdate.setSku(v.getSku());
+                        invLotLocIdUpdate.setLotnumTo(newLotnum);
+                        invLotLocIdService.updateInvLotLocId(invLotLocIdUpdate);
+                    }
+
+                }
+            }
+        }
+        return AjaxResult.success("组盘成功!");
+    }
+
     @Transactional
     @Override
     public AjaxResult arrangeStock(ArrangeStockForm arrangeStockForm) {

+ 1 - 1
warewms-ams/src/main/resources/mapper/ams/InvLotLocIdMapper.xml

@@ -330,7 +330,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         left join base_sku_type skt on sk.sku_type = skt.item_code
         left join (select dict_label,dict_value from sys_dict_data where dict_type = 'ams_inv_quality') lot05_dict on att.lotatt05 = lot05_dict.dict_value
         left join (select * from base_supplier) supp on att.lotatt06 = supp.supplier_id
-        left join (SELECT * from wms_box_info where location_id !='900') w on inv.location_id = w.location_id
+        left join (SELECT * from wms_box_info where location_id not in('99997','99998','99999')) w on inv.location_id = w.location_id
         <where>
             <if test="zoneId != null  and zoneId != ''"> and b.zone_id = #{zoneId}</if>
             <if test="sku != null  and sku != ''"> and (sk.sku like concat('%', #{sku}, '%') or sk.desc1 like concat('%', #{sku}, '%'))</if>

+ 5 - 1
warewms-ams/src/main/resources/mapper/box/WmsBoxInfoMapper.xml

@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="userdefine2"    column="userdefine2"    />
         <result property="locationId"    column="location_id"    />
         <result property="isFull"    column="is_full"    />
+        <result property="locationNo" column="location_no"/>
     </resultMap>
 
     <sql id="selectWmsBoxInfoVo">
@@ -26,10 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectWmsBoxInfoList" parameterType="WmsBoxInfo" resultMap="WmsBoxInfoResult">
-        <include refid="selectWmsBoxInfoVo"/>
+        select t1.*,t2.location_no
+        from wms_box_info t1
+        left join base_location_info t2 on t2.id = t1.location_id
         <where>
             <if test="isFull != null  and isFull != ''"> and is_full = #{isFull}</if>
             <if test="boxNo != null  and boxNo != ''"> and box_no = #{boxNo}</if>
+            <if test="locationNo != null  and locationNo != ''"> and t2.location_no = #{locationNo}</if>
         </where>
     </select>
 

+ 11 - 0
warewms-base/src/main/java/com/ruoyi/base/constant/Constant.java

@@ -9,6 +9,17 @@ public class Constant {
     public static final String CUSTOMER_ID = "default";
     public static final Long WAREHOUSE_ID = 1L;
 
+
+    /**
+     * 入库缓存位
+     */
+    public static final Long LOC_STAGE_CACHE = 99997l;
+
+    /**
+     * 出库缓存位
+     */
+    public static final Long LOC_SORTATION_CACHE = 99998l;
+
     /**
      * 中间缓存位
      * AGV作业搬运任务时候库存的虚拟库位