Переглянути джерело

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

hlf 1 рік тому
батько
коміт
380d8439b2

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

@@ -14,9 +14,9 @@ import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IEvaluationDeptService;
 import com.ims.eval.service.IUserService;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.List;
@@ -33,13 +33,13 @@ import java.util.List;
 @RequestMapping("//evaluation-dept-allocation")
 public class DepartmentAllocationController {
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptService evaluationDeptService;
 
-	@Autowired
+	@Resource
 	private HttpServletRequest request;
 
-	@Autowired
+	@Resource
 	private IUserService userService;
 
 	/**

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

@@ -11,10 +11,10 @@ import com.ims.eval.service.IEvaluationDeptRatingService;
 import com.ims.eval.service.IOrganizationStructureService;
 import com.ims.eval.util.ExcelUtil;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -34,13 +34,13 @@ import java.util.List;
 @RequestMapping("//evaluation-dept-rating")
 public class DepartmentPerformanceAppraisalRatingController {
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptRatingService evaluationDeptRatingService;
 
-	@Autowired
+	@Resource
 	private IOrganizationStructureService organizationStructureService;
 
-	@Autowired
+	@Resource
 	private HttpServletRequest request;
 
 	/**

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

@@ -17,10 +17,10 @@ import com.ims.eval.service.IEvaluationDeptService;
 import com.ims.eval.util.ExcelUtil;
 import com.ims.eval.util.WordUtil;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
@@ -42,16 +42,16 @@ import java.util.Map;
 @RequestMapping("//evaluation-dept-assessment")
 public class DepartmentalPerformanceIndicatorAssessmentController {
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptBusinessAssessmentService evaluationDeptBusinessAssessmentService;
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptBusinessContentService evaluationDeptBusinessContentService;
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptService evaluationDeptService;
 
-	@Autowired
+	@Resource
 	private HttpServletRequest request;
 
 	/**
@@ -90,6 +90,86 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	}
 
 	/**
+	 * 详情-头部信息
+	 *
+	 * @param id 业务主键
+	 * @return 结果
+	 */
+	@GetMapping(value = "/detailsHead/{id}")
+	public R detailsHead(@PathVariable("id") String id) {
+		EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment = evaluationDeptBusinessAssessmentService.getById(id);
+		return R.ok().data(evaluationDeptBusinessAssessment);
+	}
+
+	/**
+	 * 导入
+	 *
+	 * @param file 文件
+	 * @return 结果
+	 */
+	@PostMapping(value = "/import")
+	public R importData(@RequestParam("file") MultipartFile file, @RequestParam("id") String id) {
+		if (!file.isEmpty()) {
+			try {
+				//获取原始的文件名
+				String originalFilename = file.getOriginalFilename();
+				//获取文件类型
+				String fileType = originalFilename.substring(originalFilename.lastIndexOf(".") + 1, originalFilename.length());
+				//默认从第一行开始读取
+				int startRows = 1;
+				//获取输入流
+				InputStream is = file.getInputStream();
+				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = new ArrayList<>();
+				//Excel导入导出的单元类
+				List<String[]> strings = ExcelUtil.readData(fileType, startRows, true, is);
+				//遍历Excel表每一行的数据
+				for (String[] str : strings) {
+					EvaluationDeptBusinessContent evaluationDeptBusinessContent = new EvaluationDeptBusinessContent();
+					evaluationDeptBusinessContent.setBusinessPlanId(id);
+					evaluationDeptBusinessContent.setTargetName(str[3]);
+					evaluationDeptBusinessContent.setCompletionStatus(str[6]);
+					evaluationDeptBusinessContent.setEvaluationScore(str[8]);
+					evaluationDeptBusinessContentList.add(evaluationDeptBusinessContent);
+				}
+				boolean b = evaluationDeptBusinessContentService.importAssessmentDataList(evaluationDeptBusinessContentList);
+				if (b) {
+					return R.ok().data(b);
+				} else {
+					return R.error("导入失败!");
+				}
+			} catch (Exception e) {
+				log.error("错误", e);
+				return R.customError(e.getMessage()).data("失败!");
+			}
+		}
+		return R.error("上传文件为空!");
+	}
+
+	/**
+	 * 修改状态
+	 *
+	 * @param id    主键
+	 * @param stage 状态
+	 * @return 结果
+	 */
+	@PostMapping(value = "/targetStart")
+	public R targetStart(@RequestParam(value = "id") String id,
+						 @RequestParam(value = "stage") String stage) {
+		try {
+			EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment = evaluationDeptBusinessAssessmentService.getById(id);
+			evaluationDeptBusinessAssessment.setStage(stage);
+			boolean b = evaluationDeptBusinessAssessmentService.updateById(evaluationDeptBusinessAssessment);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error("失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+	/**
 	 * 生成报表
 	 *
 	 * @return 结果
@@ -138,7 +218,7 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	public R statisticalSummary(@RequestParam(value = "year") String year) {
 		Map<String, List<EvaluationDeptBusinessAssessmentDTO>> map = new HashMap<>();
 		List<EvaluationDeptBusinessAssessment> evaluationDeptBusinessAssessmentList = evaluationDeptBusinessAssessmentService.selectEvaluationDeptBusinessAssessmentByYear(year);
-		if ("2023".equals(year)) {
+		if (evaluationDeptBusinessAssessmentList.size() == 1) {
 			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
 			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
 			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
@@ -192,7 +272,7 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 		Map<String, Object> dataMap = new HashMap<>();
 		List<EvaluationDeptBusinessAssessment> evaluationDeptBusinessAssessmentList = evaluationDeptBusinessAssessmentService.selectEvaluationDeptBusinessAssessmentByYear(year);
 		List<DeptDTO> deptList = new ArrayList<>();
-		if ("2023".equals(year)) {
+		if (evaluationDeptBusinessAssessmentList.size() == 1) {
 			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
 			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
 			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
@@ -225,6 +305,47 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	}
 
 	/**
+	 * 校验审核状态
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	@GetMapping(value = "/checkAuditStatus/{id}/{deptId}")
+	public R checkAuditStatus(@PathVariable String id, @PathVariable String deptId) {
+		boolean b = true;
+		String msg = "";
+		QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(EvaluationDeptBusinessContent::getBusinessPlanId, id);
+		}
+		List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.list(qw);
+		if ("23031009".equals(deptId)) {//组织人事部
+			for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
+				if (!"0".equals(evaluationDeptBusinessContent.getAuditStatusKp())) {
+					b = false;
+					msg = "数据审核状态未通过!";
+					break;
+				}
+			}
+		} else {
+			for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
+				if (evaluationDeptBusinessContent.getDeptId().equals(deptId)) {
+					if (!"0".equals(evaluationDeptBusinessContent.getAuditStatusKp())) {
+						b = false;
+						msg = "数据审核状态未通过,请联系相关部门进行审核!";
+						break;
+					}
+				}
+			}
+		}
+		if (b) {
+			return R.ok().data(b);
+		} else {
+			return R.error(msg);
+		}
+	}
+
+	/**
 	 * 下载报表
 	 *
 	 * @param request    request
@@ -274,125 +395,4 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 			}
 		}
 	}
-
-	/**
-	 * 修改状态
-	 *
-	 * @param id    主键
-	 * @param stage 状态
-	 * @return 结果
-	 */
-	@PostMapping(value = "/targetStart")
-	public R targetStart(@RequestParam(value = "id") String id,
-						 @RequestParam(value = "stage") String stage) {
-		try {
-			EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment = evaluationDeptBusinessAssessmentService.getById(id);
-			evaluationDeptBusinessAssessment.setStage(stage);
-			boolean b = evaluationDeptBusinessAssessmentService.updateById(evaluationDeptBusinessAssessment);
-			if (b) {
-				return R.ok().data(b);
-			} else {
-				return R.error("失败!");
-			}
-		} catch (CustomException e) {
-			return R.customError(e.getMessage()).data("失败!");
-		}
-	}
-
-	/**
-	 * 详情-头部信息
-	 *
-	 * @param id 业务主键
-	 * @return 结果
-	 */
-	@GetMapping(value = "/detailsHead/{id}")
-	public R detailsHead(@PathVariable("id") String id) {
-		EvaluationDeptBusinessAssessment evaluationDeptBusinessAssessment = evaluationDeptBusinessAssessmentService.getById(id);
-		return R.ok().data(evaluationDeptBusinessAssessment);
-	}
-
-	/**
-	 * 导入
-	 *
-	 * @param file 文件
-	 * @return 结果
-	 */
-	@PostMapping(value = "/import")
-	public R importData(@RequestParam("file") MultipartFile file, @RequestParam("id") String id) {
-		if (!file.isEmpty()) {
-			try {
-				//获取原始的文件名
-				String originalFilename = file.getOriginalFilename();
-				//获取文件类型
-				String fileType = originalFilename.substring(originalFilename.lastIndexOf(".") + 1, originalFilename.length());
-				//默认从第一行开始读取
-				int startRows = 1;
-				//获取输入流
-				InputStream is = file.getInputStream();
-				List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = new ArrayList<>();
-				//Excel导入导出的单元类
-				List<String[]> strings = ExcelUtil.readData(fileType, startRows, true, is);
-				//遍历Excel表每一行的数据
-				for (String[] str : strings) {
-					EvaluationDeptBusinessContent evaluationDeptBusinessContent = new EvaluationDeptBusinessContent();
-					evaluationDeptBusinessContent.setBusinessPlanId(id);
-					evaluationDeptBusinessContent.setTargetName(str[3]);
-					evaluationDeptBusinessContent.setCompletionStatus(str[6]);
-					evaluationDeptBusinessContent.setEvaluationScore(str[8]);
-					evaluationDeptBusinessContentList.add(evaluationDeptBusinessContent);
-				}
-				boolean b = evaluationDeptBusinessContentService.importAssessmentDataList(evaluationDeptBusinessContentList);
-				if (b) {
-					return R.ok().data(b);
-				} else {
-					return R.error("导入失败!");
-				}
-			} catch (Exception e) {
-				log.error("错误", e);
-				return R.customError(e.getMessage()).data("失败!");
-			}
-		}
-		return R.error("上传文件为空!");
-	}
-
-	/**
-	 * 校验审核状态
-	 *
-	 * @param id 主键
-	 * @return 结果
-	 */
-	@GetMapping(value = "/checkAuditStatus/{id}/{deptId}")
-	public R checkAuditStatus(@PathVariable String id, @PathVariable String deptId) {
-		boolean b = true;
-		String msg = "";
-		QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
-		if (StringUtils.isNotEmpty(id)) {
-			qw.lambda().eq(EvaluationDeptBusinessContent::getBusinessPlanId, id);
-		}
-		List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList = evaluationDeptBusinessContentService.list(qw);
-		if ("23031009".equals(deptId)) {//组织人事部
-			for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
-				if (!"0".equals(evaluationDeptBusinessContent.getAuditStatusKp())) {
-					b = false;
-					msg = "数据审核状态未通过!";
-					break;
-				}
-			}
-		} else {
-			for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
-				if (evaluationDeptBusinessContent.getDeptId().equals(deptId)) {
-					if (!"0".equals(evaluationDeptBusinessContent.getAuditStatusKp())) {
-						b = false;
-						msg = "数据审核状态未通过,请联系相关部门进行审核!";
-						break;
-					}
-				}
-			}
-		}
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error(msg);
-		}
-	}
 }

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

@@ -20,10 +20,10 @@ import com.ims.eval.service.IEvaluationDeptService;
 import com.ims.eval.util.ExcelUtil;
 import com.ims.eval.util.WordUtil;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
@@ -41,19 +41,19 @@ import java.util.*;
 @RequestMapping("//evaluation-dept-plan")
 public class DepartmentalPerformanceIndicatorPlanController {
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptBusinessPlanService evaluationDeptBusinessPlanService;
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptBusinessContentService evaluationDeptBusinessContentService;
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptService evaluationDeptService;
 
-	@Autowired
+	@Resource
 	private HttpServletRequest request;
 
-	@Autowired
+	@Resource
 	private RemoteServiceBuilder remoteServiceBuilder;
 
 	/**
@@ -444,7 +444,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 	public R statisticalSummary(@RequestParam(value = "year") String year) {
 		List<EvaluationDeptBusinessPlanDTO> dtoList = new ArrayList<>();
 		List<EvaluationDeptBusinessPlan> evaluationDeptBusinessPlanList = evaluationDeptBusinessPlanService.selectEvaluationDeptBusinessPlanByYear(year);
-		if ("2023".equals(year)) {
+		if (evaluationDeptBusinessPlanList.size() == 1) {
 			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
 			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
 			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);
@@ -492,7 +492,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 		Map<String, Object> dataMap = new HashMap<>();
 		List<EvaluationDeptBusinessPlan> evaluationDeptBusinessPlanList = evaluationDeptBusinessPlanService.selectEvaluationDeptBusinessPlanByYear(year);
 		List<DeptDTO> deptList = new ArrayList<>();
-		if ("2023".equals(year)) {
+		if (evaluationDeptBusinessPlanList.size() == 1) {
 			QueryWrapper<EvaluationDept> qw = new QueryWrapper<>();
 			qw.lambda().eq(EvaluationDept::getYjzbjhType, "1");
 			qw.lambda().orderByAsc(EvaluationDept::getSerialNumber);

+ 13 - 10
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptAssessmentDeclarationController.java

@@ -13,7 +13,10 @@ import com.ims.eval.entity.DeptAssessmentDeclaration;
 import com.ims.eval.entity.DeptAssessmentDeclarationComplete;
 import com.ims.eval.entity.DeptAssessmentDeclarationContent;
 import com.ims.eval.entity.EvaluationDept;
-import com.ims.eval.entity.dto.request.*;
+import com.ims.eval.entity.dto.request.EmployeeDTO;
+import com.ims.eval.entity.dto.request.PostDTO;
+import com.ims.eval.entity.dto.request.PostUserDTO;
+import com.ims.eval.entity.dto.request.SummaryInformationDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.*;
 import com.ims.eval.service.custom.PostService;
@@ -21,10 +24,10 @@ import com.ims.eval.service.custom.PostUserService;
 import com.ims.eval.util.ExcelUtil;
 import com.ims.eval.util.ExcelUtils;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.InputStream;
@@ -44,28 +47,28 @@ import java.util.stream.Collectors;
 @RequestMapping("//evaluation-dept-ad")
 public class DeptAssessmentDeclarationController {
 
-	@Autowired
+	@Resource
 	private IDeptAssessmentDeclarationService deptAssessmentDeclarationService;
 
-	@Autowired
+	@Resource
 	private IDeptAssessmentDeclarationContentService deptAssessmentDeclarationContentService;
 
-	@Autowired
+	@Resource
 	private IDeptAssessmentDeclarationCompleteService deptAssessmentDeclarationCompleteService;
 
-	@Autowired
+	@Resource
 	private IEvaluationDeptService evaluationDeptService;
 
-	@Autowired
+	@Resource
 	private IUserService userService;
 
-	@Autowired
+	@Resource
 	private PostService postService;
 
-	@Autowired
+	@Resource
 	private PostUserService postUserService;
 
-	@Autowired
+	@Resource
 	private HttpServletRequest request;
 
 	/**

+ 5 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationRevisionController.java

@@ -12,13 +12,13 @@ import com.ims.eval.service.IEvaluationRevisionService;
 import com.ims.eval.service.IOrganizationEvaluationRuleService;
 import com.ims.eval.service.IResponsibilityIndicatorInfoService;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.Calendar;
@@ -37,16 +37,16 @@ import java.util.Map;
 @RequestMapping("//evaluation-revision")
 public class EvaluationRevisionController {
 
-	@Autowired
+	@Resource
 	private IEvaluationRevisionService evaluationRevisionService;
 
-	@Autowired
+	@Resource
 	private IOrganizationEvaluationRuleService organizationEvaluationRuleService;
 
-	@Autowired
+	@Resource
 	private IResponsibilityIndicatorInfoService responsibilityIndicatorInfoService;
 
-	@Autowired
+	@Resource
 	private HttpServletRequest request;
 
 	/**

+ 3 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/controller/NoticeManagementController.java

@@ -8,10 +8,10 @@ import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.EvaluationNotice;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IEvaluationNoticeService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.util.Arrays;
@@ -29,10 +29,10 @@ import java.util.List;
 @RequestMapping("//evaluation-dept-notice")
 public class NoticeManagementController {
 
-	@Autowired
+	@Resource
 	private IEvaluationNoticeService evaluationNoticeService;
 
-	@Autowired
+	@Resource
 	HttpServletRequest request;
 
 	/**