Bladeren bron

永湖开发

zhangxin 1 jaar geleden
bovenliggende
commit
fc18bfdbc7
18 gewijzigde bestanden met toevoegingen van 303 en 79 verwijderingen
  1. 2 8
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaController.java
  2. 4 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
  3. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotAttServiceImpl.java
  4. 3 1
      warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java
  5. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/order/domain/PalletMatchLog.java
  6. 22 0
      warewms-ams/src/main/java/com/ruoyi/ams/order/domain/WmsDocOrderDetails.java
  7. 28 9
      warewms-ams/src/main/java/com/ruoyi/ams/order/domain/WmsDocOrderHeader.java
  8. 58 0
      warewms-ams/src/main/java/com/ruoyi/ams/order/dto/PalletMatchLogDTO.java
  9. 1 0
      warewms-ams/src/main/java/com/ruoyi/ams/order/dto/PdaGroupDiskDTO.java
  10. 23 1
      warewms-ams/src/main/java/com/ruoyi/ams/order/service/IPalletMatchLogService.java
  11. 6 3
      warewms-ams/src/main/java/com/ruoyi/ams/order/service/IWmsDocOrderHeaderService.java
  12. 4 2
      warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/ActAllocationDetailsServiceImpl.java
  13. 36 3
      warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/PalletMatchLogServiceImpl.java
  14. 85 49
      warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/WmsDocOrderHeaderServiceImpl.java
  15. 3 0
      warewms-base/src/main/java/com/ruoyi/base/domain/BaseLocationInfo.java
  16. 2 1
      warewms-base/src/main/java/com/ruoyi/base/mapper/BaseLocationInfoMapper.java
  17. 6 0
      warewms-base/src/main/java/com/ruoyi/base/service/IBaseLocationInfoService.java
  18. 18 0
      warewms-base/src/main/java/com/ruoyi/base/service/impl/BaseLocationInfoServiceImpl.java

+ 2 - 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaController.java

@@ -531,8 +531,7 @@ public class PdaController {
      */
     @PostMapping("/docOrder/inventoryMatching")
     public AjaxResult inventoryMatch(@RequestParam String orderNos) {
-        List<String> orderList = JSONArray.parseArray(orderNos, String.class);
-        return AjaxResult.success(wmsDocOrderHeaderService.inventoryMatch(orderList));
+        return AjaxResult.success(wmsDocOrderHeaderService.inventoryMatch(orderNos));
     }
 
     /**
@@ -545,7 +544,6 @@ public class PdaController {
         return AjaxResult.success(wmsDocOrderHeaderService.queryPalletMatchInfoList(orderNos));
     }
 
-
     /**
      * 组盘
      * PDA备货组盘(传出库单号)
@@ -554,7 +552,7 @@ public class PdaController {
      */
     @PostMapping("/docOrder/pdaGroupDisk")
     public AjaxResult pdaGroupDisk(@RequestBody PdaGroupDiskDTO pdaGroupDiskDTO) {
-        return wmsDocOrderHeaderService.pdaGroupDiskBH(pdaGroupDiskDTO);
+        return wmsDocOrderHeaderService.syncPdaGroupDiskBH(pdaGroupDiskDTO);
     }
 
     /**
@@ -582,10 +580,6 @@ public class PdaController {
      */
     @PostMapping("/docOrder/groupDiskCheck")
     public AjaxResult groupDiskCheck(@RequestBody GroupDiskFrom groupDiskFrom) {
-
-        //通过ERP单号获取WMS的出库单号
-        String orderNo = wmsDocOrderHeaderService.changeErpNoToOrderNo(groupDiskFrom.getOrderNo());
-        groupDiskFrom.setOrderNo(orderNo);
         return wmsDocOrderHeaderService.groupDiskBHCheck(groupDiskFrom);
     }
 

+ 4 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java

@@ -4,6 +4,8 @@ import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
 /**
@@ -16,6 +18,7 @@ public class BaseEntity implements Serializable
     private static final long serialVersionUID = 1L;
 
     /** 搜索值 */
+    @TableField(exist = false)
     private String searchValue;
 
     /** 创建者 */
@@ -36,6 +39,7 @@ public class BaseEntity implements Serializable
     private String remark;
 
     /** 请求参数 */
+    @TableField(exist = false)
     private Map<String, Object> params;
 
     public String getSearchValue()

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotAttServiceImpl.java

@@ -147,7 +147,7 @@ public class InvLotAttServiceImpl implements IInvLotAttService {
                 invLotAttPalletTotalDTO.setSku(key);
                 invLotAttPalletTotalDTO.setPalletNo(item.getKey());
                 invLotAttPalletTotalDTO.setTotalQty(item.getValue().stream().map(invLotAtt -> lotNumQtyMap.get(invLotAtt.getLotnum()).getSurplusQty()).reduce(BigDecimal.ZERO, BigDecimal::add));
-                invLotAttPalletTotalDTO.setLocationId(lotNumQtyMap.get(item.getValue().stream().map(InvLotAtt::getLotnum).findFirst()).getLocationId());
+                invLotAttPalletTotalDTO.setLocationId(lotNumQtyMap.get(item.getValue().stream().map(InvLotAtt::getLotnum).findFirst().orElseGet(() -> null)).getLocationId());
                 return invLotAttPalletTotalDTO;
             }).sorted(Comparator.comparing(InvLotAttPalletTotalDTO::getTotalQty)).collect(Collectors.toList());
             result.put(key, invLotAttPalletTotalDTOList);

