فهرست منبع

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluateRuleInfoService.java
#	ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationInfoMapper.xml
全业务考评 8 ماه پیش
والد
کامیت
cee776aeff
28فایلهای تغییر یافته به همراه337 افزوده شده و 80 حذف شده
  1. 6 23
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/PerformanceBenchmarkingManageController.java
  2. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluateRuleInfoMapper.java
  3. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluateRuleMapper.java
  4. 2 1
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/IndicatorDictionaryMapper.java
  5. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationEvaluationInfoMapper.java
  6. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/PerformanceBenchmarkInfoMapper.java
  7. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/UnitInstallCapacityMapper.java
  8. 16 4
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/OrganizationEvaluationInfo.java
  9. 12 12
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/PerformanceBenchmarkInfo.java
  10. 48 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/UnitInstallCapacity.java
  11. 0 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluateRuleInfoService.java
  12. 1 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluateRuleService.java
  13. 1 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IIndicatorDictionaryService.java
  14. 1 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationInfoService.java
  15. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IPerformanceBenchmarkInfoService.java
  16. 15 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IUnitInstallCapacityService.java
  17. 7 3
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleInfoServiceImpl.java
  18. 21 9
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleServiceImpl.java
  19. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java
  20. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java
  21. 88 4
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/PerformanceBenchmarkInfoServiceImpl.java
  22. 23 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/UnitInstallCapacityServiceImpl.java
  23. 6 0
      ims-service/ims-eval/src/main/resources/mappers/EvaluateRuleInfoMapper.xml
  24. 15 0
      ims-service/ims-eval/src/main/resources/mappers/EvaluateRuleMapper.xml
  25. 5 0
      ims-service/ims-eval/src/main/resources/mappers/IndicatorDicatonaryMapper.xml
  26. 1 1
      ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationInfoMapper.xml
  27. 8 15
      ims-service/ims-eval/src/main/resources/mappers/PerformanceBenchmarkInfoMapper.xml
  28. 30 0
      ims-service/ims-eval/src/main/resources/mappers/UnitInstallCapacityMapper.xml

+ 6 - 23
ims-service/ims-eval/src/main/java/com/ims/eval/controller/PerformanceBenchmarkingManageController.java

@@ -19,41 +19,24 @@ public class PerformanceBenchmarkingManageController {
 	@Resource
 	private IPerformanceBenchmarkInfoService performanceBenchmarkInfoService;
 
-	@Resource
-	private IEvaluateRuleService evaluateRuleService;
-
-	@Resource
-	private IEvaluateRuleInfoService evaluateRuleInfoService;
-
-	@Resource
-	private IOrganizationEvaluationService organizationEvaluationService;
-
-	@Resource
-	private IOrganizationEvaluationInfoService organizationEvaluationInfoService;
-
-	@Resource
-	private IOrganizationEvaluationRuleService organizationEvaluationRuleService;
-
 	/**
 	 * 业绩对标管理列表信息(分页)
 	 *
 	 * @param pageNum        当前记录起始索引
 	 * @param pageSize       每页显示记录数
-	 * @param manageCategory 经营类别(火电、水电、风电、光伏、煤电、海外、综合)
-	 * @param year           年度
-	 * @param quarter        季度
-	 * @param monthly        月度
+	 * @param toolCategory   工具类别(寻标、立标、标杆、达标、超标)
+	 * @param manageCategory 经营类别(火电、水电、新能源(风电、光伏)、煤电、海外、综合)
+	 * @param checkCycle     周期(NDKP、JDKP、YDKP)
 	 * @return 结果
 	 */
 	@GetMapping(value = "/list")
 	public R list(
 		@RequestParam(value = "pageNum") Integer pageNum,
 		@RequestParam(value = "pageSize") Integer pageSize,
+		@RequestParam(value = "toolCategory") String toolCategory,
 		@RequestParam(value = "manageCategory") String manageCategory,
-		@RequestParam(value = "year", required = false) Integer year,
-		@RequestParam(value = "quarter", required = false) Integer quarter,
-		@RequestParam(value = "monthly", required = false) Integer monthly) {
-		IPage<PerformanceBenchmarkInfo> list = performanceBenchmarkInfoService.listPage(pageNum, pageSize, year, quarter, monthly, manageCategory);
+		@RequestParam(value = "checkCycle", required = false) String checkCycle) {
+		IPage<PerformanceBenchmarkInfo> list = performanceBenchmarkInfoService.listPage(pageNum, pageSize, toolCategory, manageCategory, checkCycle);
 		return R.ok().data(list);
 	}
 

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

@@ -26,4 +26,5 @@ public interface EvaluateRuleInfoMapper extends BaseMapper<EvaluateRuleInfo> {
 
 	List<EvaluateRuleInfoIndicatorDTO> selectlistByIndicatorInfo(@Param("ruleInfoIds") List<String> ruleInfoIds);
 
+    List<EvaluateRuleInfo> getEvaluateRuleInfoByEvaluateRuleId(@Param("evaluateRuleId") String evaluateRuleId);
 }

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

@@ -35,4 +35,5 @@ public interface EvaluateRuleMapper extends BaseMapper<EvaluateRule> {
 											  @Param("checkCycle") String checkCycle,
 											  @Param("year") String year);
 
+	EvaluateRule getEvaluateRuleListByYear(@Param("year") String year, @Param("checkCycle") String checkCycle, @Param("manageCategory") String manageCategory);
 }

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

