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

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

@@ -55,16 +55,9 @@ public interface CaseApplicationMapper {
55 55
      */
56 56
     void updatePayType(CaseConfirmPayDTO payDTO);
57 57
 
58
-    /**
59
-     * 查询部门长案件
60
-     * @param caseApplication
61
-     * @return
62
-     */
63
-    List<CaseApplication> selectDeptHeadCaseApplicationList(@Param("caseApplication") CaseApplication caseApplication, @Param("statusList")List<Integer> caseStatusList);
64 58
 
65 59
     ToDoCount selectAdminCaseToDoCount();
66 60
 
67
-    ToDoCount selectDeptHeadCaseToDoCount( @Param("statusList")List<Integer> caseStatusList);
68 61
 
69 62
     ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
70 63
 }

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

@@ -243,12 +243,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
243 243
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
244 244
         Map<String, Long> deptMap =new HashMap<>();
245 245
         if (caseAffiliates != null && caseAffiliates.size() > 0) {
246
-                // 查询所有的组织机构,组装成map
247
-                List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
248
-                if (CollectionUtil.isEmpty(deptList)) {
249
-                    deptList = new ArrayList<>();
250
-                }
251
-                 deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
246
+            // 查询所有的组织机构,组装成map
247
+            List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
248
+            if (CollectionUtil.isEmpty(deptList)) {
249
+                deptList = new ArrayList<>();
250
+            }
251
+            deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
252 252
 
253 253
             for (CaseAffiliate caseAffiliate : caseAffiliates) {
254 254
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
@@ -307,7 +307,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
307 307
         String currentDay = DateUtils.dateTime();
308 308
         String caseNum = "zc"+ currentDay;
309 309
         //查询出当天的案件编号的最大值
310
-            Integer maxCaseNum =  caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
310
+        Integer maxCaseNum =  caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
311 311
         if(null == maxCaseNum){
312 312
             caseNum = caseNum + "001";
313 313
         }else {
@@ -373,7 +373,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
373 373
 
374 374
                 }
375 375
 
376
-                    caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
376
+                caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
377 377
             }
378 378
 
379 379
         }
@@ -428,7 +428,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
428 428
                     SmsUtils.sendSms(request);
429 429
                 }
430 430
             } else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
431
-               return "申请机构与申请代理人不匹配";
431
+                return "申请机构与申请代理人不匹配";
432 432
             } else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
433 433
                 // 同步用户表和案件关联人表的手机号和名称
434 434
                 caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
@@ -602,48 +602,48 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
602 602
 
603 603
                 //对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
604 604
 //                if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
605
-                    List<CaseApplication> caseApplicationNewList = null;
606
-                    for (int i = 0; i < caseApplicationListinsert.size(); i++){
607
-                        caseApplicationNewList = new ArrayList<>();
608
-                        CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
609
-                        // 设置自动编码
610
-                        caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
611
-                        List<CaseAffiliate> caseAffiliatesnew =  new ArrayList<>();
612
-                        CaseApplication caseApplicationNew = new CaseApplication();
613
-                        copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
614
-                        if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
615
-                            for (int j = 0; j < caseApplicationListinsert.size(); j++){
616
-                                CaseApplication  caseApplicationinsert = caseApplicationListinsert.get(j);
617
-
618
-                                if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
619
-                                        caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
620
-
621
-                                    caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
622
-                                }
605
+                List<CaseApplication> caseApplicationNewList = null;
606
+                for (int i = 0; i < caseApplicationListinsert.size(); i++){
607
+                    caseApplicationNewList = new ArrayList<>();
608
+                    CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
609
+                    // 设置自动编码
610
+                    caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
611
+                    List<CaseAffiliate> caseAffiliatesnew =  new ArrayList<>();
612
+                    CaseApplication caseApplicationNew = new CaseApplication();
613
+                    copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
614
+                    if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
615
+                        for (int j = 0; j < caseApplicationListinsert.size(); j++){
616
+                            CaseApplication  caseApplicationinsert = caseApplicationListinsert.get(j);
617
+
618
+                            if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
619
+                                    caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
620
+
621
+                                caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
623 622
                             }
624
-                            caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
625
-                            caseApplicationNewList.add(caseApplicationNew);
626 623
                         }
624
+                        caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
625
+                        caseApplicationNewList.add(caseApplicationNew);
626
+                    }
627 627
 
