pjb
3 天以前 2e5837667e60378a06c7d8d1a4b095c4ba6e2d06
src/main/resources/mapper/WrkMastMapper.xml
@@ -55,12 +55,32 @@
        <result column="log_mk" property="logMk" />
        <result column="log_err_time" property="logErrTime" />
        <result column="log_err_memo" property="logErrMemo" />
        <result column="Pdc_type" property="pdcType" />
        <result column="barcode" property="barcode" />
<!--        <result column="Pdc_type" property="PdcType" />-->
        <result column="ctn_no" property="ctnNo" />
        <result column="full_plt" property="fullPlt" />
        <result column="rgv_no" property="rgvNo" />
        <result column="rgv_ssta_no" property="rgvSstaNo" />
        <result column="rgv_dsta_no" property="rgvDstaNo" />
        <result column="rgv_create_time" property="rgvCreateTime" />
        <result column="rgv_finish_time" property="rgvFinishTime" />
        <result column="work_no_other" property="workNoOther" />
    </resultMap>
    <select id="selectByIoTypeAndWrkSts"  resultMap="BaseResultMap">
        select top 1 * from asr_wrk_mast where io_type = #{ioType} and wrk_sts = #{wrkSts} order by io_time
    </select>
    <select id="selectInGzxCount" resultType="java.lang.Integer">
       select
        count(*)
       from
        asr_wrk_mast m
       where
        m.sta_no = #{site}
      and (m.whs_type is null or EXISTS (select 1 from asr_bas_devp d where d.wrk_no = m.wrk_no))
    </select>
    <select id="selectByLocNo"  resultMap="BaseResultMap">
        select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} and  (ctn_no is null or ctn_no != 'Y')
@@ -95,7 +115,7 @@
    </select>
    <select id="selectPakInStep2" resultMap="BaseResultMap">
        select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
        select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
    </select>
    <select id="selectPakInStep3" resultMap="BaseResultMap">
@@ -195,4 +215,29 @@
    <select id="selectBy104" resultType="com.zy.entity.WrkMast">
        select top 1 * from asr_wrk_mast awm where awm.sta_no = 104 and awm.wrk_sts = 11 order by awm.appe_time
    </select>
    <select id="selectCountByKb" resultType="java.lang.Integer">
SELECT
   count(*)
FROM
   asr_wrk_mast w
WHERE
   (w.sta_no = 1031
      AND w.wrk_sts != 11
      AND w.wrk_sts != 15)
   OR (
    w.wrk_sts = 15
      AND EXISTS (
      SELECT
         1
      FROM
         asr_bas_devp d
      WHERE
         d.wrk_no = w.wrk_no
         AND d.dev_no IN (1031, 1032, 1033)
    )
)
    </select>
    <select id="selectCountHisByIoTypeAndIoTime" resultType="java.lang.Integer">
         select count (*) from asr_wrk_mast_log where io_type = #{ioType} and io_time = #{ioTime}
    </select>
</mapper>