Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

wangchangsheng vor 1 Jahr
Ursprung
Commit
4ab1577039
32 geänderte Dateien mit 514 neuen und 130 gelöschten Zeilen
  1. 24 28
      ims-common/src/main/java/com/ims/common/utils/FormulaUtils.java
  2. 2 0
      ims-service/ims-eval/src/main/java/com/ims/eval/EvalApplication.java
  3. 111 2
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationRevisionController.java
  4. 5 3
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationWarningRuleController.java
  5. 0 4
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/NoticeManagementController.java
  6. 3 1
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluationWarningRuleMapper.java
  7. 6 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationEvaluationMapper.java
  8. 1 4
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/ResponsibilityIndicatorInfoMapper.java
  9. 4 1
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationNotice.java
  10. 4 4
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationWarningInfo.java
  11. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationWarningRule.java
  12. 6 3
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/ResponsibilityIndicatorInfo.java
  13. 4 2
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/ResponsibilityIndicatorInfoResDTO.java
  14. 78 0
      ims-service/ims-eval/src/main/java/com/ims/eval/schedule/EvaluationWarningSchedule.java
  15. 2 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationRevisionService.java
  16. 10 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationWarningInfoService.java
  17. 2 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationWarningRuleService.java
  18. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationService.java
  19. 3 5
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IResponsibilityIndicatorInfoService.java
  20. 9 10
      ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/WorkflowService.java
  21. 4 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluatioinScoreCountServiceImpl.java
  22. 15 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationRevisionServiceImpl.java
  23. 50 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationWarningInfoServiceImpl.java
  24. 4 3
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationWarningRuleServiceImpl.java
  25. 2 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java
  26. 4 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationServiceImpl.java
  27. 47 22
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/ResponsibilityIndicatorInfoServiceImpl.java
  28. 2 2
      ims-service/ims-eval/src/main/resources/mappers/EvaluateRuleInfoMapper.xml
  29. 8 10
      ims-service/ims-eval/src/main/resources/mappers/EvaluateWarningRuleMapper.xml.xml
  30. 4 0
      ims-service/ims-eval/src/main/resources/mappers/EvaluationNoticeMapper.xml
  31. 32 0
      ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationMapper.xml
  32. 66 20
      ims-service/ims-eval/src/main/resources/mappers/ResponsibilityIndicatorInfoMapper.xml

+ 24 - 28
ims-common/src/main/java/com/ims/common/utils/FormulaUtils.java

@@ -1,6 +1,7 @@
 package com.ims.common.utils;
 
 import com.ims.common.function.IFSFunction;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.formula.FormulaParseException;
 import org.apache.poi.ss.formula.functions.FreeRefFunction;
@@ -12,17 +13,24 @@ import org.apache.poi.ss.usermodel.*;
 import java.io.IOException;
 import java.math.BigDecimal;
 
