Jelajahi Sumber

华兰:出入库流程代码完善 --待测试

k 2 tahun lalu
induk
melakukan
f22b68aa90
16 mengubah file dengan 240 tambahan dan 173 penghapusan
  1. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/base/BaseLocationInfoController.java
  2. 2 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaDocAsnController.java
  3. 2 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaDocSoController.java
  4. 3 3
      ruoyi-admin/src/test/java/com/ruoyi/admin/test/base/WarehouseTest.java
  5. 73 131
      warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java
  6. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/business/IBusinessService.java
  7. 5 2
      warewms-ams/src/main/java/com/ruoyi/ams/config/service/LocationAllocationStrategy.java
  8. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/config/service/impl/FlowConfigHeaderServiceImpl.java
  9. 4 5
      warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java
  10. 51 11
      warewms-ams/src/main/java/com/ruoyi/ams/task/service/impl/WcsTaskServiceImpl.java
  11. 33 4
      warewms-base/src/main/java/com/ruoyi/base/constant/Constant.java
  12. 10 0
      warewms-base/src/main/java/com/ruoyi/base/domain/BaseLocationInfo.java
  13. 3 0
      warewms-base/src/main/java/com/ruoyi/base/mapper/BaseLocationInfoMapper.java
  14. 1 1
      warewms-base/src/main/java/com/ruoyi/base/service/IBaseLocationInfoService.java
  15. 2 1
      warewms-base/src/main/java/com/ruoyi/base/service/impl/BaseLocationInfoServiceImpl.java
  16. 48 6
      warewms-base/src/main/resources/mapper/base/BaseLocationInfoMapper.xml

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/base/BaseLocationInfoController.java