@@ -2,7 +2,6 @@ package com.ims.eval.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ims.eval.entity.IndicatorDictionary;
-import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -20,4 +19,6 @@ public interface IndicatorDictionaryMapper extends BaseMapper<IndicatorDictionar
     IndicatorDictionary selectByCode(@Param("code") String code);
 
     List<IndicatorDictionary> selectByIndicatorId(@Param("id") String id);
+
+    List<IndicatorDictionary> getIndicatorDictionaryList(@Param("indicatorId") String indicatorId);
 }

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

@@ -73,6 +73,7 @@ public interface OrganizationEvaluationInfoMapper extends BaseMapper<Organizatio
 											@Param("deptId") String deptId,
 											@Param("state") List<String> state);
 
+    List<OrganizationEvaluationInfo> getOrganizationEvaluationInfoListByIndicatorDictionaryId(@Param("indicatorDictionaryId") String indicatorDictionaryId);
 
 
 //	void updateEvaluationInfo(@Param("evaluationInfos")  List<OrganizationEvaluationInfo> evaluationInfos);

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

@@ -13,6 +13,6 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface PerformanceBenchmarkInfoMapper extends BaseMapper<PerformanceBenchmarkInfo> {
 
-	IPage<PerformanceBenchmarkInfo> selectListPage(Page<PerformanceBenchmarkInfo> page, @Param("year") Integer year, @Param("quarter") Integer quarter, @Param("monthly") Integer monthly, @Param("manageCategory") String manageCategory);
+	IPage<PerformanceBenchmarkInfo> selectListPage(Page<PerformanceBenchmarkInfo> page, @Param("manageCategory") String manageCategory, @Param("checkCycle") String checkCycle);
 
 }

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

@@ -0,0 +1,16 @@
+package com.ims.eval.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ims.eval.entity.UnitInstallCapacity;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author hlf
+ * @date 2024/4/3 16:49
+ * 文件说明:
+ */
+public interface UnitInstallCapacityMapper extends BaseMapper<UnitInstallCapacity> {
+	List<UnitInstallCapacity> getToolCategoryList(@Param("manageCategory") String manageCategory);
+}

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

@@ -1,13 +1,12 @@
 package com.ims.eval.entity;
 