+@Slf4j
 public class FormulaUtils {
 
+	private static Workbook workbook = null;
 
+	static {
+		if (workbook == null) {
+			workbook = new HSSFWorkbook();
+		}
 
+		String[] functionNames = { IFSFunction.FUNCTION_NAME } ;
+		FreeRefFunction[] functionImpls = { new IFSFunction() } ;
 
-	/**
-	 * Sheet 中的每一行
-	 */
-	private static HSSFRow row = null;
+		UDFFinder udfs = new DefaultUDFFinder( functionNames, functionImpls ) ;
+		UDFFinder udfToolpack = new AggregatingUDFFinder( udfs ) ;
 
-	private static FormulaEvaluator formulaEvaluator = null;
+		workbook.addToolPack(udfToolpack);
+	}
 
 	/**
 	 * 计算值
@@ -30,7 +38,7 @@ public class FormulaUtils {
 	 * @param formula Excel 中的公式,例如:MAX(56-FLOOR(20/6,1),2)
 	 * @return
 	 */
-	public static double caculateFormula1(String formula) {
+	public static double calculateFormula1(String formula) {
 		if(formula.startsWith("=")){
 			formula =formula.replace("=","");
 		}
@@ -39,8 +47,8 @@ public class FormulaUtils {
 
 		HSSFSheet sheet = workbook.createSheet();
 
-		row = sheet.createRow(0);
-		formulaEvaluator = new HSSFFormulaEvaluator(workbook);
+		HSSFRow row = sheet.createRow(0);
+		FormulaEvaluator formulaEvaluator = new HSSFFormulaEvaluator(workbook);
 
 		// 这里必须新建一个对象,否则只有第一个 formula 才有效。查看 formulaEvaluator.evaluate 的源码。
 		HSSFCell cell = row.createCell(0);
@@ -52,23 +60,18 @@ public class FormulaUtils {
 		} catch (FormulaParseException e) {
 			System.out.print(e.getMessage());
 			return 0;
+		} finally {
+			try {
+				workbook.close();
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
 		}
 	}
 
 
-	public static double caculateFormula(String formula){
-		Workbook workbook = null;
+	public static double calculateFormula(String formula){
 		try {
-			workbook = new HSSFWorkbook();
-
-			String[] functionNames = { IFSFunction.FUNCTION_NAME } ;
-			FreeRefFunction[] functionImpls = { new IFSFunction() } ;
-
-			UDFFinder udfs = new DefaultUDFFinder( functionNames, functionImpls ) ;
-			UDFFinder udfToolpack = new AggregatingUDFFinder( udfs ) ;
-
-			workbook.addToolPack(udfToolpack);
-
 			FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
 
 			Sheet sheet = workbook.createSheet();
@@ -81,14 +84,7 @@ public class FormulaUtils {
 			return new BigDecimal(value).setScale(2, BigDecimal.ROUND_CEILING).doubleValue();
 		} catch (Exception e) {
 			e.printStackTrace();
-		}finally {
-			try {
-				if(null != workbook){
-					workbook.close();
-				}
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
+			log.error("FormulaUtils==excel公式解析异常: ", e.getMessage());
 
 		}
 

+ 2 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/EvalApplication.java

@@ -7,6 +7,7 @@ import org.springframework.cloud.client.SpringCloudApplication;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.ComponentScans;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 /**
  * eval启动器
@@ -19,6 +20,7 @@ import org.springframework.context.annotation.ComponentScans;
 })
 @EnableFeignClients
 @EnableCaching
+@EnableScheduling
 public class EvalApplication {
 
 	public static void main(String[] args) {

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

@@ -1,15 +1,25 @@
 package com.ims.eval.controller;
 
+import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.EvaluationRevision;
+import com.ims.eval.entity.ResponsibilityIndicatorInfo;
+import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IEvaluationRevisionService;
+import com.ims.eval.service.IResponsibilityIndicatorInfoService;
+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.servlet.http.HttpServletRequest;
+import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 单位考评目标修订
@@ -26,6 +36,9 @@ public class EvaluationRevisionController {
 	@Autowired
 	private IEvaluationRevisionService evaluationRevisionService;
 
+	@Autowired
+	private IResponsibilityIndicatorInfoService responsibilityIndicatorInfoService;
+
 	/**
 	 * 单位考评目标修订列表信息(分页)
 	 *
@@ -44,7 +57,7 @@ public class EvaluationRevisionController {
 	 * @param des                描述
 	 * @return 结果
 	 */
-	@GetMapping(value = "list")
+	@GetMapping(value = "/list")
 	public R list(@RequestParam(value = "pageNum") Integer pageNum,
 				  @RequestParam(value = "pageSize") Integer pageSize,
 				  @RequestParam(value = "id", required = false) String id,
@@ -67,7 +80,7 @@ public class EvaluationRevisionController {
 	 *
 	 * @return 结果
 	 */
-	@GetMapping(value = "listAll")
+	@GetMapping(value = "/listAll")
 	public R listAll() {
 		List<EvaluationRevision> list = evaluationRevisionService.list();
 		return R.ok().data(list);
@@ -93,4 +106,100 @@ public class EvaluationRevisionController {
 		}
 	}
 
+	/**
+	 * 详情
+	 *
+	 * @param deptResponsibilityId 考评目标主键
+	 * @return 结果
+	 */
+	@GetMapping(value = "/details/{deptResponsibilityId}")
+	public R details(@PathVariable String deptResponsibilityId) {
+		Map<String, List<ResponsibilityIndicatorInfoResDTO>> map = responsibilityIndicatorInfoService.selectResponsibilityIndicatorInfoList(deptResponsibilityId, null, "有效");
+		return R.ok().data(map);
+	}
+
+	/**
+	 * 详情-批量新增/修改
+	 *
+	 * @param responsibilityIndicatorInfoList 修改内容
+	 * @return 结果
+	 */
+	@PostMapping(value = "/save")
+	public R addAll(@RequestBody List<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList) {
+		try {
+			boolean b = responsibilityIndicatorInfoService.saveOrUpdateBatch(responsibilityIndicatorInfoList);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+	/**
+	 * 详情-弹框数据
+	 *
+	 * @param deptResponsibilityId 考评目标主键
+	 * @param isQuantified 是否量化
+	 * @return 结果
+	 */
+	@GetMapping(value = "/popUpData")
+	public R popUpData(@RequestParam(value = "deptResponsibilityId") String deptResponsibilityId,
+					 @RequestParam(value = "isQuantified") String isQuantified) {
+		List<ResponsibilityIndicatorInfoResDTO> list = responsibilityIndicatorInfoService.selectPopUpData(deptResponsibilityId, isQuantified, null);
+		return R.ok().data(list);
+	}
+
+	/**
+	 * 导入
+	 *
+	 * @param file 文件
+	 * @param isQuantified 是否量化
+	 * @param request request
+	 * @return 结果
+	 */
+	@PostMapping(value = "/import")
+	public R importData(@RequestParam("file") MultipartFile file, @RequestParam(value = "isQuantified") String isQuantified, HttpServletRequest request) {
+		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<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList = new ArrayList<>();
+				//Excel导入导出的单元类
+				List<String[]> strings = ExcelUtil.readData(fileType, startRows, true, is);
+				//遍历Excel表每一行的数据
+				for (String[] str : strings) {
+					ResponsibilityIndicatorInfo responsibilityIndicatorInfo = new ResponsibilityIndicatorInfo();
+					responsibilityIndicatorInfo.setId(str[0]);
+					if ("是".equals(isQuantified)){
+						responsibilityIndicatorInfo.setQuantifiedValue(Double.parseDouble(str[7]));
+						responsibilityIndicatorInfo.setState(str[9]);
+					}else if ("否".equals(isQuantified)){
+						responsibilityIndicatorInfo.setNonQuantifiedValue(str[7]);
+						responsibilityIndicatorInfo.setState(str[8]);
+					}
+					responsibilityIndicatorInfo.setUpdateTime(DateUtil.date());
+					responsibilityIndicatorInfoList.add(responsibilityIndicatorInfo);
+				}
+				boolean b = responsibilityIndicatorInfoService.updateBatchById(responsibilityIndicatorInfoList);
+				if (b) {
+					return R.ok().data(b);
+				} else {
+					return R.error().data("保存失败!");
+				}
+			} catch (Exception e) {
+				log.error("错误", e);
+				return R.customError(e.getMessage()).data("失败!");
+			}
+		}
+		return R.customError("上传文件为空!");
+	}
 }

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

@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -30,9 +31,10 @@ public class EvaluationWarningRuleController {
 	@GetMapping(value = "list")
 	public R EvaluationWarningRuleList(
 		@RequestParam(value = "binSection", required = false) String binSection, //业务板块
-		@RequestParam(value = "ruleName", required = false) String ruleName) { //业务阶段
-		Map<String, Object> map = warningRuleService.warningRuleList(binSection, ruleName);
-		return R.ok().data(map);
+		@RequestParam(value = "ruleName", required = false) String ruleName, //业务阶段
+		@RequestParam(value = "type", required = false) String type) {
+		List<EvaluationWarningRule> list = warningRuleService.warningRuleList(binSection, ruleName, type, null);
+		return R.ok().data(list);
 	}
 
 

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

@@ -239,10 +239,6 @@ public class NoticeManagementController {
 					list.add(evaluationNotice);
 				}
 			}
-			DataDictionary dataDictionary = dataDictionaryService.getById(evaluationNotice.getReleaseDept());
-			if (null != dataDictionary) {
-				evaluationNotice.setReleaseDept(dataDictionary.getKeyName());
-			}
 		}
 		return R.ok().data(list);
 	}

+ 3 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluationWarningRuleMapper.java

@@ -3,6 +3,7 @@ package com.ims.eval.dao;
 import com.ims.eval.entity.EvaluationWarningRule;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -15,5 +16,6 @@ import java.util.Map;
  */
 public interface EvaluationWarningRuleMapper extends BaseMapper<EvaluationWarningRule> {
 
-	Map<String, Object> selectWarningRule(String binSection, String ruleName);
+	List<EvaluationWarningRule> selectWarningRule(String binSection, String ruleName, String type, Boolean enable);
+
 }

+ 6 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationEvaluationMapper.java

@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ims.eval.entity.dto.response.OrganizationEvaluationResDTO;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * <p>
  * 单位/部门考评记录 Mapper 接口
@@ -17,4 +20,7 @@ public interface OrganizationEvaluationMapper extends BaseMapper<OrganizationEva
 
 	OrganizationEvaluationResDTO selectById(@Param("id")String id);
 
+
+	List<Map<String, Object>> selectCompanyActualValue(String binSection, String indicatorId, String evaluationType);
+
 }

+ 1 - 4
ims-service/ims-eval/src/main/java/com/ims/eval/dao/ResponsibilityIndicatorInfoMapper.java

@@ -23,8 +23,5 @@ public interface ResponsibilityIndicatorInfoMapper extends BaseMapper<Responsibi
 																   @Param("optionCode") String optionCode,
 																   @Param("organizationId") String organizationId);
 
-
-
-
-
+	List<ResponsibilityIndicatorInfoResDTO> selectResponsibilityIndicatorInfoList(@Param("deptResponsibilityId") String deptResponsibilityId, @Param("isQuantified") String isQuantified, @Param("dataState") String dataState);
 }

+ 4 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationNotice.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.util.Date;
 
@@ -33,8 +32,12 @@ public class EvaluationNotice extends Model {
 	private String sendToContent;
 	//发布部门
 	private String releaseDept;
+	//发布部门名称
+	private String releaseDeptName;
 	//发布人
 	private String releasePeople;
+	//发布人名称
+	private String releasePeopleName;
 	//发布时间
 	private String releaseDate;
 	//发布状态

+ 4 - 4
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationWarningInfo.java

@@ -2,12 +2,14 @@ package com.ims.eval.entity;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import java.time.LocalDate;
+import java.util.Date;
+
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author wang
@@ -82,7 +84,5 @@ public class EvaluationWarningInfo extends Model {
     /**
      * 创建时间
      */
-    private LocalDate createTime;
-
-
+    private Date createTime;
 }

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

@@ -34,7 +34,7 @@ public class EvaluationWarningRule extends Model {
     /**
      * 指标id
      */
-    private String indicatorCode;
+    private String indicatorId;
 
     /**
      * 指标信息(计划值、完成值、偏差等信息)

+ 6 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/entity/ResponsibilityIndicatorInfo.java

@@ -1,11 +1,11 @@
 package com.ims.eval.entity;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.util.Date;
-
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.Date;
+
 /**
  * <p>
  * 责任书指标明细
@@ -97,5 +97,8 @@ public class ResponsibilityIndicatorInfo extends Model {
 	 */
 	private String state;
 
-
+	/**
+	 * 数据状态
+	 */
+	private String dataState;
 }

+ 4 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/ResponsibilityIndicatorInfoResDTO.java

@@ -1,7 +1,6 @@
 package com.ims.eval.entity.dto.response;
 
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
@@ -121,5 +120,8 @@ public class ResponsibilityIndicatorInfoResDTO {
 	 */
 	private Boolean updateMark;
 
-
+	/**
+	 * 数据状态
+	 */
+	private String dataState;
 }

+ 78 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/schedule/EvaluationWarningSchedule.java

@@ -0,0 +1,78 @@
+package com.ims.eval.schedule;
+
+import com.ims.eval.entity.EvaluationWarningRule;
+import com.ims.eval.service.IEvaluateRuleInfoService;
+import com.ims.eval.service.IEvaluationWarningRuleService;
+import com.ims.eval.service.IOrganizationEvaluationService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 考评预警定时处理
+ */
+@Slf4j
+@Component
+public class EvaluationWarningSchedule {
+
+	@Autowired
+	private IEvaluationWarningRuleService warningRuleService;
+	@Autowired
+	private IEvaluateRuleInfoService warningInfoService;
+	@Autowired
+	private IOrganizationEvaluationService evaluationService;
+
+
+	private final String TYPE_NDKP = "NDKP";
+	private final String TYPE_JDKP = "JDKP";
+	private final String TYPE_YDKP = "YDKP";
+
+
+	/**
+	 * 年度考评
+	 */
+	public void warningRuleResolveNDKP(){
+		List<EvaluationWarningRule> list = warningRuleService.warningRuleList(null, null, TYPE_NDKP, true);
+		List<Map<String, Object>> companys = evaluationService.getCompanyWarning(TYPE_NDKP);
+
+		if (list == null || list.size() == 0 || companys == null || companys.size() == 0) {
+			return;
+		}
+
+
+	}
+
+	/**
+	 * 季度考评
+	 */
+	public void warningRuleResolveJDKP(){
+		List<EvaluationWarningRule> list = warningRuleService.warningRuleList(null, null, TYPE_JDKP, true);
+		if (list == null || list.size() == 0) {
+			return;
+		}
+	}
+
+	/**
+	 * 月度考评
+	 */
+	public void warningRuleResolveYDKP(){
+		List<EvaluationWarningRule> list = warningRuleService.warningRuleList(null, null, TYPE_YDKP,true);
+		if (list == null || list.size() == 0) {
+			return;
+		}
+	}
+
+	private void calculate(List<EvaluationWarningRule> rules, List<Map<String, Object>> companys){
+		Map<Object, List<Map<String, Object>>> collect = companys.stream().collect(Collectors.groupingBy(m -> m.get("indicator_id")));
+		for (EvaluationWarningRule rule : rules){
+			for (Map.Entry<Object, List<Map<String, Object>>> entry : collect.entrySet()) {
+				List<Map<String, Object>> v = entry.getValue();
+
+			}
+		}
+	}
+}

+ 2 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationRevisionService.java

@@ -16,4 +16,6 @@ public interface IEvaluationRevisionService extends IService<EvaluationRevision>
 	IPage<EvaluationRevision> listPage(Integer pageNum, Integer pageSize, String id, String responsibilityCode, String cycleUnit, List<String> checkCycle, String beginDate, String endDate, String stage, String createBy, String year, String month, String des);
 
 	boolean save(String id);
+
+	boolean editState(String id, String state, String instId);
 }

+ 10 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationWarningInfoService.java

@@ -1,8 +1,10 @@
 package com.ims.eval.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.eval.entity.EvaluationWarningInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+
 /**
  * <p>
  *  服务类
@@ -13,4 +15,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IEvaluationWarningInfoService extends IService<EvaluationWarningInfo> {
 
+	/**
+	 * 查询考评预警规则
+	 * @return
+	 */
+	IPage<EvaluationWarningInfo> warningInfoList(Integer pageNum, Integer pageSize, String binSection, String indicatorId, boolean isConfirm);
+
+	boolean saveItem(String code, EvaluationWarningInfo warningInfo);
+
 }

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

@@ -3,6 +3,7 @@ package com.ims.eval.service;
 import com.ims.eval.entity.EvaluationWarningRule;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -21,7 +22,7 @@ public interface IEvaluationWarningRuleService extends IService<EvaluationWarnin
 	 * @param ruleName
 	 * @return
 	 */
-    Map<String, Object> warningRuleList(String binSection, String ruleName);
+    List<EvaluationWarningRule> warningRuleList(String binSection, String ruleName, String type, Boolean enable);
 
 	boolean saveOrUpdate(String code, EvaluationWarningRule warningRule);
 }

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

@@ -47,4 +47,5 @@ public interface IOrganizationEvaluationService extends IService<OrganizationEva
 	OrganizationEvaluationResDTO getByidAndInfo(String id, String dept,HttpServletRequest request);
 
 
+	List<Map<String, Object>> getCompanyWarning(String evaluationType);
 }

+ 3 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/service/IResponsibilityIndicatorInfoService.java

@@ -26,6 +26,7 @@ public interface IResponsibilityIndicatorInfoService extends IService<Responsibi
 
 	Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> finishValueList(List<String> deptResponsibilityIds, String dept);
 
+	Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> selectResponsibilityIndicatorInfoList(String deptResponsibilityId, String isQuantified, String dataState);
 
 	boolean saveOrUpdateDto(ResponsibilityIndicatorInfoUpdateDTO infoUpdateDTO);
 
@@ -33,10 +34,7 @@ public interface IResponsibilityIndicatorInfoService extends IService<Responsibi
 
 	Map<String ,Object> getResponsibilityIdMap(String deptResponsibilityId);
 
+	boolean saveOrUpdateBatch(List<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList);
 
-
-
-
-
-
+	List<ResponsibilityIndicatorInfoResDTO> selectPopUpData(String deptResponsibilityId, String isQuantified, String dataState);
 }

