1
zhang
昨天 286eadc0913fe9974ab2f2fd188fb707dc16ad40
zy-acs-cv/src/main/resources/mapper/JobMapper.xml
@@ -5,14 +5,14 @@
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.Job">
        <id column="id" property="id"/>
        <result column="in_task_no" property="inTaskNo"/>
        <result column="out_task_no" property="outTaskNo"/>
        <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="start_time" property="startTime"/>
        <result column="wms_time" property="wmsTime"/>
        <result column="rcs_time" property="rcsTime"/>
        <result column="status" property="status"/>
@@ -26,38 +26,42 @@
    </resultMap>
    <select id="getJobByTaskNo" resultMap="BaseResultMap">
        select *
        from cv_job
        where task_no = #{seqNum}  order by id desc limit 1
        where task_no = #{seqNum}
        order by id desc limit 1
    </select>
    <select id="getJobByJobNo" resultMap="BaseResultMap">
        select *
        from cv_job
        where job_no = #{workNo} order by id desc limit 1
        where job_no = #{workNo}
        order by id desc limit 1
    </select>
    <select id="getJobByJobNoAndJobSts" resultMap="BaseResultMap">
        select *
        from cv_job
        where job_no = #{workNo}
          and job_sts = #{jobSts}  order by id desc limit 1
          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
          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
        where barcode = #{barcode}
        order by id desc limit 1
    </select>
@@ -67,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>