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

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
 package com.ruoyi.web.controller.wisdomarbitrate;
1
 package com.ruoyi.web.controller.wisdomarbitrate;
2
 
2
 
3
+import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
3
 import com.ruoyi.common.core.controller.BaseController;
5
 import com.ruoyi.common.core.controller.BaseController;
4
 import com.ruoyi.common.core.domain.AjaxResult;
6
 import com.ruoyi.common.core.domain.AjaxResult;
5
 import com.ruoyi.common.core.page.TableDataInfo;
7
 import com.ruoyi.common.core.page.TableDataInfo;
55
         Long userId = this.getUserId();
57
         Long userId = this.getUserId();
56
         return caseEvidenceService.uploadEvidence(file, annexType, id, username, userId);
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
      */
55
      */
56
     void updatePayType(CaseConfirmPayDTO payDTO);
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
     ToDoCount selectAdminCaseToDoCount();
59
     ToDoCount selectAdminCaseToDoCount();
66
 
60
 
67
-    ToDoCount selectDeptHeadCaseToDoCount( @Param("statusList")List<Integer> caseStatusList);
68
 
61
 
69
     ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
62
     ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
70
 }
63
 }

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

3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
5
 import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
5
 import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
6
+import org.apache.ibatis.annotations.Param;
6
 
7
 
7
 import java.util.List;
8
 import java.util.List;
8
 
9
 
18
 
19
 
19
     int updateCaseAttachBycaseid(CaseAttach caseAttach);
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
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
20
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
21
 
21
 
22
     AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
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
 import com.ruoyi.common.exception.ServiceException;
22
 import com.ruoyi.common.exception.ServiceException;
23
 import com.ruoyi.common.utils.*;
23
 import com.ruoyi.common.utils.*;
24
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
24
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
25
-
26
-
27
-
28
 import com.ruoyi.common.core.domain.entity.SysUser;
25
 import com.ruoyi.common.core.domain.entity.SysUser;
29
-import com.ruoyi.common.exception.EsignDemoException;
30
-import com.ruoyi.common.exception.ServiceException;
31
 import com.ruoyi.system.domain.SysUserRole;
26
 import com.ruoyi.system.domain.SysUserRole;
32
 import com.ruoyi.system.mapper.SysRoleMapper;
27
 import com.ruoyi.system.mapper.SysRoleMapper;
33
 import com.ruoyi.system.mapper.SysUserMapper;
28
 import com.ruoyi.system.mapper.SysUserMapper;
34
 import com.ruoyi.system.mapper.SysUserRoleMapper;
29
 import com.ruoyi.system.mapper.SysUserRoleMapper;
35
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
30
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
36
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
31
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
37
-import com.ruoyi.common.utils.bean.BeanUtils;
38
 import com.ruoyi.system.mapper.SysDeptMapper;
32
 import com.ruoyi.system.mapper.SysDeptMapper;
39
 import com.ruoyi.wisdomarbitrate.domain.*;
33
 import com.ruoyi.wisdomarbitrate.domain.*;
40
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
34
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
44
 import org.springframework.beans.factory.annotation.Autowired;
38
 import org.springframework.beans.factory.annotation.Autowired;
45
 import org.springframework.stereotype.Service;
39
 import org.springframework.stereotype.Service;
46
 import org.springframework.transaction.annotation.Transactional;
40
 import org.springframework.transaction.annotation.Transactional;
47
-
48
 import java.io.File;
41
 import java.io.File;
49
 import java.io.IOException;
42
 import java.io.IOException;
50
 import java.math.BigDecimal;
43
 import java.math.BigDecimal;
71
     @Autowired
64
     @Autowired
72
     private CaseAffiliateMapper caseAffiliateMapper;
65
     private CaseAffiliateMapper caseAffiliateMapper;
73
 
66
 
74
-    @Autowired
75
-    private CasePaymentRecordMapper casePaymentRecordMapper;
76
     @Autowired
67
     @Autowired
77
     private ArbitrateRecordMapper arbitrateRecordMapper;