+ 9 - 10
ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/WorkflowService.java

@@ -1,29 +1,25 @@
 package com.ims.eval.service.custom;
 
 import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.alibaba.nacos.client.naming.utils.CollectionUtils;
 import com.ims.eval.config.ImaConfig;
 import com.ims.eval.entity.custom.DoAction;
 import com.ims.eval.entity.custom.IsOkAction;
-import com.ims.eval.entity.custom.Menu;
 import com.ims.eval.entity.custom.TodoTask;
 import com.ims.eval.entity.flow.FlowResult;
 import com.ims.eval.schedule.ScoreCalculationSchedule;
-import com.ims.eval.service.IDeptResponsibilityService;
-import com.ims.eval.service.IEvaluationDeptBusinessAssessmentService;
-import com.ims.eval.service.IEvaluationDeptBusinessPlanService;
-import com.ims.eval.service.IOrganizationEvaluationService;
+import com.ims.eval.service.*;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.ibatis.annotations.Case;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.*;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -59,6 +55,9 @@ public class WorkflowService {
 	@Autowired
 	private IEvaluationDeptBusinessAssessmentService evaluationDeptBusinessAssessmentService;
 
+	@Autowired
+	private IEvaluationRevisionService evaluationRevisionService;
+
 	/**
 	 * 发起流程
 	 *
@@ -244,7 +243,7 @@ public class WorkflowService {
 				}
 				break;
 			case "dwkpmbxd"://单位考评目标修订
-
+				evaluationRevisionService.editState(bizKey,taskName,instId);
 				break;
 			case "bbbmyjzbjh"://本部部门业绩指标计划
 				evaluationDeptBusinessPlanService.editState(bizKey,taskName,instId);

+ 4 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluatioinScoreCountServiceImpl.java

@@ -11,6 +11,7 @@ import com.ims.eval.service.IEvaluationScoreCountService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -70,6 +71,9 @@ public class EvaluatioinScoreCountServiceImpl extends ServiceImpl<EvaluationScor
 				mp.put(item.get("indicator_code").toString() + "_flag", item.get("score") == item.get("standard_score") ? "0"
 					: Double.valueOf(item.get("score").toString()) > Double.valueOf(item.get("standard_score").toString()) ? "1" : "-1");
 			}
+			DoubleSummaryStatistics sum = v.stream().collect(Collectors.summarizingDouble(e -> Double.valueOf(e.get("score").toString())));
+			BigDecimal bd = new BigDecimal(sum.getSum());
+			mp.put("score_total", bd.setScale(2, BigDecimal.ROUND_FLOOR).doubleValue());
 			value.add(mp);
 
 			// 添加标题

+ 15 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationRevisionServiceImpl.java

@@ -70,9 +70,11 @@ public class EvaluationRevisionServiceImpl extends ServiceImpl<EvaluationRevisio
 		if (StringUtils.isNotEmpty(createBy)) {
 			qw.lambda().eq(EvaluationRevision::getCreateBy, createBy);
 		}
+
 		if (StringUtils.isNotEmpty(year)) {
 			qw.lambda().eq(EvaluationRevision::getYear, year);
 		}
+
 		if (StringUtils.isNotEmpty(month)) {
 			qw.lambda().eq(EvaluationRevision::getMonth, month);
 		}
@@ -83,8 +85,7 @@ public class EvaluationRevisionServiceImpl extends ServiceImpl<EvaluationRevisio
 
 		qw.lambda().orderByDesc(EvaluationRevision::getCreateTime);
 
-		IPage<EvaluationRevision> list = baseMapper.selectPage(page, qw);
-		return list;
+		return baseMapper.selectPage(page, qw);
 	}
 
 	@Override
@@ -123,4 +124,16 @@ public class EvaluationRevisionServiceImpl extends ServiceImpl<EvaluationRevisio
 		return false;
 	}
 
+	@Override
+	public boolean editState(String id, String state, String instId) {
+		EvaluationRevision evaluationRevision = baseMapper.selectById(id);
+		if (StringUtils.isNotEmpty(state)) {
+			evaluationRevision.setStage(state);
+		}
+		if (StringUtils.isNotEmpty(instId)) {
+			evaluationRevision.setInstId(instId);
+		}
+		boolean b = super.saveOrUpdate(evaluationRevision);
+		return b;
+	}
 }

+ 50 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationWarningInfoServiceImpl.java

@@ -1,11 +1,23 @@
 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.cache.CacheContext;
+import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.EvaluationWarningInfo;
 import com.ims.eval.dao.EvaluationWarningInfoMapper;
+import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.ims.eval.entity.dto.response.MyuserResDTO;
 import com.ims.eval.service.IEvaluationWarningInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
 /**
  * <p>
  *  服务实现类
@@ -17,4 +29,42 @@ import org.springframework.stereotype.Service;
 @Service
 public class EvaluationWarningInfoServiceImpl extends ServiceImpl<EvaluationWarningInfoMapper, EvaluationWarningInfo> implements IEvaluationWarningInfoService {
 
+
+	@Override
+	public IPage<EvaluationWarningInfo> warningInfoList(Integer pageNum, Integer pageSize, String binSection, String indicatorId, boolean isConfirm) {
+		QueryWrapper<EvaluationWarningInfo> qw = new QueryWrapper<>();
+		//构造分页构造器
+		Page<EvaluationWarningInfo> page = new Page<>(pageNum, pageSize);
+		if (null == pageNum || null == pageSize) {
+			throw new CustomException("分页参数为空");
+		}
+
+		if (StringUtils.isNotEmpty(binSection)) {
+			qw.lambda().eq(EvaluationWarningInfo::getBinSection, binSection);
+		}
+
+		if (StringUtils.isNotEmpty(indicatorId)) {
+			qw.lambda().eq(EvaluationWarningInfo::getIndicatorId, indicatorId);
+		}
+
+		qw.lambda().eq(EvaluationWarningInfo::getIsConfirm, isConfirm);
+
+		IPage<EvaluationWarningInfo> list = baseMapper.selectPage(page, qw);
+
+		return list;
+	}
+
+
+	@Override
+	public boolean saveItem(String code, EvaluationWarningInfo warningInfo) {
+		//		MyuserResDTO user = userService.getSysUser(code);
+		MyuserResDTO user = new MyuserResDTO();
+		if (user != null){
+			warningInfo.setUserName(user.getName());
+			warningInfo.setUserCode(code);
+			warningInfo.setDeptId(user.getDeptId());
+		}
+
+		return saveOrUpdate(warningInfo);
+	}
 }

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

@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -28,9 +29,9 @@ public class EvaluationWarningRuleServiceImpl extends ServiceImpl<EvaluationWarn
 	private IUserService userService;
 
 	@Override
-	public Map<String, Object> warningRuleList(String binSection, String ruleName) {
-		Map<String, Object> map = baseMapper.selectWarningRule(binSection, ruleName);
-		return map;
+	public List<EvaluationWarningRule> warningRuleList(String binSection, String ruleName, String type, Boolean enable) {
+		List<EvaluationWarningRule> list = baseMapper.selectWarningRule(binSection, ruleName, type, null);
+		return list;
 	}
 
 	@Override

+ 2 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java

@@ -193,7 +193,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 											for (OrganizationEvaluationInfoResDTO f : childCodeGropListEntry.getValue()) {
 												dto.setFormula(dto.getFormula().replace("[" + f.getOptionCode() + "]", f.getQuantifiedValue() + ""));
 											}
-											double score = FormulaUtils.caculateFormula(dto.getFormula());
+											double score = FormulaUtils.calculateFormula(dto.getFormula());
 											if (StringUtils.inStringIgnoreCase("DF", dto.getOptionCode())) {
 												totalScore = totalScore + score;
 											}
@@ -256,7 +256,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 												dto.setFormula(dto.getFormula().replace("["+f.getOptionCode()+"]", f.getQuantifiedValue() + ""));
 											}
 											log.info("计算公式为:"+dto.getFormula());
-											double score = FormulaUtils.caculateFormula(dto.getFormula());
+											double score = FormulaUtils.calculateFormula(dto.getFormula());
 											if(StringUtils.inStringIgnoreCase("DF",dto.getOptionCode())){
 												totalScore = totalScore+score;
 											}

+ 4 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationServiceImpl.java

@@ -568,6 +568,10 @@ public class OrganizationEvaluationServiceImpl extends ServiceImpl<OrganizationE
 		return resDTO;
 	}
 
+	@Override
+	public List<Map<String, Object>> getCompanyWarning(String evaluationType) {
+		return baseMapper.selectCompanyActualValue(null, null, evaluationType);
+	}
 
 
 	@Transactional

+ 47 - 22
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/ResponsibilityIndicatorInfoServiceImpl.java

@@ -1,34 +1,32 @@
 package com.ims.eval.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.common.utils.Constant;
-import com.ims.common.utils.StringUtils;
 import com.ims.eval.config.CustomException;
-import com.ims.eval.entity.DataDictionary;
-import com.ims.eval.entity.Myuser;
-import com.ims.eval.entity.ResponsibilityIndicatorInfo;
 import com.ims.eval.dao.ResponsibilityIndicatorInfoMapper;
-import com.ims.eval.entity.dto.request.IndicatorDictionaryDTO;
+import com.ims.eval.entity.ResponsibilityIndicatorInfo;
 import com.ims.eval.entity.dto.request.ResponsibilityIndicatorInfoUpdateDTO;
 import com.ims.eval.entity.dto.response.MyuserResDTO;
 import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
 import com.ims.eval.service.IResponsibilityIndicatorInfoService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.eval.service.IUserService;
-import com.sun.org.apache.xpath.internal.operations.Bool;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.*;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
  * <p>
  * 责任书指标明细
-
- 服务实现类
+ * <p>
+ * 服务实现类
  * </p>
  *
  * @author wang
@@ -42,10 +40,10 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 	private IUserService userService;
 
 	@Override
-	public Map<String ,List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept, HttpServletRequest request) {
+	public Map<String, List<ResponsibilityIndicatorInfoResDTO>> planValueList(List<String> deptResponsibilityIds, String dept, HttpServletRequest request) {
 
 		MyuserResDTO myuser = userService.getSysUser(request);
-		if(null == myuser){
+		if (null == myuser) {
 			throw new CustomException("暂无权限");
 		}
 		String organizationId = "";
@@ -59,17 +57,17 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 				dept = "";
 			} else if (myuser.getLoginName().equals("admin")) {
 				dept = "";
-				updateMark= true;
+				updateMark = true;
 			} else {
 				throw new CustomException("暂无权限");
 			}
 		}
-		List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.listByresponsibilityId(deptResponsibilityIds,dept,"ZRMB",organizationId);//默认获取指定的怎目标
+		List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.listByresponsibilityId(deptResponsibilityIds, dept, "ZRMB", organizationId);//默认获取指定的怎目标
 		boolean finalUpdateMark = updateMark;
-		list.stream().forEach(i->{
+		list.stream().forEach(i -> {
 			i.setUpdateMark(i.getDeptName().equals(myuser.getDeptName()));
 		});
-		Map<String  ,List<ResponsibilityIndicatorInfoResDTO>> map  = list.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getIsQuantified));
+		Map<String, List<ResponsibilityIndicatorInfoResDTO>> map = list.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getIsQuantified));
 		map.put("quantifiedList", map.remove("是"));
 		map.put("nonQuantifiedList", map.remove("否"));
 		return map;
@@ -83,6 +81,15 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 		return null;
 	}
 
+	@Override
+	public Map<String, List<ResponsibilityIndicatorInfoResDTO>> selectResponsibilityIndicatorInfoList(String deptResponsibilityId, String isQuantified, String dataState) {
+		List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.selectResponsibilityIndicatorInfoList(deptResponsibilityId, isQuantified, dataState);
+		Map<String, List<ResponsibilityIndicatorInfoResDTO>> map = list.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getIsQuantified));
+		map.put("quantifiedList", map.remove("是"));
+		map.put("nonQuantifiedList", map.remove("否"));
+		return map;
+	}
+
 
 	@Transactional
 	@Override
@@ -112,10 +119,10 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 				indicatorInfo.setRemark(entity.getRemark());//备注
 				indicatorInfo.setState(entity.getState());//状态
 				boolean b = super.saveOrUpdate(indicatorInfo);
-				if(!b){
+				if (!b) {
 					throw new CustomException("更新失败");
 				}
-			}else {
+			} else {
 				ResponsibilityIndicatorInfo addInfo = new ResponsibilityIndicatorInfo();
 				addInfo.setDeptResponsibilityId(entity.getDeptResponsibilityId());
 				addInfo.setOrganizationEvaluationRuleId(entity.getOrganizationEvaluationRuleId());
@@ -129,7 +136,7 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 				addInfo.setCreateTime(new Date());
 				addInfo.setState("-1");//状态
 				boolean b = super.saveOrUpdate(addInfo);
-				if(!b){
+				if (!b) {
 					throw new CustomException("新增失败");
 				}
 			}
@@ -142,13 +149,31 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 	public Map<String, Object> getResponsibilityIdMap(String deptResponsibilityId) {
 		Map<String, Object> map = new HashMap<>();
 		QueryWrapper<ResponsibilityIndicatorInfo> qw = new QueryWrapper<>();
-		qw.lambda().eq(ResponsibilityIndicatorInfo::getDeptResponsibilityId,deptResponsibilityId);
+		qw.lambda().eq(ResponsibilityIndicatorInfo::getDeptResponsibilityId, deptResponsibilityId);
 		List<ResponsibilityIndicatorInfo> list = baseMapper.selectList(qw);
-		list.stream().forEach(i->{
-			map.put(i.getIndicatorId(),i.getIsQuantified().equals("是")?i.getQuantifiedValue():i.getQuantifiedValue());
+		list.stream().forEach(i -> {
+			map.put(i.getIndicatorId(), i.getIsQuantified().equals("是") ? i.getQuantifiedValue() : i.getQuantifiedValue());
 		});
 		return map;
 	}
 
+	@Override
+	public boolean saveOrUpdateBatch(List<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList) {
+		boolean b = false;
+		for (ResponsibilityIndicatorInfo responsibilityIndicatorInfo : responsibilityIndicatorInfoList) {
+			responsibilityIndicatorInfo.setDataState("失效");
+			b = super.updateById(responsibilityIndicatorInfo);
+			if (b) {
+				responsibilityIndicatorInfo.setDataState("有效");
+				b = super.save(responsibilityIndicatorInfo);
+			}
+		}
+		return b;
+	}
 
+	@Override
+	public List<ResponsibilityIndicatorInfoResDTO> selectPopUpData(String deptResponsibilityId, String isQuantified, String dataState) {
+		List<ResponsibilityIndicatorInfoResDTO> list = baseMapper.selectResponsibilityIndicatorInfoList(deptResponsibilityId, isQuantified, dataState);
+		return list;
+	}
 }

+ 2 - 2
ims-service/ims-eval/src/main/resources/mappers/EvaluateRuleInfoMapper.xml

@@ -53,10 +53,10 @@
                 AND ri.evaluate_rule_id = #{evaluateRuleId}
             </if>
 
-            order by ri.order_num asc
-        </where>
 
+        </where>
 
+        order by ri.order_num asc
     </select>
     <select id="selectlistByIndicatorInfo"
             resultType="com.ims.eval.entity.dto.response.EvaluateRuleInfoIndicatorDTO">

+ 8 - 10
ims-service/ims-eval/src/main/resources/mappers/EvaluateWarningRuleMapper.xml.xml

@@ -22,26 +22,24 @@
     </resultMap>
 
 
-    <select id="selectWarningRule" resultType="java.util.Map">
+    <select id="selectWarningRule" resultType="com.ims.eval.entity.EvaluationWarningRule">
         SELECT
-        er.*,
-        bs.section_name,
-        bs.section_code,
-        s.stage_name,
-        s.stage_code
+        er.*
         FROM
         evaluation_warning_rule er
-        LEFT JOIN bin_section bs ON bs.id = er.bin_section
-        LEFT JOIN bin_stage s ON s.id = er.bin_stage
-        LEFT JOIN indicator i ON i.id = er.indicator_id
         <where>
-
             <if test="binSection !=null and binSection !=''">
                 AND er.bin_section = #{binSection}
             </if>
             <if test="ruleName !=null and ruleName !=''">
                 AND er.rule_name like concat('%',#{ruleName},'%');
             </if>
+            <if test="type !=null and type !=''">
+                AND er.type = #{type}
+            </if>
+            <if test="enable !=null and enable !=''">
+                AND er.enable = #{enable}
+            </if>
 
         </where>
 

+ 4 - 0
ims-service/ims-eval/src/main/resources/mappers/EvaluationNoticeMapper.xml

@@ -11,7 +11,9 @@
         <result column="send_to" property="sendTo"/>
         <result column="send_to_content" property="sendToContent"/>
         <result column="release_dept" property="releaseDept"/>
+        <result column="release_dept_name" property="releaseDeptName"/>
         <result column="release_people" property="releasePeople"/>
+        <result column="release_people_name" property="releasePeopleName"/>
         <result column="release_date" property="releaseDate"/>
         <result column="release_state" property="releaseState"/>
         <result column="notice_annex" property="noticeAnnex"/>
@@ -31,7 +33,9 @@
                send_to,
                send_to_content,
                release_dept,
+               release_dept_name,
                release_people,
+               release_people_name,
                release_date,
                release_state,
                notice_annex,

+ 32 - 0
ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationMapper.xml

@@ -49,4 +49,36 @@
 
     </select>
 
+
+    <select id="selectCompanyActualValue" resultType="java.util.Map">
+        SELECT bs.section_name,
+               bs.section_code,
+               er.organization_name,
+               i.indicator_name,
+               oi.child_code,
+               id.option_name,
+               oi.option_code,
+               oi.quantified_value,
+               oe.check_cycle
+        from organization_evaluation  oe
+               LEFT JOIN organization_evaluation_info oi on oe.id = oi.organization_evaluation_id
+               INNER JOIN organization_evaluation_rule er on er.id = oi.organization_evaluation_rule_id
+               INNER JOIN indicator_dictionary id on oi.indicator_dictionary_id = id.id
+               INNER JOIN indicator i on i.id = id.indicator_id and i.id  = oi.indicator_id
+               INNER JOIN bin_section bs ON i.bin_section = bs.id
+        <where>
+            id.is_show = true
+            <if test="binSection !=null and binSection !=''">
+                AND bs.id = #{binSection}
+            </if>
+            <if test="indicatorId !=null and indicatorId !=''">
+                AND oi.indicator_id = #{indicatorId}
+            </if>
+            <if test="evaluationType !=null and evaluationType !=''">
+                AND oe.evaluationType = #{evaluationType}
+            </if>
+        </where>
+        order by oi.child_code ASC
+    </select>
+
 </mapper>

+ 66 - 20
ims-service/ims-eval/src/main/resources/mappers/ResponsibilityIndicatorInfoMapper.xml

@@ -4,28 +4,29 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.ims.eval.entity.ResponsibilityIndicatorInfo">
-        <id column="id" property="id" />
-        <result column="dept_responsibility_id" property="deptResponsibilityId" />
-        <result column="indicator_id" property="indicatorId" />
-        <result column="indicator_dictionary_id" property="indicatorDictionaryId" />
-        <result column="option_code" property="optionCode" />
-        <result column="is_quantified" property="isQuantified" />
-        <result column="quantified_value" property="quantifiedValue" />
-        <result column="non_quantified_value" property="nonQuantifiedValue" />
-        <result column="create_time" property="createTime" />
-        <result column="create_by" property="createBy" />
-        <result column="update_time" property="updateTime" />
-        <result column="update_by" property="updateBy" />
-        <result column="remark" property="remark" />
+        <id column="id" property="id"/>
+        <result column="dept_responsibility_id" property="deptResponsibilityId"/>
+        <result column="indicator_id" property="indicatorId"/>
+        <result column="indicator_dictionary_id" property="indicatorDictionaryId"/>
+        <result column="option_code" property="optionCode"/>
+        <result column="is_quantified" property="isQuantified"/>
+        <result column="quantified_value" property="quantifiedValue"/>
+        <result column="non_quantified_value" property="nonQuantifiedValue"/>
+        <result column="create_time" property="createTime"/>
+        <result column="create_by" property="createBy"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="update_by" property="updateBy"/>
+        <result column="remark" property="remark"/>
+        <result column="data_state" property="dataState"/>
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, dept_responsibility_id, indicator_id, indicator_dictionary_id, option_code, is_quantified, quantified_value, non_quantified_value, create_time, create_by, update_time, update_by, remark
+        id
+        , dept_responsibility_id, indicator_id, indicator_dictionary_id, option_code, is_quantified, quantified_value, non_quantified_value, create_time, create_by, update_time, update_by, remark, data_state
     </sql>
 
 
-
     <select id="listByresponsibilityId" resultType="com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO">
 
         select
@@ -56,29 +57,74 @@
         left join indicator_type it on i.indicator_type_id = it.id
         inner join data_dictionary dd on dd.data_key = i.dept_id
         <where>
-            ri.dept_responsibility_id in  <foreach item="item" collection="deptResponsibilityIds" separator="," open="(" close=")" index="">'${item}'</foreach>
+            ri.dept_responsibility_id in
+            <foreach item="item" collection="deptResponsibilityIds" separator="," open="(" close=")" index="">
+                '${item}'
+            </foreach>
 
             <if test="optionCode !=null and optionCode !=''">
                 and ri.option_code = #{optionCode}
             </if>
 
             <if test="dept !=null and dept !=''">
-                and  dd.key_name = #{dept}
+                and dd.key_name = #{dept}
             </if>
 
 
             <if test="organizationId !=null and organizationId !=''">
-                and  oer.organization_id = #{organizationId}
+                and oer.organization_id = #{organizationId}
             </if>
 
 
-
         </where>
 
         order by oer.organization_id,dd.data_key,i.id desc
 
     </select>
 
-
+    <select id="selectResponsibilityIndicatorInfoList"  resultType="com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO">
+        select
+            ri.id,
+            ri.dept_responsibility_id,
+            ri.indicator_id,
+            ri.is_quantified,
+            ri.data_state,
+            be.stage_name,
+            be.id binStage,
+            bn.id binSection,
+            bn.section_name,
+            oer.id organizationEvaluationRuleId,
+            oer.organization_name,
+            dd.key_name deptName,
+            it.type_name,
+            i.indicator_name,
+            ri.quantified_value,
+            ri.non_quantified_value,
+            i.unit,
+            ri.state
+        from
+            responsibility_indicator_info ri
+            inner join dept_responsibility dr on dr.id = ri.dept_responsibility_id
+            inner join organization_evaluation_rule oer on oer.id = ri.organization_evaluation_rule_id
+            left join indicator i on ri.indicator_id = i.id
+            left join bin_stage be on i.bin_stage = be.id
+            left join bin_section bn on i.bin_section = bn.id
+            left join indicator_type it on i.indicator_type_id = it.id
+            inner join data_dictionary dd on dd.data_key = i.dept_id
+        <where>
+            <if test="deptResponsibilityId != null and deptResponsibilityId != ''">
+                and ri.dept_responsibility_id = #{deptResponsibilityId}
+            </if>
+            <if test="isQuantified != null and isQuantified != ''">
+                and ri.is_quantified = #{isQuantified}
+            </if>
+            <if test="dataState == null">
+                and ri.data_state is null
+            </if>
+            <if test="dataState != null and dataState != ''">
+                and ri.data_state = #{dataState}
+            </if>
+        </where>
+    </select>
 
 </mapper>