#
zjj
2025-09-19 966626cb396cdd881e4f7684078bbf6dbdabe34f
src/main/resources/mapper/TaskWrkMapper.xml
@@ -92,10 +92,10 @@
    <select id="selectPakOut3" resultMap="BaseResultMap">
        select * from dbo.wcs_task_wrk
        where crn_no=#{crnNo}
        and target_point=#{targetPoint}
--         and target_point=#{targetPoint}
        and wrk_sts=11
        and io_type = 3
        order by io_pri desc,create_time,wrk_no ASC
        order by io_pri desc,create_time ASC
    </select>
    <select id="selectCrnWorking" resultMap="BaseResultMap">
@@ -106,9 +106,10 @@
        order by io_pri desc,create_time,wrk_no ASC
    </select>
    <select id="selectCrnNoWorking" resultMap="BaseResultMap">
    <select id="selectCrnNoInWorking" resultMap="BaseResultMap">
        select top 1 * from dbo.wcs_task_wrk
        where 1=1
        and io_type != 2
        and (wrk_sts=3 or wrk_sts=12)
        and crn_no=#{crnNo}
        and wrk_no=#{workNo}
@@ -118,7 +119,7 @@
    <select id="selectToBeHistoryData" resultMap="BaseResultMap">
        select * from dbo.wcs_task_wrk
        where 1=1
        and ((wrk_sts=14 and status=5) or status=4 or (wrk_sts=4 and status=5))
        and ((wrk_sts=15 and status=5) or status=4 or (wrk_sts=5 and status=5))
        order by io_pri desc,create_time,wrk_no ASC
    </select>
@@ -128,8 +129,16 @@
    <select id="selectWorkingTask" resultMap="BaseResultMap">
        select * from dbo.wcs_task_wrk
        where (wrk_sts=3 and io_type = 1)
        or (wrk_sts=12 and io_type = 2)
        where (wrk_sts=5 and io_type = 1)
        or (wrk_sts=15 and io_type = 2)
        or (wrk_sts = 5 and io_type = 3)
        order by io_pri desc,create_time,wrk_no ASC
    </select>
    <select id="selectbyWrksts4" resultMap="BaseResultMap">
        select * from dbo.wcs_task_wrk
        where (wrk_sts=4 and io_type = 1)
           or (wrk_sts=14 and io_type = 2)
           or (wrk_sts = 4 and io_type = 3)
        order by io_pri desc,create_time,wrk_no ASC
    </select>