+ 3 - 1
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java

@@ -1124,7 +1124,9 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
      * @return
      */
     public List<InvLotLocId> queryInvLotLocIdBySkuList(List<String> skuList){
-        return invLotLocIdMapper.selectList(Wrappers.<InvLotLocId>lambdaQuery().in(InvLotLocId::getSku, skuList));
+        List<BaseLocationInfo> baseLocationInfoList = baseLocationInfoService.queryLocStageCacheBaseLocationInfoList();
+        return invLotLocIdMapper.selectList(Wrappers.<InvLotLocId>lambdaQuery().in(InvLotLocId::getSku, skuList)
+                .in(InvLotLocId::getLocationId, baseLocationInfoList.stream().map(item -> String.valueOf(item.getId())).collect(Collectors.toList())));
     }
 
     /**

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/order/domain/PalletMatchLog.java

@@ -48,7 +48,7 @@ public class PalletMatchLog extends BaseEntity
     @Excel(name = "agv车号")
     private String agvNo;
 
-    /** $column.columnComment */
+    /** 逻辑删除*/
     @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
     private String userdefine1;
 

+ 22 - 0
warewms-ams/src/main/java/com/ruoyi/ams/order/domain/WmsDocOrderDetails.java

@@ -1,6 +1,8 @@
 package com.ruoyi.ams.order.domain;
 
 import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableField;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -188,82 +190,102 @@ public class WmsDocOrderDetails extends BaseEntity
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_01")
     private String dEdi01;
 
     /** 目标库位 */
     @Excel(name = "目标库位")
+    @TableField(value = "d_edi_02")
     private String dEdi02;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_03")
     private String dEdi03;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_04")
     private String dEdi04;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_05")
     private String dEdi05;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_06")
     private String dEdi06;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_07")
     private String dEdi07;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_08")
     private String dEdi08;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_09")
     private String dEdi09;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_10")
     private String dEdi10;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_11")
     private String dEdi11;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_12")
     private String dEdi12;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_13")
     private String dEdi13;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_14")
     private String dEdi14;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_15")
     private String dEdi15;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_16")
     private String dEdi16;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_17")
     private String dEdi17;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_18")
     private String dEdi18;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_19")
     private String dEdi19;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "d_edi_20")
     private String dEdi20;
 
     /** 跟踪号(未启用) */

+ 28 - 9
warewms-ams/src/main/java/com/ruoyi/ams/order/domain/WmsDocOrderHeader.java

@@ -3,6 +3,9 @@ package com.ruoyi.ams.order.domain;
 import java.math.BigDecimal;
 import java.util.List;
 import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -141,65 +144,81 @@ public class WmsDocOrderHeader extends BaseEntity
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "h_edi_01")
     private String hEdi01;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_02")
+    @TableField(value = "h_edi_02")
     private String hEdi02;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_03")
+    @TableField(value = "h_edi_03")
     private String hEdi03;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_04")
+    @TableField(value = "h_edi_04")
     private String hEdi04;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_05")
+    @TableField(value = "h_edi_05")
     private String hEdi05;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_06")
+    @TableField(value = "h_edi_06")
     private String hEdi06;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_07")
+    @TableField(value = "h_edi_07")
     private String hEdi07;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_08")
+    @TableField(value = "h_edi_08")
     private String hEdi08;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_09")
+    @TableField(value = "h_edi_09")
     private BigDecimal hEdi09;
 
     /**  */
-    @Excel(name = "")
+    @Excel(name = "h_edi_10")
+    @TableField(value = "h_edi_10")
     private BigDecimal hEdi10;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "h_edi_11")
     private String hEdi11;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "h_edi_12")
     private String hEdi12;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "h_edi_13")
     private String hEdi13;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "h_edi_14")
     private String hEdi14;
 
     /**  */
     @Excel(name = "")
+    @TableField(value = "h_edi_15")
     private String hEdi15;
 
     /** 出库单信息 */
+    @TableField(exist = false)
     private List<WmsDocOrderDetails> wmsDocOrderDetailsList;
 
     public void setOrderNo(String orderNo) 

+ 58 - 0
warewms-ams/src/main/java/com/ruoyi/ams/order/dto/PalletMatchLogDTO.java

@@ -0,0 +1,58 @@
+package com.ruoyi.ams.order.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class PalletMatchLogDTO implements Serializable {
+    private static final long serialVersionUID = -3052302494611264008L;
+
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /** 托盘 */
+    @Excel(name = "托盘")
+    private String palletNo;
+
+    /** 物料/产品 */
+    @Excel(name = "物料/产品")
+    private String sku;
+
+    /** 数量 */
+    @Excel(name = "数量")
+    private String totalQty;
+
+    /** 所扫描出库单(多出库单以,隔开) */
+    @Excel(name = "所扫描出库单", readConverterExp = "多=出库单以,隔开")
+    private String orderNos;
+
+    /** 库位id */
+    @Excel(name = "库位编码")
+    private String locationNo;
+
+    /** agv车号 */
+    @Excel(name = "agv车号")
+    private String agvNo;
+
+    private String createBy;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /** 备注 */
+    private String remark;
+}

+ 1 - 0
warewms-ams/src/main/java/com/ruoyi/ams/order/dto/PdaGroupDiskDTO.java

