Browse Source

手动打分 bug权限修改

feature/dangjian
zhangyongzhangyong 6 years ago
parent
commit
de9ebc2af9
  1. 2
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java
  2. 14
      esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml
  3. 17
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/ManualScoreServiceImpl.java

2
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java

@ -1050,7 +1050,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
map.put("typeKey", formDTO.getTypeKeyList().get(0));
}
if (formDTO.getDeptIdList() != null && formDTO.getDeptIdList().size() >0) {
map.put("deptId", formDTO.getDeptIdList().get(0));
map.put("deptId", formDTO.getDeptIdList());
}
if (formDTO.getDeptName() != null && formDTO.getDeptName() != "") {
map.put("deptName", formDTO.getDeptName());

14
esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml

@ -324,9 +324,19 @@
<if test="typeKey != null and typeKey != '' ">
AND sd.type_key = #{typeKey}
</if>
<if test="deptId != null and deptId != '' ">
AND instr(sd.id, #{deptId}) > 0 or instr(sd.pid, #{deptId}) > 0
<if test="deptId!=null and deptId.size()>0">
AND sd.id IN
<foreach collection="deptId" item="deptId" index="index" open="(" close=")" separator=",">
#{deptId}
</foreach>
OR sd.pid IN
<foreach collection="deptId" item="deptId" index="index" open="(" close=")" separator=",">
#{deptId}
</foreach>
</if>
<!--<if test="deptId != null and deptId != '' ">-->
<!--AND instr(sd.id, #{deptId}) > 0 or instr(sd.pid, #{deptId}) > 0-->
<!--</if>-->
<if test="typeKey != null and typeKey != '' ">
AND sd.type_key = #{typeKey}
</if>

17
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/ManualScoreServiceImpl.java

@ -164,19 +164,14 @@ public class ManualScoreServiceImpl extends BaseServiceImpl<ManualScoreDao, Manu
// 用户所选部门id
List<Long> dataScopeDeptList = new ArrayList<>();
List<Long> deptIdList = SecurityUser.getUser().getDeptIdList(); //获取用户权限
UserSysDeptInfoFormDTO userSysDeptInfoFormDTO = new UserSysDeptInfoFormDTO();
userSysDeptInfoFormDTO.setDeptIdList(deptIdList);
Result<List<UserSysDeptInfoResultDTO>> deptTypeKeys =adminFeignClient.queryUserSysDeptTypeKey(userSysDeptInfoFormDTO);
if (!("".equals(params.get("deptId")))){ //根据选择部门 项导出模板
for (int i = 0; i < deptTypeKeys.getData().size(); i++){
if (deptType.equals(deptTypeKeys.getData().get(i).getTypeKey())){
dataScopeDeptList.add(deptTypeKeys.getData().get(i).getId());
}
}
long deptId = Long.valueOf(params.get("deptId").toString());
dataScopeDeptList.add(deptId);
} else { //根据默认数据权限导出模板
List<Long> deptIdList = SecurityUser.getUser().getDeptIdList(); //获取用户权限
UserSysDeptInfoFormDTO userSysDeptInfoFormDTO = new UserSysDeptInfoFormDTO();
userSysDeptInfoFormDTO.setDeptIdList(deptIdList);
Result<List<UserSysDeptInfoResultDTO>> deptTypeKeys =adminFeignClient.queryUserSysDeptTypeKey(userSysDeptInfoFormDTO);
for (int i = 0; i < deptTypeKeys.getData().size(); i++){
if (deptType.equals(deptTypeKeys.getData().get(i).getTypeKey())){
dataScopeDeptList.add(deptTypeKeys.getData().get(i).getId());

Loading…
Cancel
Save