Browse Source

考评规则

wangchangsheng 2 years ago
parent
commit
9771e04d86
35 changed files with 1571 additions and 96 deletions
  1. 12 7
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/DataDictionaryController.java
  2. 19 13
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluateRuleController.java
  3. 94 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluateRuleInfoController.java
  4. 41 6
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorController.java
  5. 11 6
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorDictionaryController.java
  6. 141 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationRuleController.java
  7. 55 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationStructureController.java
  8. 146 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/PersonnelEvaluationRuleController.java
  9. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluateRuleInfoMapper.java
  10. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationEvaluationRuleMapper.java
  11. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationStructureMapper.java
  12. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/PersonnelEvaluationRuleMapper.java
  13. 26 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/CustomException.java
  14. 7 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/R.java
  15. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/ResultCode.java
  16. 6 21
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/Status.java
  17. 13 23
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluateRule.java
  18. 70 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluateRuleInfo.java
  19. 111 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/OrganizationEvaluationRule.java
  20. 106 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/OrganizationStructure.java
  21. 132 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/PersonnelEvaluationRule.java
  22. 20 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluateRuleInfoService.java
  23. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluateRuleService.java
  24. 3 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IIndicatorService.java
  25. 23 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationRuleService.java
  26. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationStructureService.java
  27. 25 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IPersonnelEvaluationRuleService.java
  28. 5 4
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DataDictionaryServiceImpl.java
  29. 77 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleInfoServiceImpl.java
  30. 13 9
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleServiceImpl.java
  31. 4 3
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java
  32. 43 3
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorServiceImpl.java
  33. 122 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationRuleServiceImpl.java
  34. 20 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationStructureServiceImpl.java
  35. 144 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/PersonnelEvaluationRuleServiceImpl.java

+ 12 - 7
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DataDictionaryController.java

@@ -2,6 +2,7 @@ package com.ims.eval.controller;
 
 
 import com.ims.eval.cache.CacheContext;
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.dao.result.R;
 import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.service.IDataDictionaryService;
