自动化立体仓库 - WMS系统
pang.jiabao
2024-04-03 0eb7fb10bafda3eddc9a1c97fe6bada948e731ce
根据宽窄类型来搜索库位
2个文件已修改
34 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/mapper/LocMastMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocMastMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocMastMapper.java
@@ -45,4 +45,20 @@
     * 获取目标库位所在巷道最深空库位  深<浅
     * */
    LocMast selectLocByLocStsPakInO2(@Param("locNos") List<String> locNos);
    /**
     *
     * 根据库位宽窄类型来搜索空库位(站点的不同限制堆垛机)
     * @param locType2 宽窄类型1窄,2宽
     * @param sourceStaNo 源站点
     * @return 库位集合
     */
    List<LocMast> selectLocByWidthToList(@Param("locType2") int locType2,@Param("sourceStaNo") int sourceStaNo);
    /**
     * 寻找这一组库位中有几个不为空的库位
     * @param groupOuterLoc 库位号集合
     * @return 库位集合
     */
    List<LocMast> selectAllLocNotEmpty(@Param("groupLoc") List<String> groupOuterLoc);
}
src/main/resources/mapper/LocMastMapper.xml
@@ -115,5 +115,23 @@
        </foreach>
        AND loc_sts in ('O') order by row1
    </select>
    <select id="selectLocByWidthToList" resultType="com.zy.asrs.entity.LocMast">
        select loc_no locNo,loc_type2 locType2,crn_no crnNo from asr_loc_mast where loc_sts = 'O' and loc_type2 = #{locType2}
        <choose>
            <when  test="sourceStaNo == 100">
                AND crn_no = 1
            </when >
            <when  test="sourceStaNo == 102">
                AND crn_no = 2
            </when >
        </choose>
        order by lev1,bay1,row1
    </select>
    <select id="selectAllLocNotEmpty" resultType="com.zy.asrs.entity.LocMast">
        SELECT * FROM asr_loc_mast WHERE loc_sts != 'O' AND loc_no in
        <foreach collection="groupLoc" item="loc" index="index" open="(" close=")" separator=",">
            #{loc}
        </foreach>
    </select>
</mapper>