修改
This commit is contained in:
@@ -187,7 +187,7 @@
|
||||
and l.version=(SELECT
|
||||
max( version ) version
|
||||
FROM
|
||||
case_application_log where case_appli_id = c.id)
|
||||
case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))
|
||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||
AND ca.application_organ_id = #{applicationOrganId}
|
||||
</if>
|
||||
@@ -293,14 +293,14 @@
|
||||
FROM
|
||||
case_application c
|
||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
||||
JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1,4) and l.version
|
||||
JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1, 2) and l.version
|
||||
= (
|
||||
SELECT
|
||||
max( version ) version
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE case_appli_id = c.id
|
||||
and update_submit_status not IN ( 1, 4 ))
|
||||
and update_submit_status not IN ( 1, 2 ))
|
||||
WHERE
|
||||
ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
@@ -406,7 +406,7 @@
|
||||
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
||||
AND ca.identity_type = 1
|
||||
WHERE
|
||||
l.update_submit_status IN ( 1, 4 ) and ca.identity_type=1
|
||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and ca.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
@@ -435,7 +435,7 @@
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE
|
||||
update_submit_status IN ( 1, 4 ) and c.id = l.case_appli_id)
|
||||
update_submit_status IN ( 1, 2 ) and c.id = l.case_appli_id)
|
||||
</if>
|
||||
</trim>
|
||||
) t1
|
||||
@@ -713,7 +713,7 @@
|
||||
and l.version=(SELECT
|
||||
max( version ) version
|
||||
FROM
|
||||
case_application_log where case_appli_id = c.id)
|
||||
case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))
|
||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||
AND ca.application_organ_id = #{applicationOrganId}
|
||||
</if>
|
||||
@@ -1032,7 +1032,7 @@
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE case_appli_id = t.id
|
||||
update_submit_status IN ( 1, 4 ))
|
||||
update_submit_status IN ( 1, 2 ))
|
||||
order by c.create_time desc,c.case_num desc
|
||||
</select>
|
||||
<select id="selectSecretaryCase" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
@@ -1149,13 +1149,13 @@
|
||||
FROM
|
||||
case_application c
|
||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
||||
JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1,4) and l.version = (
|
||||
JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1, 2) and l.version = (
|
||||
SELECT
|
||||
max( version ) version
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE case_appli_id = c.id
|
||||
update_submit_status IN ( 1, 4 ))
|
||||
update_submit_status IN ( 1, 2 ))
|
||||
WHERE
|
||||
ca.identity_type=1 and c.case_status in (1,5)
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
@@ -1262,7 +1262,7 @@
|
||||
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
||||
AND ca.identity_type = 1
|
||||
WHERE
|
||||
l.update_submit_status IN ( 1, 4 ) and ca.identity_type=1
|
||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and ca.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
@@ -1291,7 +1291,7 @@
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE
|
||||
update_submit_status IN ( 1, 4 ))
|
||||
update_submit_status IN ( 1, 2 ))
|
||||
) t
|
||||
GROUP BY
|
||||
t.id,
|
||||
@@ -1459,7 +1459,9 @@
|
||||
update case_application set lock_status=#{lockStatus} where id = #{id}
|
||||
</update>
|
||||
<update id="bindCaseId">
|
||||
update case_application set room_id=#{roomId} where id = #{caseId}
|
||||
<!-- update case_application set room_id=#{roomId} where id = #{caseId} -->
|
||||
|
||||
update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId}
|
||||
</update>
|
||||
<update id="updateVersionById">
|
||||
update case_application set version = #{version} where id = #{id}
|
||||
@@ -1574,7 +1576,7 @@ order by c.create_time desc limit 1
|
||||
</select>
|
||||
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
||||
select id
|
||||
from case_application where room_id=#{roomId} limit 1
|
||||
from case_application where room_id like concat('%', #{roomId}, '%') limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectMaxRoomId" resultType="java.lang.Integer">
|
||||
|
||||
Reference in New Issue
Block a user