Просмотр исходного кода

Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz3

qitz 2 лет назад
Родитель
Сommit
9fe0b621c2

+ 41
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java Просмотреть файл

@@ -1,5 +1,7 @@
1 1
 package com.ruoyi.web.controller.wisdomarbitrate;
2 2
 
3
+import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
3 5
 import com.ruoyi.common.core.controller.BaseController;
4 6
 import com.ruoyi.common.core.domain.AjaxResult;
5 7
 import com.ruoyi.common.core.page.TableDataInfo;
@@ -55,6 +57,45 @@ public class CaseEvidenceController extends BaseController {
55 57
         Long userId = this.getUserId();
56 58
         return caseEvidenceService.uploadEvidence(file, annexType, id, username, userId);
57 59
     }
60
+    @PostMapping("/batchUpload")
61
+    public AjaxResult batchUpload(@RequestParam("file") MultipartFile[] file, Integer annexType, Long id) {
62
+        if(file==null){
63
+            return error("请选择要上传的文件");
64
+        }
65
+        String username = this.getUsername();
66
+        Long userId = this.getUserId();
67
+        return caseEvidenceService.batchUpload(file, annexType, id, username, userId);
68
+    }
69
+
70
+    /**
71
+     * 获取附件
72
+     * @param caseAppliId
73
+     * @param annexTypeList
74
+     * @param
75
+     * @return
76
+     */
77
+    @GetMapping("/fileList")
78
+    public AjaxResult fileList(Long caseAppliId, @RequestParam("annexTypeList") List<Integer> annexTypeList){
79
+        if(caseAppliId==null){
80
+            return error("案件id不能为空");
81
+        }
82
+        return caseEvidenceService.fileList(caseAppliId, annexTypeList);
83
+    }
84
+
85
+    /**
86
+     * 删除附件
87
+     * @param fileIds
88
+     * @return
89
+     */
90
+    @PostMapping("/deleteFile")
91
+    public AjaxResult deleteFile( @RequestParam("fileIds") List<Integer> fileIds){
92
+
93
+        if(CollectionUtil.isEmpty(fileIds)){
94
+            return error("附件id不能为空");
95
+        }
96
+        return toAjax(caseEvidenceService.deleteFile( fileIds));
97
+    }
98
+
58 99
 
59 100
     /**
60 101
      * 查询当前用户案件列表

+ 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
 }

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

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
3 3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
5 5
 import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
6
+import org.apache.ibatis.annotations.Param;
6 7
 
7 8
 import java.util.List;
8 9
 
@@ -18,4 +19,5 @@ public interface CaseAttachMapper {
18 19
 
19 20
     int updateCaseAttachBycaseid(CaseAttach caseAttach);
20 21
 
22
+    int deleteByFileIds(@Param("ids") List<Integer> fileIds);
21 23
 }

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

@@ -20,4 +20,19 @@ public interface ICaseEvidenceService {
20 20
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
21 21
 
22 22
     AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
23
+
24
+    /**
25
+     * 批量上传文件
26
+     * @param file
27
+     * @param annexType
28
+     * @param id
29
+     * @param username
30
+     * @param userId
31
+     * @return
32
+     */
33
+    AjaxResult batchUpload(MultipartFile[] file, Integer annexType, Long id, String username, Long userId);
34
+
35
+    AjaxResult fileList(Long caseAppliId,  List<Integer> annexTypeList);
36
+
37
+    int deleteFile( List<Integer> fileIds);
23 38
 }

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

@@ -22,19 +22,13 @@ import com.ruoyi.common.exception.EsignDemoException;
22 22
 import com.ruoyi.common.exception.ServiceException;
23 23
 import com.ruoyi.common.utils.*;
24 24
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
25
-
26
-
27
-
28 25
 import com.ruoyi.common.core.domain.entity.SysUser;
29
-import com.ruoyi.common.exception.EsignDemoException;
30
-import com.ruoyi.common.exception.ServiceException;
31 26
 import com.ruoyi.system.domain.SysUserRole;
32 27
 import com.ruoyi.system.mapper.SysRoleMapper;
33 28
 import com.ruoyi.system.mapper.SysUserMapper;
34 29
 import com.ruoyi.system.mapper.SysUserRoleMapper;
35 30
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
36 31
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
37
-import com.ruoyi.common.utils.bean.BeanUtils;
38 32
 import com.ruoyi.system.mapper.SysDeptMapper;
39 33
 import com.ruoyi.wisdomarbitrate.domain.*;
40 34
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
@@ -44,7 +38,6 @@ import com.ruoyi.wisdomarbitrate.utils.SignAward;
44 38
 import org.springframework.beans.factory.annotation.Autowired;
45 39
 import org.springframework.stereotype.Service;
46 40
 import org.springframework.transaction.annotation.Transactional;
47
-
48 41
 import java.io.File;
49 42
 import java.io.IOException;
50 43
 import java.math.BigDecimal;
@@ -71,8 +64,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
71 64
     @Autowired
