whycq
2023-03-10 84b74dfb03ee81307e88b128d57d55cbbe47678e
src/main/resources/mapper/LocMastMapper.xml
@@ -33,17 +33,24 @@
        <result column="inv_wh" property="invWh" />
        <result column="mk" property="mk" />
        <result column="barcode" property="barcode" />
        <result column="Pdc_type" property="PdcType" />
        <result column="ctn_no" property="ctnNo" />
    </resultMap>
    <select id="queryFreeLocMast" resultMap="BaseResultMap">
        select top 1 * from asr_loc_mast where row1=#{row} and loc_sts='O' order by loc_sts desc ,lev1 asc,bay1 asc
        select top 1 *
        from asr_loc_mast
        where row1=#{row}
        and loc_sts='O'
        <if test="locType1 != null">
            and loc_type1 = #{locType1}
        </if>
        order by NEWID(),lev1 asc,bay1 asc
    </select>
    <select id="queryDemoSourceLoc" resultMap="BaseResultMap">
        select top 1 * from asr_loc_mast where crn_no = #{crnNo} and (loc_sts='F' or loc_sts='D')
        select top 1 * from asr_loc_mast where crn_no = #{crnNo}
        and loc_sts='D'
        ORDER BY NEWID()
    </select>
@@ -52,4 +59,8 @@
        ORDER BY NEWID()
    </select>
    <select id="queryDemoLoc0" resultMap="BaseResultMap">
        select top 1 * from asr_loc_mast where crn_no = #{crnNo} and loc_sts = 'O'and loc_type1 = #{locType1}
        ORDER BY NEWID()
    </select>
</mapper>