#
Junjie
2024-06-12 e6dbcd6aa10f9052cf811c7f4438c604d24364b3
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?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.wcs.core.mapper.TaskMapper">
 
    <select id="selectOutboundByShuttleNo" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
        and task_sts in (101, 102, 103)
        and shuttle_no = #{shuttleNo}
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectByAnalyzeSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
        and task_sts in (2, 102)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectByExecuteSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
        and task_sts in (3, 103)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectChargeByAnalyzeSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
          and task_sts in (202)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectChargeByExecuteSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
          and task_sts in (203)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectManualByAnalyzeSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
          and task_sts in (402)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectManualByExecuteSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
          and task_sts in (403)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectMoveByAnalyzeSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
          and task_sts in (302)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectMoveByExecuteSts" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where 1=1
          and task_sts in (303)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectWaitAnalyzeInBoundTask" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task where task_ctg = 1 and task_sts = 1
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectPakOut" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where task_sts=101
        and (task_ctg=101 or task_ctg=110)
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectWaitAnalyzeMoveTask" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task where task_sts = 301
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="hasChargeInLoc" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where task_sts in (201,202,203,204)
        and dest_loc = #{locNo}
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectMoveWorking" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where task_sts in (301,302,303)
        and shuttle_no = #{shuttleNo}
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectManualWorking" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where task_sts in (401,402,403)
        and shuttle_no = #{shuttleNo}
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectWorkingByShuttle" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where task_sts in (1,2,3,101,102,103,301,302,303,401,402,403)
          and shuttle_no = #{shuttleNo}
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectWorkingByLift" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where task_sts in (1,2,3,101,102,103,301,302,303,401,402,403)
          and lift_no = #{liftNo}
        order by priority desc,start_time,task_no asc
    </select>
 
    <select id="selectChargeWorking" resultType="com.zy.asrs.wcs.core.entity.Task">
        select * from wcs_task
        where task_sts in (201,202,203,204)
        and shuttle_no = #{shuttleNo}
        order by priority desc,start_time,task_no asc
    </select>
 
</mapper>