72 65
     private CaseAffiliateMapper caseAffiliateMapper;
73 66
 
74
-    @Autowired
75
-    private CasePaymentRecordMapper casePaymentRecordMapper;
76 67
     @Autowired
77 68
     private ArbitrateRecordMapper arbitrateRecordMapper;
78 69
     @Autowired
@@ -127,25 +118,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
127 118
             ){
128 119
                 return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
129 120
             }
130
-//            if(role.getRoleName().equals("仲裁委")
131
-//                    ||role.getRoleName().equals("部门长")){
132
-//                List<Integer> caseStatusList=new ArrayList<>();
133
-//                caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
134
-//                caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
135
-//                caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
136
-//                caseApplication.setDeptHeadStatus(caseStatusList);
137
-//            }
138
-//            if(role.getRoleName().equals("仲裁员")){
139
-//                caseApplication.setUserId(String.valueOf(userId));
140
-//            }
121
+            if(role.getRoleName().equals("仲裁委")
122
+                    ||role.getRoleName().equals("部门长")){
123
+                List<Integer> caseStatusList=new ArrayList<>();
124
+                caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
125
+                caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
126
+                caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
127
+                caseApplication.setDeptHeadStatus(caseStatusList);
128
+            }
129
+            if(role.getRoleName().equals("仲裁员")){
130
+                caseApplication.setUserId(String.valueOf(userId));
131
+            }
141 132
             if(role.getRoleName().equals("财务")){
142 133
                 caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
143 134
             }
144
-//            if(role.getRoleName().equals("法律顾问")){
145
-//                // 查询角色有关的用户部门
146
-//                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
147
-//                caseApplication.setDeptIds(deptIds);
148
-//            }
135
+            if(role.getRoleName().equals("法律顾问")){
136
+                // 查询角色有关的用户部门
137
+                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
138
+                caseApplication.setDeptIds(deptIds);
139
+            }
149 140
             if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
150 141
                 // 查询角色有关的用户部门
151 142
                 caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
@@ -559,12 +550,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
559 550
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
560 551
         Map<String, Long> deptMap =new HashMap<>();
561 552
         if (caseAffiliates != null && caseAffiliates.size() > 0) {
562
-                // 查询所有的组织机构,组装成map
563
-                List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
564
-                if (CollectionUtil.isEmpty(deptList)) {
565
-                    deptList = new ArrayList<>();
566
-                }
567
-                 deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
553
+            // 查询所有的组织机构,组装成map
554
+            List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
555
+            if (CollectionUtil.isEmpty(deptList)) {
556
+                deptList = new ArrayList<>();
557
+            }
558
+            deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
568 559
 
569 560
             for (CaseAffiliate caseAffiliate : caseAffiliates) {
570 561
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
@@ -623,7 +614,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
623 614
         String currentDay = DateUtils.dateTime();
624 615
         String caseNum = "zc"+ currentDay;
625 616
         //查询出当天的案件编号的最大值
626
-            Integer maxCaseNum =  caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
617
+        Integer maxCaseNum =  caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
627 618
         if(null == maxCaseNum){
628 619
             caseNum = caseNum + "001";
629 620
         }else {
@@ -689,7 +680,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
689 680
 
690 681
                 }
691 682
 
692
-                    caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
683
+                caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
693 684
             }
694 685
 
695 686
         }
@@ -722,7 +713,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
722 713
                 agentUser.setNickName(caseAffiliate.getNameAgent());
723 714
                 agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
724 715
                 agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
725
-                agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
716
+             //   agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
726 717
                 agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
727 718
                 int insertUserRow = sysUserMapper.insertUser(agentUser);
728 719
                 // 新增角色为申请人
@@ -736,23 +727,28 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
736 727
                 }
737 728
                 if (insertUserRow > 0) {
738 729
                     caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
739
-                    // 发送短信 1955400 普通短信 导入后通知申请人认证注册 尊敬的{1},您的申请的仲裁案件已导入,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信 已生效
730
+                    // 明天改下模板id:1956159 普通短信 通知用户认证注册 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
740 731
                     SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
741
-                    request.setTemplateId("1955400");
732
+                    request.setTemplateId("1956159");
742 733
                     request.setPhone(agentUser.getPhonenumber());
743 734
                     request.setTemplateParamSet(new String[]{agentUser.getNickName()});
744 735
                     SmsUtils.sendSms(request);
745 736
                 }
746 737
             } else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
747
-               return "申请机构与申请代理人不匹配";
738
+//                return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
739
+                if(null!=agentUser.getDept()&&StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
740
+                    return "该申请代理人已在【" + agentUser.getDept().getDeptName()+"】申请机构下存在,请检查填写信息是否正确";
741
+                }else {
742
+                    return "该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确";
743
+                }
748 744
             } else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
749 745
                 // 同步用户表和案件关联人表的手机号和名称
750 746
                 caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
751 747
                 caseAffiliate.setNameAgent(agentUser.getNickName());