68
     private ArbitrateRecordMapper arbitrateRecordMapper;
78
     @Autowired
69
     @Autowired
127
             ){
118
             ){
128
                 return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
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
             if(role.getRoleName().equals("财务")){
132
             if(role.getRoleName().equals("财务")){
142
                 caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
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
             if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
140
             if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
150
                 // 查询角色有关的用户部门
141
                 // 查询角色有关的用户部门
151
                 caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
142
                 caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
559
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
550
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
560
         Map<String, Long> deptMap =new HashMap<>();
551
         Map<String, Long> deptMap =new HashMap<>();
561
         if (caseAffiliates != null && caseAffiliates.size() > 0) {
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
             for (CaseAffiliate caseAffiliate : caseAffiliates) {
560
             for (CaseAffiliate caseAffiliate : caseAffiliates) {
570
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
561
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
623
         String currentDay = DateUtils.dateTime();
614
         String currentDay = DateUtils.dateTime();
624
         String caseNum = "zc"+ currentDay;
615
         String caseNum = "zc"+ currentDay;
625
         //查询出当天的案件编号的最大值
616
         //查询出当天的案件编号的最大值
626
-            Integer maxCaseNum =  caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
617
+        Integer maxCaseNum =  caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
627
         if(null == maxCaseNum){
618
         if(null == maxCaseNum){
628
             caseNum = caseNum + "001";
619
             caseNum = caseNum + "001";
629
         }else {
620
         }else {
689
 
680
 
690
                 }
681
                 }
691
 
682
 
692
-                    caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
683
+                caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
693
             }
684
             }
694
 
685
 
695
         }
686
         }
722
                 agentUser.setNickName(caseAffiliate.getNameAgent());
713
                 agentUser.setNickName(caseAffiliate.getNameAgent());
723
                 agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
714
                 agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
724
                 agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
715
                 agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
725
-                agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
716
+             //   agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
726
                 agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
717
                 agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
727
                 int insertUserRow = sysUserMapper.insertUser(agentUser);
718
                 int insertUserRow = sysUserMapper.insertUser(agentUser);
728
                 // 新增角色为申请人
719
                 // 新增角色为申请人
736
                 }
727
                 }
737
                 if (insertUserRow > 0) {
728
                 if (insertUserRow > 0) {
738
                     caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
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
                     SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
731
                     SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
741
-                    request.setTemplateId("1955400");
732
+                    request.setTemplateId("1956159");
742
                     request.setPhone(agentUser.getPhonenumber());
733
                     request.setPhone(agentUser.getPhonenumber());
743
                     request.setTemplateParamSet(new String[]{agentUser.getNickName()});
734
                     request.setTemplateParamSet(new String[]{agentUser.getNickName()});
744
                     SmsUtils.sendSms(request);
735
                     SmsUtils.sendSms(request);
745
                 }
736
                 }
746
             } else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
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
             } else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
744
             } else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
749
                 // 同步用户表和案件关联人表的手机号和名称
745
                 // 同步用户表和案件关联人表的手机号和名称
750
                 caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
746
                 caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
751
                 caseAffiliate.setNameAgent(agentUser.getNickName());
747
                 caseAffiliate.setNameAgent(agentUser.getNickName());
752
                 caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
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
                     if(!longList.contains(roleId)) {
752
                     if(!longList.contains(roleId)) {
757
                         ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
753
                         ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
758
                         SysUserRole sysUserRole = new SysUserRole();
754
                         SysUserRole sysUserRole = new SysUserRole();
918
 
914
 
919
                 //对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
915
                 //对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
920
 //                if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
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
         }else {
965
         }else {
970
             throw new ServiceException("导入立案申请数据不能为空!");
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
         }
1435
         }
1440
         caseApplication.setAnnexType(8);
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
         return caseApplicationselect;
1458
         return caseApplicationselect;
1446
     }
1459
     }
