Browse Source

Merge remote-tracking branch 'origin/master'

‘xugp 1 year ago
parent
commit
68b4485181
21 changed files with 250 additions and 103 deletions
  1. 3 0
      ims-service/ims-eval/src/main/java/com/ims/eval/cache/CacheContext.java
  2. 11 7
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/BinStageController.java
  3. 8 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptResponsibilityController.java
  4. 8 2
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluateReportController.java
  5. 2 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorController.java
  6. 9 3
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorTypeController.java
  7. 14 1
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationRuleController.java
  8. 8 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/IndicatorMapper.java
  9. 4 1
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationEvaluationRuleMapper.java
  10. 8 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinStage.java
  11. 7 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/Indicator.java
  12. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/IndicatorType.java
  13. 21 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/request/ResponsibilityIndicatorInfoUpdateDTO.java
  14. 23 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/ResponsibilityIndicatorInfoResDTO.java
  15. 2 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IDeptResponsibilityService.java
  16. 3 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationRuleService.java
  17. 1 38
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorServiceImpl.java
  18. 40 6
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationRuleServiceImpl.java
  19. 46 0
      ims-service/ims-eval/src/main/resources/mappers/IndicatorMapper.xml
  20. 23 0
      ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationRuleMapper.xml
  21. 4 45
      ims-service/ims-eval/src/main/resources/mappers/ResponsibilityIndicatorInfoMapper.xml

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