628
-                        for (int k = 0; k < caseApplicationNewList.size(); k++){
629
-                            CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
630
-                            // 新增立案信息
631
-                            caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
632
-                            caseApplicationItera.setCreateBy(getUsername());
633
-                            int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
634
-                            List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
635
-                            if(caseAffiliates!=null&&caseAffiliates.size()>0){
636
-                                for (CaseAffiliate caseAffiliate : caseAffiliates){
637
-                                    caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
628
+                    for (int k = 0; k < caseApplicationNewList.size(); k++){
629
+                        CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
630
+                        // 新增立案信息
631
+                        caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
632
+                        caseApplicationItera.setCreateBy(getUsername());
633
+                        int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
634
+                        List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
635
+                        if(caseAffiliates!=null&&caseAffiliates.size()>0){
636
+                            for (CaseAffiliate caseAffiliate : caseAffiliates){
637
+                                caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
638 638
 
639
-                                }
640
-                                caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
641 639
                             }
642
-
643
-                            successNum++;
644
-                            successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
640
+                            caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
645 641
                         }
646 642
 
643
+                        successNum++;
644
+                        successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
645
+                    }
646
+
647 647
 //                    }
648 648
 
649 649
                 }
@@ -653,7 +653,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
653 653
         }else {
654 654
             throw new ServiceException("导入立案申请数据不能为空!");
655 655
         }
656
-            return successMsg.append(failureMsg.toString()).toString();
656
+        return successMsg.append(failureMsg.toString()).toString();
657 657
 
658 658
     }
659 659
 
@@ -1019,7 +1019,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1019 1019
                                                     JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
1020 1020
                                                     double positionX = coordinateObj.getDoubleValue("positionX");
1021 1021
                                                     double positionY = coordinateObj.getDoubleValue("positionY");
1022
-                                                    sealSignRecord.setPositionXpsn(positionX);
1022
+                                                    sealSignRecord.setPositionXpsn(positionX+90);
1023 1023
                                                     sealSignRecord.setPositionYpsn(positionY);
1024 1024
                                                 }
1025 1025
                                             }else {
@@ -1034,8 +1034,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1034 1034
                                                     JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
1035 1035
                                                     double positionX = coordinateObj.getDoubleValue("positionX");
1036 1036
                                                     double positionY = coordinateObj.getDoubleValue("positionY");
1037
-                                                    sealSignRecord.setPositionXorg(positionX);
1038
-                                                    sealSignRecord.setPositionYorg(positionY);
1037
+                                                    sealSignRecord.setPositionXorg(positionX-10);
1038
+                                                    sealSignRecord.setPositionYorg(positionY+10);
1039 1039
                                                 }
1040 1040
                                             }
1041 1041
                                         }
@@ -1423,19 +1423,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1423 1423
             for(int i = 0;i < idStrList.length;i ++ ){
1424 1424
                 idList.add(Long.parseLong(idStrList[i]));
1425 1425
             }
1426
-                    // 查询仲裁员电话号
1427
-                 List<SysUser> userList=   sysUserMapper.selectUserListByIds(idList);
1428
-                 if(CollectionUtil.isNotEmpty(userList)) {
1429
-                     for (SysUser user : userList) {
1430
-                     //给仲裁员发送短信通知
1431
-                     request.setPhone(user.getPhonenumber());
1432
-                     // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
1433
-                     String name = user.getNickName();
1434
-                     request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
1435
-                     SmsUtils.sendSms(request);
1436
-
1437
-                     }
1438
-                 }
1426
+            // 查询仲裁员电话号
1427
+            List<SysUser> userList=   sysUserMapper.selectUserListByIds(idList);
1428
+            if(CollectionUtil.isNotEmpty(userList)) {
1429
+                for (SysUser user : userList) {
1430
+                    //给仲裁员发送短信通知
1431
+                    request.setPhone(user.getPhonenumber());
1432
+                    // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
1433
+                    String name = user.getNickName();
1434
+                    request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
1435
+                    SmsUtils.sendSms(request);
1436
+
1437
+                }
1438
+            }
1439 1439
 