752 748
                 caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
753 749
                 // 新增角色为申请人
754
-                if(agentUser.getRoleIds()!=null) {
755
-                    List<Long> longList = Arrays.asList(agentUser.getRoleIds());
750
+                if(CollectionUtil.isNotEmpty(agentUser.getRoles())) {
751
+                    List<Long> longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
756 752
                     if(!longList.contains(roleId)) {
757 753
                         ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
758 754
                         SysUserRole sysUserRole = new SysUserRole();
@@ -918,48 +914,48 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
918 914
 
919 915
                 //对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
920 916
 //                if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
921
-                    List<CaseApplication> caseApplicationNewList = null;
922
-                    for (int i = 0; i < caseApplicationListinsert.size(); i++){
923
-                        caseApplicationNewList = new ArrayList<>();
924
-                        CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
925
-                        // 设置自动编码
926
-                        caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
927
-                        List<CaseAffiliate> caseAffiliatesnew =  new ArrayList<>();
928
-                        CaseApplication caseApplicationNew = new CaseApplication();
929
-                        copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
930
-                        if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
931
-                            for (int j = 0; j < caseApplicationListinsert.size(); j++){
932
-                                CaseApplication  caseApplicationinsert = caseApplicationListinsert.get(j);
933
-
934
-                                if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
935
-                                        caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
936
-
937
-                                    caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
938
-                                }
917
+                List<CaseApplication> caseApplicationNewList = null;
918
+                for (int i = 0; i < caseApplicationListinsert.size(); i++){
919
+                    caseApplicationNewList = new ArrayList<>();
920
+                    CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
921
+                    // 设置自动编码
922
+                    caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
923
+                    List<CaseAffiliate> caseAffiliatesnew =  new ArrayList<>();
924
+                    CaseApplication caseApplicationNew = new CaseApplication();
925
+                    copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
926
+                    if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
927
+                        for (int j = 0; j < caseApplicationListinsert.size(); j++){
928
+                            CaseApplication  caseApplicationinsert = caseApplicationListinsert.get(j);
929
+
930
+                            if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
931
+                                    caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
932
+
933
+                                caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
939 934
                             }
940
-                            caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
941
-                            caseApplicationNewList.add(caseApplicationNew);
942 935
                         }
936
+                        caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
937
+                        caseApplicationNewList.add(caseApplicationNew);
938
+                    }
943 939
 
944
-                        for (int k = 0; k < caseApplicationNewList.size(); k++){
945
-                            CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
946
-                            // 新增立案信息
947
-                            caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
948
-                            caseApplicationItera.setCreateBy(getUsername());
949
-                            int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
950
-                            List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
951
-                            if(caseAffiliates!=null&&caseAffiliates.size()>0){
952
-                                for (CaseAffiliate caseAffiliate : caseAffiliates){
953
-                                    caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
940
+                    for (int k = 0; k < caseApplicationNewList.size(); k++){
941
+                        CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
942
+                        // 新增立案信息
943
+                        caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
944
+                        caseApplicationItera.setCreateBy(getUsername());
945
+                        int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
946
+                        List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
947
+                        if(caseAffiliates!=null&&caseAffiliates.size()>0){
948
+                            for (CaseAffiliate caseAffiliate : caseAffiliates){
949
+                                caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
954 950
 
955
-                                }
956
-                                caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
957 951
                             }
958
-
959
-                            successNum++;
960
-                            successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
952
+                            caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
961 953
                         }
962 954
 
955
+                        successNum++;
956
+                        successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
957
+                    }
958
+
963 959
 //                    }
964 960
 
965 961
                 }
@@ -969,7 +965,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
969 965
         }else {
970 966
             throw new ServiceException("导入立案申请数据不能为空!");
971 967
         }
972
-            return successMsg.append(failureMsg.toString()).toString();
968
+        return successMsg.append(failureMsg.toString()).toString();
973 969
 
974 970
     }
975 971
 
@@ -1439,8 +1435,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1439 1435
         }
1440 1436
         caseApplication.setAnnexType(8);
1441 1437
         // 查询缴费凭证
1442
-        List<CaseAttach> payOrderList = caseAttachMapper.queryCaseAttachList(caseApplication);
1443
-        caseApplicationselect.setPayOrderList(payOrderList);
1438
+        List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
1439
+        if (caseAttachList != null && caseAttachList.size() > 0) {
1440
+            for (CaseAttach caseAttach : caseAttachList) {
1441
+                String annexName = caseAttach.getAnnexName();
1442
+                String prefix = "/profile";
1443
+                int startIndex = annexName.indexOf(prefix);
1444
+                startIndex += prefix.length();
1445
+                String annexPath = "/uploadPath" + annexName.substring(startIndex);
1446
+                caseAttach.setAnnexPath(annexPath);
1447
+                int startIndexnew = annexName.lastIndexOf("/");
1448
+                if(startIndexnew!=-1){
1449
+                    String annexNamenew  = annexName.substring(startIndexnew+1);
1450
+                    caseAttach.setAnnexName(annexNamenew);
1451
+                }
1452
+
1453
+
1454
+            }
1455
+        }
1456
+        caseApplicationselect.setPayOrderList(caseAttachList);
1444 1457
 
1445 1458
         return caseApplicationselect;
1446 1459
     }
