#
Junjie
2024-12-24 8e5594bcd3ecffcdb4befd4e399f6bf18d0fdba9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.asrs.mapper.WrkChargeMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkCharge">
        <id column="wrk_no" property="wrkNo" />
        <result column="mk" property="mk" />
        <result column="wrk_sts" property="wrkSts" />
        <result column="io_type" property="ioType" />
        <result column="crn_no" property="crnNo" />
        <result column="ste_no" property="steNo" />
        <result column="charge" property="charge" />
        <result column="out_most" property="outMost" />
        <result column="io_pri" property="ioPri" />
        <result column="loc_no" property="locNo" />
        <result column="sta_no" property="staNo" />
        <result column="source_sta_no" property="sourceStaNo" />
        <result column="source_loc_no" property="sourceLocNo" />
        <result column="empty_mk" property="emptyMk" />
        <result column="io_time" property="ioTime" />
        <result column="crn_str_time" property="crnStrTime" />
        <result column="crn_end_time" property="crnEndTime" />
        <result column="modi_user" property="modiUser" />
        <result column="modi_time" property="modiTime" />
        <result column="appe_user" property="appeUser" />
        <result column="appe_time" property="appeTime" />
        <result column="memo" property="memo" />
        <result column="barcode" property="barcode" />
        <result column="shuttle_no" property="shuttleNo" />
 
    </resultMap>
 
    <select id="selectWorking" resultMap="BaseResultMap">
        select *
        from asr_wrk_charge
        where 1=1
        <if test="shuttleNo != null">
            and shuttle_no = #{shuttleNo}
        </if>
        and wrk_sts &lt; 60
        and memo = 'charge'
        order by appe_time, io_pri desc
        limit 0,1
    </select>
 
    <select id="selectWorkingOfCharge" resultMap="BaseResultMap">
        select *
        from asr_wrk_charge
        where 1=1
        <if test="charge != null">
            and charge = #{charge}
        </if>
        and wrk_sts &lt; 60
        and memo = 'charge'
        order by appe_time, io_pri desc
        limit 0,1
    </select>
 
    <select id="selectWorkingOfReset" resultMap="BaseResultMap">
        select *
        from asr_wrk_charge
        where 1=1
        <if test="steNo != null">
            and ste_no = #{steNo}
        </if>
        and wrk_sts &lt; 47
        and memo = 'reset'
        order by appe_time, io_pri desc
        limit 0,1
    </select>
 
    <select id="selectByWorkNo" resultMap="BaseResultMap">
        select * from asr_wrk_charge
        where wrk_no=#{workNo}
        order by appe_time, io_pri desc
        limit 0,1
    </select>
 
</mapper>