-import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.time.LocalDateTime;
-import java.util.Date;
-
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.Date;
+
 /**
  * <p>
  * 考评指标明细
@@ -124,4 +123,17 @@ public class OrganizationEvaluationInfo extends Model {
 	private String organizationId;
 
 
+
+	@TableField(exist = false)
+	private String checkCycle;
+	@TableField(exist = false)
+	private String degreeYear;
+	@TableField(exist = false)
+	private String quarterlyMonth;
+	@TableField(exist = false)
+	private String companyName;
+	@TableField(exist = false)
+	private String companyShort;
+	@TableField(exist = false)
+	private Double installCapacity;
 }

+ 12 - 12
ims-service/ims-eval/src/main/java/com/ims/eval/entity/PerformanceBenchmarkInfo.java

@@ -7,7 +7,7 @@ import lombok.EqualsAndHashCode;
 /**
  * @author hlf
  * @date 2024/3/28 13:57
- * 文件说明:
+ * 文件说明:业绩对标管理信息
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -21,19 +21,19 @@ public class PerformanceBenchmarkInfo extends Model {
 	private String id;
 
 	/**
-	 * 年度
+	 * 周期
 	 */
-	private Integer year;
+	private String checkCycle;
 
 	/**
-	 * 
+	 * 
 	 */
-	private Integer quarter;
+	private Integer degreeYear;
 
 	/**
-	 * 月度
+	 * 季/月度
 	 */
-	private Integer monthly;
+	private Integer quarterlyMonth;
 
 	/**
 	 * 经营类别(火电、水电、风电、光伏、煤电、海外、综合)
@@ -41,11 +41,6 @@ public class PerformanceBenchmarkInfo extends Model {
 	private String manageCategory;
 
 	/**
-	 * 序号
-	 */
-	private Integer serialNumber;
-
-	/**
 	 * 单位主键
 	 */
 	private String companyId;
@@ -56,6 +51,11 @@ public class PerformanceBenchmarkInfo extends Model {
 	private String companyName;
 
 	/**
+	 * 单位简称
+	 */
+	private String companyShort;
+
+	/**
 	 * 装机容量
 	 */
 	private Double installCapacity;

+ 48 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/UnitInstallCapacity.java

@@ -0,0 +1,48 @@
+package com.ims.eval.entity;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author hlf
+ * @date 2024/4/3 16:45
+ * 文件说明:单位装机容量信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UnitInstallCapacity extends Model {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	private String id;
+
+	/**
+	 * 单位主键
+	 */
+	private String unitId;
+
+	/**
+	 * 单位名称
+	 */
+	private String unitName;
+
+	/**
+	 * 单位简称
+	 */
+	private String unitShort;
+
+	/**
+	 * 装机容量
+	 */
+	private Double installCapacity;
+
+	/**
+	 * 业务类型
+	 */
+	private String businessType;
+
+}

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

@@ -24,6 +24,4 @@ public interface IEvaluateRuleInfoService extends IService<EvaluateRuleInfo> {
 
 	List<EvaluateRuleInfoIndicatorDTO> listByIndicatorInfo(List<String> ruleInfoIds);
 
-	boolean updateDeleteTime(List<String> ids);
-
 }

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

@@ -32,6 +32,5 @@ public interface IEvaluateRuleService extends IService<EvaluateRule> {
 
 	List<EvaluateRule> getEvaluateRuleList(String binSection, String binStage, String checkCycle, String year);
 
-
-
+	EvaluateRule getEvaluateRuleListByYear(String year, String checkCycle, String manageCategory);
 }

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

@@ -26,6 +26,5 @@ public interface IIndicatorDictionaryService extends IService<IndicatorDictionar
 	IndicatorDictionary getIndicatorDictionaryByCode(String indicatorId,String childOptionCode);
 
 
-
-
+    List<IndicatorDictionary> getIndicatorDictionaryList(String indicatorId);
 }

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

@@ -71,4 +71,5 @@ public interface IOrganizationEvaluationInfoService extends IService<Organizatio
 
 	List<OrganizationEvaluationInfo> getConvergeCommonInfo(String organizationEvaluationId, String organizationId, String indicatorId);
 
+	List<OrganizationEvaluationInfo> getOrganizationEvaluationInfoListByIndicatorDictionaryId(String indicatorDictionaryId);
 }

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

@@ -11,6 +11,6 @@ import com.ims.eval.entity.PerformanceBenchmarkInfo;
  */
 public interface IPerformanceBenchmarkInfoService extends IService<PerformanceBenchmarkInfo> {
 
-	IPage<PerformanceBenchmarkInfo> listPage(Integer pageNum, Integer pageSize, Integer year, Integer quarter, Integer monthly, String manageCategory);
+	IPage<PerformanceBenchmarkInfo> listPage(Integer pageNum, Integer pageSize, String toolCategory, String manageCategory, String checkCycle);
 
 }

