18792927508 преди 2 години
родител
ревизия
913ca3547a
променени са 1 файла, в които са добавени 67 реда и са изтрити 2 реда
  1. 67
    2
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml

+ 67
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Целия файл

@@ -59,7 +59,72 @@
59 59
         c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName,c.register_date,c.filearbitra_url
60 60
         from case_application c
61 61
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
62
-        LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
62
+        <where>
63
+            <if test="caseStatus != null">
64
+                AND c.case_status = #{caseStatus}
65
+            </if>
66
+            <if test="caseNum != null and caseNum != ''">
67
+                AND c.case_num = #{caseNum}
68
+            </if>
69
+            <if test="caseStatusList != null and caseStatusList.size() > 0">
70
+                and c.case_status in
71
+                <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
72
+                    #{caseStatus}
73
+                </foreach>
74
+            </if>
75
+        </where>
76
+        ) t <where>
77
+        <!--申请人-->
78
+        <if test="nameId != null and nameId != ''">
79
+            or ( t.application_organ_id = #{nameId}  AND t.identity_type=1 )
80
+        </if>
81
+        <!--被申请人-->
82
+        <if test="idCard != null and idCard != ''">
83
+            or (t.identity_num=#{idCard}  AND t.identity_type=2)
84
+        </if>
85
+        <!--仲裁员-->
86
+        <if test="userId != null and userId != ''">
87
+            or instr  (t.arbitrator_id,#{userId})>0
88
+        </if>
89
+        <!--法律顾问-->
90
+        <if test="deptIds != null and deptIds.size() > 0">
91
+            or t.name
92
+            in
93
+            <foreach item="item" collection="deptIds" open="(" separator="," close=")">
94
+                #{item}
95
+            </foreach>
96
+        </if>
97
+
98
+    </where>
99
+        ) t1
100
+        <where>
101
+            <!--申请人-->
102
+            <if test="nameId != null and nameId != ''">
103
+                and ( t1.applicationOrganId = #{nameId}  AND t1.identity_type=1 )
104
+            </if>
105
+        </where>
106
+        order by t1.create_time desc,t1.case_num desc
107
+    </select>
108
+    <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
109
+        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
110
+        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
111
+        ELSE '无审理方式'
112
+        END arbitratMethodName,
113
+        c.case_status ,
114
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
115
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
116
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
117
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
118
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
119
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
120
+        ELSE '无案件状态'
121
+        END caseStatusName,
122
+        c.hear_date ,c.arbitrat_claims ,
123
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
124
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
125
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
126
+        from case_application c
127
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
63 128
         <where>
64 129
             <if test="caseStatus != null">
65 130
                 AND c.case_status = #{caseStatus}
@@ -68,7 +133,7 @@
68 133
                 AND c.case_num = #{caseNum}
69 134
             </if>
70 135
             <if test="nameId != null and nameId != ''">
71
-                AND ca.NAME=#{nameId}  AND ca.identity_type=1 and ca.name=d.dept_id
136
+                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
72 137
             </if>
73 138
             <if test="caseStatusList != null and caseStatusList.size() > 0">
74 139
                 and c.case_status in