@@ -49,6 +49,7 @@ public class CacheContext implements CommandLineRunner {
 	public static List<BinStage> bseList = new ArrayList<>();
 	public static Map<String, String> bseIdMap = new HashMap<>();
 
+
 	//生产经营业务分类
 	public static List<BinSection> bsnList = new ArrayList<>();
 
@@ -114,6 +115,8 @@ public class CacheContext implements CommandLineRunner {
 		bseList.stream().forEach(d -> {
 			bseIdMap.put(d.getId(), d.getStageName());
 		});
+
+
 	}
 
 	/**

+ 11 - 7
ims-service/ims-eval/src/main/java/com/ims/eval/controller/BinStageController.java

@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -37,18 +38,21 @@ public class BinStageController {
 	/**
 	 * 查询
 	 *
-	 * @param id       主键ID
-	 * @param stageName  name
-	 * @param stageCode  code
+	 * @param id         主键ID
+	 * @param type       类型
 	 * @return
 	 */
 	//@ImsPreAuth("eval:binStage:view")
 	@GetMapping(value = "list")
 	public R list(@RequestParam(value = "id", required = false) String id,
-				  @RequestParam(value = "stageName", required = false) String stageName,
-				  @RequestParam(value = "stageCode", required = false) String stageCode) {
-//		List<BinStage> list = binStageService.list(id, stageName, stageCode);
-		List<BinStage> list =CacheContext.bseList;
+				  @RequestParam(value = "type", required = false) String type) {
+		List<BinStage> list =null;
+		if(null != type&&type.length()>0){
+			 list =CacheContext.bseList.stream().filter(t->t.getType().equals(type)).collect(Collectors.toList());;
+		}else {
+			list =CacheContext.bseList;
+		}
+
 		return R.ok().data(list);
 	}
 

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

@@ -127,6 +127,9 @@ public class DeptResponsibilityController {
 
 
 
+
+
+
 	/**
 	 *
 	 * @param id 目标责任书id
@@ -177,4 +180,9 @@ public class DeptResponsibilityController {
 		return R.ok().data(list);
 	}
 
+
+
+
+
+
 }

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

@@ -2,6 +2,7 @@ package com.ims.eval.controller;
 
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.EvaluateReport;
 import com.ims.eval.entity.EvaluateRule;
 import com.ims.eval.entity.Indicator;
@@ -40,8 +41,13 @@ public class EvaluateReportController {
 	@PostMapping(value = "generateEvaluateReport")
 	public R generateEvaluateReport(@RequestParam(value = "organizationEvaluationId", required = false) String organizationEvaluationId,
 									@RequestParam(value = "backroll", required = false) boolean backroll) {
-		boolean b = evaluateReportService.generateEvaluateReport(organizationEvaluationId,backroll);
-		return R.ok().data(b);
+		try {
+			boolean b = evaluateReportService.generateEvaluateReport(organizationEvaluationId,backroll);
+			return R.ok().data(b);
+		} catch (CustomException e) {
+			return R.customError(e.getMessage());
+		}
+
 	}
 
 

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

@@ -198,4 +198,6 @@ public class IndicatorController {
 	}
 
 
+
+
 }

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

@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -37,17 +38,22 @@ public class IndicatorTypeController {
 	 * 查询
 	 *
 	 * @param id       主键ID
-	 * @param typeName  name
+	 * @param type  type
 	 * @param typeCode  code
 	 * @return
 	 */
 	//@ImsPreAuth("eval:indicatorType:view")
 	@GetMapping(value = "list")
 	public R list(@RequestParam(value = "id", required = false) String id,
-				  @RequestParam(value = "typeName", required = false) String typeName,
+				  @RequestParam(value = "type", required = false) String type,
 				  @RequestParam(value = "typeCode", required = false) String typeCode) {
 //		List<IndicatorType> list = iIndicatorTypeService.list(id, typeName, typeCode);
-		List<IndicatorType> list =CacheContext.itList;
+		List<IndicatorType> list =null;
+		if(null != type&&type.length()>0){
+			list =CacheContext.itList.stream().filter(t->t.getType().equals(type)).collect(Collectors.toList());;
+		}else{
+			list =CacheContext.itList;
+		}
 		return R.ok().data(list);
 	}
 

+ 14 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationRuleController.java

@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -145,7 +146,19 @@ public class OrganizationEvaluationRuleController {
 	}
 
 
-
+	/**
+	 * 更具目标责任书获取对应的组织考评股则id
+	 * @param id
+	 * @param type (目标责任书:mb;考评记录:kp)
+	 * @return
+	 */
+	@GetMapping(value = "getOrganizationRule")
+	public R getOrganizationRule(
+		@RequestParam(value = "id", required = false) String id,
+		@RequestParam(value = "type", required = true) String type) {
+		List<OrganizationEvaluationRule>  list = organizationEvaluationRuleService.getOrganizationRuleId(id,type);
+		return R.ok().data(list);
+	}
 
 
 }

+ 8 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/IndicatorMapper.java

@@ -30,6 +30,14 @@ public interface IndicatorMapper extends BaseMapper<Indicator> {
 							@Param("dept") String dept,
 							@Param("company") String company);
 
+	List<Indicator> seleclistAll(@Param("id") String id,
+									@Param("indicatorName") String indicatorName,
+									@Param("indicatorCode")  String indicatorCode,
+									@Param("binSection") String binSection,
+									@Param("binStage") String binStage,
+									@Param("dept") String dept,
+									@Param("company") String company);
+
 
 	List<IndicatorResDTO> selectListByIds(@Param("indicatorIds")List<String> indicatorIds);
 

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

@@ -27,7 +27,7 @@ public interface OrganizationEvaluationRuleMapper extends BaseMapper<Organizatio
 										   @Param("evaluationCycle") String evaluationCycle);
 
 
-	List<OrganizationEvaluationRule> selectListAll(String id,
+	List<OrganizationEvaluationRule> selectListAll(@Param("id")String id,
 												   @Param("organizationName") String organizationName,
 												   @Param("organizationId") String organizationId,
 												   @Param("organizationType") String organizationType,
@@ -36,5 +36,8 @@ public interface OrganizationEvaluationRuleMapper extends BaseMapper<Organizatio
 												   @Param("evaluationCycle") String evaluationCycle);
 
 
+	List<OrganizationEvaluationRule> selectOrganizationRuleId(@Param("ids") List<String> ids);
+
+
 
 }

+ 8 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinStage.java

@@ -47,4 +47,12 @@ public class BinStage extends Model {
     private Integer orderNum;
 
 
+	/**
+	 * 类型(业务处理)对数据不同的分组
+	 */
+	private String type;
+
+
+
+
 }