1440 1440
         }
1441 1441
 
@@ -1448,7 +1448,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1448 1448
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1449 1449
                 int identityType = caseAffiliateselect.getIdentityType();
1450 1450
                 if(identityType==1){
1451
-                  caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1451
+                    caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1452 1452
 
1453 1453
                 }
1454 1454
                 //给申请人、被申请人发送短信通知
@@ -1501,7 +1501,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1501 1501
 
1502 1502
 
1503 1503
     private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
1504
-       // 申请人信息
1504
+        // 申请人信息
1505 1505
         CaseAffiliate caseAffiliate = new CaseAffiliate();
1506 1506
 
1507 1507
 //        BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
@@ -1516,7 +1516,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1516 1516
         if(StrUtil.isNotEmpty(s)){
1517 1517
             StringBuilder errorMsg = caseApplication.getErrorMsg();
1518 1518
             if(StrUtil.isEmpty(errorMsg)){
1519
-             errorMsg=new StringBuilder();
1519
+                errorMsg=new StringBuilder();
1520 1520
             }
1521 1521
             errorMsg.append(s);
1522 1522
             caseApplication.setErrorMsg(errorMsg);
@@ -1563,27 +1563,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1563 1563
 
1564 1564
 
1565 1565
 
1566
-            // 将组织机构id设为申请人名称
1567
-            if(deptMap.containsKey(caseApplication.getName())){
1568
-                caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
1569
-                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1570
-            }else {
1571
-               // 如果不存在则新增
1572
-                SysDept dept = new SysDept();
1573
-                dept.setParentId(0L);
1574
-                dept.setDeptName(caseApplication.getName());
1575
-                dept.setAncestors("0");
1576
-                dept.setOrderNum(1);
1577
-                dept.setStatus("0");
1578
-                dept.setDelFlag("0");
1579
-                dept.setCreateBy(getUsername());
1580
-                dept.setUpdateBy(getUsername());
1581
-                sysDeptMapper.insertDept(dept);
1582
-                deptMap.put(dept.getDeptName(),dept.getDeptId());
1583
-                caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
1584
-                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1566
+        // 将组织机构id设为申请人名称
1567
+        if(deptMap.containsKey(caseApplication.getName())){
1568
+            caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
1569
+            caseAffiliate.setApplicationOrganName(caseApplication.getName());
1570
+        }else {
1571
+            // 如果不存在则新增
1572
+            SysDept dept = new SysDept();
1573
+            dept.setParentId(0L);
1574
+            dept.setDeptName(caseApplication.getName());
1575
+            dept.setAncestors("0");
1576
+            dept.setOrderNum(1);
1577
+            dept.setStatus("0");
1578
+            dept.setDelFlag("0");
1579
+            dept.setCreateBy(getUsername());
1580
+            dept.setUpdateBy(getUsername());
1581
+            sysDeptMapper.insertDept(dept);
1582
+            deptMap.put(dept.getDeptName(),dept.getDeptId());
1583
+            caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
1584
+            caseAffiliate.setApplicationOrganName(caseApplication.getName());
1585 1585
 
1586
-            }
1586
+        }
1587 1587
 
1588 1588
     }
1589 1589
 

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

@@ -134,14 +134,7 @@
134 134
             </if>
135 135
         </where>
136 136
         ) t1
137
-        <!--        <where>-->
138
-        <!--            &lt;!&ndash;申请人&ndash;&gt;-->
139
-        <!--            <if test="nameId != null and nameId != ''">-->
140
-        <!--                and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
141
-        <!--                    and t1.case_status in (0,2)-->
142
-        <!--                )-->
143
-        <!--            </if>-->
144
-        <!--        </where>-->
137
+
145 138
         order by t1.create_time desc,t1.case_num desc
