Sfoglia il codice sorgente

相同库位查询分类

andy 3 anni fa
parent
commit
4d41588f44

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

@@ -17,6 +17,7 @@ import com.ruoyi.base.domain.LotattVO;
 import com.ruoyi.base.domain.vo.BaseLocationLotattVO;
 import com.ruoyi.base.mapper.BaseLocationInfoMapper;
 import com.ruoyi.base.mapper.BaseSkuMapper;
+import com.ruoyi.base.service.IBaseLocationInfoService;
 import com.ruoyi.base.service.IBaseWarehouseService;
 import com.ruoyi.base.service.SysIdsequenceService;
 import com.ruoyi.framework.web.domain.server.Sys;
@@ -27,7 +28,9 @@ import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Created by IntelliJ IDEA.
@@ -54,6 +57,8 @@ public class WarehouseTest {
     private LocationViewService locationViewService;
     @Autowired
     private BaseLocationInfoMapper baseLocationInfoMapper;
+    @Autowired
+    private IBaseLocationInfoService baseLocationInfoService;
 
     @Test
     public void test() {
@@ -106,7 +111,7 @@ public class WarehouseTest {
     }
 
     @Test
-    public void test3(){
+    public void test3() {
         LocationViewForm form = new LocationViewForm();
         form.setZoneId(2L);
         form.setWarehouseId(1L);
@@ -114,5 +119,18 @@ public class WarehouseTest {
         System.out.println(JSON.toJSONString(locationViewVO));
     }
 
-
+    @Test
+    public void test4() {
+        //List<BaseLocationInfo> locationInfoList = baseLocationInfoService.selectNeighborLocation("A2",null);
+        //System.out.println(JSON.toJSONString(locationInfoList));
+        /*List<String> arr = new ArrayList<>();
+        arr.add("A1");
+        arr.add("A2");
+        arr.add("A3");
+        List<BaseLocationInfo> locationInfoList = baseLocationInfoMapper.selectLocationByColNos(arr);
+        System.out.println(JSON.toJSONString(locationInfoList));*/
+        Map<String, String> att = new HashMap<>();
+        att.put("lotatt01","");
+        baseLocationInfoMapper.selectSameSkuColNo("A", null, att);
+    }
 }

+ 45 - 27
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -1,11 +1,14 @@
 package com.ruoyi.ams.business;
 
 import com.ruoyi.ams.common.Constant;
+import com.ruoyi.ams.config.domain.AsnSoStrategy;
 import com.ruoyi.ams.config.domain.LocationPriorityHeader;
 import com.ruoyi.ams.config.domain.dto.AgvCallDTO;
 import com.ruoyi.ams.config.domain.dto.InWarehouseDTO;
+import com.ruoyi.ams.config.domain.dto.LotattDTO;
 import com.ruoyi.ams.config.domain.dto.OutWarehouseDTO;
 import com.ruoyi.ams.config.domain.vo.LocationPriorityHeaderVO;
+import com.ruoyi.ams.config.mapper.AsnSoStrategyMapper;
 import com.ruoyi.ams.config.mapper.LocationPriorityHeaderMapper;
 import com.ruoyi.ams.config.service.ILocationPriorityHeaderService;
 import com.ruoyi.ams.config.service.LocationAllocationStrategy;
@@ -14,17 +17,18 @@ import com.ruoyi.ams.inv.service.IInvLotLocIdService;
 import com.ruoyi.ams.task.domain.WcsTask;
 import com.ruoyi.ams.task.mapper.WcsTaskMapper;
 import com.ruoyi.base.domain.BaseLocationInfo;
+import com.ruoyi.base.domain.BaseSku;
 import com.ruoyi.base.domain.vo.BaseLocationLotattVO;
+import com.ruoyi.base.mapper.BaseLocationInfoMapper;
 import com.ruoyi.base.service.IBaseLocationInfoService;
+import com.ruoyi.base.service.IBaseSkuService;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 @Service
 public class BusinessServiceImpl implements IBusinessService {
@@ -38,13 +42,18 @@ public class BusinessServiceImpl implements IBusinessService {
     @Autowired
     private LocationAllocationStrategy locationAllocationStrategy;
     @Autowired
-    private LocationPriorityHeaderMapper locationPriorityHeaderMapper;
-    @Autowired
     private InvLotLocIdMapper invLotLocIdMapper;
     @Autowired
     private IInvLotLocIdService invLotLocIdService;
     @Autowired
     private WcsTaskMapper wcsTaskMapper;
+    @Autowired
+    private AsnSoStrategyMapper asnSoStrategyMapper;
+    @Autowired
+    private BaseLocationInfoMapper baseLocationInfoMapper;
+    @Autowired
+    private IBaseSkuService baseSkuService;
+
 
     @Transactional
     @Override
@@ -145,35 +154,44 @@ public class BusinessServiceImpl implements IBusinessService {
             BaseLocationInfo baseLocationInfo = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(inWarehouseDTO.getLocationTo(), inWarehouseDTO.getWarehouseId());
             return baseLocationInfo;
         } else {
-            List<Long> zoneList = new ArrayList<>();
             if (StringUtils.isEmpty(inWarehouseDTO.getLocationZoneTo()) && StringUtils.isEmpty(inWarehouseDTO.getLocationTo())) { //不指定目标库位和区域
                 // 没有指定目标的根据sku进行匹配并进行分配
                 // 如果可以混放的区域不匹配物料也可以选择,否则只选择可以存放的区域
-                List<Long> list = locationPriorityHeaderMapper.selectZoneIdListBySku(inWarehouseDTO.getSku());
-                zoneList.addAll(list);
-            } else {
-                // 指定区域的
-                zoneList.add(Long.parseLong(inWarehouseDTO.getLocationZoneTo()));
-            }
-            BaseLocationInfo resultLocation = null;
-            for (Long zoneId : zoneList) {
-                LocationPriorityHeader query = new LocationPriorityHeader();
-                query.setLocationZone(zoneId.toString());
-                List<LocationPriorityHeaderVO> list = locationPriorityHeaderService.selectLocationPriorityHeaderList(query);
-                if (list != null && list.size() > 0) {
-                    LocationPriorityHeaderVO locationPriorityHeaderVO = list.get(0);
-                    resultLocation = locationAllocationStrategy.filterLockLocation(zoneId, inWarehouseDTO, locationPriorityHeaderVO);
-                } else {
-                    // 如果指定区域没有配置策略则随意分配一个可用的空库位
-                    List<BaseLocationInfo> locationInfoList = baseLocationInfoService.selectSortedLocatinListByZoneId(zoneId, inWarehouseDTO.getWarehouseId());
-                    resultLocation = locationAllocationStrategy.filterLockLocation(locationInfoList);
+                AsnSoStrategy asnSoStrategy = asnSoStrategyMapper.selectAsnSoStrategy();
+                BaseSku baseSku = baseSkuService.selectBaseSkuByCustomerId(Constant.CUSTOMER_ID, inWarehouseDTO.getSku());
+                //判断是否强制同物料靠近,
+                LotattDTO lotattDTO = inWarehouseDTO.getLotattDTO();
+                Map<String, String> lotattMap = new HashMap<>();
+                if (asnSoStrategy.getAsnSameLotatt1Flag().equals("optimization")) {
+                    lotattMap.put(asnSoStrategy.getAsnSameLotatt1Value(), lotattDTO.getAttr(asnSoStrategy.getAsnSameLotatt1Value()));
                 }
-                if (resultLocation != null) {
-                    return resultLocation;
+                if (asnSoStrategy.getAsnSameLotatt2Flag().equals("optimization")) {
+                    lotattMap.put(asnSoStrategy.getAsnSameLotatt2Value(), lotattDTO.getAttr(asnSoStrategy.getAsnSameLotatt2Value()));
+                }
+                List<BaseLocationInfo> locationInfoList = new ArrayList<>();
+                if (asnSoStrategy.getAsnSameSku().equals("force")) {
+                    List<String> colNo = baseLocationInfoMapper.selectSameSkuColNo(baseSku.getSku(), null, lotattMap);
+                    List<BaseLocationInfo> locs = baseLocationInfoMapper.selectLocationByColNos(colNo);
+                    locationInfoList.addAll(locs);
+                } else if (asnSoStrategy.getAsnSameSku().equals("optimization") || asnSoStrategy.getAsnSameSkuType().equals("optimization")) {
+                    List<String> skuColNo = baseLocationInfoMapper.selectSameSkuColNo(baseSku.getSku(), null, lotattMap);
+                    List<String> skuTypeColNo = baseLocationInfoMapper.selectSameSkuColNo(baseSku.getSkuType(), null, lotattMap);
+                    List<String> cols = new ArrayList<>();
+                    cols.addAll(skuColNo);
+                    cols.addAll(skuTypeColNo);
+                    List<BaseLocationInfo> locs = baseLocationInfoMapper.selectLocationByColNos(cols);
+                    locationInfoList.addAll(locs);
+                } else {
+                    locationInfoList = baseLocationInfoMapper.selectLocationBindSku(baseSku.getSkuType());
                 }
+
+            } else {
+                // 指定区域的
+                List<BaseLocationInfo> locationInfoList = baseLocationInfoService.selectSortedLocatinListByZoneId(Long.parseLong(inWarehouseDTO.getLocationZoneTo()), inWarehouseDTO.getWarehouseId());
+                return locationAllocationStrategy.filterLockLocation(locationInfoList);
             }
-            return resultLocation;
         }
+        return null;
     }
 
     @Transactional

+ 2 - 3
warewms-ams/src/main/java/com/ruoyi/ams/config/mapper/AsnSoStrategyMapper.java

@@ -13,11 +13,10 @@ public interface AsnSoStrategyMapper
 {
     /**
      * 查询出入库策略
-     * 
-     * @param asnSameSku 出入库策略主键
+     *
      * @return 出入库策略
      */
-     AsnSoStrategy selectAsnSoStrategyByAsnSameSku(String asnSameSku);
+     AsnSoStrategy selectAsnSoStrategy();
 
     /**
      * 查询出入库策略列表

+ 0 - 7
warewms-ams/src/main/java/com/ruoyi/ams/config/mapper/LocationPriorityHeaderMapper.java

@@ -92,11 +92,4 @@ public interface LocationPriorityHeaderMapper
      * @return 结果
      */
      int deleteLocationPriorityDetailsByHeaderId(Long id);
-
-    /**
-     * 根据sku匹配可以存放的区域
-     * @param sku
-     * @return
-     */
-     List<Long> selectZoneIdListBySku(String sku);
 }

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

@@ -28,7 +28,7 @@ public class AsnSoStrategyServiceImpl implements IAsnSoStrategyService
     @Override
     public AsnSoStrategy selectAsnSoStrategyByAsnSameSku(String asnSameSku)
     {
-        return asnSoStrategyMapper.selectAsnSoStrategyByAsnSameSku(asnSameSku);
+        return asnSoStrategyMapper.selectAsnSoStrategy();
     }
 
     /**

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

@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     
-    <select id="selectAsnSoStrategyByAsnSameSku" parameterType="String" resultMap="AsnSoStrategyResult">
+    <select id="selectAsnSoStrategy" parameterType="String" resultMap="AsnSoStrategyResult">
         <include refid="selectAsnSoStrategyVo"/>
     </select>
         

+ 0 - 5
warewms-ams/src/main/resources/mapper/ams/LocationPriorityHeaderMapper.xml

@@ -183,9 +183,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             ( #{item.id}, #{item.headerId}, #{item.lotattId}, #{item.lotattValue}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
         </foreach>
     </insert>
-
-    <select id="selectZoneIdListBySku" parameterType="string" resultType="java.lang.Long">
-        select z.zone_id from base_location_zone z left join location_priority_header l on z.zone_id = l.location_zone
-        where l.sku = #{sku} or l.sku is null
-    </select>
 </mapper>

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

@@ -1,6 +1,8 @@
 package com.ruoyi.base.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.base.domain.BaseLocationInfo;
 import com.ruoyi.base.domain.LotattVO;
 import com.ruoyi.base.domain.vo.BaseLocationLotattVO;
@@ -95,5 +97,53 @@ public interface BaseLocationInfoMapper
      */
      int updateLocationStockStatus(@Param("id") Long id,@Param("status") String status);
 
+    /**
+     * 查询重复的库位(库位编号、列号)
+     * @param baseLocationInfo
+     * @return
+     */
      List<BaseLocationInfo> checkIsRepeat(BaseLocationInfo baseLocationInfo);
+
+    /**
+     * 查询已经绑定sku分类的库位
+     * @param skuType
+     * @return
+     */
+     List<BaseLocationInfo> selectLocationBindSku(String skuType);
+
+    /**
+     * 查询存放相同物料的列
+     * @param sku
+     * @param zoneId
+     * @return
+     */
+     List<String> selectSameSkuColNo(@Param("sku") String sku,@Param("zoneId") Long zoneId,@Param("lotatt") Map<String,String> lotatt);
+
+    /**
+     * 存放相同物料类型的列
+     * @param skuType
+     * @param zoneId
+     * @return
+     */
+     List<String> selectSameSkuTypeColNo(@Param("skuType") String skuType,@Param("zoneId") Long zoneId);
+
+    /**
+     * 查询所有存储区的列
+     * @return
+     */
+    List<BaseLocationInfo> selectAllColNo();
+
+    /**
+     * 查询列下面所有库位
+     * @param colNo
+     * @return
+     */
+     List<BaseLocationInfo> selectLocationByColNo(String colNo);
+
+    /**
+     * 查询列下面所有库位
+     * @param colNos
+     * @return
+     */
+    List<BaseLocationInfo> selectLocationByColNos(@Param("colNos") List<String> colNos);
 }

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

@@ -109,4 +109,11 @@ public interface IBaseLocationInfoService
      */
     int updateLocationStockStatus(Long id,String status);
 
+    /**
+     * 查询相邻可以存放的库位
+     * @param colNo
+     * @param zoneId
+     * @return
+     */
+    List<BaseLocationInfo> selectNeighborLocation(String colNo,Long zoneId);
 }

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

@@ -10,6 +10,7 @@ import com.ruoyi.base.domain.BaseLocationZone;
 import com.ruoyi.base.domain.vo.BasLocationTreeSelectVO;
 import com.ruoyi.base.domain.vo.TreeSelectVO;
 import com.ruoyi.base.mapper.BaseLocationZoneMapper;
+import com.ruoyi.base.utils.CommonUtils;
 import com.ruoyi.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -170,4 +171,44 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
     public int updateLocationStockStatus(Long id, String status) {
         return baseLocationInfoMapper.updateLocationStockStatus(id, status);
     }
+
+    @Override
+    public List<BaseLocationInfo> selectNeighborLocation(String colNo, Long zoneId) {
+        List<BaseLocationInfo> colNoList = baseLocationInfoMapper.selectAllColNo();
+        List<BaseLocationInfo> resultList = new ArrayList<>();
+        String preColNo = "";
+        String nextColNo = "";
+        BaseLocationInfo currentLocation = null;
+        for (int i = 0; i < colNoList.size(); i++) {
+            if (!colNoList.get(i).getColNo().equals(colNo) && preColNo.equals("")) {
+                preColNo = colNoList.get(i).getColNo();
+                continue;
+            }
+            if (colNoList.get(i).getColNo().equals(colNo)) {
+                currentLocation = colNoList.get(i);
+                if (i + 1 < colNoList.size()) {
+                    nextColNo = colNoList.get(i + 1).getColNo();
+                }
+                continue;
+            }
+            if (nextColNo.equals(colNoList.get(i).getColNo())) {
+                continue;
+            } else {
+                if (i + 1 < colNoList.size()) {
+                    if (currentLocation != null) {
+                        if (CommonUtils.getString(colNoList.get(i + 1).getBindSku()).equals("") || CommonUtils.getString(colNoList.get(i + 1).getBindSku()).equals(currentLocation.getBindSku())) {
+                            nextColNo = colNoList.get(i + 1).getColNo();
+                        }
+                    }
+                }
+            }
+        }
+        System.out.println("pre------>" + preColNo);
+        System.out.println("current---->" + colNo);
+        System.out.println("next----->" + nextColNo);
+        resultList.addAll(baseLocationInfoMapper.selectLocationByColNo(preColNo));
+        resultList.addAll(baseLocationInfoMapper.selectLocationByColNo(nextColNo));
+        resultList.addAll(baseLocationInfoMapper.selectLocationByColNo(colNo));
+        return resultList;
+    }
 }

+ 10 - 2
warewms-base/src/main/java/com/ruoyi/base/utils/CommonUtils.java

@@ -72,6 +72,14 @@ public class CommonUtils {
         return object == null ? "" : object.toString();
     }
 
+    public static String getString(String string) {
+        if (string == null) {
+            return "";
+        } else {
+            return string;
+        }
+    }
+
     /**
      * 检查是否为Int
      *
@@ -154,7 +162,7 @@ public class CommonUtils {
 
     public static String lpad(String s, int n, String replace) {
         while (s.length() < n) {
-            s = replace+s;
+            s = replace + s;
         }
         return s;
     }
@@ -169,7 +177,7 @@ public class CommonUtils {
         map1.put("key", "123");
         map1.put("value", "1");
         arr.add(map1);
-        List<Object> map = arr.stream().map(e -> e.put("key","")).collect(Collectors.toList());
+        List<Object> map = arr.stream().map(e -> e.put("key", "")).collect(Collectors.toList());
         System.out.println(JSON.toJSONString(map));
         //System.out.println(StringUtils.join(arr,","));
 

+ 66 - 0
warewms-base/src/main/resources/mapper/base/BaseLocationInfoMapper.xml

@@ -291,4 +291,70 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         (location_no = #{locationNo} or col_no = #{colNo})
     </select>
 
+    <select id="selectLocationBindSku" parameterType="string" resultMap="BaseLocationInfoResult">
+        select b.* from base_location_info b
+        left join base_location_zone bz on b.zone_id = bz.zone_id
+        where bind_sku like concat('%', #{skuType}, '%') or ifnull(bind_sku,'') = ''
+        and bz.userdefine1 = 'INV'
+        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="selectSameSkuColNo" resultType="string">
+        select b.col_no
+        from base_location_info b
+        left join inv_lot_loc_id i on b.id = i.location_id
+        left join inv_lot_att att on i.lotnum = att.lotnum
+        left join base_sku s on i.sku = s.sku
+        left join base_location_zone bz on b.zone_id = bz.zone_id
+        where
+        i.sku = #{sku}
+        and bz.userdefine1 = 'INV'
+        <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>
+        order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11, '0'),b.col_index
+    </select>
+
+    <select id="selectSameSkuTypeColNo" resultType="string">
+        select b.col_no
+        from base_location_info b
+        left join inv_lot_loc_id i on b.id = i.location_id
+        left join base_sku s on i.sku = s.sku
+        where s.sku_type = #{sku}
+        and bz.userdefine1 = 'INV'
+        order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11, '0'),b.col_index
+    </select>
+
+    <select id="selectAllColNo" resultMap="BaseLocationInfoResult">
+        select col_no,bind_sku from base_location_info b
+        left join base_location_zone bz on b.zone_id = bz.zone_id
+        where bz.userdefine1 = 'INV'
+        group by col_no,bind_sku order by lpad(b.col_no, 11, '0')
+    </select>
+
+    <select id="selectLocationByColNo" parameterType="string" resultMap="BaseLocationInfoResult">
+        select * from base_location_info where col_no = #{colNo}
+    </select>
+
+    <select id="selectLocationByColNos" parameterType="java.util.List" resultMap="BaseLocationInfoResult">
+        select * from base_location_info
+        where col_no in
+        <foreach item="item" collection="colNos" separator="," open="(" close=")" index="">  #{item, jdbcType=VARCHAR}
+        </foreach>
+    </select>
 </mapper>