瀏覽代碼

业绩对标管理功能开发

hlf 9 月之前
父節點
當前提交
dcc1493336
共有 28 個文件被更改,包括 411 次插入138 次删除
  1. 6 8
      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. 11 11
      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. 1 0
      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. 69 10
      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. 94 71
      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 - 8
ims-service/ims-eval/src/main/java/com/ims/eval/controller/PerformanceBenchmarkingManageController.java

@@ -24,21 +24,19 @@ public class PerformanceBenchmarkingManageController {
 	 *
 	 * @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;
 }

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

@@ -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;
+
+}

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

@@ -24,4 +24,5 @@ public interface IEvaluateRuleInfoService extends IService<EvaluateRuleInfo> {
 
 	List<EvaluateRuleInfoIndicatorDTO> listByIndicatorInfo(List<String> ruleInfoIds);
 
+    List<EvaluateRuleInfo> getEvaluateRuleInfoByEvaluateRuleId(String evaluateRuleId);
 }

+ 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 saveOrUpdate(EvaluateRuleInfo entity) {

+ 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

+ 69 - 10
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/PerformanceBenchmarkInfoServiceImpl.java

@@ -1,14 +1,20 @@
 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.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
@@ -25,30 +31,83 @@ public class PerformanceBenchmarkInfoServiceImpl extends ServiceImpl<Performance
 	private IEvaluateRuleInfoService evaluateRuleInfoService;
 
 	@Resource
-	private IOrganizationEvaluationService organizationEvaluationService;
+	private IIndicatorDictionaryService indicatorDictionaryService;
 
 	@Resource
 	private IOrganizationEvaluationInfoService organizationEvaluationInfoService;
 
-	@Resource
-	private IOrganizationEvaluationRuleService organizationEvaluationRuleService;
-
 	@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(){
-
-
+	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

@@ -81,4 +81,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>

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

@@ -4,40 +4,41 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.ims.eval.entity.OrganizationEvaluationInfo">
-        <id column="id" property="id" />
-        <result column="organization_evaluation_id" property="organizationEvaluationId" />
-        <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="organization_evaluation_id" property="organizationEvaluationId"/>
+        <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"/>
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, organization_evaluation_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
+        , organization_evaluation_id, indicator_id, indicator_dictionary_id, option_code, is_quantified, quantified_value, non_quantified_value, create_time, create_by, update_time, update_by, remark
     </sql>
 
 
-<!--    <update id="updateEvaluationInfo">-->
+    <!--    <update id="updateEvaluationInfo">-->
 
-<!--            <foreach collection="evaluationInfos" item="item" index="index" separator=";">-->
-<!--                <trim suffixOverrides=",">-->
-<!--                    UPDATE organization_evaluation_info-->
-<!--                    SET quantified_Value = ${item.quantifiedValue},-->
-<!--                    non_Quantified_Value = '${item.nonQuantifiedValue}'-->
-<!--                    WHERE id = '${item.id}'-->
-<!--                </trim>-->
-<!--            </foreach>-->
+    <!--            <foreach collection="evaluationInfos" item="item" index="index" separator=";">-->
+    <!--                <trim suffixOverrides=",">-->
+    <!--                    UPDATE organization_evaluation_info-->
+    <!--                    SET quantified_Value = ${item.quantifiedValue},-->
+    <!--                    non_Quantified_Value = '${item.nonQuantifiedValue}'-->
+    <!--                    WHERE id = '${item.id}'-->
+    <!--                </trim>-->
+    <!--            </foreach>-->
 
 
-<!--    </update>-->
+    <!--    </update>-->
 
     <select id="selectListEvaluationInfoId"
             resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
@@ -69,7 +70,7 @@
         inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
         inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
         left join indicator i on ei.indicator_id = i.id
-        left join  evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
+        left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.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
@@ -78,7 +79,7 @@
         <where>
 
             <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
-                and  ei.organization_evaluation_id  = #{organizationEvaluationId}
+                and ei.organization_evaluation_id = #{organizationEvaluationId}
             </if>
 
             <if test="optionCode !=null and optionCode !=''">
@@ -86,17 +87,20 @@
             </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>
 
-            and id.option_code not in ('CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
+            and id.option_code not in
+            ('CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
         </where>
 
-        order by be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.child_code,id.option_code,id.option_order asc
+        order by
+        be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.child_code,id.option_code,id.option_order
+        asc
 
     </select>
 
@@ -156,7 +160,7 @@
         inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
         inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
         left join indicator i on ei.indicator_id = i.id
-        left join  evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
+        left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.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
@@ -165,7 +169,7 @@
         <where>
 
             <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
-                and  ei.organization_evaluation_id  = #{organizationEvaluationId}
+                and ei.organization_evaluation_id = #{organizationEvaluationId}
             </if>
 
             <if test="optionCode !=null and optionCode !=''">
@@ -173,37 +177,41 @@
             </if>
 
             <if test="dept !=null and dept !=''">
-                and  dd.key_name  like   CONCAT('%',#{dept},'%')
+                and dd.key_name like CONCAT('%',#{dept},'%')
             </if>
 
             <if test="organizationShortName !=null and organizationShortName !=''">
-                and oer.organization_short_name  like   CONCAT('%',#{organizationShortName},'%')
+                and oer.organization_short_name like CONCAT('%',#{organizationShortName},'%')
             </if>
 
             <if test="indicatorName !=null and indicatorName !=''">
-                and  i.indicator_name  like   CONCAT('%',#{indicatorName},'%')
+                and i.indicator_name like CONCAT('%',#{indicatorName},'%')
             </if>
 
             <if test="binSection !=null and binSection !=''">
-                and  bn.id = #{binSection}
+                and bn.id = #{binSection}
             </if>
 
             <if test="isQuantified !=null and isQuantified !=''">
-                and  ei.is_quantified = #{isQuantified}
+                and ei.is_quantified = #{isQuantified}
             </if>
 
             <if test="organizationId !=null and organizationId !=''">
-                and  oer.organization_id = #{organizationId}
+                and oer.organization_id = #{organizationId}
             </if>
 
-            and id.option_code not in ('DF','DF2','CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
+            and id.option_code not in
+            ('DF','DF2','CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
             and id.is_show = true
         </where>
 
-        order by oer.organization_short_name,be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.option_order asc
+        order by
+        oer.organization_short_name,be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.option_order
+        asc
 
     </select>
-    <select id="selectByIdAndEvaluationInfoId" resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
+    <select id="selectByIdAndEvaluationInfoId"
+            resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
 
         select
         ei.id,
@@ -235,7 +243,7 @@
         inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
         inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
         left join indicator i on ei.indicator_id = i.id
-        left join  evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
+        left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.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
@@ -243,21 +251,21 @@
         inner join data_dictionary dd on dd.data_key = i.dept_id
         <where>
 
-        <if test="id !=null and id !=''">
-            and  ei.id  = #{id}
-        </if>
+            <if test="id !=null and id !=''">
+                and ei.id = #{id}
+            </if>
 
-        <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
-            and  ei.organization_evaluation_id  = #{organizationEvaluationId}
-        </if>
+            <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
+                and ei.organization_evaluation_id = #{organizationEvaluationId}
+            </if>
 
-        <if test="optionCode !=null and optionCode !=''">
-            and  id.option_code = #{optionCode}
-        </if>
+            <if test="optionCode !=null and optionCode !=''">
+                and id.option_code = #{optionCode}
+            </if>
 
-        <if test="indicatorId !=null and indicatorId !=''">
-            and  i.id = #{indicatorId}
-        </if>
+            <if test="indicatorId !=null and indicatorId !=''">
+                and i.id = #{indicatorId}
+            </if>
 
 
         </where>
@@ -267,32 +275,33 @@
     </select>
     <select id="selectEvaluationIndicatorList" resultType="java.util.Map">
 
-        select  DISTINCT i.id,i.indicator_name,ri.order_num from organization_evaluation_info   ei
+        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 er on er.id = ri.evaluate_rule_id
         INNER JOIN indicator i on i.id = ri.indicator_id
         <where>
 
             <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
-                and  ei.organization_evaluation_id = #{organizationEvaluationId}
+                and ei.organization_evaluation_id = #{organizationEvaluationId}
             </if>
 
             <if test="binSection !=null and binSection !=''">
-                and  er.bin_section = #{binSection}
+                and er.bin_section = #{binSection}
             </if>
 
             <if test="binStage !=null and binStage !=''">
-                and  er.bin_stage = #{binStage}
+                and er.bin_stage = #{binStage}
             </if>
 
         </where>
 
-        order by  ri.order_num asc
+        order by ri.order_num asc
 
     </select>
 
 
-    <select id="selectEvaluationInfoList" resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
+    <select id="selectEvaluationInfoList"
+            resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
 
         select
         ei.id,
@@ -327,7 +336,7 @@
         inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
         inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
         left join indicator i on ei.indicator_id = i.id
-        left join  evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
+        left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.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
@@ -336,12 +345,12 @@
         <where>
 
             <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
-                and  ei.organization_evaluation_id  = #{organizationEvaluationId}
+                and ei.organization_evaluation_id = #{organizationEvaluationId}
             </if>
 
 
             <if test="indicatorId !=null and indicatorId !=''">
-                and  ei.indicator_id = #{indicatorId}
+                and ei.indicator_id = #{indicatorId}
             </if>
 
 
@@ -351,22 +360,21 @@
 
 
             <if test="binStage !=null and binStage !=''">
-                and  be.id = #{binStage}
+                and be.id = #{binStage}
             </if>
 
             <if test="organizationId !=null and organizationId !=''">
-                and  oer.organization_id = #{organizationId}
+                and oer.organization_id = #{organizationId}
             </if>
 
 
             <if test="organizationShortName !=null and organizationShortName !=''">
-                and  oer.organization_short_name  like   CONCAT('%',#{organizationShortName},'%')
+                and oer.organization_short_name like CONCAT('%',#{organizationShortName},'%')
             </if>
 
 
-
-
-            and id.option_code not in ('CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','LRGXKHMAX','LRGXKHMIN')
+            and id.option_code not in
+            ('CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','LRGXKHMAX','LRGXKHMIN')
         </where>
 
         order by oer.order_num asc
@@ -381,10 +389,10 @@
         <where>
 
             <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
-                and  ei.organization_evaluation_id = #{organizationEvaluationId}
+                and ei.organization_evaluation_id = #{organizationEvaluationId}
             </if>
             <if test="deptId !=null and deptId !=''">
-                and  ei.dept_id = #{deptId}
+                and ei.dept_id = #{deptId}
             </if>
             <if test="state !=null">
                 AND ei.state in
@@ -393,5 +401,20 @@
         </where>
     </select>
 
+    <select id="getOrganizationEvaluationInfoListByIndicatorDictionaryId" resultType="com.ims.eval.entity.OrganizationEvaluationInfo">
+        select
+        oei.*,
+        oe.check_cycle checkCycle,
+        oe.year degreeYear,
+        oe.month quarterlyMonth,
+        uic.unit_name companyName,
+        uic.unit_short companyShort,
+        uic.install_capacity installCapacity
+        from organization_evaluation_info oei
+        left join organization_evaluation oe on oe.id = oei.organization_evaluation_id
+        left join unit_install_capacity uic on uic.unit_id = oei.organization_id
+        where oei.indicator_dictionary_id = #{indicatorDictionaryId} and oei.is_quantified = 't'
+        order by oei.organization_id asc
+    </select>
 
 </mapper>

+ 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>