13693261870
2025-07-02 6708810c4de34dfb9513061432d656f91d56ee3a
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<?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.ruoyi.buss.mapper.DsTaskList2Mapper">
    
    <resultMap type="com.ruoyi.buss.domain.DsTaskList2" id="DsTaskListResult">
        <id property="PKID"    column="PKID"    />
        <result property="taskId"    column="TASK_ID"    />
        <result property="shipNo"    column="SHIP_NO"    />
        <result property="shipType"    column="SHIP_TYPE"    />
        <result property="TONNAGE"    column="TONNAGE"    />
        <result property="draft"    column="DRAFT"    />
        <result property="LEADER"    column="LEADER"    />
        <result property="STAFF"    column="STAFF"    />
        <result property="grpName"    column="GRP_NAME"    />
        <result property="LEVEL"    column="LEVEL"    />
        <result property="LAT"    column="LAT"    />
        <result property="LON"    column="LON"    />
        <result property="delFlag"    column="DEL_FLAG"    />
        <result property="createBy"    column="CREATE_BY"    />
        <result property="createTime"    column="CREATE_TIME"    />
        <result property="updateBy"    column="UPDATE_BY"    />
        <result property="updateTime"    column="UPDATE_TIME"    />
        <result property="oilB"    column="OIL_B"    />
        <result property="oilG"    column="OIL_G"    />
        <result property="oilA"    column="OIL_A"    />
        <result property="ammoD"    column="AMMO_D"    />
        <result property="ammoP"    column="AMMO_P"    />
        <result property="ammoS"    column="AMMO_S"    />
        <result property="ammoO"    column="AMMO_O"    />
        <result property="WATER"    column="WATER"    />
        <result property="waterP"    column="WATER_P"    />
        <result property="FOOD"    column="FOOD"    />
        <result property="foodW"    column="FOOD_W"    />
        <result property="foodO"    column="FOOD_O"    />
        <result property="pSTime"    column="P_S_TIME"    />
        <result property="pETime"    column="P_E_TIME"    />
        <result property="status"    column="STATUS"    />
        <result property="harborId"    column="HARBOR_ID"    />
        <result property="harborName"    column="HARBOR_NAME"    />
        <result property="berthId"    column="BERTH_ID"    />
        <result property="berthName"    column="BERTH_NAME"    />
        <result property="parkingType"    column="PARKING_TYPE"    />
        <result property="deptId"    column="DEPT_ID"    />
        <result property="deptName"    column="DEPT_NAME"    />
        <result property="posArea"    column="POS_AREA"    />
        <result property="remark"    column="REMARK"    />
        <result property="shipLen"    column="SHIP_LEN"    />
        <result property="dockTime"    column="DOCK_TIME"    />
        <result property="dockIndex"    column="DOCK_INDEX"    />
        <result property="path"    column="PATH"    />
    </resultMap>
 
    <sql id="selectDsTaskListVo">
        select TASK_ID, SHIP_NO, SHIP_TYPE, TONNAGE, DRAFT, LEADER, STAFF, GRP_NAME, LEVEL, LAT, LON, DEL_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, OIL_B, OIL_G, OIL_A, AMMO_D, AMMO_P, AMMO_S, AMMO_O, WATER, WATER_P, FOOD, FOOD_W, FOOD_O, P_S_TIME, P_E_TIME, STATUS, HARBOR_ID, HARBOR_NAME, BERTH_ID, BERTH_NAME, PARKING_TYPE, PKID, DEPT_ID, DEPT_NAME, POS_AREA, REMARK, SHIP_LEN, DOCK_TIME, DOCK_INDEX, PATH from ds_task_list
    </sql>
 
    <select id="selectDsTaskListList" parameterType="com.ruoyi.buss.domain.DsTaskList2" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        <where>  
            <if test="taskId != null "> and TASK_ID = #{taskId}</if>
            <if test="shipNo != null  and shipNo != ''"> and SHIP_NO = #{shipNo}</if>
            <if test="shipType != null  and shipType != ''"> and SHIP_TYPE = #{shipType}</if>
            <if test="TONNAGE != null "> and TONNAGE = #{TONNAGE}</if>
            <if test="draft != null "> and DRAFT = #{draft}</if>
            <if test="LEADER != null  and LEADER != ''"> and LEADER = #{LEADER}</if>
            <if test="STAFF != null "> and STAFF = #{STAFF}</if>
            <if test="grpName != null  and grpName != ''"> and GRP_NAME like concat('%', #{grpName}, '%')</if>
            <if test="LEVEL != null "> and LEVEL = #{LEVEL}</if>
            <if test="LAT != null "> and LAT = #{LAT}</if>
            <if test="LON != null "> and LON = #{LON}</if>
            <if test="delFlag != null  and delFlag != ''"> and DEL_FLAG = #{delFlag}</if>
            <if test="createBy != null  and createBy != ''"> and CREATE_BY = #{createBy}</if>
            <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
            <if test="updateBy != null  and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
            <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
            <if test="oilB != null "> and OIL_B = #{oilB}</if>
            <if test="oilG != null "> and OIL_G = #{oilG}</if>
            <if test="oilA != null "> and OIL_A = #{oilA}</if>
            <if test="ammoD != null "> and AMMO_D = #{ammoD}</if>
            <if test="ammoP != null "> and AMMO_P = #{ammoP}</if>
            <if test="ammoS != null "> and AMMO_S = #{ammoS}</if>
            <if test="ammoO != null "> and AMMO_O = #{ammoO}</if>
            <if test="WATER != null "> and WATER = #{WATER}</if>
            <if test="waterP != null "> and WATER_P = #{waterP}</if>
            <if test="FOOD != null "> and FOOD = #{FOOD}</if>
            <if test="foodW != null "> and FOOD_W = #{foodW}</if>
            <if test="foodO != null "> and FOOD_O = #{foodO}</if>
            <if test="pSTime != null "> and P_S_TIME = #{pSTime}</if>
            <if test="pETime != null "> and P_E_TIME = #{pETime}</if>
            <if test="status != null  and status != ''"> and STATUS = #{status}</if>
            <if test="harborId != null "> and HARBOR_ID = #{harborId}</if>
            <if test="harborName != null  and harborName != ''"> and HARBOR_NAME like concat('%', #{harborName}, '%')</if>
            <if test="berthId != null "> and BERTH_ID = #{berthId}</if>
            <if test="berthName != null  and berthName != ''"> and BERTH_NAME like concat('%', #{berthName}, '%')</if>
            <if test="parkingType != null  and parkingType != ''"> and PARKING_TYPE = #{parkingType}</if>
            <if test="PKID != null "> and PKID = #{PKID}</if>
            <if test="deptId != null "> and DEPT_ID = #{deptId}</if>
            <if test="deptName != null "> and DEPT_NAME = #{deptName}</if>
            <if test="path != null "> and PATH = #{path}</if>
        </where>
    </select>
    
    <select id="selectDsTaskListByTaskId" parameterType="Long" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        where TASK_ID = #{taskId}
    </select>
 
    <select id="selectDsTaskListByParam" parameterType="com.ruoyi.buss.domain.dto.TaskQueryParam" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        <where>
            <if test="taskId != null "> and TASK_ID = #{taskId}</if>
            <if test="deptId != null "> and DEPT_ID = #{deptId}</if>
            <if test="status != null  and status != ''"> and STATUS = #{status}</if>
            <if test="ids != null and ids.length > 0 ">
             and PKID in
                <foreach collection="ids" item="item" index="index" open="(" separator="," close=")">
                    #{item}
                </foreach>
             </if>
        </where>
    </select>
 
    <select id="selectDsTaskListByPKID" parameterType="Long" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        where PKID = #{pkid}
    </select>
 
    <select id="selectCurrentDsTaskList" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        where TASK_ID is null and CREATE_TIME >= TRUNC(SYSDATE - 1)
    </select>
 
    <select id="selectCurrentDsTaskListV2" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        where TASK_ID is null
    </select>
 
    <select id="selectCurrentDsTaskListWithShipNoV2" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        where TASK_ID is null and SHIP_NO in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
 
    <select id="selectCurrentDsTaskListWithShipNo" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        where TASK_ID is null and CREATE_TIME >= TRUNC(SYSDATE - 1) and SHIP_NO in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
 
    <select id="selectDsTaskListByPkids" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        where PKID in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
 
    <insert id="insertDsTaskList" parameterType="com.ruoyi.buss.domain.DsTaskList2">
        insert into ds_task_list
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="taskId != null">TASK_ID,</if>
            <if test="shipNo != null">SHIP_NO,</if>
            <if test="shipType != null">SHIP_TYPE,</if>
            <if test="TONNAGE != null">TONNAGE,</if>
            <if test="draft != null">DRAFT,</if>
            <if test="LEADER != null">LEADER,</if>
            <if test="STAFF != null">STAFF,</if>
            <if test="grpName != null">GRP_NAME,</if>
            <if test="LEVEL != null">LEVEL,</if>
            <if test="LAT != null">LAT,</if>
            <if test="LON != null">LON,</if>
            <if test="delFlag != null">DEL_FLAG,</if>
            <if test="createBy != null">CREATE_BY,</if>
            <if test="createTime != null">CREATE_TIME,</if>
            <if test="updateBy != null">UPDATE_BY,</if>
            <if test="updateTime != null">UPDATE_TIME,</if>
            <if test="oilB != null">OIL_B,</if>
            <if test="oilG != null">OIL_G,</if>
            <if test="oilA != null">OIL_A,</if>
            <if test="ammoD != null">AMMO_D,</if>
            <if test="ammoP != null">AMMO_P,</if>
            <if test="ammoS != null">AMMO_S,</if>
            <if test="ammoO != null">AMMO_O,</if>
            <if test="WATER != null">WATER,</if>
            <if test="waterP != null">WATER_P,</if>
            <if test="FOOD != null">FOOD,</if>
            <if test="foodW != null">FOOD_W,</if>
            <if test="foodO != null">FOOD_O,</if>
            <if test="pSTime != null">P_S_TIME,</if>
            <if test="pETime != null">P_E_TIME,</if>
            <if test="status != null">STATUS,</if>
            <if test="harborId != null">HARBOR_ID,</if>
            <if test="harborName != null">HARBOR_NAME,</if>
            <if test="berthId != null">BERTH_ID,</if>
            <if test="berthName != null">BERTH_NAME,</if>
            <if test="parkingType != null">PARKING_TYPE,</if>
            <if test="deptId != null">DEPT_ID,</if>
            <if test="deptName != null">DEPT_NAME,</if>
            <if test="posArea != null">POS_AREA,</if>
            <if test="shipLen != null">SHIP_LEN,</if>
            <if test="supplySeq != null">SUPPLY_SEQ,</if>
            <if test="dockTime != null">DOCK_TIME,</if>
            <if test="dockIndex != null">DOCK_INDEX,</if>
            <if test="path != null">PATH,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskId != null">#{taskId},</if>
            <if test="shipNo != null">#{shipNo},</if>
            <if test="shipType != null">#{shipType},</if>
            <if test="TONNAGE != null">#{TONNAGE},</if>
            <if test="draft != null">#{draft},</if>
            <if test="LEADER != null">#{LEADER},</if>
            <if test="STAFF != null">#{STAFF},</if>
            <if test="grpName != null">#{grpName},</if>
            <if test="LEVEL != null">#{LEVEL},</if>
            <if test="LAT != null">#{LAT},</if>
            <if test="LON != null">#{LON},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="oilB != null">#{oilB},</if>
            <if test="oilG != null">#{oilG},</if>
            <if test="oilA != null">#{oilA},</if>
            <if test="ammoD != null">#{ammoD},</if>
            <if test="ammoP != null">#{ammoP},</if>
            <if test="ammoS != null">#{ammoS},</if>
            <if test="ammoO != null">#{ammoO},</if>
            <if test="WATER != null">#{WATER},</if>
            <if test="waterP != null">#{waterP},</if>
            <if test="FOOD != null">#{FOOD},</if>
            <if test="foodW != null">#{foodW},</if>
            <if test="foodO != null">#{foodO},</if>
            <if test="pSTime != null">#{pSTime},</if>
            <if test="pETime != null">#{pETime},</if>
            <if test="status != null">#{status},</if>
            <if test="harborId != null">#{harborId},</if>
            <if test="harborName != null">#{harborName},</if>
            <if test="berthId != null">#{berthId},</if>
            <if test="berthName != null">#{berthName},</if>
            <if test="parkingType != null">#{parkingType},</if>
            <if test="deptId != null">#{deptId},</if>
            <if test="deptName != null">#{deptName},</if>
            <if test="posArea != null">#{posArea},</if>
            <if test="remark != null">#{remark},</if>
            <if test="shipLen != null">#{shipLen},</if>
            <if test="supplySeq != null">#{supplySeq},</if>
            <if test="dockTime != null">#{dockTime},</if>
            <if test="dockIndex != null">#{dockIndex},</if>
            <if test="path != null">#{path},</if>
         </trim>
    </insert>
 
    <update id="updateDsTaskList" parameterType="com.ruoyi.buss.domain.DsTaskList2">
        update ds_task_list
        <trim prefix="SET" suffixOverrides=",">
            <if test="taskId != null">TASK_ID = #{taskId},</if>
            <if test="shipNo != null">SHIP_NO = #{shipNo},</if>
            <if test="shipType != null">SHIP_TYPE = #{shipType},</if>
            <if test="TONNAGE != null">TONNAGE = #{TONNAGE},</if>
            <if test="draft != null">DRAFT = #{draft},</if>
            <if test="LEADER != null">LEADER = #{LEADER},</if>
            <if test="STAFF != null">STAFF = #{STAFF},</if>
            <if test="grpName != null">GRP_NAME = #{grpName},</if>
            <if test="LEVEL != null">LEVEL = #{LEVEL},</if>
            <if test="LAT != null">LAT = #{LAT},</if>
            <if test="LON != null">LON = #{LON},</if>
            <if test="delFlag != null">DEL_FLAG = #{delFlag},</if>
            <if test="createBy != null">CREATE_BY = #{createBy},</if>
            <if test="createTime != null">CREATE_TIME = #{createTime},</if>
            <if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
            <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
            <if test="oilB != null">OIL_B = #{oilB},</if>
            <if test="oilG != null">OIL_G = #{oilG},</if>
            <if test="oilA != null">OIL_A = #{oilA},</if>
            <if test="ammoD != null">AMMO_D = #{ammoD},</if>
            <if test="ammoP != null">AMMO_P = #{ammoP},</if>
            <if test="ammoS != null">AMMO_S = #{ammoS},</if>
            <if test="ammoO != null">AMMO_O = #{ammoO},</if>
            <if test="WATER != null">WATER = #{WATER},</if>
            <if test="waterP != null">WATER_P = #{waterP},</if>
            <if test="FOOD != null">FOOD = #{FOOD},</if>
            <if test="foodW != null">FOOD_W = #{foodW},</if>
            <if test="foodO != null">FOOD_O = #{foodO},</if>
            <if test="pSTime != null">P_S_TIME = #{pSTime},</if>
            <if test="pETime != null">P_E_TIME = #{pETime},</if>
            <if test="status != null">STATUS = #{status},</if>
            <if test="harborId != null">HARBOR_ID = #{harborId},</if>
            <if test="harborName != null">HARBOR_NAME = #{harborName},</if>
            <if test="berthId != null">BERTH_ID = #{berthId},</if>
            <if test="berthName != null">BERTH_NAME = #{berthName},</if>
            <if test="parkingType != null">PARKING_TYPE = #{parkingType},</if>
            <if test="deptId != null">DEPT_ID = #{deptId},</if>
            <if test="deptName != null">DEPT_NAME = #{deptName},</if>
            <if test="posArea != null">POS_AREA = #{posArea},</if>
            <if test="remark != null">REMARK = #{remark},</if>
            <if test="shipLen != null">SHIP_LEN = #{shipLen},</if>
            <if test="supplySeq != null">SUPPLY_SEQ = #{supplySeq},</if>
            <if test="dockTime != null">DOCK_TIME = #{dockTime},</if>
            <if test="dockIndex != null">DOCK_INDEX = #{dockIndex},</if>
            <if test="path != null">PATH = #{path},</if>
        </trim>
        where PKID = #{PKID}
    </update>
 
    <delete id="deleteDsTaskListByTaskId" parameterType="Long">
        delete from ds_task_list where TASK_ID = #{taskId}
    </delete>
 
    <delete id="deleteDsTaskListByPKID" parameterType="Long">
        delete from ds_task_list where PKID = #{pkid}
    </delete>
 
    <delete id="deleteDsTaskListByTaskIds" parameterType="String">
        delete from ds_task_list where TASK_ID in 
        <foreach item="taskId" collection="array" open="(" separator="," close=")">
            #{taskId}
        </foreach>
    </delete>
 
    <delete id="deleteDsTaskListByPKIDs" parameterType="String">
        delete from ds_task_list where PKID in
        <foreach item="item" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
 
    <select id="getDsTaskListByTaskIdAndDeptId" parameterType="com.ruoyi.buss.domain.DsTaskList2" resultMap="DsTaskListResult">
        <include refid="selectDsTaskListVo"/>
        <where>
            <if test="taskId != null ">TASK_ID = #{taskId}</if>
            <if test="deptId!= null  and deptId!= ''"> and DEPT_ID = #{deptId}</if>
        </where>
    </select>
 
    <select id="getDsTaskListForSupplyPlan" resultMap="DsTaskListResult">
        select a.*
        from DS_TASK_LIST a, DM_BERTH b where a.BERTH_ID = b.PKID and a.TASK_ID = ${taskId} and a.DEPT_ID = ${deptId} and a.BERTH_ID = ${berthId}
    </select>
 
    <select id="selectDsTaskListListByTaskIdAndBerthds" resultMap="DsTaskListResult">
        SELECT a.*
        FROM DS_TASK_LIST WHERE TASK_ID = ${taskId} AND a.BERTH_ID IN ${berthIds}
    </select>
</mapper>