@@ -62,12 +63,16 @@ public class DataDictionaryController {
 	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
 	public R addAll(@RequestBody DataDictionary dictionary) {
 
-		boolean b = dataDictionaryService.saveOrUpdate(dictionary);
-		if (b) {
-			cache.initDataDictionary();
-			return R.ok().data(b);
-		} else {
-			return R.error().data("保存失败!");
+		try {
+			boolean b = dataDictionaryService.saveOrUpdate(dictionary);
+			if (b) {
+				cache.initDataDictionary();
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -79,7 +84,7 @@ public class DataDictionaryController {
 	 * @return
 	 */
 	//@ImsPreAuth("eval:dataDictionary:remove")
-	@DeleteMapping(value = "/remove/{ids}")
+	@PostMapping(value = "/remove/{ids}")
 	@ApiOperation(value = "删除", notes = "删除")
 	public R deleteAll(@PathVariable("ids") String ids) {
 		String[] strings = ids.split(",");

+ 19 - 13
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluateRuleController.java

@@ -2,12 +2,14 @@ package com.ims.eval.controller;
 
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.dao.result.R;
 import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.entity.EvaluateRule;
 import com.ims.eval.entity.Indicator;
 import com.ims.eval.service.IEvaluateRuleService;
 import io.swagger.annotations.ApiOperation;
+import oracle.jdbc.proxy.annotation.Post;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -33,10 +35,10 @@ public class EvaluateRuleController {
 	/**
 	 * 查询 list
 	 *
-	 * @param id             主键
-	 * @param des            描述
-	 * @param indicatorId    指标ID
-	 * @param evaluateMethod 评分方式
+	 * @param id         主键
+	 * @param des        描述
+	 * @param binSection 业务版块
+	 * @param binStage   业务阶段
 	 * @return
 	 */
 	//@ImsPreAuth("eval:dataDictionary:view")
@@ -45,9 +47,9 @@ public class EvaluateRuleController {
 				  @RequestParam(value = "pageSize") Integer pageSize,
 				  @RequestParam(value = "id", required = false) String id,
 				  @RequestParam(value = "des", required = false) String des,
-				  @RequestParam(value = "indicatorId", required = false) String indicatorId,
-				  @RequestParam(value = "evaluateMethod", required = false) String evaluateMethod) {
-		IPage<EvaluateRule> list = evaluateRuleService.list(pageNum, pageSize, id, des, indicatorId, evaluateMethod);
+				  @RequestParam(value = "binSection", required = false) String binSection,
+				  @RequestParam(value = "binStage", required = false) String binStage) {
+		IPage<EvaluateRule> list = evaluateRuleService.list(pageNum, pageSize, id, des, binSection, binStage);
 		return R.ok().data(list);
 	}
 
@@ -64,11 +66,15 @@ public class EvaluateRuleController {
 	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
 	public R addAll(@RequestBody EvaluateRule evaluateRule) {
 
-		boolean b = evaluateRuleService.saveOrUpdate(evaluateRule);
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("保存失败!");
+		try {
+			boolean b = evaluateRuleService.saveOrUpdate(evaluateRule);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -80,7 +86,7 @@ public class EvaluateRuleController {
 	 * @return
 	 */
 	//@ImsPreAuth("eval:dataDictionary:remove")
-	@DeleteMapping(value = "/remove/{ids}")
+	@PostMapping(value = "/remove/{ids}")
 	@ApiOperation(value = "删除", notes = "删除")
 	public R deleteAll(@PathVariable("ids") String ids) {
 		String[] strings = ids.split(",");

+ 94 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluateRuleInfoController.java

@@ -0,0 +1,94 @@
+package com.ims.eval.controller;
+
+
+import com.ims.eval.dao.result.CustomException;
+import com.ims.eval.dao.result.R;
+import com.ims.eval.entity.EvaluateRuleInfo;
+import com.ims.eval.service.IEvaluateRuleInfoService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p>
+ * 考评规则信息 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-02-28
+ */
+@RestController
+@RequestMapping("//evaluate-rule-info")
+public class EvaluateRuleInfoController {
+
+
+	@Autowired
+	private IEvaluateRuleInfoService evaluateRuleInfoService;
+
+	/**
+	 * 查询 list
+	 *
+	 * @param id          主键
+	 * @param des         描述
+	 * @param indicatorId 指标ID
+	 * @return
+	 */
+	//@ImsPreAuth("eval:dataDictionary:view")
+	@GetMapping(value = "list")
+	public R list(@RequestParam(value = "id", required = false) String id,
+				  @RequestParam(value = "des", required = false) String des,
+				  @RequestParam(value = "indicatorId", required = false) String indicatorId,
+				  @RequestParam(value = "evaluateRuleId", required = false) String evaluateRuleId) {
+		List<EvaluateRuleInfo> list = evaluateRuleInfoService.list(id, des, indicatorId, evaluateRuleId);
+		return R.ok().data(list);
+	}
+
+
+	/**
+	 * 添加
+	 *
+	 * @param evaluateRuleInfo
+	 * @return
+	 */
+
+	//@ImsPreAuth("eval:dataDictionary:edit")
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody EvaluateRuleInfo evaluateRuleInfo) {
+
+		try {
+			boolean b = evaluateRuleInfoService.saveOrUpdate(evaluateRuleInfo);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	//@ImsPreAuth("eval:dataDictionary:remove")
+	@PostMapping(value = "/remove/{ids}")
+	@ApiOperation(value = "删除", notes = "删除")
+	public R deleteAll(@PathVariable("ids") String ids) {
+		String[] strings = ids.split(",");
+		boolean b = evaluateRuleInfoService.removeByIds(Arrays.asList(strings));
+		if (b) {
+			return R.ok().data(b);
+		} else {
+			return R.error().data("删除失败!");
+		}
+	}
+
+}

+ 41 - 6
ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorController.java

@@ -2,6 +2,7 @@ package com.ims.eval.controller;
 
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.dao.result.R;
 import com.ims.eval.entity.Indicator;
 import com.ims.eval.service.IIndicatorService;
@@ -10,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
+import java.util.List;
 
 /**
  * <p>
@@ -29,6 +31,8 @@ public class IndicatorController {
 
 
 	/**
+	 * 查询分页数据
+	 *
 	 * @param id            主键ID
 	 * @param indicatorName 指标名称
 	 * @param indicatorCede 指标编码
@@ -53,6 +57,33 @@ public class IndicatorController {
 		return R.ok().data(list);
 	}
 
+
+	/**
+	 * 查询所有数据
+	 *
+	 * @param id            主键ID
+	 * @param indicatorName 指标名称
+	 * @param indicatorCede 指标编码
+	 * @param binSection    业务版块
+	 * @param binStage      业务阶段
+	 * @param dept          部门
+	 * @param company       公司
+	 * @return
+	 */
+	//@ImsPreAuth("eval:dataDictionary:view")
+	@GetMapping(value = "listAll")
+	public R listAll(
+		@RequestParam(value = "id", required = false) String id,
+		@RequestParam(value = "indicatorName", required = false) String indicatorName,
+		@RequestParam(value = "indicatorCede", required = false) String indicatorCede,
+		@RequestParam(value = "binSection", required = false) String binSection,
+		@RequestParam(value = "binStage", required = false) String binStage,
+		@RequestParam(value = "dept", required = false) String dept,
+		@RequestParam(value = "company", required = false) String company) {
+		List<Indicator> list = iIndicatorService.listAll(id, indicatorName, indicatorCede, binSection, binStage, dept, company);
+		return R.ok().data(list);
+	}
+
 	/**
 	 * 添加
 	 *
@@ -65,11 +96,15 @@ public class IndicatorController {
 	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
 	public R addAll(@RequestBody Indicator indicator) {
 
-		boolean b = iIndicatorService.saveOrUpdate(indicator);
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("保存失败!");
+		try {
+			boolean b = iIndicatorService.saveOrUpdate(indicator);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -81,7 +116,7 @@ public class IndicatorController {
 	 * @return
 	 */
 	//@ImsPreAuth("eval:dataDictionary:remove")
-	@DeleteMapping(value = "/remove/{ids}")
+	@PostMapping(value = "/remove/{ids}")
 	@ApiOperation(value = "删除", notes = "删除")
 	public R deleteAll(@PathVariable("ids") String ids) {
 		String[] strings = ids.split(",");

+ 11 - 6
ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorDictionaryController.java

@@ -1,6 +1,7 @@
 package com.ims.eval.controller;
 
 
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.dao.result.R;
 import com.ims.eval.entity.Indicator;
 import com.ims.eval.entity.IndicatorDictionary;
@@ -58,11 +59,15 @@ public class IndicatorDictionaryController {
 	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
 	public R addAll(@RequestBody IndicatorDictionary dictionary) {
 
-		boolean b = indicatorDictionaryService.saveOrUpdate(dictionary);
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("保存失败!");
+		try {
+			boolean b = indicatorDictionaryService.saveOrUpdate(dictionary);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -73,7 +78,7 @@ public class IndicatorDictionaryController {
 	 * @return
 	 */
 	//@ImsPreAuth("eval:dataDictionary:remove")
-	@DeleteMapping(value = "/remove/{ids}")
+	@PostMapping(value = "/remove/{ids}")
 	@ApiOperation(value = "删除", notes = "删除")
 	public R deleteAll(@PathVariable("ids") String ids) {
 		String[] strings = ids.split(",");

+ 141 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationRuleController.java

@@ -0,0 +1,141 @@
+package com.ims.eval.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.dao.result.CustomException;
+import com.ims.eval.dao.result.R;
+import com.ims.eval.entity.Indicator;
+import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.ims.eval.service.IIndicatorService;
+import com.ims.eval.service.IOrganizationEvaluationRuleService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p>
+ * 单位/部门考评配置 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@RestController
+@RequestMapping("//organization-evaluation-rule")
+public class OrganizationEvaluationRuleController {
+
+
+	@Autowired
+	private IOrganizationEvaluationRuleService organizationEvaluationRuleService;
+
+
+	/**
+	 * @param pageNum          当前页数
+	 * @param pageSize         当前页大小
+	 * @param id               主键
+	 * @param organizationName 考评组织名称
+	 * @param organizationId   考评组织ID
+	 * @param organizationType 考评类别
+	 * @param binSection       业务版块
+	 * @param binStage         业务阶段
+	 * @param evaluationCycle  考评周期
+	 * @param year             年
+	 * @param month            月
+	 * @return
+	 */
+	//@ImsPreAuth("eval:organizationEvaluationRule:view")
+	@GetMapping(value = "list")
+	public R list(@RequestParam(value = "pageNum") Integer pageNum,
+				  @RequestParam(value = "pageSize") Integer pageSize,
+				  @RequestParam(value = "id", required = false) String id,
+				  @RequestParam(value = "organizationName", required = false) String organizationName,
+				  @RequestParam(value = "organizationId", required = false) String organizationId,
+				  @RequestParam(value = "organizationType", required = false) String organizationType,
+				  @RequestParam(value = "binSection", required = false) String binSection,
+				  @RequestParam(value = "binStage", required = false) String binStage,
+				  @RequestParam(value = "evaluationCycle", required = false) String evaluationCycle,
+				  @RequestParam(value = "year", required = false) String year,
+				  @RequestParam(value = "month", required = false) String month) {
+		IPage<OrganizationEvaluationRule> list = organizationEvaluationRuleService.list(pageNum, pageSize, id, organizationName, organizationId, organizationType, binSection, binStage, evaluationCycle, year, month);
+		return R.ok().data(list);
+	}
+
+
+	/**
+	 * 查询所有数据
+	 *
+	 * @param id               主键
+	 * @param organizationName 考评组织名称
+	 * @param organizationId   考评组织ID
+	 * @param organizationType 考评类别
+	 * @param binSection       业务版块
+	 * @param binStage         业务阶段
+	 * @param evaluationCycle  考评周期
+	 * @param year             年
+	 * @param month            月
+	 * @return
+	 */
+	//@ImsPreAuth("eval:organizationEvaluationRule:view")
+	@GetMapping(value = "listAll")
+	public R listAll(
+		@RequestParam(value = "id", required = false) String id,
+		@RequestParam(value = "organizationName", required = false) String organizationName,
+		@RequestParam(value = "organizationId", required = false) String organizationId,
+		@RequestParam(value = "organizationType", required = false) String organizationType,
+		@RequestParam(value = "binSection", required = false) String binSection,
+		@RequestParam(value = "binStage", required = false) String binStage,
+		@RequestParam(value = "evaluationCycle", required = false) String evaluationCycle,
+		@RequestParam(value = "year", required = false) String year,
+		@RequestParam(value = "month", required = false) String month) {
+		List<OrganizationEvaluationRule> list = organizationEvaluationRuleService.listAll(id, organizationName, organizationId, organizationType, binSection, binStage, evaluationCycle, year, month);
+		return R.ok().data(list);
+	}
+
+	/**
+	 * 添加
+	 *
+	 * @param evaluationRule
+	 * @return
+	 */
+
+	//@ImsPreAuth("eval:organizationEvaluationRule:edit")
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody OrganizationEvaluationRule evaluationRule) {
+
+		try {
+			boolean b = organizationEvaluationRuleService.saveOrUpdate(evaluationRule);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	//@ImsPreAuth("eval:organizationEvaluationRule:remove")
+	@PostMapping(value = "/remove/{ids}")
+	@ApiOperation(value = "删除", notes = "删除")
+	public R deleteAll(@PathVariable("ids") String ids) {
+		String[] strings = ids.split(",");
+		boolean b = organizationEvaluationRuleService.removeByIds(Arrays.asList(strings));
+		if (b) {
+			return R.ok().data(b);
+		} else {
+			return R.error().data("删除失败!");
+		}
+	}
+
+}

+ 55 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationStructureController.java

@@ -0,0 +1,55 @@
+package com.ims.eval.controller;
+
+
+import com.ims.eval.dao.result.R;
+import com.ims.eval.entity.EvaluateRuleInfo;
+import com.ims.eval.entity.OrganizationStructure;
+import com.ims.eval.service.IOrganizationStructureService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@RestController
+@RequestMapping("//organization-structure")
+public class OrganizationStructureController {
+
+
+
+
+	@Autowired
+	private IOrganizationStructureService organizationStructureService;
+	/**
+	 * 添加
+	 *
+	 * @param evaluateRuleInfo
+	 * @return
+	 */
+
+	//@ImsPreAuth("eval:dataDictionary:edit")
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody List<OrganizationStructure> evaluateRuleInfo) {
+
+		boolean b = organizationStructureService.saveBatch(evaluateRuleInfo);
+		if (b) {
+			return R.ok().data(b);
+		} else {
+			return R.error().data("保存失败!");
+		}
+	}
+
+}

+ 146 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/PersonnelEvaluationRuleController.java

@@ -0,0 +1,146 @@
+package com.ims.eval.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.dao.result.CustomException;
+import com.ims.eval.dao.result.R;
+import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.ims.eval.entity.PersonnelEvaluationRule;
+import com.ims.eval.service.IOrganizationEvaluationRuleService;
+import com.ims.eval.service.IPersonnelEvaluationRuleService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p>
+ * 考评人员配置 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@RestController
+@RequestMapping("//personnel-evaluation-rule")
+public class PersonnelEvaluationRuleController {
+
+	@Autowired
+	private IPersonnelEvaluationRuleService personnelEvaluationRuleService;
+
+
+	/**
+	 * 分页查询
+	 *
+	 * @param pageNum         当前页数
+	 * @param pageSize        当前页大小
+	 * @param id              主键ID
+	 * @param personnelId     人员编码
+	 * @param personnelName   人员名称
+	 * @param companyId       所属共公司ID
+	 * @param companyName     所属公司名称
+	 * @param deptId          所属部门
+	 * @param position        所属部门名称
+	 * @param evaluationCycle 人员岗位
+	 * @param year            年
+	 * @param month           月
+	 * @return
+	 */
+	//@ImsPreAuth("eval:personnelEvaluationRule:view")
+	@GetMapping(value = "list")
+	public R list(@RequestParam(value = "pageNum") Integer pageNum,
+				  @RequestParam(value = "pageSize") Integer pageSize,
+				  @RequestParam(value = "id", required = false) String id,
+				  @RequestParam(value = "personnelId", required = false) String personnelId,
+				  @RequestParam(value = "personnelName", required = false) String personnelName,
+				  @RequestParam(value = "companyId", required = false) String companyId,
+				  @RequestParam(value = "companyName", required = false) String companyName,
+				  @RequestParam(value = "deptId", required = false) String deptId,
+				  @RequestParam(value = "position", required = false) String position,
+				  @RequestParam(value = "evaluationCycle", required = false) String evaluationCycle,
+				  @RequestParam(value = "year", required = false) String year,
+				  @RequestParam(value = "month", required = false) String month) {
+		IPage<PersonnelEvaluationRule> list = personnelEvaluationRuleService.list(pageNum, pageSize, id, personnelId, personnelName, companyId, companyName, deptId, position, evaluationCycle, year, month);
+		return R.ok().data(list);
+	}
+
+
+	/**
+	 * 查询所有数据
+	 *
+	 * @param id              主键ID
+	 * @param personnelId     人员编码
+	 * @param personnelName   人员名称
+	 * @param companyId       所属共公司ID
+	 * @param companyName     所属公司名称
+	 * @param deptId          所属部门
+	 * @param position        所属部门名称
+	 * @param evaluationCycle 人员岗位
+	 * @param year            年
+	 * @param month           月
+	 * @return
+	 */
+	//@ImsPreAuth("eval:personnelEvaluationRule:view")
+	@GetMapping(value = "listAll")
+	public R listAll(
+		@RequestParam(value = "id", required = false) String id,
+		@RequestParam(value = "personnelId", required = false) String personnelId,
+		@RequestParam(value = "personnelName", required = false) String personnelName,
+		@RequestParam(value = "companyId", required = false) String companyId,
+		@RequestParam(value = "companyName", required = false) String companyName,
+		@RequestParam(value = "deptId", required = false) String deptId,
+		@RequestParam(value = "position", required = false) String position,
+		@RequestParam(value = "evaluationCycle", required = false) String evaluationCycle,
+		@RequestParam(value = "year", required = false) String year,
+		@RequestParam(value = "month", required = false) String month) {
+		List<PersonnelEvaluationRule> list = personnelEvaluationRuleService.listAll(id, personnelId, personnelName, companyId, companyName, deptId, position, evaluationCycle, year, month);
+		return R.ok().data(list);
+	}
+
+	/**
+	 * 添加
+	 *
+	 * @param evaluationRule
+	 * @return
+	 */
+
+	//@ImsPreAuth("eval:personnelEvaluationRule:edit")
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody PersonnelEvaluationRule evaluationRule) {
+
+		try {
+			boolean b = personnelEvaluationRuleService.saveOrUpdate(evaluationRule);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	//@ImsPreAuth("eval:personnelEvaluationRule:remove")
+	@PostMapping(value = "/remove/{ids}")
+	@ApiOperation(value = "删除", notes = "删除")
+	public R deleteAll(@PathVariable("ids") String ids) {
+		String[] strings = ids.split(",");
+		boolean b = personnelEvaluationRuleService.removeByIds(Arrays.asList(strings));
+		if (b) {
+			return R.ok().data(b);
+		} else {
+			return R.error().data("删除失败!");
+		}
+	}
+
+}

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluateRuleInfoMapper.java

@@ -0,0 +1,16 @@
+package com.ims.eval.dao;
+
+import com.ims.eval.entity.EvaluateRuleInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 考评规则信息 Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2023-02-28
+ */
+public interface EvaluateRuleInfoMapper extends BaseMapper<EvaluateRuleInfo> {
+
+}

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationEvaluationRuleMapper.java

@@ -0,0 +1,16 @@
+package com.ims.eval.dao;
+
+import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 单位/部门考评配置 Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+public interface OrganizationEvaluationRuleMapper extends BaseMapper<OrganizationEvaluationRule> {
+
+}

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationStructureMapper.java

@@ -0,0 +1,16 @@
+package com.ims.eval.dao;
+
+import com.ims.eval.entity.OrganizationStructure;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+public interface OrganizationStructureMapper extends BaseMapper<OrganizationStructure> {
+
+}

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/PersonnelEvaluationRuleMapper.java

@@ -0,0 +1,16 @@
+package com.ims.eval.dao;
+
+import com.ims.eval.entity.PersonnelEvaluationRule;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+public interface PersonnelEvaluationRuleMapper extends BaseMapper<PersonnelEvaluationRule> {
+
+}

+ 26 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/CustomException.java

@@ -0,0 +1,26 @@
+package com.ims.eval.dao.result;
+
+import org.springframework.stereotype.Component;
+
+@Component
+public class CustomException extends RuntimeException{
+
+	public CustomException() {
+	}
+
+	public CustomException(String message) {
+		super(message);
+	}
+
+	public CustomException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public CustomException(Throwable cause) {
+		super(cause);
+	}
+
+	public CustomException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+		super(message, cause, enableSuppression, writableStackTrace);
+	}
+}

+ 7 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/R.java

@@ -44,6 +44,13 @@ public class R {
         r.setMessage("失败");
         return r;
     }
+	public static R customError(String msg){
+		R r = new R();
+		r.setSuccess(false);
+		r.setCode(ResultCode.CUSTOMERROR);
+		r.setMessage(msg);
+		return r;
+	}
     public R success(Boolean success){
         this.setSuccess(success);
         return this;

+ 1 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/ResultCode.java

@@ -9,4 +9,5 @@ package com.ims.eval.dao.result;
 public class ResultCode {
     public static Integer SUCCESS = 200;
     public static Integer ERROR = 500;
+	public static Integer CUSTOMERROR = 200;
 }

+ 6 - 21
ims-service/ims-eval/src/main/java/com/ims/eval/dao/result/Status.java

@@ -2,32 +2,17 @@ package com.ims.eval.dao.result;
 /**
  *@ClassName Status
  *@Description 枚举类对象
- *@Author 谢生杰
+ *@Author wang
  *@Date 2020/9/25 18:54
  *@Version 1.0
  **/
 public enum Status {
     // 公共
-    SUCCESS(2000, "成功"),
-    UNKNOWN_ERROR(9998,"未知异常"),
-    SYSTEM_ERROR(9999, "系统异常"),
-
-
-    INSUFFICIENT_PERMISSION(4003, "权限不足"),
-
-    WARN(9000, "失败"),
-    REQUEST_PARAMETER_ERROR(1002, "请求参数错误"),
-
-
-
-    // 登录
-    LOGIN_EXPIRE(2001, "未登录或者登录失效"),
-    LOGIN_CODE_ERROR(2002, "登录验证码错误"),
-    LOGIN_ERROR(2003, "用户名不存在或密码错误"),
-    LOGIN_USER_STATUS_ERROR(2004, "用户状态不正确"),
-    LOGOUT_ERROR(2005, "退出失败,token不存在"),
-    LOGIN_USER_NOT_EXIST(2006, "该用户不存在"),
-    LOGIN_USER_EXIST(2007, "该用户已存在");
+    SUCCESS(200, "成功"),
+    UNKNOWN_ERROR(500,"未知异常"),
+    SYSTEM_ERROR(5001, "系统异常"),
+    INSUFFICIENT_PERMISSION(5002, "权限不足"),
+    REQUEST_PARAMETER_ERROR(5003, "请求参数错误");
 
 
 

+ 13 - 23
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluateRule.java

@@ -1,8 +1,8 @@
 package com.ims.eval.entity;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-
 import java.util.Date;
+
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode;
  * </p>
  *
  * @author wang
- * @since 2023-02-27
+ * @since 2023-02-28
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -26,34 +26,19 @@ public class EvaluateRule extends Model {
     private String id;
 
     /**
-     * 描述
-     */
-    private String des;
-
-    /**
-     * 指标ID
-     */
-    private String indicatorId;
-
-    /**
-     * 指标总分
+     * 业务版块
      */
-    private double totalScore;
+    private String binSection;
 
     /**
-     * 评分方式
+     * 业务阶段
      */
-    private String evaluateMethod;
+    private String binStage;
 
     /**
-     * 评分公式
-     */
-    private String evaluateFormula;
-
-    /**
-     * 隐射函数
+     * 描述
      */
-    private String mappingFunction;
+    private String des;
 
     /**
      * 创建时间
@@ -75,5 +60,10 @@ public class EvaluateRule extends Model {
      */
     private String updateBy;
 
+    /**
+     * 是否启用
+     */
+    private Boolean enable;
+
 
 }

+ 70 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluateRuleInfo.java

@@ -0,0 +1,70 @@
+package com.ims.eval.entity;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 考评规则信息
+ * </p>
+ *
+ * @author wang
+ * @since 2023-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EvaluateRuleInfo extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 指标ID
+     */
+    private String indicatorId;
+
+
+	/**
+	 * 考评规则ID
+	 */
+	private String evaluateRuleId;
+
+    /**
+     * 描述
+     */
+    private String des;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+	/**
+	 * 排列顺序
+	 */
+	private Integer orderNum;
+
+
+}

+ 111 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/OrganizationEvaluationRule.java

@@ -0,0 +1,111 @@
+package com.ims.eval.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 单位/部门考评配置
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrganizationEvaluationRule extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     * 考评组织名称
+     */
+    private String organizationName;
+
+    /**
+     * 考评组织ID
+     */
+    private String organizationId;
+
+    /**
+     * 考评类别
+     */
+    private String organizationType;
+
+    /**
+     * 业务版块
+     */
+    private String binSection;
+
+    /**
+     * 业务阶段
+     */
+    private String binStage;
+
+    /**
+     * 考评周期
+     */
+    private String evaluationCycle;
+
+    /**
+     * 考评规则ID
+     */
+    private String evaluateRuleId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 删除标记(0 为未删除,1 为已删除)
+
+     */
+    private String delFlag;
+
+    /**
+     * 是否考核(0;未考核;1:以考核)
+     */
+    private String isCheck;
+
+    /**
+     * 排序
+     */
+    private Integer orderNum;
+
+	/**
+	 * 年
+	 */
+	private String year;
+	/**
+	 * 月
+	 */
+	private String month;
+
+
+}

+ 106 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/OrganizationStructure.java

@@ -0,0 +1,106 @@
+package com.ims.eval.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrganizationStructure extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String address;
+
+    private String businessType;
+
+    private String createBy;
+
+    private Date createDate;
+
+    private String dbName;
+
+    private String delFlag;
+
+    private String isBm;
+
+    private String isMarket;
+
+    private String isNewRecord;
+
+    private String name;
+
+    private String parentId;
+
+    private String parentIds;
+
+    private String phone;
+
+    private String shortName;
+
+    private String type;
+
+    private String updateBy;
+
+    private Date updateDate;
+
+    private String useable;
+
+    private String zipCode;
+
+    private String classId;
+
+    private String classId2;
+
+    private String code;
+
+    private String deputyPerson;
+
+    private String email;
+
+    private String fax;
+
+    private String grade;
+
+    private String isExtOrg;
+
+    private String lat;
+
+    private String lng;
+
+    private String mapName;
+
+    private String master;
+
+    private String nativeNo;
+
+    private String orgCode;
+
+    private String primaryPerson;
+
+    private String remarks;
+
+    private String siteId;
+
+    private Integer sort;
+
+    private String star;
+
+    private String status;
+
+
+}

+ 132 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/PersonnelEvaluationRule.java

@@ -0,0 +1,132 @@
+package com.ims.eval.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PersonnelEvaluationRule extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     * 人员编码
+     */
+    private String personnelId;
+
+    /**
+     * 人员名称
+     */
+    private String personnelName;
+
+    /**
+     * 所属共公司ID
+     */
+    private String companyId;
+
+    /**
+     * 所属公司名称
+     */
+    private String companyName;
+
+    /**
+     * 所属部门
+     */
+    private String deptId;
+
+    /**
+     * 所属部门名称
+     */
+    private String deptName;
+
+    /**
+     * 人员岗位
+     */
+    private String position;
+
+    /**
+     * 人员职称
+     */
+    private String rank;
+
+    /**
+     * 考评周期
+     */
+    private String evaluationCycle;
+
+    /**
+     * 考评规则ID
+     */
+    private String evaluateRuleId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 删除标记(0 为未删除,1 为已删除)
+
+     */
+    private String delFlag;
+
+    /**
+     * 是否考核
+     */
+    private String isCheck;
+
+    /**
+     * 排序
+     */
+    private Integer orderNum;
+
+
+	/**
+	 * 等级
+	 */
+	private String evaluationLevel;
+
+	/**
+	 * 年
+	 */
+	private String year;
+	/**
+	 * 月
+	 */
+	private String month;
+
+
+}

+ 20 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluateRuleInfoService.java

@@ -0,0 +1,20 @@
+package com.ims.eval.service;
+
+import com.ims.eval.entity.EvaluateRuleInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 考评规则信息 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-02-28
+ */
+public interface IEvaluateRuleInfoService extends IService<EvaluateRuleInfo> {
+
+	List<EvaluateRuleInfo> list(String id, String des, String indicatorId,String evaluateRuleId);
+
+}

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluateRuleService.java

@@ -14,6 +14,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IEvaluateRuleService extends IService<EvaluateRule> {
 
-	IPage<EvaluateRule> list(Integer pageNum, Integer pageSize, String id, String des, String indicatorId, String evaluateMethod);
+	IPage<EvaluateRule> list(Integer pageNum, Integer pageSize, String id, String des, String binSection, String binStage);
 
 }

+ 3 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IIndicatorService.java

@@ -16,6 +16,9 @@ import java.util.List;
  */
 public interface IIndicatorService extends IService<Indicator> {
 
+
 	IPage<Indicator> list(Integer pageNum, Integer pageSize, String id, String indicatorName, String indicatorCede, String binSection, String binStage, String dept, String company);
 
+	List<Indicator> listAll(String id, String indicatorName, String indicatorCede, String binSection, String binStage, String dept, String company);
+
 }

+ 23 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationRuleService.java

@@ -0,0 +1,23 @@
+package com.ims.eval.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 单位/部门考评配置 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+public interface IOrganizationEvaluationRuleService extends IService<OrganizationEvaluationRule> {
+
+	IPage<OrganizationEvaluationRule> list( Integer pageNum, Integer pageSize, String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle,String year,String month);
+
+	List<OrganizationEvaluationRule> listAll( String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle,String year,String month);
+
+}

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationStructureService.java

@@ -0,0 +1,16 @@
+package com.ims.eval.service;
+
+import com.ims.eval.entity.OrganizationStructure;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+public interface IOrganizationStructureService extends IService<OrganizationStructure> {
+
+}

+ 25 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IPersonnelEvaluationRuleService.java

@@ -0,0 +1,25 @@
+package com.ims.eval.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.entity.PersonnelEvaluationRule;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+public interface IPersonnelEvaluationRuleService extends IService<PersonnelEvaluationRule> {
+
+	IPage<PersonnelEvaluationRule> list(Integer pageNum, Integer pageSize, String id, String personnelId, String personnelName, String companyId, String companyName, String deptId, String position, String evaluationCycle, String year, String month);
+
+
+	List<PersonnelEvaluationRule> listAll(String id, String personnelId, String personnelName, String companyId, String companyName, String deptId, String position, String evaluationCycle, String year, String month);
+
+
+}

+ 5 - 4
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DataDictionaryServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.dao.DataDictionaryMapper;
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.entity.Indicator;
 import com.ims.eval.service.IDataDictionaryService;
@@ -55,14 +56,14 @@ public class DataDictionaryServiceImpl extends ServiceImpl<DataDictionaryMapper,
 		if (null != entity && (null == entity.getId() || "".equals(entity.getId().trim()))) {
 			QueryWrapper<DataDictionary> qw = new QueryWrapper<>();
 			qw.lambda().eq(DataDictionary::getDataKey, entity.getDataKey());
-			qw.lambda().eq(DataDictionary::getSuperKey, entity.getSuperKey());
 			List<DataDictionary> list = baseMapper.selectList(qw);
 			if (null != list && list.size() > 0) {
-				throw new RuntimeException("当前字典key已存在");
+				throw new CustomException("当前字典key已存在");
 			}
-			entity.setUpdateTime(new Date());
-		} else {
+
 			entity.setCreateTime(new Date());
+		} else {
+			entity.setUpdateTime(new Date());
 		}
 		return super.saveOrUpdate(entity);
 	}

+ 77 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleInfoServiceImpl.java

@@ -0,0 +1,77 @@
+package com.ims.eval.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ims.common.utils.StringUtils;
+import com.ims.eval.dao.result.CustomException;
+import com.ims.eval.entity.EvaluateRule;
+import com.ims.eval.entity.EvaluateRuleInfo;
+import com.ims.eval.dao.EvaluateRuleInfoMapper;
+import com.ims.eval.service.IEvaluateRuleInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.SneakyThrows;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 考评规则信息 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-02-28
+ */
+@Service
+public class EvaluateRuleInfoServiceImpl extends ServiceImpl<EvaluateRuleInfoMapper, EvaluateRuleInfo> implements IEvaluateRuleInfoService {
+
+	@Override
+	public List<EvaluateRuleInfo> list(String id, String des, String indicatorId,String evaluateRuleId) {
+
+		QueryWrapper<EvaluateRuleInfo> qw = new QueryWrapper<>();
+
+
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(EvaluateRuleInfo::getId, id);
+		}
+
+		if (StringUtils.isNotEmpty(des)) {
+			qw.lambda().like(EvaluateRuleInfo::getDes, des);
+		}
+
+		if (StringUtils.isNotEmpty(indicatorId)) {
+			qw.lambda().eq(EvaluateRuleInfo::getIndicatorId, indicatorId);
+		}
+		if (StringUtils.isNotEmpty(evaluateRuleId)) {
+			qw.lambda().eq(EvaluateRuleInfo::getEvaluateRuleId, evaluateRuleId);
+		}
+
+		qw.lambda().orderByAsc(EvaluateRuleInfo::getOrderNum);
+
+		List<EvaluateRuleInfo> list = baseMapper.selectList( qw);
+
+		return list;
+	}
+
+
+	@Override
+	public boolean saveOrUpdate(EvaluateRuleInfo entity) {
+
+		if (null != entity && (null == entity.getId() || "".equals(entity.getId().trim()))) {
+			QueryWrapper<EvaluateRuleInfo> qw = new QueryWrapper<>();
+			qw.lambda().eq(EvaluateRuleInfo::getEvaluateRuleId, entity.getEvaluateRuleId());
+			qw.lambda().eq(EvaluateRuleInfo::getIndicatorId, entity.getIndicatorId());
+			List<EvaluateRuleInfo> list = baseMapper.selectList(qw);
+			if (null != list && list.size() > 0) {
+				throw new CustomException("该指标已存在");
+			}
+			entity.setCreateTime(new Date());
+		} else {
+			entity.setUpdateTime(new Date());
+		}
+
+		return super.saveOrUpdate(entity);
+	}
+}

+ 13 - 9
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ims.common.utils.StringUtils;
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.entity.EvaluateRule;
 import com.ims.eval.dao.EvaluateRuleMapper;
 import com.ims.eval.entity.Indicator;
@@ -26,7 +27,7 @@ import java.util.List;
 public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, EvaluateRule> implements IEvaluateRuleService {
 
 	@Override
-	public IPage<EvaluateRule> list(Integer pageNum, Integer pageSize, String id, String des, String indicatorId, String evaluateMethod) {
+	public IPage<EvaluateRule> list(Integer pageNum, Integer pageSize, String id, String des, String binSection, String binStage) {
 
 		QueryWrapper<EvaluateRule> qw = new QueryWrapper<>();
 		if (null == pageNum || null == pageSize) {
@@ -44,12 +45,12 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 			qw.lambda().like(EvaluateRule::getDes, des);
 		}
 
-		if (StringUtils.isNotEmpty(indicatorId)) {
-			qw.lambda().like(EvaluateRule::getIndicatorId, indicatorId);
+		if (StringUtils.isNotEmpty(binSection)) {
+			qw.lambda().like(EvaluateRule::getBinSection, binSection);
 		}
 
-		if (StringUtils.isNotEmpty(evaluateMethod)) {
-			qw.lambda().eq(EvaluateRule::getEvaluateMethod, evaluateMethod);
+		if (StringUtils.isNotEmpty(binStage)) {
+			qw.lambda().eq(EvaluateRule::getBinStage, binStage);
 		}
 
 		qw.lambda().orderByAsc(EvaluateRule::getId);
@@ -64,14 +65,17 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 
 		if (null != entity && (null == entity.getId() || "".equals(entity.getId().trim()))) {
 			QueryWrapper<EvaluateRule> qw = new QueryWrapper<>();
-			qw.lambda().eq(EvaluateRule::getIndicatorId, entity.getIndicatorId());
+			qw.lambda().eq(EvaluateRule::getBinSection, entity.getBinSection());
+			qw.lambda().eq(EvaluateRule::getBinStage, entity.getBinStage());
+			qw.lambda().eq(EvaluateRule::getEnable, true);
 			List<EvaluateRule> list = baseMapper.selectList(qw);
 			if (null != list && list.size() > 0) {
-				throw new RuntimeException("当前指标评分规则已存在");
+				throw new CustomException("当前模块规则已存在,如若新增规则,请禁用已存在规则");
 			}
-			entity.setUpdateTime(new Date());
-		} else {
+
 			entity.setCreateTime(new Date());
+		} else {
+			entity.setUpdateTime(new Date());
 		}
 		return super.saveOrUpdate(entity);
 

+ 4 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.cache.CacheContext;
 import com.ims.eval.dao.IndicatorDictionaryMapper;
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.entity.IndicatorDictionary;
 import com.ims.eval.service.IIndicatorDictionaryService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -58,11 +59,11 @@ public class IndicatorDictionaryServiceImpl extends ServiceImpl<IndicatorDiction
 			qw.lambda().eq(IndicatorDictionary::getOptionCode, entity.getOptionCode());
 			List<IndicatorDictionary> list = baseMapper.selectList(qw);
 			if (null != list && list.size() > 0) {
-				throw new RuntimeException("当前属性code已存在");
+				throw new CustomException("当前属性code已存在");
 			}
-			entity.setUpdateTime(new Date());
-		} else {
 			entity.setCreateTime(new Date());
+		} else {
+			entity.setUpdateTime(new Date());
 		}
 		entity.setOptionName(null == CacheContext.ddNameMap.get(entity.getOptionCode()) ? "未知属性" : CacheContext.ddNameMap.get(entity.getOptionCode()));
 		return super.saveOrUpdate(entity);

+ 43 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.dao.IndicatorDictionaryMapper;
 import com.ims.eval.dao.IndicatorMapper;
+import com.ims.eval.dao.result.CustomException;
 import com.ims.eval.entity.Indicator;
 import com.ims.eval.entity.IndicatorDictionary;
 import com.ims.eval.service.IIndicatorService;
@@ -74,6 +75,44 @@ public class IndicatorServiceImpl extends ServiceImpl<IndicatorMapper, Indicator
 	}
 
 	@Override
+	public List<Indicator> listAll(String id, String indicatorName, String indicatorCede, String binSection, String binStage, String dept, String company) {
+		QueryWrapper<Indicator> qw = new QueryWrapper<>();
+
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(Indicator::getId, id);
+		}
+
+		if (StringUtils.isNotEmpty(indicatorName)) {
+			qw.lambda().like(Indicator::getIndicatorName, indicatorName);
+		}
+
+		if (StringUtils.isNotEmpty(indicatorCede)) {
+			qw.lambda().like(Indicator::getIndicatorCode, indicatorCede);
+		}
+
+		if (StringUtils.isNotEmpty(binSection)) {
+			qw.lambda().eq(Indicator::getBinSection, binSection);
+		}
+
+		if (StringUtils.isNotEmpty(binStage)) {
+			qw.lambda().eq(Indicator::getBinStage, binStage);
+		}
+
+		if (StringUtils.isNotEmpty(dept)) {
+			qw.lambda().eq(Indicator::getDept, dept);
+		}
+
+		if (StringUtils.isNotEmpty(company)) {
+			qw.lambda().eq(Indicator::getCompany, company);
+		}
+		qw.lambda().orderByAsc(Indicator::getOrderNum);
+
+		List<Indicator> list = baseMapper.selectList(qw);
+
+		return list;
+	}
+
+	@Override
 	public boolean saveOrUpdate(Indicator entity) {
 
 		if (null != entity && (null == entity.getId() || "".equals(entity.getId().trim()))) {
@@ -83,11 +122,12 @@ public class IndicatorServiceImpl extends ServiceImpl<IndicatorMapper, Indicator
 			qw.lambda().eq(Indicator::getBinStage, entity.getBinStage());
 			List<Indicator> list = baseMapper.selectList(qw);
 			if (null != list && list.size() > 0) {
-				throw new RuntimeException("当前指标code已存在");
+				throw new CustomException("当前指标code已存在");
 			}
-			entity.setUpdateTime(new Date());
-		} else {
+
 			entity.setCreateTime(new Date());
+		} else {
+			entity.setUpdateTime(new Date());
 		}
 		return super.saveOrUpdate(entity);
 

+ 122 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationRuleServiceImpl.java

@@ -0,0 +1,122 @@
+package com.ims.eval.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ims.common.utils.StringUtils;
+import com.ims.eval.entity.Indicator;
+import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.ims.eval.dao.OrganizationEvaluationRuleMapper;
+import com.ims.eval.service.IOrganizationEvaluationRuleService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 单位/部门考评配置 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@Service
+public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<OrganizationEvaluationRuleMapper, OrganizationEvaluationRule> implements IOrganizationEvaluationRuleService {
+
+	@Override
+	public IPage<OrganizationEvaluationRule> list(Integer pageNum, Integer pageSize, String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle, String year, String month) {
+		QueryWrapper<OrganizationEvaluationRule> qw = new QueryWrapper<>();
+		//构造分页构造器
+		Page<OrganizationEvaluationRule> page = new Page<>(pageNum, pageSize);
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getId, id);
+		}
+
+		if (StringUtils.isNotEmpty(organizationName)) {
+			qw.lambda().like(OrganizationEvaluationRule::getOrganizationName, organizationName);
+		}
+
+		if (StringUtils.isNotEmpty(organizationId)) {
+			qw.lambda().like(OrganizationEvaluationRule::getOrganizationId, organizationId);
+		}
+
+		if (StringUtils.isNotEmpty(organizationType)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getOrganizationType, organizationType);
+		}
+
+		if (StringUtils.isNotEmpty(binSection)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getBinSection, binSection);
+		}
+
+		if (StringUtils.isNotEmpty(binStage)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getBinStage, binStage);
+		}
+
+		if (StringUtils.isNotEmpty(evaluationCycle)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getEvaluationCycle, evaluationCycle);
+		}
+
+		if (StringUtils.isNotEmpty(year)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getYear, year);
+		}
+		if (StringUtils.isNotEmpty(month)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getMonth, month);
+		}
+		qw.lambda().orderByAsc(OrganizationEvaluationRule::getOrderNum);
+
+		IPage<OrganizationEvaluationRule> list = baseMapper.selectPage(page, qw);
+
+		return list;
+	}
+
+	@Override
+	public List<OrganizationEvaluationRule> listAll(String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle, String year, String month) {
+		QueryWrapper<OrganizationEvaluationRule> qw = new QueryWrapper<>();
+		//构造分页构造器
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getId, id);
+		}
+
+		if (StringUtils.isNotEmpty(organizationName)) {
+			qw.lambda().like(OrganizationEvaluationRule::getOrganizationName, organizationName);
+		}
+
+		if (StringUtils.isNotEmpty(organizationId)) {
+			qw.lambda().like(OrganizationEvaluationRule::getOrganizationId, organizationId);
+		}
+
+		if (StringUtils.isNotEmpty(organizationType)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getOrganizationType, organizationType);
+		}
+
+		if (StringUtils.isNotEmpty(binSection)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getBinSection, binSection);
+		}
+
+		if (StringUtils.isNotEmpty(binStage)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getBinStage, binStage);
+		}
+
+		if (StringUtils.isNotEmpty(evaluationCycle)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getEvaluationCycle, evaluationCycle);
+		}
+
+		if (StringUtils.isNotEmpty(year)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getYear, year);
+		}
+		if (StringUtils.isNotEmpty(month)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getMonth, month);
+		}
+		qw.lambda().orderByAsc(OrganizationEvaluationRule::getOrderNum);
+
+		List<OrganizationEvaluationRule> list = baseMapper.selectList(qw);
+
+		return list;
+	}
+
+	@Override
+	public boolean saveOrUpdate(OrganizationEvaluationRule entity) {
+		return super.saveOrUpdate(entity);
+	}
+}

+ 20 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationStructureServiceImpl.java

@@ -0,0 +1,20 @@
+package com.ims.eval.service.impl;
+
+import com.ims.eval.entity.OrganizationStructure;
+import com.ims.eval.dao.OrganizationStructureMapper;
+import com.ims.eval.service.IOrganizationStructureService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@Service
+public class OrganizationStructureServiceImpl extends ServiceImpl<OrganizationStructureMapper, OrganizationStructure> implements IOrganizationStructureService {
+
+}

+ 144 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/PersonnelEvaluationRuleServiceImpl.java

@@ -0,0 +1,144 @@
+package com.ims.eval.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ims.common.utils.StringUtils;
+import com.ims.eval.dao.result.CustomException;
+import com.ims.eval.entity.Indicator;
+import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.ims.eval.entity.PersonnelEvaluationRule;
+import com.ims.eval.dao.PersonnelEvaluationRuleMapper;
+import com.ims.eval.service.IPersonnelEvaluationRuleService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-01
+ */
+@Service
+public class PersonnelEvaluationRuleServiceImpl extends ServiceImpl<PersonnelEvaluationRuleMapper, PersonnelEvaluationRule> implements IPersonnelEvaluationRuleService {
+
+	@Override
+	public IPage<PersonnelEvaluationRule> list(Integer pageNum, Integer pageSize, String id, String personnelId, String personnelName, String companyId, String companyName, String deptId, String position, String evaluationCycle, String year, String month) {
+		QueryWrapper<PersonnelEvaluationRule> qw = new QueryWrapper<>();
+		//构造分页构造器
+		Page<PersonnelEvaluationRule> page = new Page<>(pageNum, pageSize);
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getId, id);
+		}
+
+		if (StringUtils.isNotEmpty(personnelId)) {
+			qw.lambda().like(PersonnelEvaluationRule::getPersonnelId, personnelId);
+		}
+
+		if (StringUtils.isNotEmpty(personnelName)) {
+			qw.lambda().like(PersonnelEvaluationRule::getPersonnelName, personnelName);
+		}
+
+		if (StringUtils.isNotEmpty(companyId)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getCompanyId, companyId);
+		}
+
+		if (StringUtils.isNotEmpty(companyName)) {
+			qw.lambda().like(PersonnelEvaluationRule::getCompanyName, companyName);
+		}
+
+		if (StringUtils.isNotEmpty(deptId)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getDeptId, deptId);
+		}
+
+		if (StringUtils.isNotEmpty(position)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getPosition, position);
+		}
+		if (StringUtils.isNotEmpty(evaluationCycle)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getEvaluationCycle, evaluationCycle);
+		}
+
+		if (StringUtils.isNotEmpty(year)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getYear, year);
+		}
+		if (StringUtils.isNotEmpty(month)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getMonth, month);
+		}
+		qw.lambda().orderByAsc(PersonnelEvaluationRule::getOrderNum);
+
+		IPage<PersonnelEvaluationRule> list = baseMapper.selectPage(page, qw);
+
+		return list;
+	}
+
+	@Override
+	public List<PersonnelEvaluationRule> listAll(String id, String personnelId, String personnelName, String companyId, String companyName, String deptId, String position, String evaluationCycle, String year, String month) {
+		QueryWrapper<PersonnelEvaluationRule> qw = new QueryWrapper<>();
+
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getId, id);
+		}
+
+		if (StringUtils.isNotEmpty(personnelId)) {
+			qw.lambda().like(PersonnelEvaluationRule::getPersonnelId, personnelId);
+		}
+
+		if (StringUtils.isNotEmpty(personnelName)) {
+			qw.lambda().like(PersonnelEvaluationRule::getPersonnelName, personnelName);
+		}
+
+		if (StringUtils.isNotEmpty(companyId)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getCompanyId, companyId);
+		}
+
+		if (StringUtils.isNotEmpty(companyName)) {
+			qw.lambda().like(PersonnelEvaluationRule::getCompanyName, companyName);
+		}
+
+		if (StringUtils.isNotEmpty(deptId)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getDeptId, deptId);
+		}
+
+		if (StringUtils.isNotEmpty(position)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getPosition, position);
+		}
+		if (StringUtils.isNotEmpty(evaluationCycle)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getEvaluationCycle, evaluationCycle);
+		}
+
+		if (StringUtils.isNotEmpty(year)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getYear, year);
+		}
+		if (StringUtils.isNotEmpty(month)) {
+			qw.lambda().eq(PersonnelEvaluationRule::getMonth, month);
+		}
+		qw.lambda().orderByAsc(PersonnelEvaluationRule::getOrderNum);
+
+		List<PersonnelEvaluationRule> list = baseMapper.selectList(qw);
+
+		return list;
+	}
+
+	@Override
+	public boolean saveOrUpdate(PersonnelEvaluationRule entity) {
+
+		if (null != entity && (null == entity.getId() || "".equals(entity.getId().trim()))) {
+			QueryWrapper<PersonnelEvaluationRule> qw = new QueryWrapper<>();
+			qw.lambda().eq(PersonnelEvaluationRule::getYear, entity.getYear());
+			List<PersonnelEvaluationRule> list = baseMapper.selectList(qw);
+			if (null != list && list.size() > 0) {
+				throw new CustomException("当前指标code已存在");
+			}
+			entity.setCreateTime(new Date());
+		} else {
+			entity.setUpdateTime(new Date());
+		}
+
+		return super.saveOrUpdate(entity);
+	}
+}