修改申请

This commit is contained in:
18792927508
2023-11-22 13:58:34 +08:00
parent f85edb62f4
commit 11aab5bc31
26 changed files with 2470 additions and 166 deletions
@@ -194,6 +194,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_role r on r.role_id = ur.role_id
where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
</select>
<select id="selectByDeptIdAndRole" resultMap="SysUserResult">
select u.* from
sys_user u
join sys_user_role ur on u.user_id = ur.user_id
join sys_role r on ur.role_id = r.role_id
where u.dept_id = #{deptId} and r.role_name = #{roleName} and u.del_flag = '0' and r.del_flag='0'
</select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
@@ -0,0 +1,125 @@
<?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.wisdomarbitrate.mapper.CaseAffiliateLogMapper">
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate" id="CaseAffiliateResult">
<id property="id" column="id" />
<result property="caseAppliLogId" column="case_appli_log_id" />
<result property="identityType" column="identity_type" />
<result property="name" column="name" />
<result property="identityNum" column="identity_num" />
<result property="workTelphone" column="work_telphone" />
<result property="contactTelphone" column="contact_telphone" />
<result property="contactAddress" column="contact_address" />
<result property="workAddress" column="work_address" />
<result property="nameAgent" column="name_agent" />
<result property="identityNumAgent" column="identity_num_agent" />
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
<result property="contactAddressAgent" column="contact_address_agent" />
<result property="trackNum" column="track_num" />
<result property="applicationOrganId" column="application_organ_id" />
<result property="applicationOrganName" column="application_organ_name" />
<result property="compLegalPerson" column="comp_legal_person" />
<result property="compLegalperPost" column="comp_legalper_post" />
<result property="responSex" column="respon_sex" />
<result property="responBirth" column="respon_birth" />
<result property="residenAffili" column="residen_affili" />
<result property="appliAgentTitle" column="appli_agent_title" />
<result property="userId" column="user_id" />
<result property="email" column="email" />
</resultMap>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
select c.id ,c.case_appli_log_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
c.comp_legal_person,c.comp_legalper_post,c.respon_sex,c.respon_birth,
c.residen_affili,c.appli_agent_title,c.email,
c.track_num,c.application_organ_id,c.application_organ_name,s.user_id
from case_affiliate_log c
left join sys_user s on c.identity_num=s.id_card
<where>
<if test="caseAppliLogId != null ">
AND c.case_appli_log_id = #{caseAppliLogId}
</if>
</where>
</select>
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
select c.id ,c.case_appli_log_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
c.track_num,c.application_organ_id,c.application_organ_name
from case_affiliate_log c
<where>
<if test="caseAppliLogId != null ">
AND c.case_appli_log_id = #{caseAppliLogId}
</if>
<if test="identityType != null ">
AND c.identity_type = #{identityType}
</if>
</where>
</select>
<insert id="batchCaseAffiliate">
insert into case_affiliate_log(case_appli_log_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
residen_affili,appli_agent_title,
contact_address_agent,email ) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliLogId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
#{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex}, #{item.responBirth},
#{item.residenAffili},#{item.appliAgentTitle},
#{item.contactAddressAgent},
#{item.email})
</foreach>
</insert>
<update id="updataCaseAffiliate" parameterType="CaseAffiliate">
update case_affiliate_log
set
case_appli_log_id=#{caseAppliLogId},
identity_type= #{identityType},
application_organ_id= #{applicationOrganId},
application_organ_name= #{applicationOrganName},
name = #{name},
identity_num = #{identityNum},
contact_telphone = #{contactTelphone},
contact_address = #{contactAddress},
work_address = #{workAddress},
work_telphone = #{workTelphone},
name_agent = #{nameAgent},
identity_num_agent = #{identityNumAgent},
contact_telphone_agent = #{contactTelphoneAgent},
contact_address_agent = #{contactAddressAgent},
send_email = #{sendEmail},
residen_affili = #{residenAffili},
email= #{email},
track_num = #{trackNum}
where id = #{id}
</update>
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
delete from case_affiliate_log where case_appli_log_id = #{caseAppliLogId}
</delete>
<delete id="batchDeletecaseAffiliate">
delete from case_affiliate_log where case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>
@@ -56,7 +56,7 @@
<if test="caseAppliId != null ">
AND c.case_appli_id = #{caseAppliId}
</if>
<if test="caseAppliId != null ">
<if test="identityType != null ">
AND c.identity_type = #{identityType}
</if>
</where>
@@ -112,6 +112,33 @@
where id = #{id}
</update>
<update id="updateCaseAffiliateByCaseId">
<foreach collection="list" item="item" >
update case_affiliate
<set>
application_organ_id= #{item.applicationOrganId},
application_organ_name= #{item.applicationOrganName},
name = #{name},
identity_num = #{item.identityNum},
contact_telphone = #{item.contactTelphone},
contact_address = #{item.contactAddress},
work_address = #{item.workAddress},
work_telphone = #{item.workTelphone},
name_agent = #{item.nameAgent},
identity_num_agent = #{item.identityNumAgent},
contact_telphone_agent = #{item.contactTelphoneAgent},
contact_address_agent = #{item.contactAddressAgent},
send_email = #{item.sendEmail},
residen_affili = #{item.residenAffili},
email= #{item.email},
track_num = #{item.trackNum}
</set>
where case_appli_id = #{caseAppliId} and identity_type= #{item.identityType};
</foreach>
</update>
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
delete from case_affiliate where case_appli_id = #{id}
@@ -0,0 +1,158 @@
<?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.wisdomarbitrate.mapper.CaseApplicationLogMapper">
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseApplication" id="CaseApplicationResult">
<id property="id" column="id" />
<result property="caseAppliId" column="caseAppliId" />
<result property="caseNum" column="case_num" />
<result property="caseName" column="case_name" />
<result property="caseSubjectAmount" column="case_subject_amount" />
<result property="registerDate" column="register_date" />
<result property="arbitratMethod" column="arbitrat_method" />
<result property="caseStatus" column="case_status" />
<result property="hearDate" column="hear_date" />
<result property="arbitratClaims" column="arbitrat_claims" />
<result property="loanStartDate" column="loan_start_date" />
<result property="loanEndDate" column="loan_end_date" />
<result property="claimPrinciOwed" column="claim_princi_owed" />
<result property="claimInterestOwed" column="claim_interest_owed" />
<result property="claimLiquidDamag" column="claim_liquid_damag" />
<result property="feePayable" column="fee_payable" />
<result property="beginVideoDate" column="begin_video_date" />
<result property="onlineVideoPerson" column="online_video_person" />
<result property="contractNumber" column="contract_number" />
<result property="caseStatusName" column="caseStatusName" />
<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="arbitratMethodName" column="arbitratMethodName" />
<result property="isAbsence" column="is_absence" />
<result property="responCrossOpin" column="respon_cross_opin" />
<result property="applicaCrossOpin" column="applica_cross_opin" />
<result property="responDefenOpini" column="respon_defen_opini" />
<result property="arbitratorId" column="arbitrator_id" />
<result property="arbitratorName" column="arbitrator_name" />
<result property="paymentStatus" column="payment_status" />
<result property="paymentStatusName" column="paymentStatusName" />
<result property="filearbitraUrl" column="filearbitra_url" />
<result property="requestRule" column="request_rule" />
<result property="properPreser" column="proper_preser" />
<result property="adjudicaCounter" column="adjudica_counter" />
<result property="lockStatus" column="lock_status" />
<result property="version" column="version" />
<result property="updateSubmitStatus" column="update_submit_status" />
</resultMap>
<insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
insert into case_application_log(
<if test="caseAppliId != null ">case_appli_id ,</if>
<if test="caseName != null and caseName != ''">case_name ,</if>
<if test="caseNum != null and caseNum != ''">case_num,</if>
<if test="caseSubjectAmount != null">case_subject_amount,</if>
<if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
<if test="requestRule != null and requestRule != ''">request_rule,</if>
<if test="loanStartDate != null ">loan_start_date,</if>
<if test="loanEndDate != null ">loan_end_date,</if>
<if test="claimPrinciOwed != null ">claim_princi_owed,</if>
<if test="claimInterestOwed != null ">claim_interest_owed,</if>
<if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
<if test="feePayable != null ">fee_payable,</if>
<if test="contractNumber != null and contractNumber != ''">contract_number,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="version != null ">version,</if>
<if test="updateSubmitStatus != null ">update_submit_status,</if>
create_time
)values(
<if test="caseAppliId != null">#{caseAppliId},</if>
<if test="caseName != null and caseName != ''">#{caseName},</if>
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
<if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
<if test="requestRule != null and requestRule != ''">#{requestRule},</if>
<if test="loanStartDate != null ">#{loanStartDate},</if>
<if test="loanEndDate != null ">#{loanEndDate},</if>
<if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
<if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
<if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
<if test="feePayable != null ">#{feePayable},</if>
<if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="version != null ">#{version},</if>
<if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
sysdate()
)
</insert>
<update id="updateStatus">
update case_application_log
<set>
<if test="updateSubmitStatus!= null ">update_submit_status=#{updateSubmitStatus},</if>
</set>
<where>
<if test="caseId!= null ">AND case_appli_id=#{caseId}</if>
<if test="version!= null ">AND version=#{version}</if>
</where>
</update>
<delete id="deleteById" >
DELETE FROM case_application_log
WHERE id = #{id}
</delete>
<delete id="batchDeleteLog">
delete a from case_affiliate_log a
join case_application_log l on l.id=a.case_appli_log_id
where l.id in (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
);
delete from case_application_log l where l.id in (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
);
</delete>
<select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} and version=#{version}
</select>
<select id="selectLatestCase" resultMap="CaseApplicationResult">
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
</select>
<select id="selectMaxVersionByCaseId" resultType="java.lang.Integer">
SELECT max(version)
FROM case_application_log
WHERE case_appli_id = #{caseAppliId}
</select>
<select id="selectMaxVersionBySecret" resultType="java.lang.Integer">
SELECT max(version)
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
</select>
</mapper>
File diff suppressed because it is too large Load Diff