146 139
     </select>
147 140
     <select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
@@ -226,14 +219,6 @@
226 219
             </if>
227 220
         </where>
228 221
         ) t1
229
-        <!--      <where>
230
-                   &lt;!&ndash;申请人&ndash;&gt;-->
231
-        <!--            <if test="nameId != null and nameId != ''">-->
232
-        <!--                and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
233
-        <!--                and t1.case_status in (0,2)-->
234
-        <!--                )-->
235
-        <!--            </if>
236
-                </where> -->
237 222
     </select>
238 223
 
239 224
     <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
@@ -322,106 +307,6 @@
322 307
                 )
323 308
 
324 309
     </select>
325
-    <select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
326
-        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
327
-        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
328
-        ELSE '无审理方式'
329
-        END arbitratMethodName,
330
-        c.case_status ,
331
-        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
332
-        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
333
-        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
334
-        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
335
-        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
336
-        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
337
-        ELSE '无案件状态'
338
-        END caseStatusName,
339
-        c.hear_date ,c.arbitrat_claims ,
340
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
341
-        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
342
-        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
343
-        from case_application c
344
-        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
345
-        <where>
346
-            c.case_status in
347
-            <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
348
-                #{caseStatus}
349
-            </foreach>
350
-            <if test="caseApplication.caseStatus != null">
351
-                AND c.case_status = #{caseApplication.caseStatus}
352
-            </if>
353
-            <if test="caseApplication.caseNum != null and caseApplication.caseNum != ''">
354
-                AND c.case_num = #{caseApplication.caseNum}
355
-            </if>
356
-            <if test="caseApplication.nameId != null and caseApplication.nameId != ''">
357
-                AND ca.application_organ_id=#{caseApplication.nameId}  AND ca.identity_type=1
358
-            </if>
359
-            <if test="caseApplication.caseStatusList != null and caseApplication.caseStatusList.size() > 0">
360
-                and c.case_status in
361
-                <foreach item="caseStatus" collection="caseApplication.caseStatusList" open="(" separator="," close=")">
362
-                    #{caseStatus}
363
-                </foreach>
364
-            </if>
365
-        </where>
366
-        order by c.create_time desc,c.case_num desc
367
-    </select>
368
-    <select id="selectDeptHeadCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
369
-        select  sum( case when c.case_status=0 then 1 else 0 end) caseApply,
370
-        sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
371
-        sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
372
-        sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
373
-        sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
374
-        sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
375
-        sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
376
-        sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
377
-        sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
378
-        sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
379
-        sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
380
-        sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
381
-        sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
382
-        sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
383
-        sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
384
-        sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
385
-        sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
386
-        sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
387
-        from case_application c
388
-        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
389
-        <where>
390
-            <!--部门长-->
391
-            <if test="statusList != null and statusList.size() > 0">
392
-                or c.case_status in
393
-                <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
394
-                    #{caseStatus}
395
-                </foreach>
396
-                <!--被申请人-->
397
-                <if test="idCard != null and idCard != ''">
398
-                    or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
399
-                </if>
400
-                <!--仲裁员-->
401
-                <if test="userId != null and userId != ''">
402
-                    or ( t.identity_type=1 and
403
-                    t.case_status in (7,8,9,12,13,14)
404
-                    and
405
-                    instr (t.arbitrator_id,#{userId})>0)
406
-                </if>
407
-                <!--法律顾问-->
408
-                <if test="deptIds != null and deptIds.size() > 0">
409
-                    or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
410
-                    and t.application_organ_id in
411
-                    <foreach item="item" collection="deptIds" open="(" separator="," close=")">
412
-                        #{item}
413
-                    </foreach> )
414
-                </if>
415
-                <!--申请人-->
416
-                <if test="nameId != null and nameId != ''">
417
-                    or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
418
-                    and t.case_status in (0,2))
419
-                    )
420
-                </if>
421
-            </if>
422
-        </where>
423
-
424
-    </select>
425 310
 
426 311
 
427 312
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">