@@ -1739,19 +1752,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1739 1752
             for(int i = 0;i < idStrList.length;i ++ ){
1740 1753
                 idList.add(Long.parseLong(idStrList[i]));
1741 1754
             }
1742
-                    // 查询仲裁员电话号
1743
-                 List<SysUser> userList=   sysUserMapper.selectUserListByIds(idList);
1744
-                 if(CollectionUtil.isNotEmpty(userList)) {
1745
-                     for (SysUser user : userList) {
1746
-                     //给仲裁员发送短信通知
1747
-                     request.setPhone(user.getPhonenumber());
1748
-                     // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
1749
-                     String name = user.getNickName();
1750
-                     request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
1751
-                     SmsUtils.sendSms(request);
1752
-
1753
-                     }
1754
-                 }
1755
+            // 查询仲裁员电话号
1756
+            List<SysUser> userList=   sysUserMapper.selectUserListByIds(idList);
1757
+            if(CollectionUtil.isNotEmpty(userList)) {
1758
+                for (SysUser user : userList) {
1759
+                    //给仲裁员发送短信通知
1760
+                    request.setPhone(user.getPhonenumber());
1761
+                    // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
1762
+                    String name = user.getNickName();
1763
+                    request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
1764
+                    SmsUtils.sendSms(request);
1765
+
1766
+                }
1767
+            }
1755 1768
 
1756 1769
         }
1757 1770
 
@@ -1764,7 +1777,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1764 1777
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1765 1778
                 int identityType = caseAffiliateselect.getIdentityType();
1766 1779
                 if(identityType==1){
1767
-                  caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1780
+                    caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1768 1781
 
1769 1782
                 }
1770 1783
                 //给申请人、被申请人发送短信通知
@@ -1817,7 +1830,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1817 1830
 
1818 1831
 
1819 1832
     private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
1820
-       // 申请人信息
1833
+        // 申请人信息
1821 1834
         CaseAffiliate caseAffiliate = new CaseAffiliate();
1822 1835
 
1823 1836
 //        BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
@@ -1832,7 +1845,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1832 1845
         if(StrUtil.isNotEmpty(s)){
1833 1846
             StringBuilder errorMsg = caseApplication.getErrorMsg();
1834 1847
             if(StrUtil.isEmpty(errorMsg)){
1835
-             errorMsg=new StringBuilder();
1848
+                errorMsg=new StringBuilder();
1836 1849
             }
1837 1850
             errorMsg.append(s);
1838 1851
             caseApplication.setErrorMsg(errorMsg);
@@ -1879,27 +1892,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1879 1892
 
1880 1893
 
1881 1894
 
1882
-            // 将组织机构id设为申请人名称
1883
-            if(deptMap.containsKey(caseApplication.getName())){
1884
-                caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
1885
-                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1886
-            }else {
1887
-               // 如果不存在则新增
1888
-                SysDept dept = new SysDept();
1889
-                dept.setParentId(0L);
1890
-                dept.setDeptName(caseApplication.getName());
1891
-                dept.setAncestors("0");
1892
-                dept.setOrderNum(1);
1893
-                dept.setStatus("0");
1894
-                dept.setDelFlag("0");
1895
-                dept.setCreateBy(getUsername());
1896
-                dept.setUpdateBy(getUsername());
1897
-                sysDeptMapper.insertDept(dept);
1898
-                deptMap.put(dept.getDeptName(),dept.getDeptId());
1899
-                caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
1900
-                caseAffiliate.setApplicationOrganName(caseApplication.getName());
1895
+        // 将组织机构id设为申请人名称
1896
+        if(deptMap.containsKey(caseApplication.getName())){
1897
+            caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
1898
+            caseAffiliate.setApplicationOrganName(caseApplication.getName());
1899
+        }else {
1900
+            // 如果不存在则新增
1901
+            SysDept dept = new SysDept();
1902
+            dept.setParentId(0L);
1903
+            dept.setDeptName(caseApplication.getName());
1904
+            dept.setAncestors("0");
1905
+            dept.setOrderNum(1);
1906
+            dept.setStatus("0");
1907
+            dept.setDelFlag("0");
1908
+            dept.setCreateBy(getUsername());
1909
+            dept.setUpdateBy(getUsername());
1910
+            sysDeptMapper.insertDept(dept);
1911
+            deptMap.put(dept.getDeptName(),dept.getDeptId());
1912
+            caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
1913
+            caseAffiliate.setApplicationOrganName(caseApplication.getName());
1901 1914
 
1902
-            }
1915
+        }
1903 1916
 
1904 1917
     }
