select top 1 * from "SOURCE"."wcs_task_wrk"
where 1=1
and "TASK_NO" = #{taskNo}
select top 1 * from "SOURCE"."wcs_task_wrk"
where 1=1
and "IO_TYPE"=3
and "START_POINT" = #{startPoint}
select top 1 * from "SOURCE"."wcs_task_wrk"
where 1=1
and "WRK_NO" = #{wrkNo}
select top 1 * from "SOURCE"."wcs_task_wrk"
where "STATUS"=1
and "CRN_NO"=#{crnNo}
and "WRK_NO"=#{workNo}
and "START_POINT"=#{startPoint}
and "IO_TYPE"=1
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
select * from "SOURCE"."wcs_task_wrk"
where 1=1
and "STATUS" = 1
select * from "SOURCE"."wcs_task_wrk"
where "CRN_NO"=#{crnNo}
and "IO_TYPE" = 3
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
select * from "SOURCE"."wcs_task_wrk"
where "CRN_NO"=#{crnNo}
and "TARGET_POINT"=#{targetPoint}
and "WRK_STS"=13
and "IO_TYPE" = 2
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
select * from "SOURCE"."wcs_task_wrk"
where "CRN_NO"=#{crnNo}
and "TARGET_POINT"=#{targetPoint}
and "WRK_STS"=11
and "IO_TYPE" = 2
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
select * from "SOURCE"."wcs_task_wrk"
where "CRN_NO"=#{crnNo}
-- and target_point=#{targetPoint}
and "WRK_STS"=11
and "IO_TYPE" = 3
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
select top 1 * from "SOURCE"."wcs_task_wrk"
where 1=1
and ("WRK_STS"=3 or "WRK_STS"=12)
and "CRN_NO"=#{crnNo}
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
select top 1 * from "SOURCE"."wcs_task_wrk"
where 1=1
and ("WRK_STS"=3 or "WRK_STS"=12)
and "CRN_NO"=#{crnNo}
and "WRK_NO"=#{workNo}
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
select * from "SOURCE"."wcs_task_wrk"
where 1=1
and (("WRK_STS"=14 and "STATUS"=5) or "STATUS"=7 or "STATUS"=4
or ("WRK_STS"=4 and "STATUS"=5))
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
insert into "SOURCE"."wcs_task_wrk_log"
select * from "SOURCE"."wcs_task_wrk"
where "TASK_NO" = #{taskNo}
and ("STATUS"=5 or "STATUS"=4 or "STATUS"=6)
insert into "SOURCE"."wcs_task_wrk_log" select * from "SOURCE"."wcs_task_wrk" where TASK_NO = #{taskNo}
select * from "SOURCE"."wcs_task_wrk"
where ("WRK_STS"=3 and "IO_TYPE" = 1)
or ("WRK_STS"=12 and "IO_TYPE" = 2)
order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC
and WRK_NO = #{wrkNo}
and TASK_NO = #{taskNo}
and STATUS = #{status}
and MODI_TIME between #{modiTimeStart} and #{modiTimeEnd}
SELECT * FROM "SOURCE"."wcs_task_wrk"
WHERE 1=1
ORDER BY CREATE_TIME DESC
LIMIT #{pageSize} OFFSET ((#{pageNumber} - 1) * #{pageSize});
SELECT count(1) FROM "SOURCE"."wcs_task_wrk"
WHERE 1=1