Przeglądaj źródła

Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev

wangqiong123 2 lat temu
rodzic
commit
7778d2b721

+ 1
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Wyświetl plik

@@ -38,6 +38,7 @@ public class CaseApplicationController extends BaseController {
38 38
     @GetMapping("/list")
39 39
     public TableDataInfo list(CaseApplication caseApplication) {
40 40
         startPage();
41
+//        List<CaseApplication> list = caseApplicationService.selectCaseApplicationListNew(caseApplication);
41 42
         List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
42 43
         return getDataTable(list);
43 44
     }

+ 3
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/IdentityAuthenticationController.java Wyświetl plik

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.web.controller.wisdomarbitrate;
2 2
 
3 3
 import com.alibaba.fastjson.JSONObject;
4
+import com.ruoyi.common.annotation.Anonymous;
4 5
 import com.ruoyi.common.core.controller.BaseController;
5 6
 import com.ruoyi.common.core.domain.AjaxResult;
6 7
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
@@ -21,6 +22,7 @@ public class IdentityAuthenticationController extends BaseController {
21 22
     /**
22 23
      * 获取EIDtoken
23 24
      */
25
+    @Anonymous
24 26
     @PostMapping("/selectIdentityAuthenticaEIDtoken")
25 27
     public AjaxResult selectIdentityAuthenticaEIDtoken() {
26 28
         JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
@@ -30,6 +32,7 @@ public class IdentityAuthenticationController extends BaseController {
30 32
     /**
31 33
      * 小程序人脸核身后查询身份认证结果
32 34
      */
35
+    @Anonymous
33 36
     @PostMapping("/selectIdentityAuthenticaRespon")
34 37
     public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
35 38
         AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);

+ 8
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java Wyświetl plik

@@ -43,7 +43,7 @@ public interface CaseApplicationMapper {
43 43
 
44 44
     /**
45 45
      * 查询仲裁员根据案件id
46
-     * @param arbitrator
46
+     * @param id
47 47
      * @return
48 48
      */
49 49
     String selectArbitratorList(@Param("id") String id);
@@ -53,4 +53,11 @@ public interface CaseApplicationMapper {
53 53
      * @param payDTO
54 54
      */
55 55
     void updatePayType(CaseConfirmPayDTO payDTO);
56
+
57
+    /**
58
+     * 查询部门长案件
59
+     * @param caseApplication
60
+     * @return
61
+     */
62
+    List<CaseApplication> selectDeptHeadCaseApplicationList(@Param("caseApplication") CaseApplication caseApplication, @Param("statusList")List<Integer> caseStatusList);
56 63
 }

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Wyświetl plik

@@ -11,6 +11,7 @@ import java.util.List;
11 11
 
12 12
 public interface ICaseApplicationService {
13 13
     List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
14
+    List<CaseApplication> selectCaseApplicationListNew(CaseApplication caseApplication);
14 15
 
15 16
 
16 17
     int insertcaseApplication(CaseApplication caseApplication);

+ 51
- 35
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Wyświetl plik

@@ -99,41 +99,57 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
99 99
      * @return
100 100
      */
101 101
 //    @Override
102
-//    public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
103
-//        // 获取登录用户
104
-//        LoginUser loginUser = getLoginUser();
105
-//        SysUser user = loginUser.getUser();
106
-//        Long userId = user.getUserId();
107
-//        Long deptId = user.getDeptId();
108
-//        List<SysRole> roles = user.getRoles();
109
-//        // 查询登录人身份证号
110
-//        SysUser sysUser = sysUserMapper.selectUserById(userId);
111
-//        caseApplication.setIdCard(sysUser.getIdCard());
112
-//        caseApplication.setUserId(String.valueOf(userId));
113
-//        startPage();
114
-//        for (SysRole role : roles) {
115
-//            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
116
-//            if(role.getRoleName().equals("超级管理员")
117
-//            ||role.getRoleName().equals("仲裁委")
118
-//            ||role.getRoleName().equals("部门长")){
119
-//                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
120
-//            }
121
-//            if(role.getRoleName().equals("法律顾问")){
122
-//                // 查询角色有关的用户部门
123
-//                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
124
-//                caseApplication.setDeptIds(deptIds);
125
-//            }
126
-//            if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
127
-//                // 查询角色有关的用户部门
128
-//                caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
129
-//            }
130
-//        }
131
-//
132
-//
133
-//        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
134
-//        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
135
-//
136
-//    }
102
+    public List<CaseApplication> selectCaseApplicationListNew(CaseApplication caseApplication) {
103
+        // 获取登录用户
104
+        LoginUser loginUser = getLoginUser();
105
+        SysUser user = loginUser.getUser();
106
+        Long userId = user.getUserId();
107
+
108
+        // 查询登录人身份证号
109
+        SysUser sysUser = sysUserMapper.selectUserById(userId);
110
+        List<SysRole> roles = sysUser.getRoles();
111
+        // 没有角色不能查看案件列表
112
+        if(CollectionUtil.isEmpty(roles)){
113
+            throw new ServiceException("该用户没有角色权限");
114
+        }
115
+        startPage();
116
+        for (SysRole role : roles) {
117
+            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
118
+            if(role.getRoleName().equals("超级管理员")
119
+            ){
120
+                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
121
+            }
122
+            if(role.getRoleName().equals("仲裁委")
123
+                    ||role.getRoleName().equals("部门长")){
124
+                List<Integer> caseStatusList=new ArrayList<>();
125
+                caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
126
+                caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
127
+                caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
128
+                return caseApplicationMapper.selectDeptHeadCaseApplicationList(caseApplication,caseStatusList);
129
+            }
130
+            if(role.getRoleName().equals("仲裁员")){
131
+                caseApplication.setUserId(String.valueOf(userId));
132
+            }
133
+            if(role.getRoleName().equals("法律顾问")){
134
+                // 查询角色有关的用户部门
135
+                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
136
+                caseApplication.setDeptIds(deptIds);
137
+            }
138
+            if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
139
+                // 查询角色有关的用户部门
140
+                caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
141
+            }
142
+            if(role.getRoleName().equals("被申请人")){
143
+                //
144
+                caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
145
+            }
146
+        }
147
+
148
+
149
+        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
150
+        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
151
+
152
+    }
137 153
     @Override
138 154
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
139 155
         return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);

+ 4
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/WeChatUserServiceImpl.java Wyświetl plik

@@ -108,12 +108,12 @@ public class WeChatUserServiceImpl implements WeChatUserService {
108 108
     @Override
109 109
     public AjaxResult registerUser(IdentityAuthentication ientityAuthentication) {
110 110
         // 校验短信验证码
111
-//        if(StrUtil.isEmpty(getCodeCache(ientityAuthentication.getPhone()))){
112
-//            return AjaxResult.success("验证码校验失败");
113
-//        }
111
+        if(StrUtil.isEmpty(getCodeCache(ientityAuthentication.getPhone()))){
112
+            return AjaxResult.success("验证码校验失败");
113
+        }
114 114
         SysUser sysUserName=sysUserMapper.selectUserByUserName(ientityAuthentication.getUserName());
115 115
         if(sysUserName!=null){
116
-            return AjaxResult.warn("用户名已存在");
116
+            return AjaxResult.warn("账号已存在");
117 117
         }
118 118
         // 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
119 119
         SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());

+ 82
- 31
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Wyświetl plik

@@ -38,28 +38,30 @@
38 38
     </resultMap>
39 39
 
40 40
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
41
-select t1.* from(
41
+        select t1.* from(
42 42
         select t.* from(
43 43
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
44 44
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
45
-            ELSE '无审理方式'
46
-            END arbitratMethodName,
45
+        ELSE '无审理方式'
46
+        END arbitratMethodName,
47 47
         c.case_status ,
48 48
         CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
49
-                            when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
50
-                            when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
51
-                            when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
52
-                            when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
53
-                            when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
54
-                            ELSE '无案件状态'
55
-                            END caseStatusName,
49
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
50
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
51
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
52
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
53
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
54
+        ELSE '无案件状态'
55
+        END caseStatusName,
56 56
         c.hear_date ,c.arbitrat_claims ,
57
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
57
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
58
+        ,c.fee_payable ,
58 59
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
59
-        c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
60
+        c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as
61
+        applicantName,
60 62
         c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
61 63
         from case_application c
62
-        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
64
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
63 65
         <where>
64 66
             <if test="caseStatus != null">
65 67
                 AND c.case_status = #{caseStatus}
@@ -77,29 +79,34 @@ select t1.* from(
77 79
         ) t
78 80
         <where>
79 81
 
80
-        <!--被申请人-->
81
-        <if test="idCard != null and idCard != ''">
82
-            or (t.identity_num=#{idCard}  AND t.identity_type=2)
83
-        </if>
84
-        <!--仲裁员-->
85
-        <if test="userId != null and userId != ''">
86
-            or instr  (t.arbitrator_id,#{userId})>0
87
-        </if>
88
-        <!--法律顾问-->
89
-        <if test="deptIds != null and deptIds.size() > 0">
90
-            or t.name
91
-            in
92
-            <foreach item="item" collection="deptIds" open="(" separator="," close=")">
93
-                #{item}
94
-            </foreach>
95
-        </if>
82
+            <!--被申请人-->
83
+            <if test="idCard != null and idCard != ''">
84
+                or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
85
+            </if>
86
+            <!--仲裁员-->
87
+            <if test="userId != null and userId != ''">
88
+                or ( t.identity_type=1 and
89
+                       t.case_status in (7,8,9,12,13,14)
90
+                and
91
+                instr (t.arbitrator_id,#{userId})>0)
92
+            </if>
93
+            <!--法律顾问-->
94
+            <if test="deptIds != null and deptIds.size() > 0">
95
+                or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
96
+                and t.application_organ_id in
97
+                <foreach item="item" collection="deptIds" open="(" separator="," close=")">
98
+                    #{item}
99
+                </foreach> )
100
+            </if>
96 101
 
97
-    </where>
102
+        </where>
98 103
         ) t1
99 104
         <where>
100 105
             <!--申请人-->
101 106
             <if test="nameId != null and nameId != ''">
102
-                and ( t1.application_organ_id = #{nameId}  AND t1.identity_type=1 )
107
+                and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1
108
+                    and t1.case_status in (0,2)
109
+                )
103 110
             </if>
104 111
         </where>
105 112
         order by t1.create_time desc,t1.case_num desc
@@ -143,6 +150,50 @@ select t1.* from(
143 150
         </where>
144 151
         order by c.create_time desc,c.case_num desc
145 152
     </select>
153
+    <select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
154
+        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
155
+        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
156
+        ELSE '无审理方式'
157
+        END arbitratMethodName,
158
+        c.case_status ,
159
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
160
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
161
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
162
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
163
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
164
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
165
+        ELSE '无案件状态'
166
+        END caseStatusName,
167
+        c.hear_date ,c.arbitrat_claims ,
168
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
169
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
170
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
171
+        from case_application c
172
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
173
+        <where>
174
+            c.case_status in
175
+            <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
176
+                #{caseStatus}
177
+            </foreach>
178
+            <if test="caseApplication.caseStatus != null">
179
+                AND c.case_status = #{caseApplication.caseStatus}
180
+            </if>
181
+            <if test="caseApplication.caseNum != null and caseApplication.caseNum != ''">
182
+                AND c.case_num = #{caseApplication.caseNum}
183
+            </if>
184
+            <if test="caseApplication.nameId != null and caseApplication.nameId != ''">
185
+                AND ca.application_organ_id=#{caseApplication.nameId}  AND ca.identity_type=1
186
+            </if>
187
+            <if test="caseApplication.caseStatusList != null and caseApplication.caseStatusList.size() > 0">
188
+                and c.case_status in
189
+                <foreach item="caseStatus" collection="caseApplication.caseStatusList" open="(" separator="," close=")">
190
+                    #{caseStatus}
191
+                </foreach>
192
+            </if>
193
+        </where>
194
+        order by c.create_time desc,c.case_num desc
195
+    </select>
196
+
146 197
 
147 198
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
148 199
         select count(1) from  case_application c