+ 7 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/Indicator.java

@@ -96,6 +96,13 @@ public class Indicator extends Model {
      */
     private String dept;
 
+	/**
+	 * 部门name
+	 */
+	@TableField(exist = false)
+	private String deptName;
+
+
     /**
      * 公司
      */

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/IndicatorType.java

@@ -44,5 +44,10 @@ public class IndicatorType extends Model {
      */
     private Integer orderNum;
 
+	/**
+	 * 类型(业务处理)对数据不同的分组
+	 */
+	private String type;
+
 
 }

+ 21 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/request/ResponsibilityIndicatorInfoUpdateDTO.java

@@ -14,6 +14,27 @@ public class ResponsibilityIndicatorInfoUpdateDTO {
 	 */
 	private String id;
 
+	/**
+	 * 责任书id
+	 */
+	private String deptResponsibilityId;
+
+
+	/**
+	 * 组织规则id
+	 */
+	private String organizationEvaluationRuleId;
+
+	/**
+	 * 指标ID
+	 */
+	private String indicatorId;
+
+	/**
+	 * 指标项Code
+	 */
+	private String optionCode;
+
 
 	/**
 	 * 能否量化

+ 23 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/ResponsibilityIndicatorInfoResDTO.java

@@ -1,6 +1,7 @@
 package com.ims.eval.entity.dto.response;
 
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
@@ -17,6 +18,11 @@ public class ResponsibilityIndicatorInfoResDTO {
 	private String id;
 
 	/**
+	 * 责任书id
+	 */
+	private String deptResponsibilityId;
+
+	/**
 	 * 指标ID
 	 */
 	private String indicatorId;
@@ -29,8 +35,20 @@ public class ResponsibilityIndicatorInfoResDTO {
 	/**
 	 * 业务阶段
 	 */
+	private String binStage;
+
+	/**
+	 * 业务阶段
+	 */
 	private String stageName;
 
+
+	/**
+	 * 业务版块
+	 */
+	private String binSection;
+
+
 	/**
 	 * 业务板块
 	 */
@@ -42,6 +60,11 @@ public class ResponsibilityIndicatorInfoResDTO {
 	private String organizationName;
 
 	/**
+	 * 组织规则id
+	 */
+	private String organizationEvaluationRuleId;
+
+	/**
 	 * 责任部门
 	 */
 	private String deptName;

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

@@ -35,4 +35,6 @@ public interface IDeptResponsibilityService extends IService<DeptResponsibility>
 	boolean editState(String id,String state);
 
 
+
+
 }

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

@@ -26,4 +26,7 @@ public interface IOrganizationEvaluationRuleService extends IService<Organizatio
 
 	List<OrganizationEvaluationRule> listByIsCheck(String organizationType,String evaluationCycle,Boolean isCheck,Boolean delFlag);
 
+
+	List<OrganizationEvaluationRule> getOrganizationRuleId(String evalOrRespId, String type);
+
 }

+ 1 - 38
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorServiceImpl.java

@@ -103,44 +103,7 @@ public class IndicatorServiceImpl extends ServiceImpl<IndicatorMapper, Indicator
 	@Override
 	public List<Indicator> listAll(String id, String indicatorName, String indicatorCode, String binSection, String binStage, String dept, String company) {
 		QueryWrapper<Indicator> qw = new QueryWrapper<>();
-
-
-		if (StringUtils.isNotEmpty(id)) {
-			qw.lambda().eq(Indicator::getId, id);
-		}
-
-		if (StringUtils.isNotEmpty(indicatorName)) {
-			qw.lambda().like(Indicator::getIndicatorName, indicatorName);
-		}
-
-		if (StringUtils.isNotEmpty(indicatorCode)) {
-			qw.lambda().like(Indicator::getIndicatorCode, indicatorCode);
-		}
-
-		if (StringUtils.isNotEmpty(binSection)) {
-			qw.lambda().eq(Indicator::getBinSection, binSection);
-		}
-
-		if (StringUtils.isNotEmpty(binStage)) {
-			qw.lambda().eq(Indicator::getBinStage, binStage);
-		}
-
-		if (StringUtils.isNotEmpty(dept)) {
-			qw.lambda().eq(Indicator::getDept, dept);
-		}
-
-		if (StringUtils.isNotEmpty(company)) {
-			qw.lambda().eq(Indicator::getCompany, company);
-		}
-		qw.lambda().orderByAsc(Indicator::getOrderNum);
-
-		List<Indicator> list = baseMapper.selectList(qw);
-
-		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()));
-		});
-
+		List<Indicator> list = baseMapper.seleclistAll(id, indicatorName, indicatorCode, binSection, binStage, dept, company);
 		return list;
 	}
 

