1
zhang
15 小时以前 ad46ec101f19c65d1c7ecda38608ea9fac7c9ef1
zy-acs-cv/src/main/resources/mapper/JobMapper.xml
@@ -5,10 +5,15 @@
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.Job">
        <id column="id" property="id"/>
        <result column="seq_num" property="seqNum"/>
        <result column="task_no" property="taskNo"/>
        <result column="batch_no" property="batchNo"/>
        <result column="loc" property="loc"/>
        <result column="sta_no" property="staNo"/>
        <result column="barcode" property="barcode"/>
        <result column="job_no" property="jobNo"/>
        <result column="job_sts" property="jobSts"/>
        <result column="in_time" property="inTime"/>
        <result column="start_time" property="startTime"/>
        <result column="wms_time" property="wmsTime"/>
        <result column="rcs_time" property="rcsTime"/>
        <result column="status" property="status"/>
        <result column="deleted" property="deleted"/>
@@ -20,10 +25,12 @@
        <result column="memo" property="memo"/>
    </resultMap>
    <select id="getJobBySeqNum" resultMap="BaseResultMap">
    <select id="getJobByTaskNo" resultMap="BaseResultMap">
        select *
        from cv_job
        where seq_num = #{seqNum}
        where task_no = #{seqNum}
        order by id desc limit 1
    </select>
@@ -31,6 +38,7 @@
        select *
        from cv_job
        where job_no = #{workNo}
        order by id desc limit 1
    </select>
    <select id="getJobByJobNoAndJobSts" resultMap="BaseResultMap">
@@ -38,6 +46,22 @@
        from cv_job
        where job_no = #{workNo}
          and job_sts = #{jobSts}
        order by id desc limit 1
    </select>
    <select id="getJobByBarcodeAndJobSts" resultMap="BaseResultMap">
        select *
        from cv_job
        where barcode = #{barcode}
          and job_sts = #{jobSts}
        order by id desc limit 1
    </select>
    <select id="getJobByBarcode" resultMap="BaseResultMap">
        select *
        from cv_job
        where barcode = #{barcode}
        order by id desc limit 1
    </select>
@@ -47,4 +71,10 @@
        where job_sts = #{jobSts}
    </select>
    <select id="listJobToLog" resultMap="BaseResultMap">
        select *
        from cv_job
        where job_sts = #{jobSts} and DATEDIFF(NOW(), #{day}) > 1
    </select>
</mapper>