|
|
@@ -187,7 +187,7 @@
|
|
187
|
187
|
and l.version=(SELECT
|
|
188
|
188
|
max( version ) version
|
|
189
|
189
|
FROM
|
|
190
|
|
- case_application_log where case_appli_id = c.id)
|
|
|
190
|
+ case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))
|
|
191
|
191
|
<if test="applicationOrganId != null and applicationOrganId != ''">
|
|
192
|
192
|
AND ca.application_organ_id = #{applicationOrganId}
|
|
193
|
193
|
</if>
|
|
|
@@ -293,14 +293,14 @@
|
|
293
|
293
|
FROM
|
|
294
|
294
|
case_application c
|
|
295
|
295
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
|
296
|
|
- JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1,4) and l.version
|
|
|
296
|
+ JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1, 2) and l.version
|
|
297
|
297
|
= (
|
|
298
|
298
|
SELECT
|
|
299
|
299
|
max( version ) version
|
|
300
|
300
|
FROM
|
|
301
|
301
|
case_application_log
|
|
302
|
302
|
WHERE case_appli_id = c.id
|
|
303
|
|
- and update_submit_status not IN ( 1, 4 ))
|
|
|
303
|
+ and update_submit_status not IN ( 1, 2 ))
|
|
304
|
304
|
WHERE
|
|
305
|
305
|
ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
|
|
306
|
306
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
|
@@ -406,7 +406,7 @@
|
|
406
|
406
|
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
|
407
|
407
|
AND ca.identity_type = 1
|
|
408
|
408
|
WHERE
|
|
409
|
|
- l.update_submit_status IN ( 1, 4 ) and ca.identity_type=1
|
|
|
409
|
+ l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
|
410
|
410
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
411
|
411
|
and ca.application_organ_id in
|
|
412
|
412
|
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
@@ -435,7 +435,7 @@
|
|
435
|
435
|
FROM
|
|
436
|
436
|
case_application_log
|
|
437
|
437
|
WHERE
|
|
438
|
|
- update_submit_status IN ( 1, 4 ) and c.id = l.case_appli_id)
|
|
|
438
|
+ update_submit_status IN ( 1, 2 ) and c.id = l.case_appli_id)
|
|
439
|
439
|
</if>
|
|
440
|
440
|
</trim>
|
|
441
|
441
|
) t1
|
|
|
@@ -713,7 +713,7 @@
|
|
713
|
713
|
and l.version=(SELECT
|
|
714
|
714
|
max( version ) version
|
|
715
|
715
|
FROM
|
|
716
|
|
- case_application_log where case_appli_id = c.id)
|
|
|
716
|
+ case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))
|
|
717
|
717
|
<if test="applicationOrganId != null and applicationOrganId != ''">
|
|
718
|
718
|
AND ca.application_organ_id = #{applicationOrganId}
|
|
719
|
719
|
</if>
|
|
|
@@ -1032,7 +1032,7 @@
|
|
1032
|
1032
|
FROM
|
|
1033
|
1033
|
case_application_log
|
|
1034
|
1034
|
WHERE case_appli_id = t.id
|
|
1035
|
|
- update_submit_status IN ( 1, 4 ))
|
|
|
1035
|
+ update_submit_status IN ( 1, 2 ))
|
|
1036
|
1036
|
order by c.create_time desc,c.case_num desc
|
|
1037
|
1037
|
</select>
|
|
1038
|
1038
|
<select id="selectSecretaryCase" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
|
@@ -1149,13 +1149,13 @@
|
|
1149
|
1149
|
FROM
|
|
1150
|
1150
|
case_application c
|
|
1151
|
1151
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
|
1152
|
|
- JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1,4) and l.version = (
|
|
|
1152
|
+ JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1, 2) and l.version = (
|
|
1153
|
1153
|
SELECT
|
|
1154
|
1154
|
max( version ) version
|
|
1155
|
1155
|
FROM
|
|
1156
|
1156
|
case_application_log
|
|
1157
|
1157
|
WHERE case_appli_id = c.id
|
|
1158
|
|
- update_submit_status IN ( 1, 4 ))
|
|
|
1158
|
+ update_submit_status IN ( 1, 2 ))
|
|
1159
|
1159
|
WHERE
|
|
1160
|
1160
|
ca.identity_type=1 and c.case_status in (1,5)
|
|
1161
|
1161
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
|
@@ -1262,7 +1262,7 @@
|
|
1262
|
1262
|
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
|
1263
|
1263
|
AND ca.identity_type = 1
|
|
1264
|
1264
|
WHERE
|
|
1265
|
|
- l.update_submit_status IN ( 1, 4 ) and ca.identity_type=1
|
|
|
1265
|
+ l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
|
1266
|
1266
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
1267
|
1267
|
and ca.application_organ_id in
|
|
1268
|
1268
|
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
@@ -1291,7 +1291,7 @@
|
|
1291
|
1291
|
FROM
|
|
1292
|
1292
|
case_application_log
|
|
1293
|
1293
|
WHERE
|
|
1294
|
|
- update_submit_status IN ( 1, 4 ))
|
|
|
1294
|
+ update_submit_status IN ( 1, 2 ))
|
|
1295
|
1295
|
) t
|
|
1296
|
1296
|
GROUP BY
|
|
1297
|
1297
|
t.id,
|
|
|
@@ -1459,7 +1459,9 @@
|
|
1459
|
1459
|
update case_application set lock_status=#{lockStatus} where id = #{id}
|
|
1460
|
1460
|
</update>
|
|
1461
|
1461
|
<update id="bindCaseId">
|
|
1462
|
|
- update case_application set room_id=#{roomId} where id = #{caseId}
|
|
|
1462
|
+ <!-- update case_application set room_id=#{roomId} where id = #{caseId} -->
|
|
|
1463
|
+
|
|
|
1464
|
+ update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId}
|
|
1463
|
1465
|
</update>
|
|
1464
|
1466
|
<update id="updateVersionById">
|
|
1465
|
1467
|
update case_application set version = #{version} where id = #{id}
|
|
|
@@ -1574,7 +1576,7 @@ order by c.create_time desc limit 1
|
|
1574
|
1576
|
</select>
|
|
1575
|
1577
|
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
|
1576
|
1578
|
select id
|
|
1577
|
|
- from case_application where room_id=#{roomId} limit 1
|
|
|
1579
|
+ from case_application where room_id like concat('%', #{roomId}, '%') limit 1
|
|
1578
|
1580
|
</select>
|
|
1579
|
1581
|
|
|
1580
|
1582
|
<select id="selectMaxRoomId" resultType="java.lang.Integer">
|