Ver código fonte

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

wangqiong123 2 anos atrás
pai
commit
df8ed662e8

+ 37
- 29
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Ver arquivo

@@ -97,39 +97,47 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
97 97
      * @param caseApplication
98 98
      * @return
99 99
      */
100
+//    @Override
101
+//    public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
102
+//        // 获取登录用户
103
+//        LoginUser loginUser = getLoginUser();
104
+//        SysUser user = loginUser.getUser();
105
+//        Long userId = user.getUserId();
106
+//        Long deptId = user.getDeptId();
107
+//        List<SysRole> roles = user.getRoles();
108
+//        // 查询登录人身份证号
109
+//        SysUser sysUser = sysUserMapper.selectUserById(userId);
110
+//        caseApplication.setIdCard(sysUser.getIdCard());
111
+//        caseApplication.setUserId(String.valueOf(userId));
112
+//        startPage();
113
+//        for (SysRole role : roles) {
114
+//            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
115
+//            if(role.getRoleName().equals("超级管理员")
116
+//            ||role.getRoleName().equals("仲裁委")
117
+//            ||role.getRoleName().equals("部门长")){
118
+//                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
119
+//            }
120
+//            if(role.getRoleName().equals("法律顾问")){
121
+//                // 查询角色有关的用户部门
122
+//                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
123
+//                caseApplication.setDeptIds(deptIds);
124
+//            }
125
+//            if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
126
+//                // 查询角色有关的用户部门
127
+//                caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
128
+//            }
129
+//        }
130
+//
131
+//
132
+//        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
133
+//        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
134
+//
135
+//    }
100 136
     @Override
101 137
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
102
-        // 获取登录用户
103
-        LoginUser loginUser = getLoginUser();
104
-        SysUser user = loginUser.getUser();
105
-        Long userId = user.getUserId();
106
-        Long deptId = user.getDeptId();
107
-        List<SysRole> roles = user.getRoles();
108
-        // 查询登录人身份证号
109
-        SysUser sysUser = sysUserMapper.selectUserById(userId);
110
-        caseApplication.setIdCard(sysUser.getIdCard());
111
-        caseApplication.setUserId(String.valueOf(userId));
112
-        startPage();
113
-        for (SysRole role : roles) {
114
-            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
115
-            if(role.getRoleName().equals("超级管理员")
116
-            ||role.getRoleName().equals("仲裁委")
117
-            ||role.getRoleName().equals("部门长")){
118
-                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
119
-            }
120
-            if(role.getRoleName().equals("法律顾问")){
121
-                // 查询角色有关的用户部门
122
-                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
123
-                caseApplication.setDeptIds(deptIds);
124
-            }
125
-        }
126
-
127
-
128
-        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
129
-        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
138
+        return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
130 139
 
131 140
     }
132
-
133 141
     @Override
134 142
     @Transactional
135 143
     public int insertcaseApplication(CaseApplication caseApplication) {

+ 8
- 9
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Ver arquivo

@@ -37,9 +37,9 @@
37 37
         <result property="filearbitraUrl"   column="filearbitra_url"  />
38 38
     </resultMap>
39 39
 
40
-
41
-
42 40
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
41
+select t1.* from(
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 45
             ELSE '无审理方式'
@@ -56,7 +56,8 @@
56 56
         c.hear_date ,c.arbitrat_claims ,
57 57
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
58 58
         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,d.dept_name as applicantName,c.register_date,c.filearbitra_url
59
+        c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
60
+        c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
60 61
         from case_application c
61 62
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
62 63
         <where>
@@ -73,11 +74,9 @@
73 74
                 </foreach>
74 75
             </if>
75 76
         </where>
76
-        ) t <where>
77
-        <!--申请人-->
78
-        <if test="nameId != null and nameId != ''">
79
-            or ( t.application_organ_id = #{nameId}  AND t.identity_type=1 )
80
-        </if>
77
+        ) t
78
+        <where>
79
+
81 80
         <!--被申请人-->
82 81
         <if test="idCard != null and idCard != ''">
83 82
             or (t.identity_num=#{idCard}  AND t.identity_type=2)
@@ -100,7 +99,7 @@
100 99
         <where>
101 100
             <!--申请人-->
102 101
             <if test="nameId != null and nameId != ''">
103
-                and ( t1.applicationOrganId = #{nameId}  AND t1.identity_type=1 )
102
+                and ( t1.application_organ_id = #{nameId}  AND t1.identity_type=1 )
104 103
             </if>
105 104
         </where>
106 105
         order by t1.create_time desc,t1.case_num desc