+ 40 - 6
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationRuleServiceImpl.java

@@ -6,22 +6,20 @@ 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.EvaluateRule;
-import com.ims.eval.entity.IndicatorType;
-import com.ims.eval.entity.OrganizationEvaluationRule;
+import com.ims.eval.entity.*;
 import com.ims.eval.dao.OrganizationEvaluationRuleMapper;
 import com.ims.eval.entity.dto.request.OrganizationEvaluationRuleDTO;
+import com.ims.eval.service.IDeptResponsibilityService;
 import com.ims.eval.service.IEvaluateRuleService;
 import com.ims.eval.service.IOrganizationEvaluationRuleService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.eval.service.IOrganizationEvaluationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.Serializable;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * <p>
@@ -38,6 +36,13 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 	@Autowired
 	private IEvaluateRuleService evaluateRuleService;
 
+	@Autowired
+	private IOrganizationEvaluationService organizationEvaluationService;
+
+
+	@Autowired
+	private IDeptResponsibilityService deptResponsibilityService;
+
 
 	@Override
 	public IPage<OrganizationEvaluationRule> list(Integer pageNum, Integer pageSize, String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle) {
@@ -180,6 +185,35 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 		return list;
 	}
 
+	@Override
+	public List<OrganizationEvaluationRule> getOrganizationRuleId(String evalOrRespId, String type) {
+
+		List<String> ids = new ArrayList<>();
+		if("mb".equals(type)){
+			DeptResponsibility deptResponsibility  = deptResponsibilityService.getById(evalOrRespId);
+			if(null == deptResponsibility){
+				throw new CustomException("考评记录为空");
+			}
+			ids = Arrays.asList(deptResponsibility.getOrganizationEvaluationRuleId().split(","));
+		}
+		if("kp".equals(type)){
+			OrganizationEvaluation  organizationEvaluation = organizationEvaluationService.getById(evalOrRespId);
+			if(null == organizationEvaluation){
+				throw new CustomException("考评记录为空");
+			}
+			ids = Arrays.asList(organizationEvaluation.getOrganizationEvaluationRuleId().split(","));
+		}
+
+
+		if(ids.size()<=0){
+			throw new CustomException("考评记录重配置为空");
+		}
+//		QueryWrapper<OrganizationEvaluationRule> qw = new QueryWrapper<>();
+//		qw.lambda().in(OrganizationEvaluationRule::getId, ids);
+		List<OrganizationEvaluationRule> list = baseMapper.selectOrganizationRuleId(ids);
+
+		return list;
+	}
 
 
 	@Transactional

+ 46 - 0
ims-service/ims-eval/src/main/resources/mappers/IndicatorMapper.xml

@@ -119,4 +119,50 @@
         where i.id = #{id}
     </select>
 
