Browse Source

业绩指标计划、业绩指标考评新需求修改

hlf 1 year ago
parent
commit
2b54b56a73

+ 89 - 23
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentalPerformanceIndicatorAssessmentController.java

@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.config.CustomException;
+import com.ims.eval.entity.EvaluationDept;
 import com.ims.eval.entity.EvaluationDeptBusinessAssessment;
 import com.ims.eval.entity.EvaluationDeptBusinessContent;
 import com.ims.eval.entity.custom.Path;
 import com.ims.eval.entity.dto.request.DeptDTO;
+import com.ims.eval.entity.dto.request.EvaluationDeptBusinessAssessmentDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IEvaluationDeptBusinessAssessmentService;
 import com.ims.eval.service.IEvaluationDeptBusinessContentService;
@@ -95,23 +97,34 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	@GetMapping(value = "/generateReport/{id}")
 	public R generateReport(@PathVariable("id") String id) throws Exception {
 		Map<String, Object> dataMap = new HashMap<>();
-		EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment = evaluationDeptBusinessAssessmentService.getById(id);
 		List<DeptDTO> deptList = new ArrayList<>();
-		DeptDTO dept = new DeptDTO();
-		dept.setDeptId(evaluationDeptBusinessAssessment.getDeptId());
-		dept.setDeptName(evaluationDeptBusinessAssessment.getDeptName());
-		List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(id, evaluationDeptBusinessAssessment.getDeptId());
-		if (evaluationDeptBusinessContentList.size() > 0) {
-			dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
-			if (evaluationDeptBusinessContentList.size() > 1) {
-				evaluationDeptBusinessContentList.remove(0);
+		String fileName;
+		EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment = evaluationDeptBusinessAssessmentService.getById(id);
+		if (null == evaluationDeptBusinessAssessment.getDeptId() && null == evaluationDeptBusinessAssessment.getDeptName()) {
+			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
+			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
+			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
+			List<EvaluationDept> evaluationDeptList = evaluationDeptService.list(qw);
+			for (EvaluationDept evaluationDept : evaluationDeptList) {
+				DeptDTO dept = new DeptDTO();
+				dept.setDeptId(evaluationDept.getDeptId());
+				dept.setDeptName(evaluationDept.getDeptName());
+				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(id, evaluationDept.getDeptId());
 				dept.setList(evaluationDeptBusinessContentList);
+				deptList.add(dept);
 			}
+			fileName = evaluationDeptBusinessAssessment.getAppraisalYear() + "年度经营业绩完成情况.doc";
+		} else {
+			DeptDTO dept = new DeptDTO();
+			dept.setDeptId(evaluationDeptBusinessAssessment.getDeptId());
+			dept.setDeptName(evaluationDeptBusinessAssessment.getDeptName());
+			List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(id, evaluationDeptBusinessAssessment.getDeptId());
+			dept.setList(evaluationDeptBusinessContentList);
+			deptList.add(dept);
+			fileName = evaluationDeptBusinessAssessment.getDeptName() + evaluationDeptBusinessAssessment.getAppraisalYear() + "年度经营业绩完成情况.doc";
 		}
-		deptList.add(dept);
 		dataMap.put("appraisalYear", evaluationDeptBusinessAssessment.getAppraisalYear());
 		dataMap.put("list", deptList);
-		String fileName = evaluationDeptBusinessAssessment.getDeptName() + evaluationDeptBusinessAssessment.getAppraisalYear() + "年度经营业绩完成情况.doc";
 		WordUtil.generateWord(dataMap, "template_dbkp_wcqk.ftl", Path.getStatementPath(), fileName);
 		return R.ok().data(fileName);
 	}
@@ -123,8 +136,50 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	 */
 	@GetMapping(value = "/statisticalSummary")
 	public R statisticalSummary(@RequestParam(value = "year") String year) {
-
-		return R.ok().data(true);
+		Map<String, List<EvaluationDeptBusinessAssessmentDTO>> map = new HashMap<>();
+		List<EvaluationDeptBusinessAssessment> evaluationDeptBusinessAssessmentList = evaluationDeptBusinessAssessmentService.selectEvaluationDeptBusinessAssessmentByYear(year);
+		if ("2023".equals(year)) {
+			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
+			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
+			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
+			List<EvaluationDept> evaluationDeptList = evaluationDeptService.list(qw);
+			for (EvaluationDept evaluationDept : evaluationDeptList) {
+				if (evaluationDeptBusinessAssessmentList.size() > 0) {
+					List<EvaluationDeptBusinessAssessmentDTO> dtoList = new ArrayList<>();
+					List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessAssessmentList.get(0).getId(), evaluationDept.getDeptId());
+					for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
+						EvaluationDeptBusinessAssessmentDTO dto = new EvaluationDeptBusinessAssessmentDTO();
+						dto.setSerialNumber(evaluationDeptBusinessContent.getSerialNumber());
+						dto.setTargetName(evaluationDeptBusinessContent.getTargetName());
+						dto.setTargetValue(evaluationDeptBusinessContent.getTargetValue());
+						dto.setBaseScore(evaluationDeptBusinessContent.getBaseScore());
+						dto.setCompletionStatus(evaluationDeptBusinessContent.getCompletionStatus());
+						dto.setEvaluationCriteria(evaluationDeptBusinessContent.getEvaluationCriteria());
+						dto.setEvaluationScore(evaluationDeptBusinessContent.getEvaluationScore());
+						dtoList.add(dto);
+					}
+					map.put(evaluationDept.getDeptName(), dtoList);
+				}
+			}
+		} else {
+			for (EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment : evaluationDeptBusinessAssessmentList) {
+				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessAssessment.getId(), evaluationDeptBusinessAssessment.getDeptId());
+				List<EvaluationDeptBusinessAssessmentDTO> dtoList = new ArrayList<>();
+				for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
+					EvaluationDeptBusinessAssessmentDTO dto = new EvaluationDeptBusinessAssessmentDTO();
+					dto.setSerialNumber(evaluationDeptBusinessContent.getSerialNumber());
+					dto.setTargetName(evaluationDeptBusinessContent.getTargetName());
+					dto.setTargetValue(evaluationDeptBusinessContent.getTargetValue());
+					dto.setBaseScore(evaluationDeptBusinessContent.getBaseScore());
+					dto.setCompletionStatus(evaluationDeptBusinessContent.getCompletionStatus());
+					dto.setEvaluationCriteria(evaluationDeptBusinessContent.getEvaluationCriteria());
+					dto.setEvaluationScore(evaluationDeptBusinessContent.getEvaluationScore());
+					dtoList.add(dto);
+				}
+				map.put(evaluationDeptBusinessAssessment.getDeptName(), dtoList);
+			}
+		}
+		return R.ok().data(map);
 	}
 
 	/**
@@ -137,19 +192,30 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 		Map<String, Object> dataMap = new HashMap<>();
 		List<EvaluationDeptBusinessAssessment> evaluationDeptBusinessAssessmentList = evaluationDeptBusinessAssessmentService.selectEvaluationDeptBusinessAssessmentByYear(year);
 		List<DeptDTO> deptList = new ArrayList<>();
-		for (EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment : evaluationDeptBusinessAssessmentList) {
-			DeptDTO dept = new DeptDTO();
-			dept.setDeptId(evaluationDeptBusinessAssessment.getDeptId());
-			dept.setDeptName(evaluationDeptBusinessAssessment.getDeptName());
-			List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessAssessment.getId(), evaluationDeptBusinessAssessment.getDeptId());
-			if (evaluationDeptBusinessContentList.size() > 0) {
-				dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
-				if (evaluationDeptBusinessContentList.size() > 1) {
-					evaluationDeptBusinessContentList.remove(0);
+		if ("2023".equals(year)) {
+			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
+			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
+			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
+			List<EvaluationDept> evaluationDeptList = evaluationDeptService.list(qw);
+			for (EvaluationDept evaluationDept : evaluationDeptList) {
+				if (evaluationDeptBusinessAssessmentList.size() > 0) {
+					DeptDTO dept = new DeptDTO();
+					dept.setDeptId(evaluationDept.getDeptId());
+					dept.setDeptName(evaluationDept.getDeptName());
+					List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessAssessmentList.get(0).getId(), evaluationDept.getDeptId());
 					dept.setList(evaluationDeptBusinessContentList);
+					deptList.add(dept);
 				}
 			}
-			deptList.add(dept);
+		} else {
+			for (EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment : evaluationDeptBusinessAssessmentList) {
+				DeptDTO dept = new DeptDTO();
+				dept.setDeptId(evaluationDeptBusinessAssessment.getDeptId());
+				dept.setDeptName(evaluationDeptBusinessAssessment.getDeptName());
+				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessAssessment.getId(), evaluationDeptBusinessAssessment.getDeptId());
+				dept.setList(evaluationDeptBusinessContentList);
+				deptList.add(dept);
+			}
 		}
 		dataMap.put("appraisalYear", year);
 		dataMap.put("list", deptList);

+ 125 - 25
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentalPerformanceIndicatorPlanController.java

@@ -10,6 +10,7 @@ import com.ims.eval.entity.EvaluationDeptBusinessContent;
 import com.ims.eval.entity.EvaluationDeptBusinessPlan;
 import com.ims.eval.entity.custom.Path;
 import com.ims.eval.entity.dto.request.DeptDTO;
+import com.ims.eval.entity.dto.request.EvaluationDeptBusinessPlanDTO;
 import com.ims.eval.entity.dto.response.MyuserResDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.feign.RemoteServiceBuilder;
@@ -322,6 +323,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 				int startRows = 1;
 				//获取输入流
 				InputStream is = file.getInputStream();
+				EvaluationDeptBusinessPlan evaluationDeptBusinessPlan = evaluationDeptBusinessPlanService.getById(id);
 				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = new ArrayList<>();
 				//Excel导入导出的单元类
 				List<String[]> strings = ExcelUtil.readData(fileType, startRows, true, is);
@@ -329,8 +331,13 @@ public class DepartmentalPerformanceIndicatorPlanController {
 				for (String[] str : strings) {
 					EvaluationDeptBusinessContent evaluationDeptBusinessContent = new EvaluationDeptBusinessContent();
 					evaluationDeptBusinessContent.setBusinessPlanId(id);
-					evaluationDeptBusinessContent.setDeptId(str[0]);
-					evaluationDeptBusinessContent.setDeptName(str[1]);
+					if (null == evaluationDeptBusinessPlan.getDeptId() && null == evaluationDeptBusinessPlan.getDeptName()) {
+						evaluationDeptBusinessContent.setDeptId(str[0]);
+						evaluationDeptBusinessContent.setDeptName(str[1]);
+					} else {
+						evaluationDeptBusinessContent.setDeptId(evaluationDeptBusinessPlan.getDeptId());
+						evaluationDeptBusinessContent.setDeptName(evaluationDeptBusinessPlan.getDeptName());
+					}
 					evaluationDeptBusinessContent.setSerialNumber(Integer.valueOf(str[2]));
 					evaluationDeptBusinessContent.setTargetName(str[3]);
 					evaluationDeptBusinessContent.setTargetValue(str[4]);
@@ -384,28 +391,98 @@ public class DepartmentalPerformanceIndicatorPlanController {
 	@GetMapping(value = "/generateReport/{id}")
 	public R generateReport(@PathVariable("id") String id) throws Exception {
 		Map<String, Object> dataMap = new HashMap<>();
-		EvaluationDeptBusinessPlan evaluationDeptBusinessPlan = evaluationDeptBusinessPlanService.getById(id);
 		List<DeptDTO> deptList = new ArrayList<>();
-		DeptDTO dept = new DeptDTO();
-		dept.setDeptId(evaluationDeptBusinessPlan.getDeptId());
-		dept.setDeptName(evaluationDeptBusinessPlan.getDeptName());
-		List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(id, evaluationDeptBusinessPlan.getDeptId());
-		if (evaluationDeptBusinessContentList.size() > 0) {
-			dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
-			if (evaluationDeptBusinessContentList.size() > 1) {
-				evaluationDeptBusinessContentList.remove(0);
-				dept.setList(evaluationDeptBusinessContentList);
+		String fileName;
+		EvaluationDeptBusinessPlan evaluationDeptBusinessPlan = evaluationDeptBusinessPlanService.getById(id);
+		if (null == evaluationDeptBusinessPlan.getDeptId() && null == evaluationDeptBusinessPlan.getDeptName()) {
+			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
+			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
+			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
+			List<EvaluationDept> evaluationDeptList = evaluationDeptService.list(qw);
+			for (EvaluationDept evaluationDept : evaluationDeptList) {
+				DeptDTO dept = new DeptDTO();
+				dept.setDeptId(evaluationDept.getDeptId());
+				dept.setDeptName(evaluationDept.getDeptName());
+				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(id, evaluationDept.getDeptId());
+				if (evaluationDeptBusinessContentList.size() > 0) {
+					dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
+					if (evaluationDeptBusinessContentList.size() > 1) {
+						evaluationDeptBusinessContentList.remove(0);
+						dept.setList(evaluationDeptBusinessContentList);
+					}
+				}
+				deptList.add(dept);
 			}
+			fileName = evaluationDeptBusinessPlan.getAppraisalYear() + "年度经营业绩指标计划.doc";
+		} else {
+			DeptDTO dept = new DeptDTO();
+			dept.setDeptId(evaluationDeptBusinessPlan.getDeptId());
+			dept.setDeptName(evaluationDeptBusinessPlan.getDeptName());
+			List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(id, evaluationDeptBusinessPlan.getDeptId());
+			if (evaluationDeptBusinessContentList.size() > 0) {
+				dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
+				if (evaluationDeptBusinessContentList.size() > 1) {
+					evaluationDeptBusinessContentList.remove(0);
+					dept.setList(evaluationDeptBusinessContentList);
+				}
+			}
+			deptList.add(dept);
+			fileName = evaluationDeptBusinessPlan.getDeptName() + evaluationDeptBusinessPlan.getAppraisalYear() + "年度经营业绩指标计划.doc";
 		}
-		deptList.add(dept);
 		dataMap.put("appraisalYear", evaluationDeptBusinessPlan.getAppraisalYear());
 		dataMap.put("list", deptList);
-		String fileName = evaluationDeptBusinessPlan.getDeptName() + evaluationDeptBusinessPlan.getAppraisalYear() + "年度经营业绩指标计划.doc";
 		WordUtil.generateWord(dataMap, "template_dbkp_zbjh.ftl", Path.getStatementPath(), fileName);
 		return R.ok().data(fileName);
 	}
 
 	/**
+	 * 统计汇总数据
+	 *
+	 * @param year 年度
+	 */
+	@GetMapping(value = "/statisticalSummary")
+	public R statisticalSummary(@RequestParam(value = "year") String year) {
+		List<EvaluationDeptBusinessPlanDTO> dtoList = new ArrayList<>();
+		List<EvaluationDeptBusinessPlan> evaluationDeptBusinessPlanList = evaluationDeptBusinessPlanService.selectEvaluationDeptBusinessPlanByYear(year);
+		if ("2023".equals(year)) {
+			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
+			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
+			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
+			List<EvaluationDept> evaluationDeptList = evaluationDeptService.list(qw);
+			for (EvaluationDept evaluationDept : evaluationDeptList) {
+				if (evaluationDeptBusinessPlanList.size() > 0) {
+					List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessPlanList.get(0).getId(), evaluationDept.getDeptId());
+					for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
+						EvaluationDeptBusinessPlanDTO dto = new EvaluationDeptBusinessPlanDTO();
+						dto.setDeptName(evaluationDept.getDeptName());
+						dto.setSerialNumber(evaluationDeptBusinessContent.getSerialNumber());
+						dto.setTargetName(evaluationDeptBusinessContent.getTargetName());
+						dto.setTargetValue(evaluationDeptBusinessContent.getTargetValue());
+						dto.setBaseScore(evaluationDeptBusinessContent.getBaseScore());
+						dto.setEvaluationCriteria(evaluationDeptBusinessContent.getEvaluationCriteria());
+						dtoList.add(dto);
+					}
+				}
+			}
+		} else {
+			for (EvaluationDeptBusinessPlan evaluationDeptBusinessPlan : evaluationDeptBusinessPlanList) {
+				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessPlan.getId(), evaluationDeptBusinessPlan.getDeptId());
+				for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
+					EvaluationDeptBusinessPlanDTO dto = new EvaluationDeptBusinessPlanDTO();
+					dto.setDeptName(evaluationDeptBusinessPlan.getDeptName());
+					dto.setSerialNumber(evaluationDeptBusinessContent.getSerialNumber());
+					dto.setTargetName(evaluationDeptBusinessContent.getTargetName());
+					dto.setTargetValue(evaluationDeptBusinessContent.getTargetValue());
+					dto.setBaseScore(evaluationDeptBusinessContent.getBaseScore());
+					dto.setEvaluationCriteria(evaluationDeptBusinessContent.getEvaluationCriteria());
+					dtoList.add(dto);
+				}
+			}
+		}
+		return R.ok().data(dtoList);
+	}
+
+	/**
 	 * 生成汇总报表
 	 *
 	 * @return 结果
@@ -415,19 +492,42 @@ public class DepartmentalPerformanceIndicatorPlanController {
 		Map<String, Object> dataMap = new HashMap<>();
 		List<EvaluationDeptBusinessPlan> evaluationDeptBusinessPlanList = evaluationDeptBusinessPlanService.selectEvaluationDeptBusinessPlanByYear(year);
 		List<DeptDTO> deptList = new ArrayList<>();
-		for (EvaluationDeptBusinessPlan evaluationDeptBusinessPlan : evaluationDeptBusinessPlanList) {
-			DeptDTO dept = new DeptDTO();
-			dept.setDeptId(evaluationDeptBusinessPlan.getDeptId());
-			dept.setDeptName(evaluationDeptBusinessPlan.getDeptName());
-			List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessPlan.getId(), evaluationDeptBusinessPlan.getDeptId());
-			if (evaluationDeptBusinessContentList.size() > 0) {
-				dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
-				if (evaluationDeptBusinessContentList.size() > 1) {
-					evaluationDeptBusinessContentList.remove(0);
-					dept.setList(evaluationDeptBusinessContentList);
+		if ("2023".equals(year)) {
+			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
+			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
+			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
+			List<EvaluationDept> evaluationDeptList = evaluationDeptService.list(qw);
+			for (EvaluationDept evaluationDept : evaluationDeptList) {
+				if (evaluationDeptBusinessPlanList.size() > 0) {
+					DeptDTO dept = new DeptDTO();
+					dept.setDeptId(evaluationDept.getDeptId());
+					dept.setDeptName(evaluationDept.getDeptName());
+					List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessPlanList.get(0).getId(), evaluationDept.getDeptId());
+					if (evaluationDeptBusinessContentList.size() > 0) {
+						dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
+						if (evaluationDeptBusinessContentList.size() > 1) {
+							evaluationDeptBusinessContentList.remove(0);
+							dept.setList(evaluationDeptBusinessContentList);
+						}
+					}
+					deptList.add(dept);
 				}
 			}
-			deptList.add(dept);
+		} else {
+			for (EvaluationDeptBusinessPlan evaluationDeptBusinessPlan : evaluationDeptBusinessPlanList) {
+				DeptDTO dept = new DeptDTO();
+				dept.setDeptId(evaluationDeptBusinessPlan.getDeptId());
+				dept.setDeptName(evaluationDeptBusinessPlan.getDeptName());
+				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.selectEvaluationDeptBusinessContentListByBusinessPlanId(evaluationDeptBusinessPlan.getId(), evaluationDeptBusinessPlan.getDeptId());
+				if (evaluationDeptBusinessContentList.size() > 0) {
+					dept.setEvaluationDeptBusinessContent(evaluationDeptBusinessContentList.get(0));
+					if (evaluationDeptBusinessContentList.size() > 1) {
+						evaluationDeptBusinessContentList.remove(0);
+						dept.setList(evaluationDeptBusinessContentList);
+					}
+				}
+				deptList.add(dept);
+			}
 		}
 		dataMap.put("appraisalYear", year);
 		dataMap.put("list", deptList);

+ 34 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/request/EvaluationDeptBusinessAssessmentDTO.java

@@ -0,0 +1,34 @@
+package com.ims.eval.entity.dto.request;
+
+import lombok.Data;
+
+/**
+ * @author hlf
+ * @date 2024/1/12 9:59
+ * 文件说明:本部部门业绩指标考核统计汇总报表
+ */
+@Data
+public class EvaluationDeptBusinessAssessmentDTO {
+
+	//序号
+	private Integer serialNumber;
+
+	//关键业绩指标名称
+	private String targetName;
+
+	//目标值
+	private String targetValue;
+
+	//基础分
+	private String baseScore;
+
+	//完成情况
+	private String completionStatus;
+
+	//评价标准
+	private String evaluationCriteria;
+
+	//自评得分
+	private String evaluationScore;
+
+}

+ 31 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/request/EvaluationDeptBusinessPlanDTO.java

@@ -0,0 +1,31 @@
+package com.ims.eval.entity.dto.request;
+
+import lombok.Data;
+
+/**
+ * @author hlf
+ * @date 2024/1/12 9:59
+ * 文件说明:本部部门业绩指标计划统计汇总报表
+ */
+@Data
+public class EvaluationDeptBusinessPlanDTO {
+
+	//部门
+	private String deptName;
+
+	//序号
+	private Integer serialNumber;
+
+	//关键业绩指标名称
+	private String targetName;
+
+	//目标值
+	private String targetValue;
+
+	//基础分
+	private String baseScore;
+
+	//评价标准
+	private String evaluationCriteria;
+
+}