1905 1918
 

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

@@ -104,8 +104,6 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
104 104
                     }
105 105
                 }
106 106
             }
107
-            // 新增日志
108
-            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
109 107
 
110 108
             return AjaxResult.success("审核成功");
111 109
         }

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

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3
+import cn.hutool.core.collection.CollectionUtil;
3 4
 import com.ruoyi.common.config.RuoYiConfig;
4 5
 import com.ruoyi.common.constant.CaseApplicationConstants;
5 6
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -21,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
21 22
 import org.springframework.web.multipart.MultipartFile;
22 23
 
23 24
 import java.io.IOException;
25
+import java.util.ArrayList;
24 26
 import java.util.Arrays;
25 27
 import java.util.List;
26 28
 import java.util.stream.Collectors;
@@ -195,6 +197,79 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
195 197
         }
196 198
         return null;
197 199
     }
200
+    @Transactional
201
+    @Override
202
+    public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id, String userName, Long userId) {
203
+        List<CaseAttach> successList= new ArrayList<>();
204
+        try {
205
+            String filePath = RuoYiConfig.getUploadPath();
206
+            for (MultipartFile file : files) {
207
+                // 上传
208
+                String fileName = FileUploadUtils.upload(filePath, file);
209
+                CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
210
+                        .annexName(fileName)
211
+                        .annexPath(filePath)
212
+                        .annexType(annexType)
213
+                        .userId(userId)
214
+                        .userName(userName)
215
+                        .build();
216
+                int count = caseAttachMapper.save(caseAttach);
217
+                if (count > 0 && annexType!=null && annexType!=8) {
218
+                    if(id!=null){
219
+                        //修改案件状态
220
+                        CaseApplication caseApplication = new CaseApplication();
221
+                        caseApplication.setId(id);
222
+                        caseApplication.setCaseStatus(4);
223
+                        caseApplicationMapper.submitCaseApplication(caseApplication);
224
+                    }
225
+                    CaseAttach caseAttachselect = new CaseAttach();
226
+                    caseAttachselect.setAnnexId(caseAttach.getAnnexId());
227
+                    caseAttachselect.setAnnexName(caseAttach.getAnnexName());
228
+                    caseAttachselect.setAnnexType(caseAttach.getAnnexType());
229
+                    successList.add(caseAttachselect);
230
+                }
231
+            }
232
+
233
+
234
+        } catch (IOException e) {
235
+            e.printStackTrace();
236
+            return AjaxResult.error("上传失败");
237
+        }
238
+
239
+        return AjaxResult.success("上传成功",successList);
240
+
241
+    }
242
+
243
+    @Override
244
+    public AjaxResult fileList(Long caseAppliId,  List<Integer> annexTypeList) {
245
+        CaseApplication caseApplication = new CaseApplication();
246
+        caseApplication.setId(caseAppliId);
247
+        caseApplication.setAnnexTypeList(annexTypeList);
248
+        List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
249
+        if(CollectionUtil.isNotEmpty(caseAttachList)){
250
+                for (CaseAttach caseAttach : caseAttachList) {
251
+                    String annexName = caseAttach.getAnnexName();
252
+                    String prefix = "/profile";
253
+                    int startIndex = annexName.indexOf(prefix);
254
+                    startIndex += prefix.length();
255
+                    String annexPath = "/uploadPath" + annexName.substring(startIndex);
256
+                    caseAttach.setAnnexPath(annexPath);
257
+                    int startIndexnew = annexName.lastIndexOf("/");
258
+                    if(startIndexnew!=-1){
259
+                        String annexNamenew  = annexName.substring(startIndexnew+1);
260
+                        caseAttach.setAnnexName(annexNamenew);
261
+                    }
262
+                }
263
+                return AjaxResult.success(caseAttachList);
264
+        }
265
+        return null;
266
+    }
267
+
268
+    @Override
269
+    public int deleteFile( List<Integer> fileIds) {
270
+
271
+        return caseAttachMapper.deleteByFileIds(fileIds);
272
+    }
198 273
 
199 274
     private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
200 275
         List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);

+ 10
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java Просмотреть файл

@@ -1,8 +1,10 @@
1 1
 package com.ruoyi.wisdomarbitrate.utils;
2 2
 
3 3
 import cn.hutool.extra.spring.SpringUtil;
4
+import com.ruoyi.common.core.domain.entity.SysUser;
4 5
 import com.ruoyi.common.core.domain.model.LoginUser;
5 6
 import com.ruoyi.common.utils.SecurityUtils;
7
+import com.ruoyi.system.mapper.SysUserMapper;
6 8
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
7 9
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
8 10
 
@@ -17,6 +19,7 @@ import javax.validation.constraints.NotNull;
17 19
 public class CaseLogUtils
