Browse Source

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

hlf 1 year ago
parent
commit
8704072efa

+ 16 - 20
ims-service/ims-eval/src/main/java/com/ims/eval/component/NextApproverImpl.java

@@ -1,13 +1,12 @@
 package com.ims.eval.component;
 
-import com.alibaba.fastjson.JSONObject;
 import com.ims.eval.entity.DeptAssessmentDeclaration;
 import com.ims.eval.service.IDeptAssessmentDeclarationService;
 import com.ims.idms.modules.sys.entity.SysUser;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -20,7 +19,7 @@ import java.util.List;
 @Slf4j
 public class NextApproverImpl {
 
-	@Autowired
+	@Resource
 	private IDeptAssessmentDeclarationService deptAssessmentDeclarationService;
 
 	/**
@@ -30,20 +29,16 @@ public class NextApproverImpl {
 	 */
 	public List<SysUser> submitTask1(String id, String a2, String a3) {
 		List<SysUser> userList = null;
-		log.info("用户1 ID"+id);
 		try {
 			userList = new ArrayList<>();
 			DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
-			if (null != deptAssessmentDeclaration){
+			if (null != deptAssessmentDeclaration) {
 				SysUser user = new SysUser();
 				user.setId(deptAssessmentDeclaration.getDeptLeaderId());
 				user.setNo(deptAssessmentDeclaration.getDeptLeaderNo());
 				user.setName(deptAssessmentDeclaration.getDeptLeaderName());
 				userList.add(user);
 			}
-			String listJSONString = JSONObject.toJSONString(userList);
-			log.info("用户1 list"+listJSONString);
-
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
@@ -56,19 +51,20 @@ public class NextApproverImpl {
 	 * @return 结果
 	 */
 	public List<SysUser> submitTask2(String id, String a2, String a3) {
-		log.info("用户2 ID"+id);
-		List<SysUser> userList = new ArrayList<>();
-		DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
-		if (null != deptAssessmentDeclaration){
-			SysUser user = new SysUser();
-			user.setId(deptAssessmentDeclaration.getSeconderId());
-			user.setNo(deptAssessmentDeclaration.getSeconderNo());
-			user.setName(deptAssessmentDeclaration.getSeconderName());
-			userList.add(user);
-			System.out.println("用户数量2;id="+user.getId());
+		List<SysUser> userList = null;
+		try {
+			userList = new ArrayList<>();
+			DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
+			if (null != deptAssessmentDeclaration) {
+				SysUser user = new SysUser();
+				user.setId(deptAssessmentDeclaration.getSeconderId());
+				user.setNo(deptAssessmentDeclaration.getSeconderNo());
+				user.setName(deptAssessmentDeclaration.getSeconderName());
+				userList.add(user);
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
 		}
-		String listJSONString = JSONObject.toJSONString(userList);
-		log.info("用户2 list"+listJSONString);
 		return userList;
 	}
 }

+ 4 - 7
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentalPerformanceIndicatorAssessmentController.java

@@ -25,10 +25,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 本部部门业绩指标考核
@@ -176,7 +173,7 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	 */
 	@GetMapping(value = "/generateReport/{id}")
 	public R generateReport(@PathVariable("id") String id) throws Exception {
-		Map<String, Object> dataMap = new HashMap<>();
+		Map<String, Object> dataMap = new LinkedHashMap<>();
 		List<DeptDTO> deptList = new ArrayList<>();
 		String fileName;
 		EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment = evaluationDeptBusinessAssessmentService.getById(id);
@@ -216,7 +213,7 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	 */
 	@GetMapping(value = "/statisticalSummary")
 	public R statisticalSummary(@RequestParam(value = "year") String year) {
-		Map<String, List<EvaluationDeptBusinessAssessmentDTO>> map = new HashMap<>();
+		Map<String, List<EvaluationDeptBusinessAssessmentDTO>> map = new LinkedHashMap<>();
 		List<EvaluationDeptBusinessAssessment> evaluationDeptBusinessAssessmentList = evaluationDeptBusinessAssessmentService.selectEvaluationDeptBusinessAssessmentByYear(year);
 		if (evaluationDeptBusinessAssessmentList.size() == 1) {
 			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
@@ -269,7 +266,7 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	 */
 	@GetMapping(value = "/summaryReport/{year}")
 	public R summaryReport(@PathVariable("year") String year) throws Exception {
-		Map<String, Object> dataMap = new HashMap<>();
+		Map<String, Object> dataMap = new LinkedHashMap<>();
 		List<EvaluationDeptBusinessAssessment> evaluationDeptBusinessAssessmentList = evaluationDeptBusinessAssessmentService.selectEvaluationDeptBusinessAssessmentByYear(year);
 		List<DeptDTO> deptList = new ArrayList<>();
 		if (evaluationDeptBusinessAssessmentList.size() == 1) {

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

@@ -390,7 +390,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 	 */
 	@GetMapping(value = "/generateReport/{id}")
 	public R generateReport(@PathVariable("id") String id) throws Exception {
-		Map<String, Object> dataMap = new HashMap<>();
+		Map<String, Object> dataMap = new LinkedHashMap<>();
 		List<DeptDTO> deptList = new ArrayList<>();
 		String fileName;
 		EvaluationDeptBusinessPlan evaluationDeptBusinessPlan = evaluationDeptBusinessPlanService.getById(id);
@@ -489,7 +489,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 	 */
 	@GetMapping(value = "/summaryReport/{year}")
 	public R summaryReport(@PathVariable("year") String year) throws Exception {
-		Map<String, Object> dataMap = new HashMap<>();
+		Map<String, Object> dataMap = new LinkedHashMap<>();
 		List<EvaluationDeptBusinessPlan> evaluationDeptBusinessPlanList = evaluationDeptBusinessPlanService.selectEvaluationDeptBusinessPlanByYear(year);
 		List<DeptDTO> deptList = new ArrayList<>();
 		if (evaluationDeptBusinessPlanList.size() == 1) {