#
1
9 天以前 8980782bebfd40b2a56169e4fb53686882e87a97
src/main/resources/mapper/WrkMastMapper.xml
@@ -59,6 +59,7 @@
<!--        <result column="Pdc_type" property="PdcType" />-->
        <result column="ctn_no" property="ctnNo" />
        <result column="full_plt" property="fullPlt" />
        <result column="take_none" property="takeNone" />
    </resultMap>
@@ -78,13 +79,16 @@
        select * from asr_wrk_mast
        where wrk_sts=5
        or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp))
        or (wrk_sts=15 and dateadd(mi,15,crn_end_time) &lt;= getdate() and wrk_no not in (select wrk_no from asr_bas_devp))
        or (wrk_sts=15 and dateadd(mi,3,crn_end_time) &lt;= getdate() and wrk_no not in (select wrk_no from asr_bas_devp))
        or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp))
        order by io_time,wrk_no asc
    </select>
    <select id="selectPakInStep1" resultMap="BaseResultMap">
        select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC
    </select>
    <select id="selectPakInStepBarcode" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where  barcode = #{barcode}
    </select>
    <select id="selectPakInStep11" resultMap="BaseResultMap">
@@ -109,6 +113,15 @@
    <select id="selectPakOutStep2" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC
    </select>
    <select id="selectPakOutStep9996" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where wrk_no = 9996 and wrk_sts=12 and io_type = 12 order by io_pri desc,io_time desc,wrk_no ASC
    </select>
    <select id="selectPakOutStep9997" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where wrk_no = 9997 and wrk_sts=12 and io_type = 12 order by io_pri desc,io_time desc,wrk_no ASC
    </select>
    <select id="selectPakOutStep107" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where barcode = #{barcode}
    </select>
    <select id="selectLocMove" resultMap="BaseResultMap">
@@ -157,8 +170,15 @@
    </select>
    <select id="selectPakOutStep11" resultMap="BaseResultMap">
        select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
        select top 1 *
        from dbo.asr_wrk_mast with (readpast, updlock)
        where crn_no=#{crnNo}
        and source_sta_no=#{sourceStaNo}
        and wrk_sts=11
        and io_type>100
        order by io_pri desc, io_time, wrk_no asc
    </select>
    <!--                                       入出库模式相关                                      -->
    <select id="selectWorkingPakin" resultMap="BaseResultMap">
@@ -182,4 +202,30 @@
    <select id="selectPakoutEmpty" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where  io_type = 110 and sta_no = #{staNo} order by io_time,wrk_no
    </select>
    <select id="countPakOutEmpty" resultType="int">
        select count(*)
        from dbo.asr_wrk_mast
        where io_type = 110 and sta_no = #{staNo}
    </select>
    <select id="selectPickStep2" resultMap="BaseResultMap">
        select top 1 * from asr_wrk_mast where barcode = #{barcode} and (wrk_sts=14 and io_type=107) or (wrk_sts=2 and io_type=57)
    </select>
    <select id="selectPickStep3" resultMap="BaseResultMap">
        select top 1 * from asr_wrk_mast where barcode = #{barcode} and (wrk_sts=14 and io_type=107) or (wrk_sts=2 and io_type=57)
    </select>
    <select id="selectByWrkNo" resultMap="BaseResultMap">
        select * from asr_wrk_mast
        where wrk_no = #{wrkNo}
    </select>
    <select id="selectByWrkNo9996" resultMap="BaseResultMap">
        select * from asr_wrk_mast
        where wrk_no = #{wrkNo}
        and wrk_sts = 11
    </select>
    <select id="selectByWrkNo9997" resultMap="BaseResultMap">
        select * from asr_wrk_mast
        where wrk_no = #{wrkNo}
        and wrk_sts = 11
    </select>
</mapper>