@@ -110,7 +110,7 @@ public class BaseLocationInfoController extends BaseController {
      */
     @GetMapping("/queryDict/{zoneId}")
     public AjaxResult queryDict(@PathVariable("zoneId") Long zoneId) {
-        List<BaseLocationInfo> locationInfoList = baseLocationInfoService.selectSortedLocatinListByZoneId(zoneId, 1L);
+        List<BaseLocationInfo> locationInfoList = baseLocationInfoService.selectSortedLocatinListByZoneId(zoneId, 1L,null);
         return AjaxResult.success("", locationInfoList);
     }
 

+ 2 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/pda/PdaDocAsnController.java

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.warewms.pda;
 
 import com.ruoyi.ams.business.IBusinessService;
 import com.ruoyi.ams.config.domain.dto.AgvCallItem;
+import com.ruoyi.base.constant.Constant;
 import com.ruoyi.common.core.domain.AjaxResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -23,8 +24,6 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/pda/asn")
 public class PdaDocAsnController {
 
-    public static final long ASN_FLOW_ID = 14;
-
 
     @Autowired
     private IBusinessService businessService;
@@ -35,6 +34,6 @@ public class PdaDocAsnController {
         if (StringUtils.isEmpty(agvCallItem.getLocationFrom())) {
             return AjaxResult.error("起始库位不可为空!");
         }
-        return businessService.agvCall(agvCallItem, ASN_FLOW_ID);
+        return businessService.agvCall(agvCallItem, Constant.IN_TRAN_FLOW_ID);
     }
 }

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

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.warewms.pda;
 
 import com.ruoyi.ams.business.IBusinessService;
 import com.ruoyi.ams.config.domain.dto.AgvCallItem;
+import com.ruoyi.base.constant.Constant;
 import com.ruoyi.common.core.domain.AjaxResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -22,8 +23,6 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/pda/so")
 public class PdaDocSoController {
 
-    public static final long SO_FLOW_ID = 16;
-
 
     @Autowired
     private IBusinessService businessService;
@@ -34,6 +33,6 @@ public class PdaDocSoController {
         if (StringUtils.isEmpty(agvCallItem.getLocationTo())) {
             return AjaxResult.error("目标库位不可为空!");
         }
-        return businessService.agvCall(agvCallItem, SO_FLOW_ID);
+        return businessService.agvCall(agvCallItem, Constant.STO_TRAN_FLOW_ID);
     }
 }

+ 3 - 3
ruoyi-admin/src/test/java/com/ruoyi/admin/test/base/WarehouseTest.java

@@ -177,7 +177,7 @@ public class WarehouseTest {
 
     @Test
     public void test6() {
-        List<BaseLocationInfo> loc1 = baseLocationInfoService.selectSortedLocatinListByZoneId(2L, 1L);
+        List<BaseLocationInfo> loc1 = baseLocationInfoService.selectSortedLocatinListByZoneId(2L, 1L,null);
         //List<BaseLocationInfo> loc2 = baseLocationInfoService.selectSortedLocatinListByZoneId(1L,1L);
         //List<BaseLocationInfo> loc3 = baseLocationInfoService.selectSortedLocatinListByZoneId(1L,1L);
         List<Long> locationIdList = new ArrayList<>();
@@ -288,7 +288,7 @@ public class WarehouseTest {
 
     @Test
     public void clear() {
-        
+
     }
 
     @Test
@@ -317,4 +317,4 @@ public class WarehouseTest {
 
     }
 
-}
+}

+ 73 - 131
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -1,5 +1,6 @@
 package com.ruoyi.ams.business;
 
+import com.alibaba.fastjson.JSON;
 import com.ruoyi.ams.agv.ndc.common.ByteUtil;
 import com.ruoyi.ams.agv.ndc.common.CRC16Util;
 import com.ruoyi.ams.agv.ndc.domain.AmsTask;
@@ -88,7 +89,7 @@ public class BusinessServiceImpl implements IBusinessService {
     }
 
     @Override
-    public AjaxResult agvCall(AgvCallItem agvCallItem,Long flowId) {
+    public AjaxResult agvCall(AgvCallItem agvCallItem, Long flowId) {
         //查询所属流程
         FlowConfigHeaderVO flowConfigHeaderVO = flowConfigHeaderService.selectFlowConfigHeaderById(flowId);
 
@@ -134,125 +135,40 @@ public class BusinessServiceImpl implements IBusinessService {
                     zoneIdList = Arrays.stream(flowConfigHeaderVO.getLocationFrom().split(",")).collect(Collectors.toList());
                 }
 
-                List<BaseLocationInfo> locationFromList = this.convertLocation(paramLocationFrom, agvCallDTO.getWarehouseId());
-                List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId());
-
                 if (flowConfigHeaderVO.getFlowType().equals("ASN")) {
                     AgvCallItemDTO agvCall = agvCallDTO.getAgvCallItemDTOList().get(0);
+                    List<BaseLocationInfo> locationFromList = this.convertLocation(paramLocationFrom, agvCallDTO.getWarehouseId(), null);
+                    List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), "shift_no + 0,shift_index");
                     locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "ASN", asnSoStrategy, agvCall, token);
                     locationTo = this.zoneLocationAllocation(locationToList, "locationTo", "ASN", asnSoStrategy, agvCall, token);
                     //2.初始化库存
-                    for (AgvCallItemDTO call : agvCallDTO.getAgvCallItemDTOList()) {
-                        invLotLocIdService.deleteInvLotLocIdById(locationFrom.getId());
-                        invLotLocIdService.initInv(locationFrom.getId().toString(), call.getSku(), Constant.CUSTOMER_ID, call.getQty(), call.getLotattDTO(), BigDecimal.ZERO);
-                    }
+//                    for (AgvCallItemDTO call : agvCallDTO.getAgvCallItemDTOList()) {
+//                        invLotLocIdService.deleteInvLotLocIdById(locationFrom.getId());
+//                        invLotLocIdService.initInv(locationFrom.getId().toString(), call.getSku(), Constant.CUSTOMER_ID, call.getQty(), call.getLotattDTO(), BigDecimal.ZERO);
+//                    }
                     wcsTaskList.addAll(this.genTask(locationFrom, locationTo, flowConfigHeaderVO, agvCallDTO, token));
-                } else if (flowConfigHeaderVO.getFlowType().equals("SO")) {
-                    List<Long> locationList = new ArrayList<>();
-                    for (BaseLocationInfo b : locationFromList) {
-                        locationList.add(b.getId());
-                    }
-                    List<OutWarehouseDTO> warehouseDTOS = new ArrayList<>();
-                    for (AgvCallItemDTO agvCall : agvCallDTO.getAgvCallItemDTOList()) {
-                        if (agvCall.getQty() != null) {
-                            Double qty = invLotLocIdService.queryInvBySku(agvCall.getSku(), agvCall.getLotattDTO(), zoneIdList);
-                            if (qty == null || qty < agvCall.getQty()) {
-                                throw new ServiceException(String.format("%s所需库存不够", agvCall.getSku()), token);
-                            }
-                        }
 
-                        OutWarehouseDTO outWarehouseDTO = new OutWarehouseDTO();
-                        outWarehouseDTO.setSku(agvCall.getSku());
-                        outWarehouseDTO.setQty(agvCall.getQty());
-                        outWarehouseDTO.setWeight(agvCall.getWeight());
-                        outWarehouseDTO.setSupplier(agvCall.getSupplier());
-                        outWarehouseDTO.setLotattDTO(agvCall.getLotattDTO());
-                        outWarehouseDTO.setWarehouseId(agvCallDTO.getWarehouseId());
-                        outWarehouseDTO.setAgvCallItemDTO(agvCall);
-                        warehouseDTOS.add(outWarehouseDTO);
-                    }
-                    List<FilterLockInvLocationDTO> locationFromResultList = locationAllocationStrategy.filterLockInv(locationList, warehouseDTOS, asnSoStrategy, token);
-                    for (FilterLockInvLocationDTO b : locationFromResultList) {
-                        InWarehouseDTO inWarehouseDTO = new InWarehouseDTO();
-                        inWarehouseDTO.setWarehouseId(b.getOutWarehouseDTO().getAgvCallItemDTO().getWarehouseId());
-                        inWarehouseDTO.setSku(b.getOutWarehouseDTO().getAgvCallItemDTO().getSku());
-                        inWarehouseDTO.setLocationTo(b.getOutWarehouseDTO().getAgvCallItemDTO().getLocationTo());
-                        inWarehouseDTO.setLocationFrom(b.getOutWarehouseDTO().getAgvCallItemDTO().getLocationFrom());
-                        inWarehouseDTO.setQty(b.getOutWarehouseDTO().getAgvCallItemDTO().getQty());
-                        inWarehouseDTO.setSupplier(b.getOutWarehouseDTO().getAgvCallItemDTO().getSupplier());
-                        inWarehouseDTO.setWeight(b.getOutWarehouseDTO().getAgvCallItemDTO().getWeight());
-                        inWarehouseDTO.setLotattDTO(b.getOutWarehouseDTO().getAgvCallItemDTO().getLotattDTO());
-                        locationTo = locationAllocationStrategy.filterLockLocation(locationToList, token);
-                        wcsTaskList.addAll(this.genTask(b.getLocationInfo(), locationTo, flowConfigHeaderVO, agvCallDTO, token));
-                    }
-                } else if (flowConfigHeaderVO.getFlowType().equals("MVCALL")) {
-                    for (AgvCallItemDTO agvCall : agvCallDTO.getAgvCallItemDTOList()) {
-                        Double totalQty = agvCall.getQty();
-                        int trySize = 100;
-                        if (agvCall.getQty() != null) {
-                            Double qty = invLotLocIdService.queryInvBySku(agvCall.getSku(), agvCall.getLotattDTO(), zoneIdList);
-                            if (qty == null || qty < agvCall.getQty()) {
-                                throw new ServiceException("所需库存不够", token);
-                            }
-                        }
+                } else if (flowConfigHeaderVO.getFlowType().equals("SO")) {
+                    AgvCallItemDTO agvCall = agvCallDTO.getAgvCallItemDTOList().get(0);
+                    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
+                            , agvCall.getWarehouseId(), hashMap, agvCall.getSku(), "inv.create_time");
+                    locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "SO", asnSoStrategy, agvCall, token);
+                    locationTo = this.zoneLocationAllocation(locationToList, "locationTo", "SO", asnSoStrategy, agvCall, token);
+                    wcsTaskList.addAll(this.genTask(locationFrom, locationTo, flowConfigHeaderVO, agvCallDTO, token));
 
