18792927508 2 лет назад
Родитель
Сommit
b5555698e8

+ 24
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Просмотреть файл

@@ -329,6 +329,30 @@ public class CaseApplication  extends BaseEntity {
329 329
      */
330 330
     private String userId;
331 331
     private List<Long> deptIds;
332
+    /**
333
+     * 部门长状态
334
+     */
335
+    private List<Integer> deptHeadStatus;
336
+    /**
337
+     * 财务状态
338
+     */
339
+    private Integer financeStatus;
340
+
341
+    public Integer getFinanceStatus() {
342
+        return financeStatus;
343
+    }
344
+
345
+    public void setFinanceStatus(Integer financeStatus) {
346
+        this.financeStatus = financeStatus;
347
+    }
348
+
349
+    public List<Integer> getDeptHeadStatus() {
350
+        return deptHeadStatus;
351
+    }
352
+
353
+    public void setDeptHeadStatus(List<Integer> deptHeadStatus) {
354
+        this.deptHeadStatus = deptHeadStatus;
355
+    }
332 356
 
333 357
     public List<Long> getDeptIds() {
334 358
         return deptIds;

+ 6
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Просмотреть файл

@@ -167,24 +167,28 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
167 167
             throw new ServiceException("该用户没有角色权限");
168 168
         }
169 169
         CaseApplication caseApplication = new CaseApplication();
170
+        List<Integer> caseStatusList=new ArrayList<>();
170 171
         for (SysRole role : roles) {
171 172
             // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
172 173
             if(role.getRoleName().equals("超级管理员")
173 174
             ){
174 175
                 return caseApplicationMapper.selectAdminCaseToDoCount();
175 176
             }
177
+
176 178
             // 查看所有案件
177 179
             if(role.getRoleName().equals("仲裁委")
178 180
                     ||role.getRoleName().equals("部门长")){
179
-                List<Integer> caseStatusList=new ArrayList<>();
180 181
                 caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
181 182
                 caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
182 183
                 caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
183
-                return caseApplicationMapper.selectDeptHeadCaseToDoCount(caseStatusList);
184
+                caseApplication.setDeptHeadStatus(caseStatusList);
184 185
             }
185 186
             if(role.getRoleName().equals("仲裁员")){
186 187
                 caseApplication.setUserId(String.valueOf(userId));
187 188
             }
189
+            if(role.getRoleName().equals("财务")){
190
+                caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
191
+            }
188 192
             if(role.getRoleName().equals("法律顾问")){
189 193
                 // 查询角色有关的用户部门
190 194
                 List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());

+ 46
- 8
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Просмотреть файл

@@ -39,12 +39,11 @@
39 39
 
40 40
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
41 41
         select t1.* from(
42
-        select dinstinct(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
42
+        select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
43 43
              t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
44 44
         t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
45 45
         t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
46
-        t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.application_organ_name as
47
-        applicantName,
46
+        t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
48 47
         t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url
49 48
         from(
50 49
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
@@ -105,14 +104,25 @@
105 104
                     #{item}
106 105
                 </foreach> )
107 106
             </if>
108
-            <where>
107
+
109 108
                 <!--申请人-->
110 109
                 <if test="nameId != null and nameId != ''">
111
-                    or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
110
+                    or ( t.application_organ_id = #{nameId} AND t.identity_type=1
112 111
                     and t.case_status in (0,2))
113
-                    )
112
+
114 113
                 </if>
115
-            </where>
114
+        <!--部门长-->
115
+            <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
116
+            or t.case_status in
117
+            <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
118
+                #{caseStatus}
119
+            </foreach>
120
+            </if>
121
+            <!--申请人-->
122
+            <if test="financeStatus != null and financeStatus != ''">
123
+                or( t.case_status =#{financeStatus})
124
+
125
+            </if>
116 126
         </where>
117 127
         ) t1
118 128
 <!--        <where>-->
@@ -356,10 +366,38 @@
356 366
         from case_application c
357 367
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
358 368
         <where>
359
-            c.case_status in
369
+            <!--部门长-->
370
+            <if test="statusList != null and statusList.size() > 0">
371
+            or c.case_status in
360 372
             <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
361 373
                 #{caseStatus}
362 374
             </foreach>
375
+                <!--被申请人-->
376
+                <if test="idCard != null and idCard != ''">
377
+                    or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
378
+                </if>
379
+                <!--仲裁员-->
380
+                <if test="userId != null and userId != ''">
381
+                    or ( t.identity_type=1 and
382
+                    t.case_status in (7,8,9,12,13,14)
383
+                    and
384
+                    instr (t.arbitrator_id,#{userId})>0)
385
+                </if>
386
+                <!--法律顾问-->
387
+                <if test="deptIds != null and deptIds.size() > 0">
388
+                    or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
389
+                    and t.application_organ_id in
390
+                    <foreach item="item" collection="deptIds" open="(" separator="," close=")">
391
+                        #{item}
392
+                    </foreach> )
393
+                </if>
394
+                <!--申请人-->
395
+                <if test="nameId != null and nameId != ''">
396
+                    or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
397
+                    and t.case_status in (0,2))
398
+                    )
399
+                </if>
400
+            </if>
363 401
         </where>
364 402
 
365 403
     </select>