@@ -31,6 +31,7 @@ public class PdaGroupDiskDTO implements Serializable {
     /**
      * 出库单号(理货备货才会传入)
      */
+    @NotBlank(message = "出库单号不能为空")
     private String orderNo;
 
     /**

+ 23 - 1
warewms-ams/src/main/java/com/ruoyi/ams/order/service/IPalletMatchLogService.java

@@ -1,6 +1,7 @@
 package com.ruoyi.ams.order.service;
 
 import com.ruoyi.ams.order.domain.PalletMatchLog;
+import com.ruoyi.ams.order.dto.PalletMatchLogDTO;
 import com.ruoyi.framework.service.BaseService;
 
 import java.util.List;
@@ -23,9 +24,30 @@ public interface IPalletMatchLogService extends BaseService<PalletMatchLog>
     List<PalletMatchLog> selectPalletMatchLogList(PalletMatchLog palletMatchLog);
 
     /**
-     * 根据单号获取托盘匹配信息
+     * 根据单号获取托盘匹配信息(本次匹配托盘)
      * @param orderNos
      * @return
      */
     List<PalletMatchLog> queryPalletMatchLogByOrderNos(String orderNos);
+
+    /**
+     * 根据单号获取托盘匹配信息(所有匹配托盘信息)
+     * @param orderNos
+     * @return
+     */
+    List<PalletMatchLog> queryAllPalletMatchLogByOrderNos(String orderNos);
+
+    /**
+     * 根据单号获取托盘匹配信息
+     * @param orderNos
+     * @return
+     */
+    List<PalletMatchLog> queryPalletMatchLogByOrderNos(String orderNos, String logicalDeletion);
+
+    /**
+     * 逻辑删除记录
+     * @param palletMatchLogDTOList
+     * @return
+     */
+    Boolean logicalDeletionPalletMatchLog(List<PalletMatchLog> palletMatchLogDTOList);
 }

+ 6 - 3
warewms-ams/src/main/java/com/ruoyi/ams/order/service/IWmsDocOrderHeaderService.java

@@ -5,6 +5,7 @@ import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattVO;
 import com.ruoyi.ams.order.domain.PalletMatchLog;
 import com.ruoyi.ams.order.domain.WmsDocOrderDetails;
 import com.ruoyi.ams.order.domain.WmsDocOrderHeader;
+import com.ruoyi.ams.order.dto.PalletMatchLogDTO;
 import com.ruoyi.ams.order.dto.PdaGroupDiskDTO;
 import com.ruoyi.ams.order.form.*;
 import com.ruoyi.ams.order.vo.CheckOutVO;
@@ -250,6 +251,8 @@ public interface IWmsDocOrderHeaderService {
      */
     AjaxResult groupDiskBHCheck(GroupDiskFrom groupDiskFrom);
 
+    AjaxResult syncPdaGroupDiskBH(PdaGroupDiskDTO pdaGroupDiskDTO);
+
     /**
      * PDA理货备货
      * @param pdaGroupDiskDTO
@@ -424,15 +427,15 @@ public interface IWmsDocOrderHeaderService {
 
     /**
      * 库存分配
-     * @param orderList
+     * @param orderNos
      * @return
      */
-    Boolean inventoryMatch(List<String> orderList);
+    Boolean inventoryMatch(String orderNos);
 
     /**
      * 获取库存分配反馈
      * @param orderNos
      * @return
      */
-    List<PalletMatchLog> queryPalletMatchInfoList(String orderNos);
+    List<PalletMatchLogDTO> queryPalletMatchInfoList(String orderNos);
 }

+ 4 - 2
warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/ActAllocationDetailsServiceImpl.java

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.ruoyi.ams.box.domain.WmsBoxInfo;
 import com.ruoyi.ams.box.service.IWmsBoxInfoService;
 import com.ruoyi.ams.order.domain.WmsDocOrderDetails;
@@ -17,6 +18,7 @@ import com.ruoyi.base.service.IBaseLocationInfoService;
 import com.ruoyi.base.utils.IdSequenceUtils;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.ams.order.mapper.ActAllocationDetailsMapper;
@@ -174,8 +176,7 @@ public class ActAllocationDetailsServiceImpl implements IActAllocationDetailsSer
 //            }
 //            return AjaxResult.success("分配明细生成成功");
 //        }
-
-        String allocationId = idSequenceUtils.generateId("ANO");
+        String allocationId = IdWorker.getIdStr();
         ActAllocationDetails actAllocationDetails = new ActAllocationDetails();
         actAllocationDetails.setAllocationId(allocationId);
         actAllocationDetails.setOrderNo(orderDetails.getOrderNo());