-                        while (trySize > 0) {
-                            OutWarehouseDTO outWarehouseDTO = new OutWarehouseDTO();
-                            outWarehouseDTO.setSku(agvCall.getSku());
-                            outWarehouseDTO.setQty(agvCall.getQty());
-                            outWarehouseDTO.setWeight(agvCall.getWeight());
-                            outWarehouseDTO.setSupplier(agvCall.getSupplier());
-                            outWarehouseDTO.setLotattDTO(agvCall.getLotattDTO());
-                            outWarehouseDTO.setWarehouseId(agvCall.getWarehouseId());
-                            BaseLocationInfo mvLocationFrom = outInvAllocation(outWarehouseDTO, token);
-                            //locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "MV", asnSoStrategy, agvCall, token);
-                            locationTo = this.zoneLocationAllocation(locationToList, "locationTo", "MV", asnSoStrategy, agvCall, token);
-                            if (mvLocationFrom == null) {
-                                break;
-                            }
-                            if (locationTo == null) {
-                                break;
-                            }
-                            wcsTaskList.addAll(this.genTask(mvLocationFrom, locationTo, flowConfigHeaderVO, agvCallDTO, token));
-                            if (agvCall.getQty() != null) {
-                                Double current = invLotLocIdMapper.queryInvBySkuLocationId(agvCall.getSku(), mvLocationFrom.getId(), agvCall.getLotattDTO());
-                                if (current != null) {
-                                    totalQty -= current;
-                                    if (totalQty <= 0) {
-                                        break;
-                                    }
-                                }
-                            }
-                            trySize--;
-                        }
-                    }
-                } else if (flowConfigHeaderVO.getFlowType().equals("RECEIPT")) {
-                    //绑定收货库位库存到起始库位
-                    String palletNo = agvCallDTO.getPalletNo();
-                    WmsBoxInfo wmsBoxInfo = new WmsBoxInfo();
-                    wmsBoxInfo.setBoxNo(palletNo);
-                    wmsBoxInfo = wmsBoxInfoService.selectWmsBoxInfoByModel(wmsBoxInfo);
-                    if (wmsBoxInfo == null) {
-                        throw new ServiceException("托盘不存在");
-                    }
-                    wmsBoxInfo.setLocationId(Long.parseLong(agvCallDTO.getLocationFrom()));
-                    int result = wmsBoxInfoService.updateWmsBoxInfo(wmsBoxInfo);
-                    if (result <= 0) {
-                        throw new ServiceException("托盘绑定更新失败");
-                    }
-                    //锁定库位
-                    if (!redisCache.lockCacheObject(locationFrom.getId().toString(), "", token)) {
-                        throw new ServiceException("库位锁定失败");
-                    }
-                    if (!redisCache.lockCacheObject(locationTo.getId().toString(), "", token)) {
-                        throw new ServiceException("库位锁定失败");
-                    }
-                    //生成任务
-                    this.genTask(locationFrom, locationTo, flowConfigHeaderVO, agvCallDTO, token);
                 } else if (flowConfigHeaderVO.getFlowType().equals("MV")) {
                     AgvCallItemDTO agvCall = agvCallDTO.getAgvCallItemDTOList().get(0);
+                    List<BaseLocationInfo> locationFromList = this.convertLocation(paramLocationFrom, agvCallDTO.getWarehouseId(), null);
+                    List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), null);
                     locationFrom = this.zoneLocationAllocation(locationFromList, "locationFrom", "MV", asnSoStrategy, agvCall, token);
                     locationTo = this.zoneLocationAllocation(locationToList, "locationTo", "MV", asnSoStrategy, agvCall, token);
+                    //2.初始化库存
+                    for (AgvCallItemDTO call : agvCallDTO.getAgvCallItemDTOList()) {
+                        invLotLocIdService.deleteInvLotLocIdById(locationFrom.getId());
+                        invLotLocIdService.initInv(locationFrom.getId().toString(), call.getSku(), Constant.CUSTOMER_ID, call.getQty(), call.getLotattDTO(), BigDecimal.ZERO);
+                    }
                     wcsTaskList.addAll(this.genTask(locationFrom, locationTo, flowConfigHeaderVO, agvCallDTO, token));
                 }
             }
