|
@@ -5265,7 +5265,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
|
|
|
//导出报告
|
|
|
@Override
|
|
|
- public HttpRespMsg exportReport(@RequestParam String startDate, @RequestParam String endDate,Integer exportType, Integer projectId,Integer stateKey,Integer departmentId, HttpServletRequest request) {
|
|
|
+ public HttpRespMsg exportReport(@RequestParam String startDate, @RequestParam String endDate,Integer exportType, Integer projectId,Integer stateKey,String departmentIds, HttpServletRequest request) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
DateFormat timeDf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
long t0 = System.currentTimeMillis();
|
|
@@ -5399,9 +5399,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
//获取部门的所有子部门
|
|
|
List<Department> departments = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id",companyId));
|
|
|
Department[] deptArray = departments.toArray(new Department[0]);
|
|
|
- List<Integer> branchDepartment = null;
|
|
|
- if(departmentId != null){
|
|
|
- branchDepartment = departmentService.getBranchDepartment(departmentId,departments);
|
|
|
+ List<Integer> branchDepartment = new ArrayList<>();
|
|
|
+ if(!StringUtils.isEmpty(departmentIds)){
|
|
|
+ String[] deptSplit = departmentIds.split(",");
|
|
|
+ List<String> deptStrList = Arrays.asList(deptSplit);
|
|
|
+ deptStrList.forEach(d->{
|
|
|
+ List<Integer> department = departmentService.getBranchDepartment(Integer.valueOf(d), departments);
|
|
|
+ branchDepartment.addAll(department);
|
|
|
+ });
|
|
|
}
|
|
|
if (functionList.size() == 0) {
|
|
|
//检查是否是部门负责人
|