@@ -254,6 +255,7 @@ public class ActAllocationDetailsServiceImpl implements IActAllocationDetailsSer
     @Transactional
     @Override
     public AjaxResult modifyAssignmentStockTaskStatusPickingComplete(String orderNo, Long locationId, String palletNo) {
+        if (StringUtils.isBlank(orderNo)) return AjaxResult.success();
         WmsDocOrderHeader wmsDocOrderHeader = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(orderNo);
         if (!wmsDocOrderHeader.getOrderType().equals(Constant.ORDER_TYP.BH.getValue())) {
             return AjaxResult.success();

+ 36 - 3
warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/PalletMatchLogServiceImpl.java

@@ -1,14 +1,17 @@
 package com.ruoyi.ams.order.service.impl;
 
-import cn.hutool.db.sql.Wrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.ams.order.domain.PalletMatchLog;
+import com.ruoyi.ams.order.dto.PalletMatchLogDTO;
 import com.ruoyi.ams.order.mapper.PalletMatchLogMapper;
 import com.ruoyi.ams.order.service.IPalletMatchLogService;
+import com.ruoyi.common.constant.Constants;
 import com.ruoyi.framework.service.impl.BaseServiceImpl;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 托盘匹配记录Service业务层处理
@@ -33,13 +36,43 @@ public class PalletMatchLogServiceImpl extends BaseServiceImpl<PalletMatchLogMap
     }
 
     /**
-     * 根据单号获取托盘匹配信息
+     * 根据单号获取托盘匹配信息(本次匹配托盘)
      * @param orderNos
      * @return
      */
     @Override
     public List<PalletMatchLog> queryPalletMatchLogByOrderNos(String orderNos) {
-        return baseDao.selectList(Wrappers.<PalletMatchLog>lambdaQuery().eq(PalletMatchLog::getOrderNos, orderNos));
+        return queryPalletMatchLogByOrderNos(orderNos, Constants.NO);
+    }
+
+    /**
+     * 根据单号获取托盘匹配信息(所有匹配托盘信息)
+     * @param orderNos
+     * @return
+     */
+    @Override
+    public List<PalletMatchLog> queryAllPalletMatchLogByOrderNos(String orderNos) {
+        return queryPalletMatchLogByOrderNos(orderNos, null);
+    }
+
+    /**
+     * 根据单号获取托盘匹配信息
+     * @param orderNos
+     * @return
+     */
+    @Override
+    public List<PalletMatchLog> queryPalletMatchLogByOrderNos(String orderNos, String logicalDeletion) {
+        return baseDao.selectList(Wrappers.<PalletMatchLog>lambdaQuery().eq(PalletMatchLog::getOrderNos, orderNos).eq(StringUtils.isNotBlank(logicalDeletion), PalletMatchLog::getUserdefine1, logicalDeletion));
+    }
+
+    /**
+     * 逻辑删除记录
+     * @param palletMatchLogDTOList
+     * @return
+     */
+    @Override
+    public Boolean logicalDeletionPalletMatchLog(List<PalletMatchLog> palletMatchLogDTOList){
+        return baseDao.update(new PalletMatchLog(), Wrappers.<PalletMatchLog>lambdaUpdate().set(PalletMatchLog::getUserdefine1, Constants.YES).in(PalletMatchLog::getId, palletMatchLogDTOList.stream().map(PalletMatchLog::getId).collect(Collectors.toList()))) > 0;
     }
 
 }

+ 85 - 49
warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/WmsDocOrderHeaderServiceImpl.java

@@ -3,6 +3,7 @@ package com.ruoyi.ams.order.service.impl;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.comparator.CompareUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.ams.asn.service.IWmsDocAsnHeaderService;
@@ -33,6 +34,7 @@ import com.ruoyi.ams.order.domain.ActAllocationDetails;
 import com.ruoyi.ams.order.domain.PalletMatchLog;
 import com.ruoyi.ams.order.domain.WmsDocOrderDetails;
 import com.ruoyi.ams.order.domain.WmsDocOrderHeader;
+import com.ruoyi.ams.order.dto.PalletMatchLogDTO;
 import com.ruoyi.ams.order.dto.PdaGroupDiskDTO;
 import com.ruoyi.ams.order.form.*;
 import com.ruoyi.ams.order.mapper.WmsDocOrderDetailsMapper;
@@ -49,6 +51,7 @@ import com.ruoyi.base.form.SnCheckSoForm;
 import com.ruoyi.base.service.IBaseLocationInfoService;
 import com.ruoyi.base.service.ICodeSkuRelationshipService;
 import com.ruoyi.base.utils.IdSequenceUtils;