@@ -336,7 +252,7 @@ public class BusinessServiceImpl implements IBusinessService {
                 return locationAllocationStrategy.filterLockLocation(locationInfoList, inWarehouseDTO, asnSoStrategy, token);
             } else {
                 // 指定区域的
-                List<BaseLocationInfo> locationInfoList = baseLocationInfoService.selectSortedLocatinListByZoneId(Long.parseLong(inWarehouseDTO.getLocationZoneTo()), inWarehouseDTO.getWarehouseId());
+                List<BaseLocationInfo> locationInfoList = baseLocationInfoService.selectSortedLocatinListByZoneId(Long.parseLong(inWarehouseDTO.getLocationZoneTo()), inWarehouseDTO.getWarehouseId(), null);
                 return locationAllocationStrategy.filterLockLocation(locationInfoList, token);
             }
         }
@@ -389,35 +305,45 @@ public class BusinessServiceImpl implements IBusinessService {
                     throw new ServiceException("入库起始库位没有可以分配的空库位", token);
                 }
             } else {
-                if (locationInfoList != null && locationInfoList.size() > 0) {
-                    locationInfo = locationAllocationStrategy.filterLockLocation(locationInfoList, token);
-                } else {
-                    InWarehouseDTO inWarehouseDTO = new InWarehouseDTO();
-                    inWarehouseDTO.setWarehouseId(agvCallDTO.getWarehouseId());
-                    inWarehouseDTO.setSku(agvCallDTO.getSku());
-                    inWarehouseDTO.setLocationTo(agvCallDTO.getLocationTo());
-                    inWarehouseDTO.setLocationFrom(agvCallDTO.getLocationFrom());
-                    inWarehouseDTO.setQty(agvCallDTO.getQty());
-                    inWarehouseDTO.setSupplier(agvCallDTO.getSupplier());
-                    inWarehouseDTO.setWeight(agvCallDTO.getWeight());
-                    inWarehouseDTO.setLotattDTO(agvCallDTO.getLotattDTO());
-                    locationInfo = inLocationAllocation(inWarehouseDTO, token);
+                for (BaseLocationInfo b : locationInfoList) {
+                    if (!b.getStockStatus().equals("00") || !b.getIsEmpty().equals("Y") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
+                        continue;
+                    }
+                    if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
+                        continue;
+                    }
+                    locationInfo = b;
+                    break;
                 }
                 if (locationInfo == null) {
-                    throw new ServiceException("目标库位没有可以分配的库位", token);
+                    throw new ServiceException("没有可以分配的库位", token);
                 }
-                return locationInfo;
             }
         } else if (type.equals("SO")) {
             //起始库位
             if (locationType.equals("locationFrom")) {
+                for (BaseLocationInfo b : locationInfoList) {
+                    if (!b.getStockStatus().equals("00") || !b.getIsEmpty().equals("N") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
+                        continue;
+                    }
+                    if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
+                        continue;
+                    }
+                    locationInfo = b;
+                    break;
+                }
+                if (locationInfo == null) {
+                    throw new ServiceException("没有可以分配的库位", token);
+                }
 
             } else { //目标库位
                 for (BaseLocationInfo b : locationInfoList) {
                     if (!b.getStockStatus().equals("00") || !b.getIsEmpty().equals("Y") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
                         continue;
                     }
-                    redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token);
+                    if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
+                        continue;
+                    }
                     locationInfo = b;
                     break;
                 }
@@ -429,10 +355,12 @@ public class BusinessServiceImpl implements IBusinessService {
             if (locationType.equals("locationFrom")) {
 
                 for (BaseLocationInfo b : locationInfoList) {
-                    if (!b.getStockStatus().equals("00") || !b.getIsEmpty().equals("N") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
+                    if (!b.getStockStatus().equals("00") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
+                        continue;
+                    }
+                    if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
                         continue;
                     }
-                    redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token);
                     locationInfo = b;
                     break;
                 }
@@ -452,7 +380,9 @@ public class BusinessServiceImpl implements IBusinessService {
                     if (!b.getStockStatus().equals("00") || !b.getIsEmpty().equals("Y") || redisCache.checkIsLock(RedisKey.LOCK_LOCATION + b.getId())) {
                         continue;
                     }
-                    redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token);
+                    if (!redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + b.getId(), b.getId().toString(), token)) {
+                        continue;
+                    }
                     locationInfo = b;
                     break;
                 }
@@ -472,7 +402,7 @@ public class BusinessServiceImpl implements IBusinessService {
     }
 
     @Override