+ 15 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IUnitInstallCapacityService.java

@@ -0,0 +1,15 @@
+package com.ims.eval.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ims.eval.entity.UnitInstallCapacity;
+
+import java.util.List;
+
+/**
+ * @author hlf
+ * @date 2024/4/3 16:49
+ * 文件说明:
+ */
+public interface IUnitInstallCapacityService extends IService<UnitInstallCapacity> {
+	List<UnitInstallCapacity> getToolCategoryList(String manageCategory);
+}

+ 7 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleInfoServiceImpl.java

@@ -1,13 +1,12 @@
 package com.ims.eval.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.ims.common.utils.StringUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.eval.config.CustomException;
-import com.ims.eval.entity.EvaluateRuleInfo;
 import com.ims.eval.dao.EvaluateRuleInfoMapper;
+import com.ims.eval.entity.EvaluateRuleInfo;
 import com.ims.eval.entity.dto.response.EvaluateRuleInfoIndicatorDTO;
 import com.ims.eval.service.IEvaluateRuleInfoService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
@@ -50,6 +49,11 @@ public class EvaluateRuleInfoServiceImpl extends ServiceImpl<EvaluateRuleInfoMap
 		return list;
 	}
 
+	@Override
+	public List<EvaluateRuleInfo> getEvaluateRuleInfoByEvaluateRuleId(String evaluateRuleId) {
+		return baseMapper.getEvaluateRuleInfoByEvaluateRuleId(evaluateRuleId);
+	}
+
 
 	@Override
 	public boolean updateDeleteTime(List<String> ids) {

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

@@ -58,26 +58,26 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 		qw.lambda().orderByDesc(EvaluateRule::getCreateTime);
 
 		IPage<EvaluateRule> list = baseMapper.selectPage(page, qw);
-		list.getRecords().stream().forEach(l->{
-			l.setBinSectionName(null == CacheContext.ddNameMap.get(l.getBinSection()) ? "" :CacheContext.ddNameMap.get(l.getBinSection()));
+		list.getRecords().stream().forEach(l -> {
+			l.setBinSectionName(null == CacheContext.ddNameMap.get(l.getBinSection()) ? "" : CacheContext.ddNameMap.get(l.getBinSection()));
 			l.setBinStageName(null == CacheContext.ddNameMap.get(l.getBinStage()) ? "" : CacheContext.ddNameMap.get(l.getBinStage()));
 		});
 		return list;
 	}
 
 	@Override
-	public IPage<EvaluateRule> listPage(Integer pageNum, Integer pageSize, String id, String des, String binSection, String binStage,String checkCycle,String year) {
+	public IPage<EvaluateRule> listPage(Integer pageNum, Integer pageSize, String id, String des, String binSection, String binStage, String checkCycle, String year) {
 		if (null == pageNum || null == pageSize) {
 			throw new RuntimeException("分页参数为空");
 		}
 		//构造分页构造器
 		Page<EvaluateRule> page = new Page<>(pageNum, pageSize);
-		IPage<EvaluateRule> list = baseMapper.selectListPage(page, id, des, binSection, binStage,checkCycle,year);
+		IPage<EvaluateRule> list = baseMapper.selectListPage(page, id, des, binSection, binStage, checkCycle, year);
 		return list;
 	}
 
 	@Override
-	public List<EvaluateRule> listAll(String id, String des, String binSection, String binStage,String checkCycle,String year) {
+	public List<EvaluateRule> listAll(String id, String des, String binSection, String binStage, String checkCycle, String year) {
 		QueryWrapper<EvaluateRule> qw = new QueryWrapper<>();
 
 		if (StringUtils.isNotEmpty(id)) {
@@ -113,8 +113,8 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 
 		List<EvaluateRule> list = baseMapper.selectList(qw);
 
-		list.stream().forEach(l->{
-			l.setBinSectionName(null == CacheContext.ddNameMap.get(l.getBinSection()) ? "" :CacheContext.ddNameMap.get(l.getBinSection()));
+		list.stream().forEach(l -> {
+			l.setBinSectionName(null == CacheContext.ddNameMap.get(l.getBinSection()) ? "" : CacheContext.ddNameMap.get(l.getBinSection()));
 			l.setBinStageName(null == CacheContext.ddNameMap.get(l.getBinStage()) ? "" : CacheContext.ddNameMap.get(l.getBinStage()));
 		});
 
@@ -125,7 +125,7 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 	public List<EvaluateRule> listAll(List<String> ids) {
 		QueryWrapper<EvaluateRule> qw = new QueryWrapper<>();
 
-		if (null == ids || ids.size()<=0) {
+		if (null == ids || ids.size() <= 0) {
 			throw new CustomException("获取规则参数空");
 		}
 		qw.lambda().in(EvaluateRule::getId, ids);
@@ -135,7 +135,7 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 
 	@Override
 	public List<EvaluateRuleInfoResDTO> getListInIdsInfos(List<String> ids, String binSection, String binStage) {
-		List<EvaluateRuleInfoResDTO> list = baseMapper.selectListInIdsInfos(ids,binSection,binStage);
+		List<EvaluateRuleInfoResDTO> list = baseMapper.selectListInIdsInfos(ids, binSection, binStage);
 		return list;
 	}
 
@@ -201,4 +201,16 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 		List<EvaluateRule> list = baseMapper.selectEvaluateRuleList(binSection, binStage, checkCycle, year);
 		return list;
 	}
+
+	@Override
+	public EvaluateRule getEvaluateRuleListByYear(String year, String checkCycle, String manageCategory) {
+		if ("海外".equals(manageCategory)) {
+			manageCategory = "国际业务";
+		}
+		if ("综合".equals(manageCategory)) {
+			manageCategory = "综合支持";
+		}
+		manageCategory = manageCategory + "生产经营";
+		return baseMapper.getEvaluateRuleListByYear(year, checkCycle, manageCategory);
+	}
 }

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java

@@ -174,4 +174,9 @@ public class IndicatorDictionaryServiceImpl extends ServiceImpl<IndicatorDiction
 		}
 		return null;
 	}
+
+	@Override
+	public List<IndicatorDictionary> getIndicatorDictionaryList(String indicatorId) {
+		return baseMapper.getIndicatorDictionaryList(indicatorId);
+	}
 }

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

@@ -1294,6 +1294,11 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 		return list;
 	}
 
+	@Override
+	public List<OrganizationEvaluationInfo> getOrganizationEvaluationInfoListByIndicatorDictionaryId(String indicatorDictionaryId) {
+		return baseMapper.getOrganizationEvaluationInfoListByIndicatorDictionaryId(indicatorDictionaryId);
+	}
+
 	/**
 	 * 状态抓换 (-1:不合格;0:待确认;1:已确认)
 	 * @return

+ 88 - 4
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/PerformanceBenchmarkInfoServiceImpl.java

@@ -1,13 +1,21 @@
 package com.ims.eval.service.impl;
 
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.IdUtil;
+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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.common.utils.StringUtils;
 import com.ims.eval.dao.PerformanceBenchmarkInfoMapper;
-import com.ims.eval.entity.PerformanceBenchmarkInfo;
-import com.ims.eval.service.IPerformanceBenchmarkInfoService;
+import com.ims.eval.entity.*;
+import com.ims.eval.service.*;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author hlf
  * @date 2024/3/28 14:07
@@ -16,14 +24,90 @@ import org.springframework.stereotype.Service;
 @Service
 public class PerformanceBenchmarkInfoServiceImpl extends ServiceImpl<PerformanceBenchmarkInfoMapper, PerformanceBenchmarkInfo> implements IPerformanceBenchmarkInfoService {
 
+	@Resource
+	private IEvaluateRuleService evaluateRuleService;
+
+	@Resource
+	private IEvaluateRuleInfoService evaluateRuleInfoService;
+
+	@Resource
+	private IIndicatorDictionaryService indicatorDictionaryService;
+
+	@Resource
+	private IOrganizationEvaluationInfoService organizationEvaluationInfoService;
+
 	@Override
-	public IPage<PerformanceBenchmarkInfo> listPage(Integer pageNum, Integer pageSize, Integer year, Integer quarter, Integer monthly, String manageCategory) {
+	public IPage<PerformanceBenchmarkInfo> listPage(Integer pageNum, Integer pageSize, String toolCategory, String manageCategory, String checkCycle) {
 		if (null == pageNum || null == pageSize) {
 			throw new RuntimeException("分页参数为空");
 		}
 		//构造分页构造器
 		Page<PerformanceBenchmarkInfo> page = new Page<>(pageNum, pageSize);
-		return baseMapper.selectListPage(page, year, quarter, monthly, manageCategory);
+		//寻标
+		xb("", checkCycle, manageCategory);
+		return baseMapper.selectListPage(page, manageCategory, checkCycle);
+	}
+
+	/**
+	 * 寻标
+	 */
+	private void xb(String year, String checkCycle, String manageCategory) {
+		List<PerformanceBenchmarkInfo> performanceBenchmarkInfoList = new ArrayList<>();
+		EvaluateRule evaluateRule = evaluateRuleService.getEvaluateRuleListByYear(year, checkCycle, manageCategory);
+		List<EvaluateRuleInfo> evaluateRuleInfoList = evaluateRuleInfoService.getEvaluateRuleInfoByEvaluateRuleId(evaluateRule.getId());
+		for (EvaluateRuleInfo evaluateRuleInfo : evaluateRuleInfoList) {
+			List<IndicatorDictionary> indicatorDictionaryList = indicatorDictionaryService.getIndicatorDictionaryList(evaluateRuleInfo.getIndicatorId());
+			if (indicatorDictionaryList.size() > 0) {
+				//计划值
+				IndicatorDictionary jhz = indicatorDictionaryList.stream().filter(p -> !p.getOptionCode().equals("WCZ")).findFirst().orElse(null);
+				//实际完成值
+				IndicatorDictionary wcz = indicatorDictionaryList.stream().filter(p -> p.getOptionCode().equals("WCZ")).findFirst().orElse(null);
+				if (jhz != null && wcz != null) {
+					List<OrganizationEvaluationInfo> jhzList = organizationEvaluationInfoService.getOrganizationEvaluationInfoListByIndicatorDictionaryId(jhz.getId());
+					List<OrganizationEvaluationInfo> wczList = organizationEvaluationInfoService.getOrganizationEvaluationInfoListByIndicatorDictionaryId(wcz.getId());
+					if (jhzList.size() == wczList.size()) {
+						for (int i = 0; i < wczList.size(); i++) {
+							OrganizationEvaluationInfo jhzObj = jhzList.get(i);
+							OrganizationEvaluationInfo wczObj = wczList.get(i);
+							PerformanceBenchmarkInfo performanceBenchmarkInfo = new PerformanceBenchmarkInfo();
+							performanceBenchmarkInfo.setId(Convert.toStr(IdUtil.getSnowflake(1, 1).nextId()));
+							performanceBenchmarkInfo.setCheckCycle(wczObj.getCheckCycle());
+							performanceBenchmarkInfo.setDegreeYear(Integer.valueOf(wczObj.getDegreeYear()));
+							performanceBenchmarkInfo.setQuarterlyMonth(Integer.valueOf(wczObj.getQuarterlyMonth()));
+							performanceBenchmarkInfo.setManageCategory(manageCategory);
+							performanceBenchmarkInfo.setCompanyId(wczObj.getOrganizationId());
+							performanceBenchmarkInfo.setCompanyName(wczObj.getCompanyName());
+							performanceBenchmarkInfo.setCompanyShort(wczObj.getCompanyShort());
+							performanceBenchmarkInfo.setInstallCapacity(wczObj.getInstallCapacity());
+							performanceBenchmarkInfo.setIndexName(evaluateRuleInfo.getDes());
+							performanceBenchmarkInfo.setPlannedValue(jhzObj.getQuantifiedValue());
+							performanceBenchmarkInfo.setCompleteValue(wczObj.getQuantifiedValue());
+							QueryWrapper<PerformanceBenchmarkInfo> qw = new QueryWrapper<>();
+							if (StringUtils.isNotEmpty(performanceBenchmarkInfo.getCheckCycle())) {
+								qw.lambda().eq(PerformanceBenchmarkInfo::getCheckCycle, performanceBenchmarkInfo.getCheckCycle());
+							}
+							if (null != performanceBenchmarkInfo.getDegreeYear()) {
+								qw.lambda().eq(PerformanceBenchmarkInfo::getDegreeYear, performanceBenchmarkInfo.getDegreeYear());
+							}
+							if (null != performanceBenchmarkInfo.getQuarterlyMonth()) {
+								qw.lambda().eq(PerformanceBenchmarkInfo::getQuarterlyMonth, performanceBenchmarkInfo.getQuarterlyMonth());
+							}
+							if (StringUtils.isNotEmpty(performanceBenchmarkInfo.getManageCategory())) {
+								qw.lambda().eq(PerformanceBenchmarkInfo::getManageCategory, performanceBenchmarkInfo.getManageCategory());
+							}
+							if (StringUtils.isNotEmpty(performanceBenchmarkInfo.getCompanyId())) {
+								qw.lambda().eq(PerformanceBenchmarkInfo::getCompanyId, performanceBenchmarkInfo.getCompanyId());
+							}
+							PerformanceBenchmarkInfo obj = baseMapper.selectOne(qw);
+							if (null == obj) {
+								performanceBenchmarkInfoList.add(performanceBenchmarkInfo);
+							}
+						}
+					}
+				}
+			}
+		}
+		super.saveBatch(performanceBenchmarkInfoList);
 	}
 
 }

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

@@ -0,0 +1,23 @@
+package com.ims.eval.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.eval.dao.UnitInstallCapacityMapper;
+import com.ims.eval.entity.UnitInstallCapacity;
+import com.ims.eval.service.IUnitInstallCapacityService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author hlf
+ * @date 2024/4/3 16:49
+ * 文件说明:
+ */
+@Service
+public class UnitInstallCapacityServiceImpl extends ServiceImpl<UnitInstallCapacityMapper, UnitInstallCapacity> implements IUnitInstallCapacityService {
+
+	@Override
+	public List<UnitInstallCapacity> getToolCategoryList(String manageCategory) {
+		return baseMapper.getToolCategoryList(manageCategory);
+	}
+}

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

@@ -84,4 +84,10 @@
 
     </select>
 
+    <select id="getEvaluateRuleInfoByEvaluateRuleId" resultType="com.ims.eval.entity.EvaluateRuleInfo">
+        select * from evaluate_rule_info eri
+        left join indicator i on i.id = eri.indicator_id
+        where eri.evaluate_rule_id = #{evaluateRuleId} and i.is_quantified = '是'
+    </select>
+
 </mapper>

+ 15 - 0
ims-service/ims-eval/src/main/resources/mappers/EvaluateRuleMapper.xml

@@ -121,5 +121,20 @@
         </where>
 
     </select>
+    <select id="getEvaluateRuleListByYear" resultType="com.ims.eval.entity.EvaluateRule">
+        select * from evaluate_rule
+        <where>
+            enable = true
+            <if test="year != null and year != ''">
+                AND year = #{year}
+            </if>
+            <if test="checkCycle != null and checkCycle != ''">
+                AND check_cycle = #{checkCycle}
+            </if>
+            <if test="des != null and des != ''">
+                AND des like CONCAT('%',#{manageCategory},'%')
+            </if>
+        </where>
+    </select>
 
 </mapper>

+ 5 - 0
ims-service/ims-eval/src/main/resources/mappers/IndicatorDicatonaryMapper.xml

@@ -20,5 +20,10 @@
 
     </select>
 
+    <select id="getIndicatorDictionaryList" resultType="com.ims.eval.entity.IndicatorDictionary">
+        select * from indicator_dictionary
+        where indicator_id = #{indicatorId} and is_show = 't' and is_quantified = 't' and option_name not like CONCAT('%','差值','%') and option_name not like CONCAT('%','得分','%')
+    </select>
+
 
 </mapper>

+ 1 - 1
ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationInfoMapper.xml

@@ -268,7 +268,7 @@
     <select id="selectEvaluationIndicatorList" resultType="java.util.Map">
 
         select  DISTINCT i.id,i.indicator_name,ri.order_num from organization_evaluation_info   ei
-            LEFT JOIN evaluate_rule_info ri on ei.evaluate_rule_info_id = ri.id
+        LEFT JOIN evaluate_rule_info ri on ei.evaluate_rule_info_id = ri.id
         LEFT JOIN evaluate_rule er on er.id = ri.evaluate_rule_id
         INNER JOIN indicator i on i.id = ri.indicator_id
         <where>

+ 8 - 15
ims-service/ims-eval/src/main/resources/mappers/PerformanceBenchmarkInfoMapper.xml

@@ -5,13 +5,13 @@
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.ims.eval.entity.PerformanceBenchmarkInfo">
         <id column="id" property="id"/>
-        <result column="year" property="year"/>
-        <result column="quarter" property="quarter"/>
-        <result column="monthly" property="monthly"/>
+        <result column="check_cycle" property="checkCycle"/>
+        <result column="degree_year" property="degreeYear"/>
+        <result column="quarterly_month" property="quarterlyMonth"/>
         <result column="manage_category" property="manageCategory"/>
-        <result column="serial_number" property="serialNumber"/>
         <result column="company_id" property="companyId"/>
         <result column="company_name" property="companyName"/>
+        <result column="company_short" property="companyShort"/>
         <result column="install_capacity" property="installCapacity"/>
         <result column="index_name" property="indexName"/>
         <result column="planned_value" property="plannedValue"/>
@@ -23,27 +23,20 @@
 
     <!-- 通用查询结果列 -->
     <sql id="selectPerformanceBenchmarkInfoVo">
-        select id, `year`, quarter, monthly, manage_category, serial_number, company_id, company_name, install_capacity, index_name, planned_value, complete_value, recommended_value, scaling_value, is_pole
+        select id, check_cycle, degree_year, quarterly_month, manage_category, company_id, company_name, company_short, install_capacity, index_name, planned_value, complete_value, recommended_value, scaling_value, is_pole
         from performance_benchmark_info
     </sql>
 
     <select id="selectListPage" resultType="com.ims.eval.entity.PerformanceBenchmarkInfo">
         select * from performance_benchmark_info
         <where>
-            <if test="year != null and year != ''">
-                AND year = #{year}
-            </if>
-            <if test="quarter != null and quarter != ''">
-                AND quarter = #{quarter}
-            </if>
-            <if test="monthly != null and monthly != ''">
-                AND monthly = #{monthly}
-            </if>
             <if test="manageCategory != null and manageCategory != ''">
                 AND manage_category = #{manageCategory}
             </if>
+            <if test="checkCycle != null and checkCycle != ''">
+                AND check_cycle = #{checkCycle}
+            </if>
         </where>
-        order by serial_number asc
     </select>
 
 

+ 30 - 0
ims-service/ims-eval/src/main/resources/mappers/UnitInstallCapacityMapper.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ims.eval.dao.UnitInstallCapacityMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.ims.eval.entity.UnitInstallCapacity">
+        <id column="id" property="id"/>
+        <id column="unit_id" property="unitId"/>
+        <result column="unit_name" property="unitName"/>
+        <result column="unit_short" property="unitShort"/>
+        <result column="install_capacity" property="installCapacity"/>
+        <result column="business_type" property="businessType"/>
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="selectUnitInstallCapacityVo">
+        select id,
+               unit_id,
+               unit_name,
+               unit_short,
+               install_capacity,
+               business_type
+        from unit_install_capacity
+    </sql>
+
+    <select id="getToolCategoryList" resultType="com.ims.eval.entity.UnitInstallCapacity">
+        select * from unit_install_capacity where business_type = #{manageCategory}
+    </select>
+
+</mapper>