#
zwl
2025-10-10 cec95e176a9cfaa7661883f66dcebcc98a8b6449
src/main/resources/mapper/WrkMastMapper.xml
@@ -67,7 +67,7 @@
    </select>
    <select id="selectByLocNo1"  resultMap="BaseResultMap">
        select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} or loc_no = #{sourceLocNo})
        select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} or loc_no = #{sourceLocNo}
    </select>
    <select id="selectToBeCompleteData" resultMap="BaseResultMap">
@@ -100,7 +100,7 @@
    </select>
    <select id="selectPickStep" resultMap="BaseResultMap">
        select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)
        select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=16 and (io_type=103 or io_type=107 or io_type=104)
    </select>
    <select id="selectPakOutStep1" resultMap="BaseResultMap">
@@ -112,11 +112,15 @@
    </select>
    <select id="selectLocMove" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no
        select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_pri desc, io_time,wrk_no
    </select>
    <select id="selectLocMoving" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no
    </select>
    <select id="selectWorkings" resultMap="BaseResultMap">
        select * from dbo.asr_wrk_mast where 1=1 and wrk_sts=12 and (io_type=104 or io_type=107 or io_type=110)
    </select>
    <select id="selectWorking" resultMap="BaseResultMap">
@@ -179,4 +183,14 @@
        and source_sta_no = #{sourceStaNo}
        order by io_time,wrk_no
    </select>
    <select id="selectPakInStepBarcode" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where  barcode = #{barcode}
    </select>
    <select id="selectPakOutStep14" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast
        where crn_no=#{crnNo}
          and ((wrk_sts=14 and io_type in (103,107) and source_sta_no=#{sourceStaNo}) or (wrk_sts in (2,3) and io_type in (53,57) and sta_no=#{sourceStaNo}))
        order by io_pri desc,io_time,wrk_no asc
    </select>
</mapper>