1739
             for(int i = 0;i < idStrList.length;i ++ ){
1752
             for(int i = 0;i < idStrList.length;i ++ ){
1740
                 idList.add(Long.parseLong(idStrList[i]));
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
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1777
                 CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
1765
                 int identityType = caseAffiliateselect.getIdentityType();
1778
                 int identityType = caseAffiliateselect.getIdentityType();
1766
                 if(identityType==1){
1779
                 if(identityType==1){
1767
-                  caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1780
+                    caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
1768
 
1781
 
1769
                 }
1782
                 }
1770
                 //给申请人、被申请人发送短信通知
1783
                 //给申请人、被申请人发送短信通知
1817
 
1830
 
1818
 
1831
 
1819
     private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
1832
     private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
1820
-       // 申请人信息
1833
+        // 申请人信息
1821
         CaseAffiliate caseAffiliate = new CaseAffiliate();
1834
         CaseAffiliate caseAffiliate = new CaseAffiliate();
1822
 
1835
 
1823
 //        BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
1836
 //        BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
1832
         if(StrUtil.isNotEmpty(s)){
1845
         if(StrUtil.isNotEmpty(s)){
1833
             StringBuilder errorMsg = caseApplication.getErrorMsg();
1846
             StringBuilder errorMsg = caseApplication.getErrorMsg();
1834
             if(StrUtil.isEmpty(errorMsg)){
1847
             if(StrUtil.isEmpty(errorMsg)){
1835
-             errorMsg=new StringBuilder();
1848
+                errorMsg=new StringBuilder();
1836
             }
1849
             }
1837
             errorMsg.append(s);
1850
             errorMsg.append(s);
1838
             caseApplication.setErrorMsg(errorMsg);
1851
             caseApplication.setErrorMsg(errorMsg);
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
                     }
104
                     }
105
                 }
105
                 }
106
             }
106
             }
107
-            // 新增日志
108
-            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
109
 
107
 
110
             return AjaxResult.success("审核成功");
108
             return AjaxResult.success("审核成功");
111
         }
109
         }

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

1
 package com.ruoyi.wisdomarbitrate.service.impl;
1
 package com.ruoyi.wisdomarbitrate.service.impl;
2
 
2
 
3
+import cn.hutool.core.collection.CollectionUtil;
3
 import com.ruoyi.common.config.RuoYiConfig;
4
 import com.ruoyi.common.config.RuoYiConfig;
4
 import com.ruoyi.common.constant.CaseApplicationConstants;
5
 import com.ruoyi.common.constant.CaseApplicationConstants;
5
 import com.ruoyi.common.core.domain.AjaxResult;
6
 import com.ruoyi.common.core.domain.AjaxResult;
21
 import org.springframework.web.multipart.MultipartFile;
22
 import org.springframework.web.multipart.MultipartFile;
22
 
23
 
23
 import java.io.IOException;
24
 import java.io.IOException;
25
+import java.util.ArrayList;
24
 import java.util.Arrays;
26
 import java.util.Arrays;
25
 import java.util.List;
27
 import java.util.List;
26
 import java.util.stream.Collectors;
28
 import java.util.stream.Collectors;
195
         }
197
         }
196
         return null;
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
     private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
274
     private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
200
         List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
275
         List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);

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

1
 package com.ruoyi.wisdomarbitrate.utils;
1
 package com.ruoyi.wisdomarbitrate.utils;
2
 
2
 
3
 import cn.hutool.extra.spring.SpringUtil;
3
 import cn.hutool.extra.spring.SpringUtil;
4
+import com.ruoyi.common.core.domain.entity.SysUser;
4
 import com.ruoyi.common.core.domain.model.LoginUser;
5
 import com.ruoyi.common.core.domain.model.LoginUser;
5
 import com.ruoyi.common.utils.SecurityUtils;
6
 import com.ruoyi.common.utils.SecurityUtils;
7
+import com.ruoyi.system.mapper.SysUserMapper;
6
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
8
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
7
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
9
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
8
 
10
 
17
 public class CaseLogUtils
19
 public class CaseLogUtils