-    public List<BaseLocationInfo> convertLocation(String locationNoOrZoneId, Long warehouseId) {
+    public List<BaseLocationInfo> convertLocation(String locationNoOrZoneId, Long warehouseId, String orderBy) {
         List<BaseLocationInfo> locationInfoList = new ArrayList<>();
         if (!StringUtils.isEmpty(locationNoOrZoneId)) {
             String[] arr = locationNoOrZoneId.split(",");
@@ -482,7 +412,7 @@ public class BusinessServiceImpl implements IBusinessService {
                     BaseLocationInfo info = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(obj, warehouseId);
                     locationInfoList.add(info);
                 } else {
-                    List<BaseLocationInfo> infoList = baseLocationInfoService.selectSortedLocatinListByZoneId(Long.parseLong(obj), warehouseId);
+                    List<BaseLocationInfo> infoList = baseLocationInfoService.selectSortedLocatinListByZoneId(Long.parseLong(obj), warehouseId, orderBy);
                     locationInfoList.addAll(infoList);
                 }
             }
@@ -728,7 +658,19 @@ public class BusinessServiceImpl implements IBusinessService {
     @Transactional
     @Override
     public void autoSendTranSit() {
-
+        List<BaseLocationInfo> baseLocationInfos = baseLocationInfoService.selectSortedLocatinListByZoneId(Constant.ZONE_TYPE.TRANSIT.getValue()
+                , Constant.WAREHOUSE_ID, null);
+        for (BaseLocationInfo baseLocationInfo : baseLocationInfos) {
+            // 判断是否有货并且空闲
+            if (baseLocationInfo.getStockStatus().equals(Constant.STOCK_STATUS.STOCK00.getValue())
+                    && baseLocationInfo.getIsEmpty().equals(Constant.IS_YES.N)) {
+                if (baseLocationInfo.getUserdefine1().equals("ASN")) {
+                    businessService.agvCall(null, Constant.TRAN_STO_FLOW_ID);
+                } else if (baseLocationInfo.getUserdefine1().equals("SO")) {
+                    businessService.agvCall(null, Constant.TRAN_OUT_FLOW_ID);
+                }
+            }
+        }
     }
 
     @Transactional

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/business/IBusinessService.java

@@ -76,7 +76,7 @@ public interface IBusinessService {
      * @param warehouseId 仓库id
      * @return
      */
-    List<BaseLocationInfo> convertLocation(String locationNoOrZoneId, Long warehouseId);
+    List<BaseLocationInfo> convertLocation(String locationNoOrZoneId, Long warehouseId,String orderBy);
 
     /**
      * 生成任务

+ 5 - 2
warewms-ams/src/main/java/com/ruoyi/ams/config/service/LocationAllocationStrategy.java

@@ -358,8 +358,10 @@ public class LocationAllocationStrategy {
      * @return
      */
     public List<FilterLockInvLocationDTO> filterLockInv(List<Long> locationIdList, List<OutWarehouseDTO> outWarehouseDTOs, AsnSoStrategy asnSoStrategy, Long token) {
+        Map<String,String> map = JSON.parseObject(JSON.toJSONString(outWarehouseDTOs.get(0).getLotattDTO()),HashMap.class);
         //取出范围内所有的库存
-        List<BaseLocationLotattListVO> locationLotattVOList = baseLocationInfoService.selectSortedLocatinListByZoneId(locationIdList, 1L, null, null);
+        List<BaseLocationLotattListVO> locationLotattVOList = baseLocationInfoService
+                .selectSortedLocatinListByZoneId(locationIdList, 1L, map, outWarehouseDTOs.get(0).getSku());
         List<FilterLockInvLocationDTO> result = new ArrayList<>(); //返回的结果
         Map<String, List<BaseLocationLotattListVO>> lockInv = new HashMap<>(); //已锁定的库存列表(key:列名,value:库位库存)
         //将同一列的库位排序好====================================================>
@@ -528,6 +530,7 @@ public class LocationAllocationStrategy {
                         if (redisCache.lockCacheObject(RedisKey.LOCK_LOCATION + v.getId(), v.getId().toString(), token)) {
                             //判断是否有阻挡
                             BaseLocationInfo newLocation = new BaseLocationInfo();
+                            BeanUtils.copyProperties(v, newLocation);
                             currentLocation = new FilterLockInvLocationDTO();
                             currentLocation.setLocationInfo(newLocation);
                             currentLocation.setOutWarehouseDTO(ow);
@@ -639,4 +642,4 @@ public class LocationAllocationStrategy {
         }
         return isCan;
     }
-}
+}

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/config/service/impl/FlowConfigHeaderServiceImpl.java

@@ -167,7 +167,7 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
 
         flowConfigHeaderMapper.updateFlowConfigHeader(flowConfigHeader);
         flowConfigHeaderMapper.deleteFlowConfigDetailsByHeaderId(flowConfigHeader.getId());
-        flowConfigEventMapper.deleteFlowConfigEventByFlowID(flowConfigHeader.getId());
+        flowConfigEventMapper.deleteFlowConfigEventById(flowConfigHeader.getId());
         insertFlowConfigDetails(flowConfigHeader);
         insertFlowConfigEvent(flowConfigHeader);
         return AjaxResult.success("保存成功");

+ 4 - 5
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java

@@ -480,14 +480,13 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
             invLotLocId.setLocationId(locationFrom);
             invLotLocId.setSku(sku);
             invLotLocId.setCustomerId(customerId);
-//            invLotLocId.setQty(new BigDecimal(qty));
+            invLotLocId.setQty(new BigDecimal(qty));
 //            invLotLocId.setQtyEach(new BigDecimal(qty));
 //            invLotLocId.setQtyallocated(qtyallocated);
 //            invLotLocId.setQtyallocatedEach(qtyallocated);
-            invLotLocId.setQty(new BigDecimal(1));
-            invLotLocId.setQtyEach(new BigDecimal(1));
-            invLotLocId.setQtyallocated(new BigDecimal(1));
-            invLotLocId.setQtyallocatedEach(new BigDecimal(1));
+            invLotLocId.setQtyEach(new BigDecimal(0));
+            invLotLocId.setQtyallocated(new BigDecimal(0));
+            invLotLocId.setQtyallocatedEach(new BigDecimal(0));
             invLotLocId.setQtypa(BigDecimal.ZERO);
             invLotLocId.setQtyrpin(BigDecimal.ZERO);
             invLotLocId.setCreateTime(new Date());

+ 51 - 11
warewms-ams/src/main/java/com/ruoyi/ams/task/service/impl/WcsTaskServiceImpl.java

@@ -325,21 +325,31 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
                         break;
                     case 2://完成
                         if (wcsTask.getState() != 6) {
+                            if (wcsTask.getState() == 2) {
+                                log.info("不能重复放货," + taskNo);
+                                return;
+                            }
                             wcsTask.setEndTime(new Date());
                             // 解锁终点库位
                             baseLocationInfoService.unLockLocationStockStatus(Long.parseLong(wcsTask.getLocationTo())
                                     , Constant.WAREHOUSE_ID, updateBy);
                             // 将中间缓存位库存移动到终点
                             moveMiddleCacheToDestination(wcsTask);
+                            // 修改库存标识标识 因为接驳位可以出库也可以入库 所以需要标识当前接驳位的库存是入库还是出库
+                            updateInvAsnSoMarking(wcsTask.getLocationFrom(), wcsTask.getLocationTo());
                             //释放redis锁
                             if (!StringUtils.isEmpty(wcsTask.getExt8())) {
-                                redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()),wcsTask.getLocationTo());
+                                redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()));
                             }
                         }
                         break;
                     case 3:
                         break;
                     case 4:
