251 lines
15 KiB
XML
251 lines
15 KiB
XML
<?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.CaseApplicationMapper">
|
|
|
|
<resultMap type="CaseApplication" id="CaseApplicationResult">
|
|
<id property="id" column="id" />
|
|
<result property="caseNum" column="case_num" />
|
|
<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="arbitratorId" column="arbitrator_id" />
|
|
<result property="arbitratorName" column="arbitrator_name" />
|
|
<result property="paymentStatus" column="payment_status" />
|
|
<result property="paymentStatusName" column="paymentStatusName" />
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
select c.id ,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 '待案件归档'
|
|
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.update_by ,c.update_time , c.arbitrator_name,d.dept_name as name
|
|
from case_application c
|
|
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
|
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id
|
|
<where>
|
|
<if test="caseStatus != null">
|
|
AND c.case_status = #{caseStatus}
|
|
</if>
|
|
<if test="caseNum != null and caseNum != ''">
|
|
AND c.case_num = #{caseNum}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
AND d.dept_name like CONCAT( '%',#{name},'%') AND ca.identity_type=1 and ca.name=d.dept_id
|
|
</if>
|
|
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
|
and c.case_status in
|
|
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
|
#{caseStatus}
|
|
</foreach>
|
|
</if>
|
|
</where>
|
|
order by c.create_time desc,c.case_num desc
|
|
</select>
|
|
|
|
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
|
|
select count(1) from case_application c
|
|
<where>
|
|
<if test="caseNum != null and caseNum != ''">
|
|
AND c.case_num = #{caseNum}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
|
|
insert into case_application(
|
|
|
|
<if test="caseNum != null and caseNum != ''">case_num,</if>
|
|
<if test="caseSubjectAmount != null">case_subject_amount,</if>
|
|
<if test="registerDate != null">register_date,</if>
|
|
<if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method,</if>
|
|
<if test="caseStatus != null ">case_status,</if>
|
|
<if test="hearDate != null ">hear_date,</if>
|
|
<if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</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="beginVideoDate != null ">begin_video_date,</if>
|
|
<if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person,</if>
|
|
|
|
<if test="contractNumber != null and contractNumber != ''">contract_number,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
create_time
|
|
)values(
|
|
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
|
|
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
|
|
<if test="registerDate != null">#{registerDate},</if>
|
|
<if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
|
|
<if test="caseStatus != null ">#{caseStatus},</if>
|
|
<if test="hearDate != null ">#{hearDate},</if>
|
|
<if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</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="beginVideoDate != null ">#{beginVideoDate},</if>
|
|
<if test="onlineVideoPerson != null and onlineVideoPerson != ''">#{onlineVideoPerson},</if>
|
|
|
|
<if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
sysdate()
|
|
)
|
|
</insert>
|
|
|
|
<update id="updataCaseApplication" parameterType="CaseApplication">
|
|
update case_application
|
|
<set>
|
|
<if test="caseSubjectAmount != null">case_subject_amount = #{caseSubjectAmount},</if>
|
|
<if test="registerDate != null">register_date = #{registerDate},</if>
|
|
<if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method = #{arbitratMethod},</if>
|
|
<if test="hearDate != null ">hear_date = #{hearDate},</if>
|
|
<if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims = #{arbitratClaims},</if>
|
|
<if test="loanStartDate != null ">loan_start_date = #{loanStartDate},</if>
|
|
<if test="loanEndDate != null ">loan_end_date = #{loanEndDate},</if>
|
|
<if test="loanEndDate != null ">claim_princi_owed = #{claimPrinciOwed},</if>
|
|
<if test="claimInterestOwed != null ">claim_interest_owed = #{claimInterestOwed},</if>
|
|
<if test="claimLiquidDamag != null ">claim_liquid_damag = #{claimLiquidDamag},</if>
|
|
<if test="feePayable != null ">fee_payable = #{feePayable},</if>
|
|
<if test="beginVideoDate != null ">begin_video_date = #{beginVideoDate},</if>
|
|
<if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person = #{onlineVideoPerson},</if>
|
|
|
|
<if test="contractNumber != null and contractNumber != ''">contract_number = #{contractNumber},</if>
|
|
|
|
<if test="caseName != null and caseName != ''">case_name = #{caseName},</if>
|
|
<if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
|
|
<if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
|
|
<if test="caseStatus != null">case_status = #{caseStatus},</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
|
|
update_time = sysdate()
|
|
</set>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<update id="submitCaseApplication" parameterType="CaseApplication">
|
|
update case_application
|
|
<set>
|
|
<if test="caseStatus != null">case_status = #{caseStatus},</if>
|
|
<if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
|
|
<if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
|
|
<if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
|
|
<if test="arbitratMethod != null ">arbitrat_method = #{arbitratMethod},</if>
|
|
<if test="caseName != null and caseName != ''">case_name = #{caseName},</if>
|
|
<if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
|
|
<if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
|
|
<if test="isAgreePendTral != null">is_agree_pend_tral = #{isAgreePendTral},</if>
|
|
<if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
|
|
<if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
|
|
<if test="hearDate != null">hear_date = #{hearDate},</if>
|
|
</set>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deletecaseApplication" parameterType="CaseApplication">
|
|
delete from case_application where id = #{id}
|
|
</delete>
|
|
|
|
<select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
select c.id ,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 '待案件归档'
|
|
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.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name
|
|
from case_application c
|
|
<where>
|
|
<if test="id != null ">
|
|
AND c.id = #{id}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectCaseApplicationConfirm" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
select c.id ,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 '待案件归档'
|
|
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.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,
|
|
p.payment_status ,
|
|
CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
|
|
ELSE '无支付状态'
|
|
END paymentStatusName
|
|
from case_application c left join case_payment_record p on c.id = p.case_id
|
|
where c.case_status = 3 and p.payment_status = 1
|
|
AND c.id = #{id}
|
|
|
|
</select>
|
|
<select id="selectCaseNumLike" resultType="java.lang.Integer">
|
|
select max(substring(case_num, #{length}+1,12)+1) as maxCaseNum
|
|
from case_application where case_num like CONCAT(#{caseNum},'%') ;
|
|
</select>
|
|
|
|
|
|
</mapper> |