+    <select id="seleclistAll" resultType="com.ims.eval.entity.Indicator">
+        SELECT
+        i.*,t.type_name indicatorTypeName,
+        b.stage_name binStageName,
+        bs.section_name binSectionName,
+        dd.key_name deptName
+        FROM
+        indicator i
+        LEFT JOIN indicator_type t  ON i.indicator_type_id = t.id
+        LEFT JOIN bin_stage b  ON i.bin_stage = b.id
+        LEFT JOIN bin_section bs  ON i.bin_section = bs.id
+        inner join data_dictionary dd on dd.data_key = i.dept
+        <where>
+
+
+            <if test="id !=null and id !=''">
+                AND i.id = #{id}
+            </if>
+            <if test="indicatorName !=null and indicatorName !=''">
+                AND i.indicator_name like   CONCAT('%',#{indicatorName},'%')
+            </if>
+
+            <if test="indicatorCode !=null and indicatorCode !=''">
+                AND i.indicator_code = #{indicatorCode}
+            </if>
+
+            <if test="binSection !=null and binSection !=''">
+                AND i.bin_section = #{binSection}
+            </if>
+
+            <if test="binStage !=null and binStage !=''">
+                AND i.bin_stage = #{binStage}
+            </if>
+
+            <if test="dept !=null and dept !=''">
+                AND i.dept = #{dept}
+            </if>
+
+            <if test="company !=null and company !=''">
+                AND i.company = #{company}
+            </if>
+
+        </where>
+
+    </select>
+
 </mapper>

+ 23 - 0
ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationRuleMapper.xml

@@ -115,6 +115,29 @@
 
         </where>
     </select>
+    <select id="selectOrganizationRuleId" resultType="com.ims.eval.entity.OrganizationEvaluationRule">
+        SELECT
+        r.*,
+        i.rule_name,
+        bs.section_name binSectionName,
+        be.stage_name binStageName
+        FROM
+        organization_evaluation_rule r
+        LEFT JOIN evaluate_rule i ON r.evaluate_rule_id = i.ID
+        LEFT JOIN bin_section bs  ON r.bin_section = bs.id
+        LEFT JOIN bin_stage be on be.id = r.bin_stage
+        <where>
+
+
+            <if test="ids !=null">
+                AND r.id in
+                <foreach item="item" collection="ids" separator="," open="(" close=")" index="">'${item}'</foreach>
+            </if>
+
+            order by order_num asc
+
+        </where>
+    </select>
 
 
 </mapper>

+ 4 - 45
ims-service/ims-eval/src/main/resources/mappers/ResponsibilityIndicatorInfoMapper.xml

@@ -24,61 +24,20 @@
         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
     </sql>
 
-<!--    <select id="listByresponsibilityId" resultType="com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO">-->
-
-<!--        select-->
-<!--        ri.id,-->
-<!--        ri.indicator_id,-->
-<!--        ri.is_quantified,-->
-<!--        be.stage_name,-->
-<!--        bn.section_name,-->
-<!--        dr.organization_name,-->
-<!--        dd.key_name deptName,-->
-<!--        it.type_name,-->
-<!--        i.indicator_name,-->
-<!--        id.child_name,-->
-<!--        id.option_name,-->
-<!--        id.option_code,-->
-<!--        ri.quantified_value,-->
-<!--        ri.non_quantified_value,-->
-<!--        i.unit-->
-<!--        from-->
-<!--            responsibility_indicator_info ri-->
-<!--            inner join dept_responsibility dr on dr.id = ri.dept_responsibility_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-->
-<!--            left join indicator_dictionary id on ri.indicator_dictionary_id = id.id-->
-<!--            inner join data_dictionary dd on dd.data_key = i.dept-->
-<!--        <where>-->
-<!--            ri.dept_responsibility_id in  <foreach item="item" collection="deptResponsibilityIds" separator="," open="(" close=")" index="">'${item}'</foreach>-->
-
-<!--            <if test="optionCode !=null and optionCode !=''">-->
-<!--                and id.option_code = #{optionCode}-->
-<!--            </if>-->
-
-<!--            <if test="dept !=null and dept !=''">-->
-<!--                and  dd.key_name = #{dept}-->
-<!--            </if>-->
-
-
-<!--        </where>-->
-
-<!--            order by id.option_code desc-->
-
-<!--    </select>-->
-<!--    -->
 
 
     <select id="listByresponsibilityId" resultType="com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO">
 
         select
         ri.id,
+        ri.dept_responsibility_id,
         ri.indicator_id,
         ri.is_quantified,
         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,