+                        if (wcsTask.getState() == 4) {
+                            log.info("不能重复取货," + taskNo);
+                            return;
+                        }
                         // 解锁起始库位
                         baseLocationInfoService.unLockLocationStockStatus(Long.parseLong(wcsTask.getLocationFrom())
                                 , Constant.WAREHOUSE_ID, updateBy);
@@ -348,22 +358,28 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
 
                         //释放redis锁
                         if (!StringUtils.isEmpty(wcsTask.getExt8())) {
-                            redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()),wcsTask.getLocationFrom());
+                            redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()), wcsTask.getLocationFrom());
                         }
                         break;
                     case 5:
                         break;
                     case 6://卸货
                         if (wcsTask.getState() != 2) {
+                            if (wcsTask.getState() == 6) {
+                                log.info("不能重复放货," + taskNo);
+                                return;
+                            }
                             wcsTask.setEndTime(new Date());
                             // 解锁终点库位
                             baseLocationInfoService.unLockLocationStockStatus(Long.parseLong(wcsTask.getLocationTo())
                                     , Constant.WAREHOUSE_ID, updateBy);
                             // 将中间缓存位库存移动到终点
                             moveMiddleCacheToDestination(wcsTask);
+                            // 修改库存标识标识 因为接驳位可以出库也可以入库 所以需要标识当前接驳位的库存是入库还是出库
+                            updateInvAsnSoMarking(wcsTask.getLocationFrom(), wcsTask.getLocationTo());
                             //释放redis锁
                             if (!StringUtils.isEmpty(wcsTask.getExt8())) {
-                                redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()),wcsTask.getLocationTo());
+                                redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()));
                             }
                         }
                         break;
@@ -374,18 +390,14 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
                             // 解锁终点库位
                             baseLocationInfoService.unLockLocationStockStatus(Long.parseLong(wcsTask.getLocationTo())
                                     , Constant.WAREHOUSE_ID, updateBy);
-                            //释放redis锁
-                            if (!StringUtils.isEmpty(wcsTask.getExt8())) {
-                                redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()),wcsTask.getLocationTo());
-                            }
                         } else {
                             // 解锁终点和起始库位
                             baseLocationInfoService.unLockLocationStockStatus(Long.parseLong(wcsTask.getLocationFrom()), Long.parseLong(wcsTask.getLocationTo())
                                     , Constant.WAREHOUSE_ID, updateBy);
-                            //释放redis锁
-                            if (!StringUtils.isEmpty(wcsTask.getExt8())) {
-                                redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()));
-                            }
+                        }
+                        //释放redis锁
+                        if (!StringUtils.isEmpty(wcsTask.getExt8())) {
+                            redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()));
                         }
                         // 取消任务删除中间缓存库存
                         cancelTaskDelMiddleCache(wcsTask);
@@ -468,6 +480,34 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
         return AjaxResult.success();
     }
 
+    /**
+     * 修改库存出入库标记
+     *
+     * @param locationFrom
+     * @param locationTo
+     * @return
+     */
+    @Transactional
+    public void updateInvAsnSoMarking(String locationFrom, String locationTo) {
+        BaseLocationInfo baseLocationFrom = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(locationFrom, Constant.WAREHOUSE_ID);
+        BaseLocationInfo baseLocationTo = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(locationTo, Constant.WAREHOUSE_ID);
+        // 目标点为接驳位才进行判断
+        if (baseLocationTo.getZoneId().compareTo(Constant.ZONE_TYPE.TRANSIT.getValue()) != 0) {
+            return;
+        }
+        BaseLocationInfo baseLocationInfo = new BaseLocationInfo();
+        // 判断起始库区是不是属于仓储区
+        if (baseLocationFrom.getZoneId().compareTo(Constant.ZONE_TYPE.STORAGE.getValue()) == 0) {
+            // 是仓储区修改库存标记为出库
+            baseLocationInfo.setUserdefine1("SO");
+        } else {
+            // 不是仓储区修改库存标记为入库
+            baseLocationInfo.setUserdefine1("ASN");
+        }
+        baseLocationInfo.setId(Long.valueOf(locationTo));
+        baseLocationInfoService.updateBaseLocationInfo(baseLocationInfo);
+    }
+
 
     /**
      * 取消任务删除中间缓存库存

+ 33 - 4
warewms-base/src/main/java/com/ruoyi/base/constant/Constant.java

@@ -8,6 +8,23 @@ package com.ruoyi.base.constant;
 public class Constant {
     public static final String CUSTOMER_ID = "default";
     public static final Long WAREHOUSE_ID = 1L;
+    /**
+     * 入库缓存区到接驳位
+     */
+    public static final long IN_TRAN_FLOW_ID = 18;
+    /**
+     * 接驳位到仓储区
+     */
+    public static final long TRAN_STO_FLOW_ID = 19;
+    /**
+     * 仓储区到接驳位
+     */
+    public static final long STO_TRAN_FLOW_ID = 20;
+    /**
+     * 接驳位到出库缓存区
+     */
+    public static final long TRAN_OUT_FLOW_ID = 21;
+
 
     /**
      * 中间缓存位
@@ -188,14 +205,26 @@ public class Constant {
     }
 
     public enum ZONE_TYPE {
+
+        /**
+         * 成品区
+         */
+        STORAGE(1l),
+
         /**
-         * 入库区域
+         * 入库区
          */