18
 {
20
 {
19
     private static CaseLogRecordMapper caseLogRecordMapper= SpringUtil.getBean(CaseLogRecordMapper.class);
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
      * @param notes 备注
28
      * @param notes 备注
26
      */
29
      */
27
     public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes  ){
30
     public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes  ){
31
+        CaseLogRecord operLog = new CaseLogRecord();
28
         // 获取当前的用户
32
         // 获取当前的用户
29
         LoginUser loginUser = SecurityUtils.getLoginUser();
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
         operLog.setCaseAppliId(caseAppliId);
40
         operLog.setCaseAppliId(caseAppliId);
36
         operLog.setCaseNode(caseNode);
41
         operLog.setCaseNode(caseNode);
37
         operLog.setNotes(notes);
42
         operLog.setNotes(notes);

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

178
 	</select>
178
 	</select>
179
 
179
 
180
 	<select id="selectUserByIdCard" parameterType="String" resultMap="SysUserResult">
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
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
186
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
183
 	</select>
187
 	</select>
184
 
188
 

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

49
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
49
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
50
         select t1.* from(
50
         select t1.* from(
51
         select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
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
         t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
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
         t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
54
         t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
55
         t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
55
         t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
96
 
96
 
97
             <!--被申请人-->
97
             <!--被申请人-->
98
             <if test="idCard != null and idCard != ''">
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
             </if>
100
             </if>
101
             <!--仲裁员-->
101
             <!--仲裁员-->
102
             <if test="userId != null and userId != ''">
102
             <if test="userId != null and userId != ''">
103
                 or ( t.identity_type=1 and
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
                 and
105
                 and
106
                 instr (t.arbitrator_id,#{userId})>0)
106
                 instr (t.arbitrator_id,#{userId})>0)
107
             </if>
107
             </if>
108
             <!--法律顾问-->
108
             <!--法律顾问-->
109
             <if test="deptIds != null and deptIds.size() > 0">
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
                 and t.application_organ_id in
111
                 and t.application_organ_id in
112
                 <foreach item="item" collection="deptIds" open="(" separator="," close=")">
112
                 <foreach item="item" collection="deptIds" open="(" separator="," close=")">
113
                     #{item}
113
                     #{item}
114
                 </foreach> )
114
                 </foreach> )
115
             </if>
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
             <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
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
             </if>
128
             </if>
129
             <!--财务-->
129
             <!--财务-->
130
             <if test="financeStatus != null and financeStatus != ''">
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
             </if>
134
             </if>
135
+
134
         </where>
136
         </where>
135
         ) t1
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
         order by t1.create_time desc,t1.case_num desc
139
         order by t1.create_time desc,t1.case_num desc
145
     </select>
140
     </select>
146
     <select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
141
     <select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
165
         from(
160
         from(
166
         select  DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num , t.identity_type from(
161
         select  DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num , t.identity_type from(
167
         select c.id ,
162
         select c.id ,
168
-         c.case_status,ca.application_organ_id,
163
+        c.case_status,ca.application_organ_id,
169
         c.arbitrator_id,ca.identity_num , ca.identity_type
164
         c.arbitrator_id,ca.identity_num , ca.identity_type
170
         from case_application c
165
         from case_application c
171
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
166
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
188
 
183
 
189
             <!--被申请人-->
184
             <!--被申请人-->
190
             <if test="idCard != null and idCard != ''">
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
             </if>
187
             </if>
193
             <!--仲裁员-->
188
             <!--仲裁员-->
194
             <if test="userId != null and userId != ''">
189
             <if test="userId != null and userId != ''">
195
                 or ( t.identity_type=1 and
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
                 and
192
                 and
198
                 instr (t.arbitrator_id,#{userId})>0)
193
                 instr (t.arbitrator_id,#{userId})>0)
199
             </if>
194
             </if>
200
             <!--法律顾问-->
195
             <!--法律顾问-->
201
             <if test="deptIds != null and deptIds.size() > 0">
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
                 and t.application_organ_id in
198
                 and t.application_organ_id in
204
                 <foreach item="item" collection="deptIds" open="(" separator="," close=")">
199
                 <foreach item="item" collection="deptIds" open="(" separator="," close=")">
205
                     #{item}
200
                     #{item}
208
             <!--申请人-->
203
             <!--申请人-->
209
             <if test="nameId != null and nameId != ''">
204
             <if test="nameId != null and nameId != ''">
210
                 or ( t.application_organ_id = #{nameId} AND t.identity_type=1
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
             </if>
208
             </if>
214
             <!--部门长-->
209
             <!--部门长-->
220
             </if>
215
             </if>
221
             <!--财务-->
216
             <!--财务-->
222
             <if test="financeStatus != null and financeStatus != ''">
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
             </if>
220
             </if>
226
         </where>
221
         </where>
227
         ) t1
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
     </select>
223
     </select>
237
 
224
 
238
     <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
225
     <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
296
             sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
283
             sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
297
         FROM
284
         FROM
298
             case_application c
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
                 AND ca.identity_type = 1
287
                 AND ca.identity_type = 1
301
         WHERE
288
         WHERE
302
                 c.case_status IN (
289
                 c.case_status IN (
321
                 )
308
                 )
322
 
309
 
323
     </select>
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
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
313
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
463
         )values(
350
         )values(
464
         <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
351
         <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
465
         <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
352
         <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
466
-       sysdate(),
353
+        sysdate(),
467
         <if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
354
         <if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
468
         <if test="caseStatus != null ">#{caseStatus},</if>
355
         <if test="caseStatus != null ">#{caseStatus},</if>
469
         <if test="hearDate != null ">#{hearDate},</if>
356
         <if test="hearDate != null ">#{hearDate},</if>
559
     <select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
446
     <select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
560
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
447
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
561
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
448
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
562
-            ELSE '无审理方式'
563
-            END arbitratMethodName,
449
+        ELSE '无审理方式'
450
+        END arbitratMethodName,
564
         c.case_status ,
451
         c.case_status ,
565
         CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
452
         CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
566
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
453
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
587
 
474
 
588
     <select id="selectCaseApplicationConfirm" parameterType="CaseApplication" resultMap="CaseApplicationResult">
475
     <select id="selectCaseApplicationConfirm" parameterType="CaseApplication" resultMap="CaseApplicationResult">
589
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
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
         from case_application c left join case_payment_record p on c.id  = p.case_id
498
         from case_application c left join case_payment_record p on c.id  = p.case_id
612
         where c.case_status  = 3
499
         where c.case_status  = 3
613
-            AND c.id = #{id}
500
+          AND c.id = #{id}
614
 
501
 
615
     </select>
502
     </select>
616
     <select id="selectCaseNumLike" resultType="java.lang.Integer">
503
     <select id="selectCaseNumLike" resultType="java.lang.Integer">
622
     </select>
509
     </select>
623
 
510
 
624
 
511
 
625
-</mapper>
512
+</mapper>

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

17
         INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
17
         INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
18
         VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
18
         VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
19
     </insert>
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
     <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
28
     <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
22
         select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
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
             cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
25
             cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
26
         CASE cl.case_node when 0 then '立案申请' when 1 then '提交立案申请' when 2 then '立案审查'
26
         CASE cl.case_node when 0 then '立案申请' when 1 then '提交立案申请' when 2 then '立案审查'
27
         when 3 then '支付成功' when 4 then '缴费确认' when 5 then '案件质证'
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
         when 12 then '核验裁决书' when 13 then '同意裁决书' when 14 then '签名成功'
30
         when 12 then '核验裁决书' when 13 then '同意裁决书' when 14 then '签名成功'
31
         when 15 then '用印成功' when 16 then '送达仲裁文书' when 17 then '案件归档'
31
         when 15 then '用印成功' when 16 then '送达仲裁文书' when 17 then '案件归档'
32
         when 26 then '证据确认成功'
32
         when 26 then '证据确认成功'