压缩包上传,裁决书生成,案件修改,修改后对比信息

This commit is contained in:
18792927508
2023-12-09 09:25:12 +08:00
parent a7826fbc16
commit 5d4929f36b
17 changed files with 906 additions and 1789 deletions
@@ -46,13 +46,9 @@
<result property="properPreser" column="proper_preser" />
<result property="adjudicaCounter" column="adjudica_counter" />
<result property="lockStatus" column="lock_status" />
<result property="interestRate" column="interest_rate" />
<result property="outstandingMoney" column="outstanding_money" />
<result property="facts" column="facts" />
<result property="partyA" column="party_a" />
<result property="disputes" column="disputes" />
<result property="loanType" column="loan_type" />
<result property="loanTerm" column="loan_term" />
<result property="batchNumber" column="batch_number" />
<result property="mediationAgreement" column="mediation_agreement" />
</resultMap>
@@ -63,7 +59,7 @@
t1.loan_start_date,t1.loan_end_date,t1.claim_princi_owed,t1.claim_interest_owed,t1.claim_liquid_damag,t1.fee_payable,
t1.begin_video_date,t1.online_video_person,t1.contract_number,t1.create_by,t1.create_time,t1.update_by,t1.update_time,
t1.arbitrator_name,t1.name,t1.application_organ_id,t1.applicantName,t1.arbitrator_id,t1.identity_num,t1.identity_type,
t1.filearbitra_url,t1.lock_status,t1.version,t1.updateSubmitStatus
t1.filearbitra_url,t1.lock_status,t1.version,t1.updateSubmitStatus,t1.batch_number
from(
<trim suffixOverrides="union">
<!--申请人,被申请人,仲裁员,部门长,财务,代理人案件-->
@@ -76,7 +72,7 @@
t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
t.arbitrator_id,t.identity_num ,
t.identity_type,t.filearbitra_url,t.lock_status,t.version,t.updateSubmitStatus
t.identity_type,t.filearbitra_url,t.lock_status,t.version,t.updateSubmitStatus,t.batch_number
from(
select c.id ,'' AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
@@ -100,7 +96,7 @@
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
as applicantName,
c.arbitrator_id,ca.identity_num ,ca.identity_type,c.filearbitra_url,c.lock_status,c.version,null as
updateSubmitStatus
updateSubmitStatus,c.batch_number
from case_application c
JOIN case_affiliate ca ON ca.case_appli_id = c.id
<!--查询条件-->
@@ -207,7 +203,7 @@
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,(select version from
case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select
update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
as updateSubmitStatus
as updateSubmitStatus,c.batch_number
from case_application c
JOIN case_affiliate ca ON ca.case_appli_id =c.id AND ca.identity_type = 1
@@ -287,7 +283,8 @@
c.arbitrator_id,ca.identity_num ,ca.identity_type,
c.filearbitra_url,
c.lock_status,c.version,
null as updateSubmitStatus
null as updateSubmitStatus,
c.batch_number
FROM
case_application c
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
@@ -382,7 +379,7 @@
ca.application_organ_id ,
ca.application_organ_name AS applicantName,
c.arbitrator_id,ca.identity_num ,ca.identity_type,
c.filearbitra_url,c.lock_status,l.version,l.update_submit_status as updateSubmitStatus
c.filearbitra_url,c.lock_status,l.version,l.update_submit_status as updateSubmitStatus,c.batch_number
FROM
case_application c
JOIN case_application_log l ON c.id = l.case_appli_id
@@ -814,7 +811,7 @@
c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url,(select version from
case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select
update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
as updateSubmitStatus
as updateSubmitStatus,c.batch_number
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 c.id = l.case_appli_id and c.version=l.version
@@ -902,328 +899,6 @@
</if>
</where>
</select>
<select id="selectApplicationCase" resultMap="CaseApplicationResult">
SELECT
l.case_appli_id id,
l.id AS caseLogId,
l.version,
l.case_num,
l.case_subject_amount,
c.register_date,
c.arbitrat_method,
CASE
c.arbitrat_method
WHEN 1 THEN
'开庭审理'
WHEN 2 THEN
'书面审理' ELSE '无审理方式'
END arbitratMethodName,
c.case_status,
CASE
c.case_status
when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 18 then '待仲裁员审核仲裁文书'
when 31 then '待修改开庭时间' ELSE '无案件状态'
END caseStatusName,
c.hear_date,
l.arbitrat_claims,
l.loan_start_date,
l.loan_end_date,
l.claim_princi_owed,
l.claim_interest_owed,
l.claim_liquid_damag,
l.fee_payable,
c.begin_video_date,
c.online_video_person,
l.contract_number,
l.create_by,
c.create_time,
c.lock_status,
l.update_by,
l.update_time,
c.arbitrator_name,
ca.application_organ_id applicationOrganId,
ca.application_organ_name AS applicantName,
c.filearbitra_url,l.update_submit_status as updateSubmitStatus,l.case_name
FROM
case_application c
JOIN case_application_log l ON c.id = l.case_appli_id
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
AND ca.identity_type = 1
WHERE
ca.identity_type=1
<if test="applicationOrganId != null and applicationOrganId != ''">
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
<!--暂时改为可以查询到生成裁决书之前所有的案件状态-->
and (t.case_status &lt;= 10 or t.case_status=31))
<!-- and t.case_status in (0,2,17))-->
</if>
<if test="caseStatus != null">
AND c.case_status = #{caseStatus}
</if>
<if test="lockStatus != null">
AND c.lock_status = #{lockStatus}
</if>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="nameId != null and nameId != ''">
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
</if>
<!-- <if test="caseStatusList != null and caseStatusList.size() > 0">-->
<!-- and c.case_status in (1,5)-->
<!-- </if>-->
<!-- 查询该案件的最新记录 -->
AND l.version = (
SELECT
max( version ) version
FROM
case_application_log
WHERE case_appli_id = t.id
update_submit_status IN ( 1, 2 ))
order by c.create_time desc,c.case_num desc
</select>
<select id="selectSecretaryCase" parameterType="CaseApplication" resultMap="CaseApplicationResult">
SELECT
t.id,
t.caseLogId,
max( version ) version,
t.case_num,
t.case_subject_amount,
t.register_date,
t.arbitrat_method,
t.caseStatusName,
t.hear_date,
t.arbitrat_claims,
t.loan_start_date,
t.loan_end_date,
t.claim_princi_owed,
t.claim_interest_owed,
t.claim_liquid_damag,
t.fee_payable,
t.begin_video_date,
t.online_video_person,
t.contract_number,
t.create_by,
t.create_time,
t.lock_status,
t.update_by,
t.update_time,
t.arbitrator_name,
t.applicationOrganId,
t.applicantName,
t.filearbitra_url,
t.updateSubmitStatus,t.case_name
FROM
(
<!-- 查询案件主表 -->
SELECT
c.id,
'' AS caseLogId,
c.version,
c.case_num,
c.case_subject_amount,
c.register_date,
c.arbitrat_method,
CASE
c.arbitrat_method
WHEN 1 THEN
'开庭审理'
WHEN 2 THEN
'书面审理' ELSE '无审理方式'
END arbitratMethodName,
c.case_status,
CASE
c.case_status
when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 18 then '待仲裁员审核仲裁文书'
when 31 then '待修改开庭时间' ELSE '无案件状态'
END caseStatusName,
c.hear_date,
c.arbitrat_claims,
c.loan_start_date,
c.loan_end_date,
c.claim_princi_owed,
c.claim_interest_owed,
c.claim_liquid_damag,
c.fee_payable,
c.begin_video_date,
c.online_video_person,
c.contract_number,
c.create_by,
c.create_time,
c.lock_status,
c.update_by,
c.update_time,
c.arbitrator_name,
ca.application_organ_id applicationOrganId,
ca.application_organ_name AS applicantName,
c.filearbitra_url,null as updateSubmitStatus,c.case_name
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, 2) and l.version = (
SELECT
max( version ) version
FROM
case_application_log
WHERE case_appli_id = c.id
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">
and ca.application_organ_id in
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="caseStatus != null">
AND c.case_status = #{caseStatus}
</if>
<if test="lockStatus != null">
AND c.lock_status = #{lockStatus}
</if>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="nameId != null and nameId != ''">
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
</if>
UNION
<!-- 查询案件记录表修改提交申请和撤销申请的案件 -->
SELECT
l.case_appli_id id,
l.id AS caseLogId,
l.version,
l.case_num,
l.case_subject_amount,
c.register_date,
c.arbitrat_method,
CASE
c.arbitrat_method
WHEN 1 THEN
'开庭审理'
WHEN 2 THEN
'书面审理' ELSE '无审理方式'
END arbitratMethodName,
c.case_status,
CASE
c.case_status
when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 18 then '待仲裁员审核仲裁文书'
when 31 then '待修改开庭时间' ELSE '无案件状态'
END caseStatusName,
c.hear_date,
l.arbitrat_claims,
l.loan_start_date,
l.loan_end_date,
l.claim_princi_owed,
l.claim_interest_owed,
l.claim_liquid_damag,
l.fee_payable,
c.begin_video_date,
c.online_video_person,
l.contract_number,
l.create_by,
c.create_time,
c.lock_status,
l.update_by,
l.update_time,
c.arbitrator_name,
ca.application_organ_id applicationOrganId,
ca.application_organ_name AS applicantName,
c.filearbitra_url,l.update_submit_status as updateSubmitStatus,l.case_name
FROM
case_application c
JOIN case_application_log l ON c.id = l.case_appli_id
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, 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=")">
#{item}
</foreach>
</if>
<if test="caseStatus != null">
AND c.case_status = #{caseStatus}
</if>
<if test="lockStatus != null">
AND c.lock_status = #{lockStatus}
</if>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="nameId != null and nameId != ''">
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
</if>
<!-- <if test="caseStatusList != null and caseStatusList.size() > 0">-->
<!-- and c.case_status in (1,5)-->
<!-- </if>-->
<!-- 查询该案件的最新记录 -->
AND l.version = (
SELECT
max( version ) version
FROM
case_application_log
WHERE
update_submit_status IN ( 1, 2 ))
) t
GROUP BY
t.id,
t.caseLogId,
t.version,
t.case_num,
t.case_subject_amount,
t.register_date,
t.arbitrat_method,
t.caseStatusName,
t.hear_date,
t.arbitrat_claims,
t.loan_start_date,
t.loan_end_date,
t.claim_princi_owed,
t.claim_interest_owed,
t.claim_liquid_damag,
t.fee_payable,
t.begin_video_date,
t.online_video_person,
t.contract_number,
t.create_by,
t.create_time,
t.lock_status,
t.update_by,
t.update_time,
t.arbitrator_name,
t.applicationOrganId,
t.applicantName,
t.filearbitra_url,
t.updateSubmitStatus,
t.case_name
ORDER BY
t.create_time DESC,
t.case_num DESC
</select>
<insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
insert into case_application(
<if test="caseName != null and caseName != ''">case_name ,</if>
@@ -1254,14 +929,9 @@
<if test="importFlag != null ">import_flag,</if>
<if test="version != null ">version,</if>
<if test="templateId != null ">template_id,</if>
interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement,
batch_number,
create_time
)values(
<if test="caseName != null and caseName != ''">#{caseName},</if>
@@ -1292,14 +962,10 @@
<if test="importFlag != null ">#{importFlag},</if>
<if test="version != null ">#{version},</if>
<if test="templateId != null ">#{templateId},</if>
#{interestRate},
#{outstandingMoney},
#{facts},
#{partyA},
#{disputes},
#{loanType},
#{loanTerm},
#{mediationAgreement},
#{batchNumber},
sysdate()
)
</insert>
@@ -1333,13 +999,7 @@
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
<if test="version != null ">version = #{version},</if>
<if test="interestRate != null and interestRate != ''">interest_rate = #{interestRate},</if>
<if test="outstandingMoney != null and outstandingMoney != ''">outstanding_money = #{outstandingMoney},</if>
<if test="facts != null and facts != ''">facts = #{facts},</if>
<if test="partyA != null and partyA != ''">party_a = #{partyA},</if>
<if test="disputes != null and disputes != ''">disputes = #{disputes},</if>
<if test="loanType != null and loanType != ''">loan_type = #{loanType},</if>
<if test="loanTerm != null and loanTerm != ''">loan_term = #{loanTerm},</if>
<if test="facts != null and facts != ''">facts = #{facts},</if>
<if test="mediationAgreement != null and mediationAgreement != ''">mediation_agreement = #{mediationAgreement},</if>
update_time = sysdate()
</set>
@@ -1425,13 +1085,8 @@
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.request_rule,c.adjudica_counter,c.proper_preser,
c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
c.interest_rate,
c.outstanding_money,
c.batch_number,
c.facts,
c.party_a,
c.disputes,
c.loan_type,
c.loan_term,
c.mediation_agreement,c.template_id templateId
from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
@@ -1463,7 +1118,10 @@
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.request_rule,c.adjudica_counter,c.proper_preser,
c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
c.batch_number,
c.facts,
c.mediation_agreement,c.template_id templateId
from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
@@ -1492,7 +1150,7 @@
when 31 then '待修改开庭时间'
ELSE '无案件状态'
END caseStatusName,
c.hear_date ,c.arbitrat_claims ,
c.hear_date ,c.arbitrat_claims , c.batch_number,c.facts,c.mediation_agreement,c.template_id templateId,
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,
@@ -1521,7 +1179,10 @@
select max(room_id+1) as maxRoomId
from reserved_conference ;
</select>
<select id="selectBatchNumberLike" resultType="java.lang.Integer">
select max(batch_number) as maxBatchNumber
from case_application ;
</select>
</mapper>