|
|
@ -164,9 +164,24 @@ public class ManualScoreServiceImpl extends BaseServiceImpl<ManualScoreDao, Manu |
|
|
|
|
|
|
|
// 用户所选部门id
|
|
|
|
List<Long> dataScopeDeptList = new ArrayList<>(); |
|
|
|
if (!("".equals(params.get("deptId")))){ |
|
|
|
long deptId = Long.valueOf(params.get("deptId").toString()).longValue(); |
|
|
|
dataScopeDeptList.add(deptId); |
|
|
|
|
|
|
|
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()); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { //根据默认数据权限导出模板
|
|
|
|
for (int i = 0; i < deptTypeKeys.getData().size(); i++){ |
|
|
|
if (deptType.equals(deptTypeKeys.getData().get(i).getTypeKey())){ |
|
|
|
dataScopeDeptList.add(deptTypeKeys.getData().get(i).getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 考核周期开始月
|
|
|
|
YearMonth scoreStartDateMonth = YearMonth.parse(month); |
|
|
@ -258,13 +273,13 @@ public class ManualScoreServiceImpl extends BaseServiceImpl<ManualScoreDao, Manu |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @Description: excel导入时,检查 所选月份下,部门是否已打分 |
|
|
|
* @Param: [recordList, user] |
|
|
|
* @return: java.lang.StringBuffer |
|
|
|
* @Author: zy |
|
|
|
* @Date: 2020-04-22 |
|
|
|
*/ |
|
|
|
* @Param: [recordList, user] |
|
|
|
* @return: java.lang.StringBuffer |
|
|
|
* @Author: zy |
|
|
|
* @Date: 2020-04-22 |
|
|
|
*/ |
|
|
|
private StringBuffer excelImportCheckDeptWhetherManualScore(List<ManualScoreExcel> recordList, UserDetail user) { |
|
|
|
StringBuffer deptErrorInfo = new StringBuffer(); |
|
|
|
for (ManualScoreExcel manualScoreExcel : recordList) { |
|
|
@ -282,7 +297,7 @@ public class ManualScoreServiceImpl extends BaseServiceImpl<ManualScoreDao, Manu |
|
|
|
} |
|
|
|
return deptErrorInfo; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @Description: 调用admin模块查询部门信息详情 |
|
|
|
* @param dataScopeDeptList 用户数据权限 |
|
|
@ -318,7 +333,7 @@ public class ManualScoreServiceImpl extends BaseServiceImpl<ManualScoreDao, Manu |
|
|
|
//根据部门名称获取部门id及所有详细信息
|
|
|
|
Result<List<UserSysDeptInfoResultDTO>> deptInfo = adminFeignClient.queryAllDeptInfo(userSysDeptInfoFormDTO); |
|
|
|
List<UserSysDeptInfoResultDTO> userSysDeptInfoResultDTOList = deptInfo.getData(); |
|
|
|
|
|
|
|
|
|
|
|
DeptLevelAndLeaderDTO deptLevelInfo = deptUtils.getDeptLevelInfo(userSysDeptInfoResultDTOList.get(0).getId(), YesOrNoEnum.YES); |
|
|
|
ManualScoreEntity manualScoreEntity = new ManualScoreEntity(); |
|
|
|
manualScoreEntity.setDeptId(deptLevelInfo.getDeptId()); |
|
|
@ -371,6 +386,7 @@ public class ManualScoreServiceImpl extends BaseServiceImpl<ManualScoreDao, Manu |
|
|
|
@Override |
|
|
|
public PageData<ManualScoreDTO> listManualScoreResultDTO(Map<String, Object> params) { |
|
|
|
params.put("deptId", params.get("deptId").toString()); |
|
|
|
params.put("deptIdList", SecurityUser.getUser().getDeptIdList()); |
|
|
|
IPage<ManualScoreDTO> page = getPage(params); |
|
|
|
List<ManualScoreDTO> list = baseDao.selectListManualScoreResultDTO(params); |
|
|
|
return new PageData<>(list, page.getTotal()); |
|
|
@ -396,4 +412,4 @@ public class ManualScoreServiceImpl extends BaseServiceImpl<ManualScoreDao, Manu |
|
|
|
} |
|
|
|
return big; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|