18 20
 {
19 21
     private static CaseLogRecordMapper caseLogRecordMapper= SpringUtil.getBean(CaseLogRecordMapper.class);
22
+    private static SysUserMapper userMapper= SpringUtil.getBean(SysUserMapper.class);
20 23
 
21 24
     /**
22 25
      * 新增案件日志
@@ -25,13 +28,15 @@ public class CaseLogUtils
25 28
      * @param notes 备注
26 29
      */
27 30
     public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes  ){
31
+        CaseLogRecord operLog = new CaseLogRecord();
28 32
         // 获取当前的用户
29 33
         LoginUser loginUser = SecurityUtils.getLoginUser();
30
-        String nickName = loginUser.getUser().getNickName();
31
-        CaseLogRecord operLog = new CaseLogRecord();
32
-        operLog.setCreateBy(loginUser.getUsername());
33
-        operLog.setCreateNickName(nickName);
34
-        operLog.setUpdateBy(loginUser.getUsername());
34
+        if(loginUser!=null) {
35
+            SysUser sysUser = userMapper.selectUserById(loginUser.getUserId());
36
+            operLog.setCreateBy(sysUser.getUserName());
37
+            operLog.setCreateNickName(sysUser.getNickName());
38
+            operLog.setUpdateBy(sysUser.getUserName());
39
+        }
35 40
         operLog.setCaseAppliId(caseAppliId);
36 41
         operLog.setCaseNode(caseNode);
37 42
         operLog.setNotes(notes);

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

@@ -178,7 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
178 178
 	</select>
179 179
 
180 180
 	<select id="selectUserByIdCard" parameterType="String" resultMap="SysUserResult">
181
-		select u.* from sys_user u
181
+		select u.*,d.dept_name,ur.role_id
182
+			from sys_user u
183
+		    left join sys_dept d on u.dept_id = d.dept_id
184
+			left join sys_user_role ur on u.user_id = ur.user_id
185
+			left join sys_role r on r.role_id = ur.role_id
182 186
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
183 187
 	</select>
184 188
 

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

@@ -49,7 +49,7 @@
49 49
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
50 50
         select t1.* from(
51 51
         select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
52
-             t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
52
+        t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
53 53
         t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
54 54
         t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
55 55
         t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
@@ -96,51 +96,46 @@
96 96
 
97 97
             <!--被申请人-->
98 98
             <if test="idCard != null and idCard != ''">
99
-                or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
99
+                or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
100 100
             </if>
101 101
             <!--仲裁员-->
102 102
             <if test="userId != null and userId != ''">
103 103
                 or ( t.identity_type=1 and
104
-                       t.case_status in (7,8,9,12,13,14)
104
+                t.case_status in (7,8,9,12,13,14,17)
105 105
                 and
106 106
                 instr (t.arbitrator_id,#{userId})>0)
107 107
             </if>
108 108
             <!--法律顾问-->
109 109
             <if test="deptIds != null and deptIds.size() > 0">
110
-                or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
110
+                or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
111 111
                 and t.application_organ_id in
112 112
                 <foreach item="item" collection="deptIds" open="(" separator="," close=")">
113 113
                     #{item}
114 114
                 </foreach> )
115 115
             </if>
116 116
 
117
-                <!--申请人-->
118
-                <if test="nameId != null and nameId != ''">
119
-                    or ( t.application_organ_id = #{nameId} AND t.identity_type=1
120
-                    and t.case_status in (0,2))
117
+            <!--申请人-->
118
+            <if test="nameId != null and nameId != ''">
119
+                or ( t.application_organ_id = #{nameId} AND t.identity_type=1
120
+                and t.case_status in (0,2,17))
121 121
 
122
-                </if>
123
-        <!--部门长-->
122
+            </if>
123
+            <!--部门长-->
124 124
             <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
125
-            or (t.identity_type=1 and t.case_status in
126
-            <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">#{caseStatus}
127
-            </foreach>)
125
+                or (t.identity_type=1 and t.case_status in
126
+                <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">#{caseStatus}
127
+                </foreach>)
128 128
             </if>
129 129
             <!--财务-->
130 130
             <if test="financeStatus != null and financeStatus != ''">
131
-                 (t.identity_type=1 and t.case_status =#{financeStatus})
131
+                or  (t.identity_type=1 and t.case_status =#{financeStatus})
132
+
132 133
 
133 134
             </if>
135
+
134 136
         </where>
135 137
         ) t1
136
-<!--        <where>-->
137
-<!--            &lt;!&ndash;申请人&ndash;&gt;-->
138
-<!--            <if test="nameId != null and nameId != ''">-->
139
-<!--                and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
140
-<!--                    and t1.case_status in (0,2)-->
141
-<!--                )-->
142
-<!--            </if>-->
143
-<!--        </where>-->
138
+
144 139
         order by t1.create_time desc,t1.case_num desc
145 140
     </select>
146 141
     <select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
@@ -165,7 +160,7 @@
165 160
         from(
166 161
         select  DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num , t.identity_type from(
167 162
         select c.id ,
168
-         c.case_status,ca.application_organ_id,
163
+        c.case_status,ca.application_organ_id,
169 164
         c.arbitrator_id,ca.identity_num , ca.identity_type
170 165
         from case_application c
171 166
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
@@ -188,18 +183,18 @@
188 183
 
189 184
             <!--被申请人-->
190 185
             <if test="idCard != null and idCard != ''">
191
-                or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
186
+                or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
192 187
             </if>
193 188
             <!--仲裁员-->
194 189
             <if test="userId != null and userId != ''">
195 190
                 or ( t.identity_type=1 and
196
-                t.case_status in (7,8,9,12,13,14)
191
+                t.case_status in (7,8,9,12,13,14,17)
197 192
                 and
198 193
                 instr (t.arbitrator_id,#{userId})>0)
199 194
             </if>
200 195
             <!--法律顾问-->
201 196
             <if test="deptIds != null and deptIds.size() > 0">
202
-                or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
197
+                or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
203 198
                 and t.application_organ_id in
204 199
                 <foreach item="item" collection="deptIds" open="(" separator="," close=")">
205 200
                     #{item}
@@ -208,7 +203,7 @@
208 203
             <!--申请人-->
209 204
             <if test="nameId != null and nameId != ''">
210 205
                 or ( t.application_organ_id = #{nameId} AND t.identity_type=1
211
-                and t.case_status in (0,2))
206
+                and t.case_status in (0,2,17))
212 207
 
213 208
             </if>
214 209
             <!--部门长-->
@@ -220,19 +215,11 @@
220 215
             </if>
221 216
             <!--财务-->
222 217
             <if test="financeStatus != null and financeStatus != ''">
223
-                ( t.identity_type=1 and t.case_status =#{financeStatus})
218
+             or   ( t.identity_type=1 and t.case_status =#{financeStatus})
224 219
 
225 220
             </if>
226 221
         </where>
227 222
         ) t1
228
-        <!--      <where>
229
-                   &lt;!&ndash;申请人&ndash;&gt;-->
230
-<!--            <if test="nameId != null and nameId != ''">-->
231
-<!--                and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
232
-<!--                and t1.case_status in (0,2)-->
233
-<!--                )-->
234
-<!--            </if>
235
-        </where> -->
236 223
     </select>
237 224
 
238 225
     <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
@@ -296,7 +283,7 @@
296 283
             sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
297 284
         FROM
298 285
             case_application c
299
-                 JOIN case_affiliate ca ON ca.case_appli_id = c.id
286
+                JOIN case_affiliate ca ON ca.case_appli_id = c.id
300 287
                 AND ca.identity_type = 1
301 288
         WHERE
302 289
                 c.case_status IN (
@@ -321,106 +308,6 @@
321 308
                 )
322 309
 
323 310
     </select>
324
-    <select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
325
-        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
326
-        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
327
-        ELSE '无审理方式'
328
-        END arbitratMethodName,
329
-        c.case_status ,
330
-        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
331
-        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
332
-        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
333
-        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
334
-        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
335
-        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
336
-        ELSE '无案件状态'
337
-        END caseStatusName,
338
-        c.hear_date ,c.arbitrat_claims ,
339
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
340
-        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
341
-        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
342
-        from case_application c
343
-        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
344
-        <where>
345
-            c.case_status in
346
-            <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
347
-                #{caseStatus}
348
-            </foreach>
349
-            <if test="caseApplication.caseStatus != null">
350
-                AND c.case_status = #{caseApplication.caseStatus}
351
-            </if>
352
-            <if test="caseApplication.caseNum != null and caseApplication.caseNum != ''">
353
-                AND c.case_num = #{caseApplication.caseNum}
354
-            </if>
355
-            <if test="caseApplication.nameId != null and caseApplication.nameId != ''">
356
-                AND ca.application_organ_id=#{caseApplication.nameId}  AND ca.identity_type=1
357
-            </if>
358
-            <if test="caseApplication.caseStatusList != null and caseApplication.caseStatusList.size() > 0">
359
-                and c.case_status in
360
-                <foreach item="caseStatus" collection="caseApplication.caseStatusList" open="(" separator="," close=")">
361
-                    #{caseStatus}
362
-                </foreach>
363
-            </if>
364
-        </where>
365
-        order by c.create_time desc,c.case_num desc
366
-    </select>
367
-    <select id="selectDeptHeadCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
368
-        select  sum( case when c.case_status=0 then 1 else 0 end) caseApply,
369
-        sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
370
-        sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
371
-        sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
372
-        sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
373
-        sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
374
-        sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
375
-        sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
376
-        sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
377
-        sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
378
-        sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
379
-        sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
380
-        sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
381
-        sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
382
-        sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
383
-        sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
384
-        sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
385
-        sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
386
-        from case_application c
387
-        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
388
-        <where>
389
-            <!--部门长-->
390
-            <if test="statusList != null and statusList.size() > 0">
391
-            or c.case_status in
392
-            <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
393
-                #{caseStatus}
394
-            </foreach>
395
-                <!--被申请人-->
396
-                <if test="idCard != null and idCard != ''">
397
-                    or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
398
-                </if>
399
-                <!--仲裁员-->
400
-                <if test="userId != null and userId != ''">
401
-                    or ( t.identity_type=1 and
402
-                    t.case_status in (7,8,9,12,13,14)
403
-                    and
404
-                    instr (t.arbitrator_id,#{userId})>0)
405
-                </if>
406
-                <!--法律顾问-->
407
-                <if test="deptIds != null and deptIds.size() > 0">
408
-                    or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
409
-                    and t.application_organ_id in
410
-                    <foreach item="item" collection="deptIds" open="(" separator="," close=")">
411
-                        #{item}
412
-                    </foreach> )
413
-                </if>
414
-                <!--申请人-->
415
-                <if test="nameId != null and nameId != ''">
416
-                    or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
417
-                    and t.case_status in (0,2))
418
-                    )
419
-                </if>
420
-            </if>
421
-        </where>
422
-
423
-    </select>
424 311
 
425 312
 
426 313
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
@@ -463,7 +350,7 @@
463 350
         )values(
464 351
         <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
465 352
         <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
466
-       sysdate(),
353
+        sysdate(),
467 354
         <if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
468 355
         <if test="caseStatus != null ">#{caseStatus},</if>
469 356
         <if test="hearDate != null ">#{hearDate},</if>
@@ -559,8 +446,8 @@
559 446
     <select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
560 447
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
561 448
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
562
-            ELSE '无审理方式'
563
-            END arbitratMethodName,
449
+        ELSE '无审理方式'
450
+        END arbitratMethodName,
564 451
         c.case_status ,
565 452
         CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
566 453
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
@@ -587,30 +474,30 @@
587 474
 
588 475
     <select id="selectCaseApplicationConfirm" parameterType="CaseApplication" resultMap="CaseApplicationResult">
589 476
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
590
-        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
591
-        ELSE '无审理方式'
592
-        END arbitratMethodName,
593
-        c.case_status ,
594
-        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
595
-        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
596
-        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
597
-        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
598
-        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
599
-        when 15 then '待仲裁文书送达' when 16 then '待案件归档'
600
-        ELSE '无案件状态'
601
-        END caseStatusName,
602
-        c.hear_date ,c.arbitrat_claims ,
603
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
604
-        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
605
-        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,
606
-        p.payment_status ,
607
-        CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
608
-        ELSE '无支付状态'
609
-        END paymentStatusName,c.pay_type,
610
-        CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
477
+               CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
478
+                                      ELSE '无审理方式'
479
+                   END arbitratMethodName,
480
+               c.case_status ,
481
+               CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
482
+                                  when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
483
+                                  when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
484
+                                  when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
485
+                                  when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
486
+                                  when 15 then '待仲裁文书送达' when 16 then '待案件归档'
487
+                                  ELSE '无案件状态'
488
+                   END caseStatusName,
489
+               c.hear_date ,c.arbitrat_claims ,
490
+               c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
491
+               c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
492
+               c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,
493
+               p.payment_status ,
494
+               CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
495
+                                     ELSE '无支付状态'
496
+                   END paymentStatusName,c.pay_type,
497
+               CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
611 498
         from case_application c left join case_payment_record p on c.id  = p.case_id
612 499
         where c.case_status  = 3
613
-            AND c.id = #{id}
500
+          AND c.id = #{id}
614 501
 
615 502
     </select>
616 503
     <select id="selectCaseNumLike" resultType="java.lang.Integer">
@@ -622,4 +509,4 @@
622 509
     </select>
623 510
 
624 511
 
625
-</mapper>
512
+</mapper>

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

@@ -17,6 +17,13 @@
17 17
         INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
18 18
         VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
19 19
     </insert>
20
+    <delete id="deleteByFileIds">
21
+        delete from case_attach
22
+        where annex_id in
23
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
24
+            #{id}
25
+        </foreach>
26
+    </delete>
20 27
 
21 28
     <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
22 29
         select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account

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

@@ -25,8 +25,8 @@
25 25
             cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
26 26
         CASE cl.case_node when 0 then '立案申请' when 1 then '提交立案申请' when 2 then '立案审查'
27 27
         when 3 then '支付成功' when 4 then '缴费确认' when 5 then '案件质证'
28
-        when 6 then '组庭审核' when 7 then '组庭确认' when 8 then '开庭审理'
29
-        when 9 then '待书面审理' when 10 then '书面审理' when 11 then '拒绝裁决书'
28
+        when 6 then '组庭审核' when 7 then '组庭确认' when 8 then '当前仲裁方式为开庭审理'
29
+        when 9 then '当前仲裁方式为书面审理' when 10 then '书面审理' when 11 then '生成裁決书'
30 30
         when 12 then '核验裁决书' when 13 then '同意裁决书' when 14 then '签名成功'
31 31
         when 15 then '用印成功' when 16 then '送达仲裁文书' when 17 then '案件归档'
32 32
         when 26 then '证据确认成功'