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

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

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.web.controller.wisdomarbitrate;
2 2
 
3 3
 import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
4 5
 import com.ruoyi.common.annotation.Anonymous;
5 6
 import com.ruoyi.common.annotation.Log;
6 7
 import com.ruoyi.common.core.controller.BaseController;
@@ -8,6 +9,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
8 9
 import com.ruoyi.common.core.page.TableDataInfo;
9 10
 import com.ruoyi.common.enums.BusinessType;
10 11
 import com.ruoyi.common.exception.EsignDemoException;
12
+import com.ruoyi.common.exception.ServiceException;
11 13
 import com.ruoyi.common.utils.WxAppletNotifyUtils;
12 14
 import com.ruoyi.wisdomarbitrate.domain.*;
13 15
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
@@ -37,6 +39,9 @@ public class CaseApplicationController extends BaseController {
37 39
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list')")
38 40
     @GetMapping("/list")
39 41
     public TableDataInfo list(CaseApplication caseApplication) {
42
+        if(StrUtil.isEmpty(caseApplication.getSelectCaseStatus())){
43
+          caseApplication.setSelectCaseStatus("0");
44
+        }
40 45
         startPage();
41 46
         List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
42 47
 //        List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);

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

@@ -55,6 +55,7 @@ public class WeChatUserController extends BaseController {
55 55
         ){
56 56
             return warn("参数校验失败");
57 57
         }
58
+        logger.info("调用小程序注册==="+ientityAuthentication.toString());
58 59
         return weChatUserService.registerUser(ientityAuthentication);
59 60
     }
60 61
 

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

@@ -9,6 +9,10 @@ import java.util.List;
9 9
 
10 10
 public class CaseApplication  extends BaseEntity {
11 11
     private static final long serialVersionUID = 1L;
12
+    /**
13
+     * 查询案件时区分是否待办案件,0待办案件,1已办案件
14
+     */
15
+    private String selectCaseStatus;
12 16
 
13 17
     /** ID */
14 18
     private Long id;
@@ -26,6 +30,14 @@ public class CaseApplication  extends BaseEntity {
26 30
     /** 仲裁方式 */
27 31
     private Integer arbitratMethod;
28 32
 
33
+    public String getSelectCaseStatus() {
34
+        return selectCaseStatus;
35
+    }
36
+
37
+    public void setSelectCaseStatus(String selectCaseStatus) {
38
+        this.selectCaseStatus = selectCaseStatus;
39
+    }
40
+
29 41
     public Integer getArbitratMethod() {
30 42
         return arbitratMethod;
31 43
     }
@@ -355,6 +367,10 @@ public class CaseApplication  extends BaseEntity {
355 367
      * 用户id
356 368
      */
357 369
     private String userId;
370
+    /**
371
+     * 登录用户用户名
372
+     */
373
+    private String loginUserName;
358 374
     private List<Long> deptIds;
359 375
     /**
360 376
      * 部门长状态
@@ -365,6 +381,14 @@ public class CaseApplication  extends BaseEntity {
365 381
      */
366 382
     private Integer financeStatus;
367 383
 
384
+    public String getLoginUserName() {
385
+        return loginUserName;
386
+    }
387
+
388
+    public void setLoginUserName(String loginUserName) {
389
+        this.loginUserName = loginUserName;
390
+    }
391
+
368 392
     public Integer getFinanceStatus() {
369 393
         return financeStatus;
370 394
     }

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

@@ -97,4 +97,11 @@ public interface CaseApplicationMapper {
97 97
      * @return
98 98
      */
99 99
     Long selectCaseIdByRoomId(@Param("roomId")String roomId);
100
+
101
+    /**
102
+     * 查询已办案件
103
+     * @param caseApplication
104
+     * @return
105
+     */
106
+    List<CaseApplication> selectHandledCase(CaseApplication caseApplication);
100 107
 }

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

@@ -112,50 +112,56 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
112 112
         Long userId = user.getUserId();
113 113
         // 查询登录人身份证号
114 114
         SysUser sysUser = sysUserMapper.selectUserById(userId);
115
-        List<SysRole> roles = sysUser.getRoles();
116
-        // 没有角色不能查看案件列表
117
-        if(CollectionUtil.isEmpty(roles)){
118
-            throw new ServiceException("该用户没有角色权限");
119
-        }
120
-        startPage();
121
-        for (SysRole role : roles) {
122
-            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
123
-            if(role.getRoleName().equals("超级管理员")
124
-            ){
125
-                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
126
-            }
127
-            if(role.getRoleName().equals("仲裁委")
128
-                    ||role.getRoleName().equals("部门长")){
129
-                List<Integer> caseStatusList=new ArrayList<>();
130
-                caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
131
-                caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
132
-                caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
133
-                caseApplication.setDeptHeadStatus(caseStatusList);
134
-            }
135
-            if(role.getRoleName().equals("仲裁员")){
136
-                caseApplication.setUserId(String.valueOf(userId));
137
-            }
138
-            if(role.getRoleName().equals("财务")){
139
-                caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
115
+        // 已办案件
116
+        if(caseApplication.getSelectCaseStatus().equals("1")){
117
+            caseApplication.setLoginUserName(sysUser.getUserName());
118
+            return caseApplicationMapper.selectHandledCase(caseApplication);
119
+        }else { // 待办案件
120
+            List<SysRole> roles = sysUser.getRoles();
121
+            // 没有角色不能查看案件列表
122
+            if (CollectionUtil.isEmpty(roles)) {
123
+                throw new ServiceException("该用户没有角色权限");
140 124
             }
141
-            if(role.getRoleName().equals("法律顾问")){
142
-                // 查询角色有关的用户部门
143
-                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
144
-                caseApplication.setDeptIds(deptIds);
145
-            }
146
-            if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
147
-                // 查询角色有关的用户部门
148
-                caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
149
-            }
150
-            if(role.getRoleName().equals("被申请人")){
151
-                //
152
-                caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
125
+            startPage();
126
+            for (SysRole role : roles) {
127
+                // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
128
+                if (role.getRoleName().equals("超级管理员")
129
+                ) {
130
+                    return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
131
+                }
132
+                if (role.getRoleName().equals("仲裁委")
133
+                        || role.getRoleName().equals("部门长")) {
134
+                    List<Integer> caseStatusList = new ArrayList<>();
135
+                    caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
136
+                    caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
137
+                    caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
138
+                    caseApplication.setDeptHeadStatus(caseStatusList);
139
+                }
140
+                if (role.getRoleName().equals("仲裁员")) {
141
+                    caseApplication.setUserId(String.valueOf(userId));
142
+                }
143
+                if (role.getRoleName().equals("财务")) {
144
+                    caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
145
+                }
146
+                if (role.getRoleName().equals("法律顾问")) {
147
+                    // 查询角色有关的用户部门
148
+                    List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
149
+                    caseApplication.setDeptIds(deptIds);
150
+                }
151
+                if (StrUtil.isEmpty(caseApplication.getNameId()) && role.getRoleName().equals("申请人")) {
152
+                    // 查询角色有关的用户部门
153
+                    caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
154
+                }
155
+                if (role.getRoleName().equals("被申请人")) {
156
+                    //
157
+                    caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
158
+                }
153 159
             }
154
-        }
155 160
 
156 161
 
157
-        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
158
-        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
162
+            // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
163
+            return caseApplicationMapper.selectCaseApplicationList(caseApplication);
164
+        }
159 165
 
160 166
     }
161 167
     @Override

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

@@ -215,7 +215,6 @@ public class VideoServiceImpl implements VideoService {
215 215
     @Transactional
216 216
     public  String downloadImage(String fileId,String fileUrl,String roomId) throws IOException {
217 217
         String staticAndMksDir = null;
218
-        log.info("fileUrl========");
219 218
         if (fileUrl != null) {
220 219
             //下载时文件名称
221 220
             String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
@@ -224,7 +223,6 @@ public class VideoServiceImpl implements VideoService {
224 223
                 String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
225 224
                 staticAndMksDir = Paths.get(absPath).toFile().toString();
226 225
                 HttpUtil.downloadFile(fileUrl, staticAndMksDir );
227
-            log.info("selectCaseIdByRoomId========");
228 226
             Long caseId= caseApplicationMapper.selectCaseIdByRoomId(roomId);
229 227
             String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
230 228
             // 存入数据库
@@ -233,7 +231,6 @@ public class VideoServiceImpl implements VideoService {
233 231
                     .annexPath(RuoYiConfig.getVideoUploadPath())
234 232
                     .annexType(9)
235 233
                     .build();
236
-            log.info("视频保存========");
237 234
              caseAttachMapper.save(caseAttach);
238 235
             return annexName;
239 236
         }

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

@@ -130,7 +130,6 @@ public class WeChatUserServiceImpl implements WeChatUserService {
130 130
 
131 131
         // 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
132 132
         SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
133
-
134 133
         if(sysUser!=null){
135 134
             sysUser.setIdCard(ientityAuthentication.getIdentityNo());
136 135
             sysUser.setNickName(ientityAuthentication.getName());
@@ -147,7 +146,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
147 146
             sysUser.setUserName(ientityAuthentication.getUserName());
148 147
             sysUser.setPhonenumber(ientityAuthentication.getPhone());
149 148
             sysUser.setEmail(ientityAuthentication.getEmail());
150
-            sysUser.setCreateBy(ientityAuthentication.getPhone());
149
+            sysUser.setCreateBy(ientityAuthentication.getUserName());
151 150
             sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
152 151
             int row = sysUserMapper.insertUser(sysUser);
153 152
             if(row<1) {

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

@@ -46,7 +46,51 @@
46 46
         <result property="adjudicaCounter"   column="adjudica_counter"  />
47 47
         <result property="lockStatus"   column="lock_status"  />
48 48
     </resultMap>
49
-
49
+    <select id="selectHandledCase"  resultMap="CaseApplicationResult">
50
+        select DISTINCT(c.id) id,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
51
+        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
52
+        ELSE '无审理方式'
53
+        END arbitratMethodName,
54
+        c.case_status ,
55
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
56
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
57
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
58
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
59
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
60
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
61
+        when 31 then '待修改开庭时间'
62
+        ELSE '无案件状态'
63
+        END caseStatusName,
64
+        c.hear_date ,c.arbitrat_claims ,
65
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
66
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
67
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
68
+        from case_log_record r
69
+        join case_application c on r.case_appli_id=c.id
70
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
71
+        <where>
72
+            
73
+            <if test="lockStatus != null">
74
+                AND c.lock_status = #{lockStatus}
75
+            </if>
76
+            <if test="caseNum != null and caseNum != ''">
77
+                AND c.case_num = #{caseNum}
78
+            </if>
79
+            <if test="nameId != null and nameId != ''">
80
+                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
81
+            </if>
82
+            <if test="loginUserName != null and loginUserName != ''">
83
+                AND r.create_by=#{loginUserName}  AND ca.identity_type=1
84
+            </if>
85
+            <if test="caseStatusList != null and caseStatusList.size() > 0">
86
+                and r.case_node in
87
+                <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
88
+                    #{caseStatus}
89
+                </foreach>
90
+            </if>
91
+        </where>
92
+        order by c.create_time desc,c.case_num desc
93
+    </select>
50 94
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
51 95
         select t1.* from(
52 96
         select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
@@ -568,4 +612,5 @@
568 612
     </select>
569 613
 
570 614
 
615
+
571 616
 </mapper>