| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387 |
- <?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="com.ruoyi.wisdomarbitrate.domain.CaseApplication" id="CaseApplicationResult">
- <id property="id" column="id"/>
- <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="applicantIsWrittenHear" column="appli_iswrit_hear"/>
- <result property="respondentIsWrittenHear" column="respon_isWrit_hear"/>
-
- <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="facts" column="facts"/>
-
- <result property="batchNumber" column="batch_number"/>
- <result property="mediationAgreement" column="mediation_agreement"/>
- <result property="identityType" column="identity_type"/>
- <result property="name" column="name"/>
- </resultMap>
-
-
- <select id="selectCaseApplicationList" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" resultMap="CaseApplicationResult">
- select DISTINCT(t1.id),t1.caseLogId,t1.case_num,t1.case_subject_amount,t1.register_date,t1.arbitrat_method,
- t1.arbitratMethodName,t1.case_status,t1.caseStatusName,t1.hear_date,t1.arbitrat_claims,
- 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.appli_iswrit_hear,t1.respon_isWrit_hear,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.batch_number,t1.pendingStatus
- from(
- <trim suffixOverrides="union">
- <!--被申请人,仲裁员,部门长,财务,代理人案件-->
- <if test="isOtherRole!=null and isOtherRole==1">
- 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 '书面审理'
- 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.appli_iswrit_hear,c.respon_isWrit_hear,
- 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,c.batch_number,0 as pendingStatus
- from case_application c
- JOIN case_affiliate ca ON ca.case_appli_id = c.id
- <where>
- <!--根据角色和状态过滤-->
- <!--被申请人-->
- <if test="idCard != null and idCard != ''">
- or (ca.identity_num=#{idCard} AND ca.identity_type=2
- and (c.case_status=4 or c.case_status=17)
- )
- </if>
- <!--仲裁员-->
- <if test="userId != null and userId != ''">
- or ( ca.identity_type=1 and
- c.case_status in (7,13,17,18)
- and
- instr (c.arbitrator_id,#{userId})>0)
- </if>
- <!--部门长-->
- <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
- or (ca.identity_type=1)
- </if>
- <!--财务-->
- <if test="financeStatus != null and financeStatus != ''">
- or (ca.identity_type=1
- and c.case_status =#{financeStatus}
- )
- </if>
- <!--代理人-->
- <if test="agentDeptIds != null and agentDeptIds.size()>0">
- or (
- ca.application_organ_id in
- <foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
- </foreach>
- AND ca.identity_type=1
- and c.case_status in (0,9)
- )
-
- </if>
- </where>
- union
- </if>
- <if test="applicationOrganId != null and applicationOrganId != ''">
-
-
- <!--申请人案件-->
- 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 '书面审理'
- 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.appli_iswrit_hear,c.respon_isWrit_hear,
- 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,(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,c.batch_number,0 as pendingStatus
- from case_application c
- JOIN case_affiliate ca ON ca.case_appli_id =c.id AND ca.identity_type = 1
-
- <where>
- (c.case_status <= 10 or c.case_status=31) AND
- ca.identity_type=1
-
- <if test="applicationOrganId != null and applicationOrganId != ''">
- AND ca.application_organ_id = #{applicationOrganId}
- </if>
- </where>
- union
- </if>
- <!--秘书案件-->
- <if test="deptIds != null and deptIds.size() > 0">
-
- <!--秘书主表案件-->
- 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
- '书面审理' 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.appli_iswrit_hear,c.respon_isWrit_hear,
- 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,
- c.batch_number,0 as pendingStatus
- 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
- )
- WHERE
- ca.identity_type=1
- and c.case_status in (1,5,8,9,11,14,15,16,17,31)
- union
- <!--秘书审核案件-->
- SELECT
- l.case_appli_id id,
- l.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
- '书面审理' 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.appli_iswrit_hear,c.respon_isWrit_hear,
- 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,l.version,l.update_submit_status as updateSubmitStatus,c.batch_number,0 as pendingStatus
- 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
-
- <!-- 查询该案件的最新记录 -->
- AND l.version = (
- SELECT
- max( version ) version
- FROM
- case_application_log
- WHERE
- c.id = case_appli_id)
-
- union
- </if>
- <!-- 已办案件 -->
- <if test="loginUserName != null and loginUserName != ''">
- 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
- '书面审理' 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.appli_iswrit_hear,c.respon_isWrit_hear,
- 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,
- c.batch_number,1 as pendingStatus
- from case_log_record r
- join case_application c on r.case_appli_id=c.id and r.case_node!=c.case_status
- JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
- WHERE
- r.create_by=#{loginUserName} AND ca.identity_type=1
- and c.id not in(
- <trim suffixOverrides="union">
- <!--被申请人,仲裁员,部门长,财务,代理人案件-->
- <if test="isOtherRole!=null and isOtherRole==1">
- select c.id
- from case_application c
- JOIN case_affiliate ca ON ca.case_appli_id = c.id
- <where>
- <!--根据角色和状态过滤-->
- <!--被申请人-->
- <if test="idCard != null and idCard != ''">
- or (ca.identity_num=#{idCard} AND ca.identity_type=2
- and (c.case_status=4 or c.case_status=17)
- )
- </if>
- <!--仲裁员-->
- <if test="userId != null and userId != ''">
- or ( ca.identity_type=1 and
- c.case_status in (7,13,17,18)
- and
- instr (c.arbitrator_id,#{userId})>0)
- </if>
- <!--部门长-->
- <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
- or (ca.identity_type=1)
- </if>
- <!--财务-->
- <if test="financeStatus != null and financeStatus != ''">
- or (ca.identity_type=1
- and c.case_status =#{financeStatus}
- )
- </if>
- <!--代理人-->
- <if test="agentDeptIds != null and agentDeptIds.size()>0">
- or (
- ca.application_organ_id in
- <foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
- </foreach>
- AND ca.identity_type=1
- and c.case_status in (0,9)
- )
-
- </if>
- </where>
- union
- </if>
- <if test="applicationOrganId != null and applicationOrganId != ''">
-
-
- <!--申请人案件-->
- select c.id
- from case_application c
- JOIN case_affiliate ca ON ca.case_appli_id =c.id AND ca.identity_type = 1
-
- <where>
- (c.case_status <= 10 or c.case_status=31) AND
- ca.identity_type=1
-
- <if test="applicationOrganId != null and applicationOrganId != ''">
- AND ca.application_organ_id = #{applicationOrganId}
- </if>
- </where>
- union
- </if>
- <!--秘书案件-->
- <if test="deptIds != null and deptIds.size() > 0">
-
- <!--秘书主表案件-->
- SELECT
- c.id
- 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
- )
- WHERE
- ca.identity_type=1
- and c.case_status in (1,5,8,9,11,14,15,16,17,31)
- union
- <!--秘书审核案件-->
- SELECT
- l.case_appli_id id
- 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
-
- <!-- 查询该案件的最新记录 -->
- AND l.version = (
- SELECT
- max( version ) version
- FROM
- case_application_log
- WHERE
- c.id = case_appli_id)
- </if>
- </trim>
- )
- </if>
-
- </trim>
- ) t1
- <where>
- <if test="caseStatus != null">
- AND t1.case_status = #{caseStatus}
- </if>
- <if test="lockStatus != null">
- AND t1.lock_status = #{lockStatus}
- </if>
- <if test="caseNum != null and caseNum != ''">
- AND t1.case_num = #{caseNum}
- </if>
- <if test="batchNumber != null">
- AND t1.batch_number = #{batchNumber}
- </if>
- <if test="nameId != null and nameId != ''">
- AND t1.application_organ_id=#{nameId} AND t1.identity_type=1
- </if>
- </where>
-
- order by t1.pendingStatus asc,t1.case_num desc
- </select>
-
-
- <select id="selectHandledCase" resultMap="CaseApplicationResult">
- select DISTINCT(c.id) 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 '待案件归档' 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,c.version
- from case_log_record r
- join case_application c on r.case_appli_id=c.id
- JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
- <where>
-
- <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="loginUserName != null and loginUserName != ''">
- AND r.create_by=#{loginUserName} AND ca.identity_type=1
- </if>
-
- </where>
- order by c.create_time desc,c.case_num desc
- </select>
-
- <select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
- select sum( case when t1.case_status=0 then 1 else 0 end) caseApply,
- sum( case when t1.case_status=1 then 1 else 0 end) caseApplyCheck,
- sum( case when t1.case_status=2 then 1 else 0 end) caseApplyPay,
- sum( case when t1.case_status=3 then 1 else 0 end) caseApplyPayCheck,
- sum( case when t1.case_status=4 then 1 else 0 end) caseApplyEvidence,
- sum( case when t1.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
- sum( case when t1.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
- sum( case when t1.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
- sum( case when t1.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
- sum( case when t1.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
- sum( case when t1.case_status=10 then 1 else 0 end) caseApplyAward,
- sum( case when t1.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
- sum( case when t1.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
- sum( case when t1.case_status=13 then 1 else 0 end) caseApplyAwardSign,
- sum( case when t1.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
- sum( case when t1.case_status=15 then 1 else 0 end) caseApplyAwardSend,
- sum( case when t1.case_status=16 then 1 else 0 end) caseApplyStored,
- sum( case when t1.case_status=17 then 1 else 0 end) caseApplyArchived,
- sum( case when t1.case_status=18 then 1 else 0 end) arbitratorApplyAwardConfirm,
- sum( case when t1.case_status=31 then 1 else 0 end) updateOnlineHearDate
- from(
- <trim suffixOverrides="union">
- <!--被申请人,仲裁员,部门长,财务,代理人案件-->
- <if test="isOtherRole!=null and isOtherRole==1">
- select DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num ,
- t.identity_type from(
- select c.id ,
- c.case_status,ca.application_organ_id,
- c.arbitrator_id,ca.identity_num , ca.identity_type
- from case_application c
- JOIN case_affiliate ca ON ca.case_appli_id = c.id
- <where>
- <if test="caseStatus != null">
- AND c.case_status = #{caseStatus}
- </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>
- ) t
- <where>
-
- <!--被申请人-->
- <if test="idCard != null and idCard != ''">
- or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
- </if>
- <!--仲裁员-->
- <if test="userId != null and userId != ''">
- or ( t.identity_type=1 and
- t.case_status in (7,13,17,18)
- and
- instr (t.arbitrator_id,#{userId})>0)
- </if>
- <!--申请人-->
- <if test="applicationOrganId != null and applicationOrganId != ''">
- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
- and t.case_status in (0,2,17))
-
- </if>
- <!--部门长-->
- <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
- or (t.identity_type=1 and t.case_status in
- <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
- #{caseStatus}
- </foreach>)
- </if>
- <!--财务-->
- <if test="financeStatus != null and financeStatus != ''">
- or ( t.identity_type=1 and t.case_status =#{financeStatus})
-
- </if>
- <!--代理人-->
- <if test="agentDeptIds != null and agentDeptIds.size()>0">
- or (
- t.application_organ_id in
- <foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
- </foreach>
- AND t.identity_type=1
- and t.case_status in (0,9))
-
- </if>
- </where>
- union
- </if>
-
- <!--秘书案件-->
- <if test="deptIds != null and deptIds.size() > 0">
-
- select c.id ,
- c.case_status,ca.application_organ_id,
- c.arbitrator_id,ca.identity_num , ca.identity_type
- 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
- )
- WHERE
- ca.identity_type=1
-
- and c.case_status in (1,5,8,9,11,14,15,16,17,31)
- <!-- <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="nameId != null and nameId != ''">
- AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
- </if>
- union
- select c.id ,
- c.case_status,ca.application_organ_id,
- c.arbitrator_id,ca.identity_num , ca.identity_type
- 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
- AND l.version = (
- SELECT
- max( version ) version
- FROM
- case_application_log
- WHERE
- c.id = case_appli_id)
- </if>
- </trim>
-
- ) t1
- </select>
-
- <select id="selectAdminCaseApplicationList" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" resultMap="CaseApplicationResult">
- select DISTINCT(c.id) id,0 as pendingStatus,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.appli_iswrit_hear,c.respon_isWrit_hear,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,(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,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
-
- <where>
- <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="batchNumber != null">
- AND c.batch_number = #{batchNumber}
- </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
- <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
- #{caseStatus}
- </foreach>
- </if>
- </where>
- order by c.case_num desc
- </select>
-
- <select id="selectAdminCaseApplicationListBatch" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" resultMap="CaseApplicationResult">
- SELECT DISTINCT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
- c.arbitrator_id ,a.identity_type ,a.name ,a.application_organ_id as applicationOrganId,
- a.application_organ_name as applicantName,
- CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
- ELSE '无审理方式'
- END arbitratMethodName
- FROM case_application c left join case_affiliate a on c.id = a.case_appli_id
- WHERE c.lock_status = 0 and c.batch_number is not null
- and a.identity_type = 1
- <if test="batchNumber != null and batchNumber != ''">
- AND c.batch_number = #{batchNumber}
- </if>
- <if test="nameId != null and nameId != ''">
- AND a.application_organ_id=#{nameId}
- </if>
- order by c.batch_number desc
- </select>
-
- <select id="selectAdminCaseApplicationListBatch1" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" resultMap="CaseApplicationResult">
- SELECT DISTINCT t1.batch_number ,t1.arbitrat_method ,t1.arbitrator_name ,
- t1.arbitrator_id ,t1.identity_type ,t1.name ,t1.applicationOrganId ,
- t1.applicantName,t1.arbitratMethodName
- FROM(
- <trim suffixOverrides="union">
- <!--被申请人,仲裁员,部门长,财务,代理人案件-->
- <if test="isOtherRole!=null and isOtherRole==1">
- SELECT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
- c.arbitrator_id ,ca.identity_type ,ca.name ,ca.application_organ_id as applicationOrganId,
- ca.application_organ_name as applicantName, c.lock_status,
- CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
- ELSE '无审理方式'
- END arbitratMethodName
- FROM case_application c left join case_affiliate ca on c.id = ca.case_appli_id
- <where>
- <!--根据角色和状态过滤-->
- <!--被申请人-->
- <if test="idCard != null and idCard != ''">
- or (ca.identity_num=#{idCard} AND ca.identity_type=2
- and (c.case_status=4 or c.case_status=17)
- )
- </if>
- <!--仲裁员-->
- <if test="userId != null and userId != ''">
- or ( ca.identity_type=1 and
- c.case_status in (7,13,17,18)
- and
- instr (c.arbitrator_id,#{userId})>0 )
- </if>
- <!--部门长-->
- <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
- or (ca.identity_type=1)
- </if>
- <!--财务-->
- <if test="financeStatus != null and financeStatus != ''">
- or (ca.identity_type=1
- and c.case_status =#{financeStatus}
- )
- </if>
- <!--代理人-->
- <if test="agentDeptIds != null and agentDeptIds.size()>0">
- or (
- ca.application_organ_id in
- <foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
- </foreach>
- AND ca.identity_type=1
- and c.case_status in (0,9)
- )
-
- </if>
- </where>
-
- union
- </if>
-
- <!--申请人案件-->
- <if test="applicationOrganId != null and applicationOrganId != ''">
- SELECT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
- c.arbitrator_id ,ca.identity_type ,ca.name ,ca.application_organ_id as applicationOrganId,
- ca.application_organ_name as applicantName, c.lock_status,
- CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
- ELSE '无审理方式'
- END arbitratMethodName
- FROM case_application c left join case_affiliate ca on c.id = ca.case_appli_id
-
- <where>
- (c.case_status <= 10 or c.case_status=31) AND
- ca.identity_type=1
-
- <if test="applicationOrganId != null and applicationOrganId != ''">
- AND ca.application_organ_id = #{applicationOrganId}
- </if>
- </where>
- union
- </if>
-
- <!--秘书案件-->
- <if test="deptIds != null and deptIds.size() > 0">
-
- SELECT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
- c.arbitrator_id ,ca.identity_type ,ca.name ,ca.application_organ_id as applicationOrganId,
- ca.application_organ_name as applicantName, c.lock_status,
- CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
- ELSE '无审理方式'
- END arbitratMethodName
- FROM case_application c left join case_affiliate ca on c.id = ca.case_appli_id
-
- WHERE ca.identity_type=1
- and c.case_status in (1,5,8,9,11,14,15,16,17,31)
- union
- </if>
- </trim>
-
- ) t1
- WHERE t1.lock_status = 0 and t1.batch_number is not null
- and t1.identity_type = 1
- <if test="batchNumber != null and batchNumber != ''">
- AND t1.batch_number = #{batchNumber}
- </if>
- <if test="nameId != null and nameId != ''">
- AND t1.application_organ_id=#{nameId}
- </if>
- order by t1.batch_number desc
-
- </select>
-
- <select id="selectAdminCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
- SELECT
- sum( case when c.case_status=0 then 1 else 0 end) caseApply,
- sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
- sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
- sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
- sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
- sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
- sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
- sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
- sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
- sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
- sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
- sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
- sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
- sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
- sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
- sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
- sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
- sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived,
- sum( case when c.case_status=18 then 1 else 0 end) arbitratorApplyAwardConfirm,
- sum( case when c.case_status=31 then 1 else 0 end) updateOnlineHearDate
- FROM
- case_application c
- JOIN case_affiliate ca ON ca.case_appli_id = c.id
- AND ca.identity_type = 1
- WHERE
- c.case_status IN (
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18,
- 31
- )
-
- </select>
-
-
- <select id="selectCaseApplicationCount" parameterType="com.ruoyi.wisdomarbitrate.domain.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="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
- insert into case_application(
- <if test="id != null">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>
- register_date,
- <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="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="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="adjudicaCounter != null ">adjudica_counter,</if>
- <if test="properPreser != null ">proper_preser,</if>
-
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="importFlag != null ">import_flag,</if>
- <if test="version != null ">version,</if>
- <if test="templateId != null ">template_id,</if>
- facts,
- mediation_agreement,
- batch_number,
- create_time
- )values(
- <if test="id != null">#{id} ,</if>
- <if test="caseName != null and caseName != ''">#{caseName},</if>
- <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
- <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
- sysdate(),
- <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="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="beginVideoDate != null ">#{beginVideoDate},</if>
- <if test="onlineVideoPerson != null and onlineVideoPerson != ''">#{onlineVideoPerson},</if>
-
- <if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
-
- <if test="adjudicaCounter != null ">#{adjudicaCounter},</if>
- <if test="properPreser != null ">#{properPreser},</if>
-
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="importFlag != null ">#{importFlag},</if>
- <if test="version != null ">#{version},</if>
- <if test="templateId != null ">#{templateId},</if>
-
- #{facts},
- #{mediationAgreement},
- #{batchNumber},
- sysdate()
- )
- </insert>
- <insert id="batchSave">
- insert into case_application(
- id,
- case_name ,
- case_num,
- case_subject_amount,
- register_date,
- arbitrat_method,
- case_status,
- hear_date,
- arbitrat_claims,
- request_rule,
- loan_start_date,
- loan_end_date,
- claim_princi_owed,
-
- claim_interest_owed,
- claim_liquid_damag,
- fee_payable,
- begin_video_date,
- online_video_person,
-
- contract_number,
-
- adjudica_counter,
- proper_preser,
-
- create_by,
- import_flag,
- version,
- template_id,
- facts,
- mediation_agreement,
- batch_number,
- create_time
- )values
- <foreach item="item" index="index" collection="list" separator=",">
- (
- #{item.id},
- #{item.caseName},
- #{item.caseNum},
- #{item.caseSubjectAmount},
- sysdate(),
- #{item.arbitratMethod},
- #{item.caseStatus},
- #{item.hearDate},
- #{item.arbitratClaims},
- #{item.requestRule},
- #{item.loanStartDate},
- #{item.loanEndDate},
- #{item.claimPrinciOwed},
-
- #{item.claimInterestOwed},
- #{item.claimLiquidDamag},
- #{item.feePayable},
- #{item.beginVideoDate},
- #{item.onlineVideoPerson},
-
- #{item.contractNumber},
-
- #{item.adjudicaCounter},
- #{item.properPreser},
-
- #{item.createBy},
- #{item.importFlag},
- #{item.version},
- #{item.templateId},
-
- #{item.facts},
- #{item.mediationAgreement},
- #{item.batchNumber},
- sysdate()
- )
- </foreach>;
- </insert>
-
- <update id="updataCaseApplication" parameterType="com.ruoyi.wisdomarbitrate.domain.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">arbitrat_method = #{arbitratMethod},</if>
- <if test="hearDate != null ">hear_date = #{hearDate},</if>
- <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims = #{arbitratClaims},</if>
- <if test="requestRule != null and requestRule != ''">request_rule = #{requestRule},</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="properPreser != null">proper_preser = #{properPreser},</if>
-
- <if test="applicantIsWrittenHear != null">appli_iswrit_hear = #{applicantIsWrittenHear},</if>
- <if test="respondentIsWrittenHear != null">respon_isWrit_hear = #{respondentIsWrittenHear},</if>
-
- <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="facts != null and facts != ''">facts = #{facts},</if>
- <if test="mediationAgreement != null and mediationAgreement != ''">mediation_agreement =
- #{mediationAgreement},
- </if>
- update_time = sysdate()
- </set>
- where id = #{id}
- </update>
-
- <update id="submitCaseApplication" parameterType="com.ruoyi.wisdomarbitrate.domain.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="adjudicaCounter != null">adjudica_counter = #{adjudicaCounter},</if>
- <if test="objectiJuris != null">objecti_juris = #{objectiJuris},</if>
-
- <if test="isAbsence != null">is_absence = #{isAbsence},</if>
- <if test="lockStatus != null">lock_status = #{lockStatus},</if>
- <if test="appliIsAbsen != null">appli_is_absen = #{appliIsAbsen},</if>
- <if test="responCrossOpin != null and responCrossOpin != ''">respon_cross_opin = #{responCrossOpin},</if>
- <if test="applicaCrossOpin != null and applicaCrossOpin != ''">applica_cross_opin = #{applicaCrossOpin},
- </if>
- <if test="responDefenOpini != null and responDefenOpini != ''">respon_defen_opini = #{responDefenOpini},
- </if>
- <if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
- <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
- <if test="respondentIsWrittenHear != null">respon_isWrit_hear = #{respondentIsWrittenHear},</if>
- <if test="hearDate != null">hear_date = #{hearDate},</if>
- <if test="filearbitraUrl != null and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
- <if test="adjudicaCounterReason != null and adjudicaCounterReason != ''">adjudica_counter_reason =
- #{adjudicaCounterReason},
- </if>
- </set>
- where id = #{id}
- </update>
- <update id="updatePayType">
- update case_application set pay_type=#{payType} where id in
- <foreach item="caseId" collection="caseIds" open="(" separator="," close=")">
- #{caseId}
- </foreach>
- </update>
- <update id="updateCaseLockStatus">
- 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= CONCAT(room_id,',',#{roomId}) where id =#{caseId} -->
- </update>
- <update id="updateVersionById">
- update case_application set version = #{version} where id = #{id}
- </update>
-
- <delete id="deletecaseApplication" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication">
- delete from case_application where id = #{id}
- </delete>
- <delete id="batchDeletecaseApplication">
- delete from case_application
- where id in
- <foreach collection="ids" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>;
- delete from case_affiliate
- where case_appli_id in
- <foreach collection="ids" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>;
- delete from case_attach
- where case_appli_id in
- <foreach collection="ids" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>;
- delete from column_value
- where case_id in
- <foreach collection="ids" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>;
- </delete>
-
- <select id="selectCaseApplication" parameterType="com.ruoyi.wisdomarbitrate.domain.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_name,
- 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.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.batch_number,
- c.facts,
- c.appli_iswrit_hear,c.respon_isWrit_hear,
- 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
-
- <where>
- <if test="id != null ">
- AND c.id = #{id}
- </if>
- </where>
- order by c.create_time desc limit 1
- </select>
- <select id="listCaseApplicationByIds" resultMap="CaseApplicationResult">
- select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_name,
- 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.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.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
-
- <where>
- <if test="ids != null and ids.size() > 0 ">
- c.id in
- <foreach item="id" collection="ids" open="(" separator="," close=")">
- #{id}
- </foreach>
- </if>
- </where>
- </select>
- <select id="selectCaseApplicationConfirm" parameterType="com.ruoyi.wisdomarbitrate.domain.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 '待案件归档' when 17 then '已归档'
- when 18 then '待仲裁员审核仲裁文书'
- when 31 then '待修改开庭时间'
- ELSE '无案件状态'
- END caseStatusName,
- 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,
- p.payment_status ,
- CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
- ELSE '无支付状态'
- END paymentStatusName,c.pay_type,
- CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
- from case_application c left join case_payment_record p on c.id = p.case_id
- where c.id = #{id} and p.payment_status=1 limit 1
-
- </select>
-
- <select id="listCaseApplicationByBatchNumber" resultMap="CaseApplicationResult">
- select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_name,
- 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.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.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
- WHERE c.lock_status = 0
- <if test="batchNumber != null and batchNumber != ''">
- AND c.batch_number = #{batchNumber}
- </if>
- <if test="caseStatus != null">
- AND c.case_status = #{caseStatus}
- </if>
- </select>
-
- <select id="selectCaseNumLike" resultType="java.lang.Integer">
- select max(substring(case_num, #{length}+1,12)) as maxCaseNum
- from case_application where case_num like CONCAT(#{caseNum},'%') ;
- </select>
- <select id="selectArbitratorList" resultType="java.lang.String">
- select a.arbitrator_id id from case_application a where a.id=#{id}
- </select>
-
- <select id="selectCasenum" resultType="java.lang.Integer">
- SELECT count(1)
- from case_application c
- where c.arbitrator_id = #{userId}
- and c.case_status in(8,9)
- </select>
-
- <select id="selectCaseIdByRoomId" resultType="java.lang.Long">
- select id
- from case_application where room_id=#{roomId} limit 1
- </select>
-
- <select id="selectMaxRoomId" resultType="java.lang.Long">
- 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>
|