+import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.exception.ServiceException;
@@ -974,13 +977,13 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
     @Transactional(propagation = Propagation.REQUIRES_NEW)
     @Override
     public AjaxResult doCheckout(CheckOutInfoForm check) {
-        String orderNo = check.getOrderNo();
+//        String orderNo = check.getOrderNo();
         String palletNo = check.getPalletNo();
         // 验证出库单号
-        WmsDocOrderHeader wmsDocOrderHeader = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByErpNo(orderNo);
-        if (wmsDocOrderHeader == null) {
-            return AjaxResult.error("对应出库单号不存在!");
-        }
+//        WmsDocOrderHeader wmsDocOrderHeader = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByErpNo(orderNo);
+//        if (wmsDocOrderHeader == null) {
+//            return AjaxResult.error("对应出库单号不存在!");
+//        }
         //生成任务呼叫到接驳位
         BaseLocationInfo baseLocationInfo = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(check.getLocationNo(), Constant.WAREHOUSE_ID);
         FlowConfigHeaderVO flowConfigHeaderVO = flowConfigHeaderService.selectFlowConfigHeaderById((long) Constant.FLOW_ID_SO);
@@ -992,7 +995,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         agvCallDTO.setWarehouseId(Constant.WAREHOUSE_ID);
         // 参数内容过长无法添加
         agvCallDTO.setExtParam("");
-        agvCallDTO.setOrderNo(wmsDocOrderHeader.getOrderNo());
+        agvCallDTO.setOrderNo(StringUtils.EMPTY);
         agvCallDTO.setTaskType(Constant.FLOW_ID_SO + "");
         AjaxResult result = businessService.agvCall(flowConfigHeaderVO, agvCallDTO);
         if ((int) result.get(AjaxResult.CODE_TAG) == 500) {
@@ -1307,26 +1310,15 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
 
     @Override
     public AjaxResult groupDiskBHCheck(GroupDiskFrom groupDiskFrom) {
-
-        // 验证出库单
-        WmsDocOrderHeader header = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(groupDiskFrom.getOrderNo());
-        if (null == header) return AjaxResult.error("查无此出库单数据" + groupDiskFrom.getOrderNo());
-        if (!header.getOrderType().equals(Constant.ORDER_TYP.BH.getValue())) {
-            return AjaxResult.error("出库单类型不可备货组盘!");
-        }
-        if (!header.getOrderStatus().equals(Constant.ORDER_STS.STS10.getValue())
-                && !header.getOrderStatus().equals(Constant.ORDER_STS.STS20.getValue())
-                && !header.getOrderStatus().equals(Constant.ORDER_STS.STS22.getValue())) {
-            return AjaxResult.error("出库单状态不可备货组盘!");
-        }
-
-        //验证目标托盘库存,一个托盘只能备货一个出库单
-        AjaxResult ajaxResultC = invLotLocIdService.checkPalletIsOnlyOrderNo(groupDiskFrom.getPalletNoTo()
-                , groupDiskFrom.getOrderNo());
-        if (!ajaxResultC.isSuccess()) {
-            return ajaxResultC;
-        }
-
+        //通过ERP单号获取WMS的出库单号
+        String orderNo = wmsDocOrderHeaderService.changeErpNoToOrderNo(groupDiskFrom.getOrderNo());
+        if (StringUtils.isBlank(orderNo)) return AjaxResult.error("出库单号不存在!");
+        //todo 查询出库单状态和类型
+
+        //todo查询托盘是否存在
+        WmsBoxInfo wmsBoxInfo = wmsBoxInfoService.selectWmsBoxInfoByBoxNo(groupDiskFrom.getBoxNo());
+        Optional.ofNullable(wmsBoxInfo).orElseThrow(() -> new BaseException("托盘不存在!"));
+        if (Constants.YES.equals(wmsBoxInfo.getIsFull())) return AjaxResult.error("该托盘已满托!");
         return AjaxResult.success();
     }
 
@@ -1767,7 +1759,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         // 验证库存
         if (StringUtils.isEmpty(endLotattVO.getLotatt15())) {
 
-        }else {
+        } else {
             WmsDocOrderHeader header = wmsDocOrderHeaderService.selectDocOrderHeaderByOrderNo(endLotattVO.getLotatt15());
             if (header == null || !header.getOrderType().equals(Constant.ORDER_TYP.LH.getValue())) {
                 return AjaxResult.success("扫描的条码不可反拣组盘!不存在对应的出库理货单!");
@@ -2737,22 +2729,32 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         return AjaxResult.success();
     }
 
+    /**
+     * 并发控制
+     * @param pdaGroupDiskDTO
+     * @return
+     */
+    @Override
+    public synchronized AjaxResult syncPdaGroupDiskBH(PdaGroupDiskDTO pdaGroupDiskDTO){
+        return pdaGroupDiskBH(pdaGroupDiskDTO);
+    }
+
     /**
      * PDA理货备货
+     *
      * @param pdaGroupDiskDTO
      * @return
      */
     @Override
     @Transactional
-    public synchronized AjaxResult pdaGroupDiskBH(PdaGroupDiskDTO pdaGroupDiskDTO) {
+    public AjaxResult pdaGroupDiskBH(PdaGroupDiskDTO pdaGroupDiskDTO) {
         String palletNoFrom = pdaGroupDiskDTO.getPalletNoFrom(); // 起始托盘
         String palletNoTo = pdaGroupDiskDTO.getPalletNoTo(); // 目标托盘
         String sn = pdaGroupDiskDTO.getSn(); // 条码号
-        String orderNo = StringUtils.isNotBlank(pdaGroupDiskDTO.getOrderNo()) ? pdaGroupDiskDTO.getOrderNo() : ""; // 出库单号(备货才会传入)
         String boxNo = StringUtils.isNotBlank(pdaGroupDiskDTO.getBoxNo()) ? pdaGroupDiskDTO.getBoxNo() : palletNoTo; //箱号
         BigDecimal qty = new BigDecimal(pdaGroupDiskDTO.getQty()); // 数量
-
-        verifyWmsDocOrder(orderNo);
+        WmsDocOrderHeader wmsDocOrderHeader = selectWmsDocOrderHeaderByErpNo(pdaGroupDiskDTO.getOrderNo());
+        String orderNo = wmsDocOrderHeader.getOrderNo();
 
         // 根据条码获取物料号
         CodeSkuRelationshipVO codeSkuRelationshipVO = codeSkuRelationshipService.checkIsProduct(sn);
@@ -2766,9 +2768,9 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         String locationId = invLotLocId.getLocationId();
         BigDecimal qtyAllocated = ObjectUtil.isNotNull(invLotLocId.getQtyallocated()) ? invLotLocId.getQtyallocated() : BigDecimal.ZERO;
         BigDecimal invLotLocQty = invLotLocId.getQty().subtract(qtyAllocated);
-        if (CompareUtil.compare(qty, invLotLocQty) >= 0){
+        if (CompareUtil.compare(qty, invLotLocQty) >= 0) {
             invLotLocIdService.updateInvLotLocId(invLotLocId.getLotnum(), lotNum, invLotLocQty, sku, locationId);
-        }else {
+        } else {
             // 拆分库存
             // 修改原库存
             invLotLocIdService.updateInvLotLocId(invLotLocId.getLotnum(), qtyAllocated.add(qty), invLotLocId.getSku());
@@ -2787,10 +2789,10 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
             BigDecimal wmsDocOrderDetailsQty = wmsDocOrderDetails.getQtyOrdered().subtract(wmsDocOrderDetailsQtyAllocated);
             BigDecimal remainQty = qty.subtract(wmsDocOrderDetailsQty);
             Boolean flag = CompareUtil.compare(remainQty, BigDecimal.ZERO) < 0;
-            wmsDocOrderDetails.setQtyAllocated(flag ? qty : wmsDocOrderDetailsQty);
+            wmsDocOrderDetails.setQtyAllocated(flag ? wmsDocOrderDetailsQtyAllocated.add(qty) : wmsDocOrderDetails.getQtyOrdered());
             wmsDocOrderDetails.setQtyAllocatedEach(wmsDocOrderDetails.getQtyAllocated());
             wmsDocOrderDetails.setLineStatus(flag ? Constant.ORDER_STS.STS10.getValue() : Constant.ORDER_STS.STS20.getValue());
-            wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(wmsDocOrderDetails);
+            wmsDocOrderDetailsService.updateWmsDocOrderDetails(wmsDocOrderDetails);
             //生成分配明细
             actAllocationDetailsService.addActAllocationDetails(lotNum, locationId, qty, wmsDocOrderDetails
                     , wmsDocOrderDetails.getLineStatus());
@@ -2802,15 +2804,20 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         }
         // 更新托盘
         wmsBoxInfoService.updateWmsBoxLocationIdByBoxNo(boxNo, Long.parseLong(locationId));
+        List<WmsDocOrderDetails> wmsDocOrderDetailsByOrderNo = wmsDocOrderDetailsService.queryWmsDocOrderDetailsByOrderNo(orderNo);
+        List<WmsDocOrderDetails> docOrderDetailsList = wmsDocOrderDetailsByOrderNo.stream().filter(item -> CompareUtil.compare(item.getLineStatus(), Constant.ORDER_STS.STS20.getValue()) != 0).collect(Collectors.toList());
+        wmsDocOrderHeaderMapper.update(new WmsDocOrderHeader(), Wrappers.<WmsDocOrderHeader>lambdaUpdate()
+                .set(WmsDocOrderHeader::getOrderStatus, CollectionUtil.isNotEmpty(docOrderDetailsList) ? Constant.ORDER_STS.STS22.getValue() : Constant.ORDER_STS.STS23.getValue()).eq(WmsDocOrderHeader::getOrderNo, orderNo));
         return AjaxResult.success("当前托盘备货成功!");
     }
 
-    private InvLotLocId buildInvLotLocId(String lotNum, BigDecimal qty, String locationId, String traceId, String sku){
+    private InvLotLocId buildInvLotLocId(String lotNum, BigDecimal qty, String locationId, String traceId, String sku) {
         InvLotLocId invLotLocId = new InvLotLocId();
         invLotLocId.setLotnum(lotNum);
         invLotLocId.setTraceid(traceId);
         invLotLocId.setLocationId(locationId);
         invLotLocId.setCustomerId(Constant.CUSTOMER_ID);
+
         invLotLocId.setSku(sku);
         invLotLocId.setQty(qty);
         invLotLocId.setQtyEach(qty);
@@ -2819,7 +2826,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         return invLotLocId;
     }
 
-    private InvLotAtt buildInvLotAtt(String lotNum, String palletNoTo, String orderNo, String sn, String sku){
+    private InvLotAtt buildInvLotAtt(String lotNum, String palletNoTo, String orderNo, String sn, String sku) {
         InvLotAtt invLotAtt = new InvLotAtt();
         invLotAtt.setLotnum(lotNum);
         invLotAtt.setLotatt07(palletNoTo);
@@ -2830,8 +2837,10 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         invLotAtt.setCreateTime(DateUtils.getNowDate());
         return invLotAtt;
     }
+
     /**
      * 验证出库单
+     *
      * @param orderNo
      */
     private void verifyWmsDocOrder(String orderNo) {
@@ -2847,15 +2856,22 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         }
     }
 
-
     /**
      * 库存分配
-     * @param orderList
+     *
+     * @param orderNos
      * @return
      */
     @Override
     @Transactional
-    public Boolean inventoryMatch(List<String> orderList) {
+    public Boolean inventoryMatch(String orderNos) {
+        List<String> orderList = JSONArray.parseArray(orderNos, String.class);
+        String order = orderList.stream().collect(Collectors.joining(","));
+        List<PalletMatchLog> palletMatchLogList = palletMatchLogService.queryAllPalletMatchLogByOrderNos(order);
+        if (CollectionUtil.isNotEmpty(palletMatchLogList)) {
+            palletMatchLogService.logicalDeletionPalletMatchLog(palletMatchLogList);
+        }
+
         //根据erp单号获取出库单头列表
         List<WmsDocOrderHeader> wmsDocOrderHeaderList = wmsDocOrderHeaderMapper.selectList(Wrappers.<WmsDocOrderHeader>lambdaQuery().in(WmsDocOrderHeader::getSoReference1, orderList).orderByDesc(WmsDocOrderHeader::getCreateTime));
         if (CollectionUtil.isEmpty(wmsDocOrderHeaderList)) {
@@ -2863,19 +2879,19 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         }
         List<WmsDocOrderHeader> wmsDocOrderHeaderFilterList = wmsDocOrderHeaderList.stream().filter(item -> item.getOrderStatus().equals(Constant.ORDER_STS.STS00.getValue())
                 || item.getOrderStatus().equals(Constant.ORDER_STS.STS10.getValue()) || item.getOrderStatus().equals(Constant.ORDER_STS.STS22.getValue())).collect(Collectors.toList());
-        if (CollectionUtil.isEmpty(wmsDocOrderHeaderFilterList)){
+        if (CollectionUtil.isEmpty(wmsDocOrderHeaderFilterList)) {
             throw new BaseException("出库单状态不可进行库存匹配!");
         }
         List<WmsDocOrderDetails> wmsDocOrderDetailsList = wmsDocOrderDetailsService.queryWmsDocOrderDetailsByOrderNo(wmsDocOrderHeaderFilterList.stream().filter(item -> StringUtils.isNotBlank(item.getOrderNo())).map(WmsDocOrderHeader::getOrderNo).collect(Collectors.toList()));
-        if (CollectionUtil.isEmpty(wmsDocOrderDetailsList)){
+        if (CollectionUtil.isEmpty(wmsDocOrderDetailsList)) {
             throw new BaseException("出库单明细为空!");
         }
         Map<String, List<WmsDocOrderDetails>> wmsDocOrderDetailsGroupBySkuMap = wmsDocOrderDetailsList.stream().filter(item -> StringUtils.isNotBlank(item.getSku())).collect(Collectors.groupingBy(WmsDocOrderDetails::getSku));
-        if (CollectionUtil.isEmpty(wmsDocOrderDetailsGroupBySkuMap)){
+        if (CollectionUtil.isEmpty(wmsDocOrderDetailsGroupBySkuMap)) {
             throw new BaseException("出库单明细绑定sku为空!");
         }
         Map<String, List<InvLotAttPalletTotalDTO>> invLotAttPalletTotalMap = invLotAttService.buildInvLotAttPalletTotalMap(wmsDocOrderDetailsGroupBySkuMap.entrySet().stream().map(Map.Entry::getKey).collect(Collectors.toList()));
-        if (CollectionUtil.isEmpty(invLotAttPalletTotalMap)){
+        if (CollectionUtil.isEmpty(invLotAttPalletTotalMap)) {
             throw new BaseException("所选出库单绑定sku无库存!");
         }
         //所需出库托盘
@@ -2887,9 +2903,17 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
             if (CompareUtil.compare(total, BigDecimal.ZERO) <= 0) continue;
             List<InvLotAttPalletTotalDTO> invLotAttPalletTotalDTOList = invLotAttPalletTotalMap.get(wmsDocOrderDetailsGroupBySkuMapEntry.getKey());
             if (CollectionUtil.isEmpty(invLotAttPalletTotalDTOList)) continue;
-            for (InvLotAttPalletTotalDTO invLotAttPalletTotalDTO : invLotAttPalletTotalDTOList) {
+            List<InvLotAttPalletTotalDTO> invLotAttPalletTotalList = new ArrayList<>();
+            if (CollectionUtil.isNotEmpty(palletMatchLogList)){
+                invLotAttPalletTotalList = invLotAttPalletTotalDTOList.stream().filter(item -> !palletMatchLogList.stream().map(palletMatchLog -> palletMatchLog.getPalletNo()).collect(Collectors.toList()).contains(item.getPalletNo())).collect(Collectors.toList());
+            }
+            if (CollectionUtil.isEmpty(invLotAttPalletTotalList)) {
+                result.addAll(invLotAttPalletTotalDTOList);
+                continue;
+            }
+            for (InvLotAttPalletTotalDTO invLotAttPalletTotalDTO : invLotAttPalletTotalList) {
                 BigDecimal palletTotal = invLotAttPalletTotalDTO.getTotalQty();
-                if (CompareUtil.compare(total, palletTotal) <= 0){
+                if (CompareUtil.compare(total, palletTotal) <= 0) {
                     result.add(invLotAttPalletTotalDTO);
                     break;
                 }
@@ -2901,17 +2925,29 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
     }
 
     @Override
-    public List<PalletMatchLog> queryPalletMatchInfoList(String orderNos) {
-        return palletMatchLogService.queryPalletMatchLogByOrderNos(orderNos);
+    public List<PalletMatchLogDTO> queryPalletMatchInfoList(String orderNos) {
+        List<String> orderList = JSONArray.parseArray(orderNos, String.class);
+        String order = orderList.stream().collect(Collectors.joining(","));
+        List<PalletMatchLog> palletMatchLogList = palletMatchLogService.queryPalletMatchLogByOrderNos(order);
+        List<BaseLocationInfo> baseLocationInfoList = baseLocationInfoService.selectBaseLocationInfoList(palletMatchLogList.stream().map(PalletMatchLog::getLocationId).collect(Collectors.toList()));
+
+        return palletMatchLogList.stream().map(item -> {
+            PalletMatchLogDTO palletMatchLogDTO = ConvertUtils.sourceToTarget(item, PalletMatchLogDTO.class);
+            BaseLocationInfo locationInfo = baseLocationInfoList.stream().filter(baseLocationInfo -> baseLocationInfo.getId().equals(Long.parseLong(item.getLocationId()))).findFirst().orElseThrow(() -> new BaseException("库位信息有误"));
+            palletMatchLogDTO.setLocationNo(locationInfo.getLocationNo());
+            return palletMatchLogDTO;
+        }).collect(Collectors.toList());
     }
 
-    private List<PalletMatchLog> buildPalletMatchLogList(List<InvLotAttPalletTotalDTO> invLotAttPalletTotalDTOList, List<String> orderList){
+    private List<PalletMatchLog> buildPalletMatchLogList(List<InvLotAttPalletTotalDTO> invLotAttPalletTotalDTOList, List<String> orderList) {
         String orderNos = orderList.stream().collect(Collectors.joining(","));
         Date createTime = DateUtils.getNowDate();
         return invLotAttPalletTotalDTOList.stream().map(item -> {
             PalletMatchLog palletMatchLog = ConvertUtils.sourceToTarget(item, PalletMatchLog.class);
+            palletMatchLog.setTotalQty(item.getTotalQty().toString());
             palletMatchLog.setCreateTime(createTime);
             palletMatchLog.setOrderNos(orderNos);
+            palletMatchLog.setUserdefine1(Constants.NO);
             return palletMatchLog;
         }).collect(Collectors.toList());
     }

+ 3 - 0
warewms-base/src/main/java/com/ruoyi/base/domain/BaseLocationInfo.java

@@ -1,5 +1,6 @@
 package com.ruoyi.base.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -31,6 +32,7 @@ public class BaseLocationInfo extends BaseEntity {
      * 区域id
      */
     @Excel(name = "库区名称")
+    @TableField(exist = false)
     private String zoneName;
 
     /**
@@ -149,6 +151,7 @@ public class BaseLocationInfo extends BaseEntity {
 
     private String userdefine10;
 
+    @TableField(exist = false)
     private String orderByClause;
 
     public void setId(Long id) {

+ 2 - 1
warewms-base/src/main/java/com/ruoyi/base/mapper/BaseLocationInfoMapper.java

@@ -1,5 +1,6 @@
 package com.ruoyi.base.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.base.domain.BaseLocationInfo;
 import com.ruoyi.base.domain.dto.BaseLocationGuiDTO;
 import com.ruoyi.base.domain.dto.BaseLocationInfoSameColDTO;
@@ -16,7 +17,7 @@ import java.util.Map;
  * @author andy
  * @date 2022-02-18
  */
-public interface BaseLocationInfoMapper {
+public interface BaseLocationInfoMapper extends BaseMapper<BaseLocationInfo> {
     /**
      * 查询库位信息
      *

+ 6 - 0
warewms-base/src/main/java/com/ruoyi/base/service/IBaseLocationInfoService.java

@@ -25,6 +25,12 @@ public interface IBaseLocationInfoService {
      */
     BaseLocationInfo selectBaseLocationInfoById(Long id);
 
+    List<BaseLocationInfo> selectBaseLocationInfoList(List<String> locationIdList);
+
+    List<BaseLocationInfo> queryLocStageCacheBaseLocationInfoList();
+
+    List<BaseLocationInfo> queryBaseLocationInfoByZoneId(Long zoneId);
+
     /**
      * 根据id或者编号查询库位信息
      *

+ 18 - 0
warewms-base/src/main/java/com/ruoyi/base/service/impl/BaseLocationInfoServiceImpl.java

@@ -1,5 +1,7 @@
 package com.ruoyi.base.service.impl;
 
+import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.base.constant.Constant;
 import com.ruoyi.base.domain.BaseLocationInfo;
 import com.ruoyi.base.domain.BaseLocationZone;
@@ -53,6 +55,22 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
         return baseLocationInfoMapper.selectBaseLocationInfoById(id);
     }
 
+    @Override
+    public List<BaseLocationInfo> selectBaseLocationInfoList(List<String> locationIdList){
+        List<Long> idList = locationIdList.stream().map(Long::parseLong).collect(Collectors.toList());
+        if (CollectionUtil.isEmpty(idList)) return new ArrayList<>();
+        return baseLocationInfoMapper.selectList(Wrappers.<BaseLocationInfo>lambdaQuery()
+                .in(BaseLocationInfo::getId, idList));
+    }
+
+    @Override
+    public List<BaseLocationInfo> queryLocStageCacheBaseLocationInfoList(){return queryBaseLocationInfoByZoneId(2l);}
+
+    @Override
+    public List<BaseLocationInfo> queryBaseLocationInfoByZoneId(Long zoneId){
+        return baseLocationInfoMapper.selectList(Wrappers.<BaseLocationInfo>lambdaQuery().eq(BaseLocationInfo::getZoneId, zoneId));
+    }
+
     @Override
     public BaseLocationInfo selectBaseLocationInfoByIdOrNo(String idOrNo, Long warehouseId) {
         BaseLocationInfo locationInfo = null;