-        ZONE_IN(4L),
+        IN_CACHE(2l),
+
+        /**
+         * 出库区
+         */
+        OUT_CACHE(3l),
+
         /**
-         * 出库区域
+         * 接驳位
          */
-        ZONE_OUT(5L);
+        TRANSIT(4l);
 
         private Long value;
 

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

@@ -142,6 +142,8 @@ public class BaseLocationInfo extends BaseEntity {
 
     private String userdefine10;
 
+    private String orderBy;
+
     public void setId(Long id) {
         this.id = id;
     }
@@ -390,6 +392,14 @@ public class BaseLocationInfo extends BaseEntity {
         this.weightLimit = weightLimit;
     }
 
+    public String getOrderBy() {
+        return orderBy;
+    }
+
+    public void setOrderBy(String orderBy) {
+        this.orderBy = orderBy;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 3 - 0
warewms-base/src/main/java/com/ruoyi/base/mapper/BaseLocationInfoMapper.java

@@ -99,6 +99,9 @@ public interface BaseLocationInfoMapper {
      */
     List<BaseLocationLotattVO> selectSortedLocationLotattListByZoneIdList(@Param("zoneId") List<Long> zoneId, @Param("warehouseId") Long warehouseId, @Param("lotatt") Map<String, String> lotatt);
 
+    List<BaseLocationInfo> selectSortedLocationLotattListByZoneIdListOrderBy(@Param("zoneId") List<String> zoneId, @Param("warehouseId") Long warehouseId, @Param("lotatt") Map<String, String> lotatt,@Param("sku") String sku,@Param("orderBy") String orderBy);
+
+
     List<BaseLocationLotattVO> selectSortedLocationLotattListByLocationIdList(@Param("locationId") List<Long> locationId, @Param("warehouseId") Long warehouseId, @Param("lotatt") Map<String, String> lotatt, @Param("sku") String sku);
 
     /**

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

@@ -116,7 +116,7 @@ public interface IBaseLocationInfoService {
      * @param warehouseId
      * @return
      */
-    List<BaseLocationInfo> selectSortedLocatinListByZoneId(Long zoneId, Long warehouseId);
+    List<BaseLocationInfo> selectSortedLocatinListByZoneId(Long zoneId, Long warehouseId,String orderBy);
 
     /**
      * 根据zoneId查询库位信息

+ 2 - 1
warewms-base/src/main/java/com/ruoyi/base/service/impl/BaseLocationInfoServiceImpl.java

@@ -177,10 +177,11 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
     }
 
     @Override
-    public List<BaseLocationInfo> selectSortedLocatinListByZoneId(Long zoneId, Long warehouseId) {
+    public List<BaseLocationInfo> selectSortedLocatinListByZoneId(Long zoneId, Long warehouseId,String orderBy) {
         BaseLocationInfo query = new BaseLocationInfo();
         query.setWarehouseId(warehouseId);
         query.setZoneId(zoneId);
+        query.setOrderBy(orderBy);
         return baseLocationInfoMapper.selectSortedLocationListByZoneId(query);
     }
 

+ 48 - 6
warewms-base/src/main/resources/mapper/base/BaseLocationInfoMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.base.mapper.BaseLocationInfoMapper">
-    
+
     <resultMap type="BaseLocationInfo" id="BaseLocationInfoResult">
         <result property="id"    column="id"    />
         <result property="warehouseId"    column="warehouse_id"    />
@@ -167,7 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectBaseLocationInfoList" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoResult">
         <include refid="selectBaseLocationInfoVo"/>
-        <where>  
+        <where>
             <if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
             <if test="zoneId != null "> and zone_id = #{zoneId}</if>
             <if test="locationNo != null  and locationNo != ''"> and location_no like concat('%', #{locationNo}, '%')</if>
@@ -182,7 +182,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectBaseLocationInfoVo"/>
         where location_no = #{locationNo} and warehouse_id = #{warehouseId}
     </select>
-    
+
     <select id="selectBaseLocationInfoById" parameterType="Long" resultMap="BaseLocationInfoResult">
         <include refid="selectBaseLocationInfoVo"/>
         where id = #{id}
@@ -313,7 +313,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteBaseLocationInfoByIds" parameterType="String">
-        delete from base_location_info where id in 
+        delete from base_location_info where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -322,7 +322,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectSortedLocationListByZoneId" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoResult">
         <include refid="selectBaseLocationInfoVo"/>
         where warehouse_id = #{warehouseId} and zone_id = #{zoneId}
-        order by lpad(row_no, 11, '0'),row_index,lpad(shift_no, 11, '0'),shift_index,lpad(col_no, 11, '0'),col_index
+        <if test="orderBy != null">
+            orderBy #{orderBy}
+        </if>
+        <if test="orderBy == null">
+            order by row_no + 0,row_index,shift_no + 0,shift_index,col_no + 0,col_index
+        </if>
     </select>
 
     <select id="selectSortedLocationLotattListByZoneId" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoLotattResult">
@@ -460,6 +465,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="lotatt.lotatt18 != null and lotatt.lotatt18 != ''"> and att.lotatt18 = #{lotatt.lotatt18}</if>
         order by lpad(row_no, 11, '0'),row_index,lpad(shift_no, 11, '0'),shift_index,lpad(col_no, 11, '0'),col_index
     </select>
+    <select id="selectSortedLocationLotattListByZoneIdListOrderBy" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoLotattResult">
+        select b.id, b.warehouse_id, b.zone_id, b.location_no, b.location_barcode, b.row_no, b.row_index, b.col_no, b.col_index, b.shift_no,
+        b.shift_index, b.stock_status, b.is_empty, b.bind_sku, b.location_type,  b.rack_id,  b.agv_station,  b.folded_tag,  b.folded_count,
+        b.userdefine1, b.userdefine2, b.userdefine3, b.userdefine4,  b.userdefine5,  b.userdefine6,  b.userdefine7,  b.userdefine8,
+        b.userdefine9, b.userdefine10, b.create_by, b.create_time,  b.update_by,  b.update_time,  b.remark, inv.sku, inv.qty, height_limit, weight_limit, att.*
+        from base_location_info b
+        left join inv_lot_loc_id inv on b.id = inv.location_id
+        left join inv_lot_att att on inv.lotnum = att.lotnum
+        where warehouse_id = #{warehouseId} and zone_id in
+        <foreach item="item" collection="zoneId" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+        <if test="sku != null and sku != ''"> and inv.sku = #{sku}</if>
+        <if test="lotatt.lotatt01 != null and lotatt.lotatt01 != ''"> and att.lotatt01 = #{lotatt.lotatt01}</if>
+        <if test="lotatt.lotatt02 != null and lotatt.lotatt02 != ''"> and att.lotatt02 = #{lotatt.lotatt02}</if>
+        <if test="lotatt.lotatt03 != null and lotatt.lotatt03 != ''"> and att.lotatt03 = #{lotatt.lotatt03}</if>
+        <if test="lotatt.lotatt04 != null and lotatt.lotatt04 != ''"> and att.lotatt04 = #{lotatt.lotatt04}</if>
+        <if test="lotatt.lotatt05 != null and lotatt.lotatt05 != ''"> and att.lotatt05 = #{lotatt.lotatt05}</if>
+        <if test="lotatt.lotatt06 != null and lotatt.lotatt06 != ''"> and att.lotatt06 = #{lotatt.lotatt06}</if>
+        <if test="lotatt.lotatt07 != null and lotatt.lotatt07 != ''"> and att.lotatt07 = #{lotatt.lotatt07}</if>
+        <if test="lotatt.lotatt08 != null and lotatt.lotatt08 != ''"> and att.lotatt08 = #{lotatt.lotatt08}</if>
+        <if test="lotatt.lotatt09 != null and lotatt.lotatt09 != ''"> and att.lotatt09 = #{lotatt.lotatt09}</if>
+        <if test="lotatt.lotatt10 != null and lotatt.lotatt10 != ''"> and att.lotatt10 = #{lotatt.lotatt10}</if>
+        <if test="lotatt.lotatt11 != null and lotatt.lotatt11 != ''"> and att.lotatt11 = #{lotatt.lotatt11}</if>
+        <if test="lotatt.lotatt12 != null and lotatt.lotatt12 != ''"> and att.lotatt12 = #{lotatt.lotatt12}</if>
+        <if test="lotatt.lotatt13 != null and lotatt.lotatt13 != ''"> and att.lotatt13 = #{lotatt.lotatt13}</if>
+        <if test="lotatt.lotatt14 != null and lotatt.lotatt14 != ''"> and att.lotatt14 = #{lotatt.lotatt14}</if>
+        <if test="lotatt.lotatt15 != null and lotatt.lotatt15 != ''"> and att.lotatt15 = #{lotatt.lotatt15}</if>
+        <if test="lotatt.lotatt16 != null and lotatt.lotatt16 != ''"> and att.lotatt16 = #{lotatt.lotatt16}</if>
+        <if test="lotatt.lotatt17 != null and lotatt.lotatt17 != ''"> and att.lotatt17 = #{lotatt.lotatt17}</if>
+        <if test="lotatt.lotatt18 != null and lotatt.lotatt18 != ''"> and att.lotatt18 = #{lotatt.lotatt18}</if>
+        <if test="orderBy != null">
+            order By #{orderBy}
+        </if>
+        <if test="orderBy == null">
+            order by row_no + 0,row_index,shift_no + 0,shift_index,col_no + 0,col_index
+        </if>    </select>
 
     <select id="selectSortedLocationLotattListByLocationIdList" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoLotattResult">
         select b.id, b.warehouse_id, b.zone_id, b.location_no, b.location_barcode, b.row_no, b.row_index, b.col_no, b.col_index, b.shift_no,
@@ -527,4 +569,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           and b.col_no = #{colNo}
           and b.warehouse_id = #{warehouseId}
     </select>
-</mapper>
+</mapper>