Преглед изворни кода

不区分权限案件查询

18792927508 пре 2 година
родитељ
комит
41660a5056

+ 37
- 29
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Прегледај датотеку

97
      * @param caseApplication
97
      * @param caseApplication
98
      * @return
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
     @Override
136
     @Override
101
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
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
     @Override
141
     @Override
134
     @Transactional
142
     @Transactional
135
     public int insertcaseApplication(CaseApplication caseApplication) {
143
     public int insertcaseApplication(CaseApplication caseApplication) {

+ 8
- 9
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Прегледај датотеку

37
         <result property="filearbitraUrl"   column="filearbitra_url"  />
37
         <result property="filearbitraUrl"   column="filearbitra_url"  />
38
     </resultMap>
38
     </resultMap>
39
 
39
 
40
-
41
-
42
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
40
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
41
+select t1.* from(
42
+        select t.* from(
43
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
43
         select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
44
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
44
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
45
             ELSE '无审理方式'
45
             ELSE '无审理方式'
56
         c.hear_date ,c.arbitrat_claims ,
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 ,c.fee_payable ,
58
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
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
         from case_application c
61
         from case_application c
61
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
62
         LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
62
         <where>
63
         <where>
73
                 </foreach>
74
                 </foreach>
74
             </if>
75
             </if>
75
         </where>
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
         <if test="idCard != null and idCard != ''">
81
         <if test="idCard != null and idCard != ''">
83
             or (t.identity_num=#{idCard}  AND t.identity_type=2)
82
             or (t.identity_num=#{idCard}  AND t.identity_type=2)
100
         <where>
99
         <where>
101
             <!--申请人-->
100
             <!--申请人-->
102
             <if test="nameId != null and nameId != ''">
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
             </if>
103
             </if>
105
         </where>
104
         </where>
106
         order by t1.create_time desc,t1.case_num desc
105
         order by t1.create_time desc,t1.case_num desc