Browse Source

指标添加 所有指标路径

dev_shibei_match
jianjun 5 years ago
parent
commit
84b06adb5e
  1. 52
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridSubScoreDTO.java
  2. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java
  5. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java
  6. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java
  7. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java
  8. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java
  9. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java
  10. 42
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java
  11. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  12. 20
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupServiceImpl.java
  13. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml
  14. 32
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml
  15. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDao.xml
  16. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml
  17. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailTemplateDao.xml
  18. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupTemplateDao.xml

52
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridSubScoreDTO.java

@ -0,0 +1,52 @@
package com.epmet.dto.indexcal;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 网格相关分值
*
* @author yinzuomei@elink-cn.com
* @date 2020/8/31 16:38
*/
@Data
public class GridSubScoreDTO implements Serializable {
/**
* 网格Id
*/
private String gridId;
/**
* 客户Id
*/
private String customerId;
/**
* 网格所属的机关Id
*/
private String agencyId;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId;
/**
* 年度ID: yyyy
*/
private String yearId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
private List<GridScoreDetailDTO> detailList;
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.indexcal; package com.epmet.dao.evaluationindex.indexcal;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.GridSubScoreDTO;
import com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity; import com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -55,4 +56,15 @@ public interface GridSubScoreDao extends BaseDao<GridSubScoreEntity> {
@Param("monthId") String monthId, @Param("monthId") String monthId,
@Param("allParentIndexCode") String allParentIndexCode, @Param("allParentIndexCode") String allParentIndexCode,
@Param("deleteSize") Integer deleteSize); @Param("deleteSize") Integer deleteSize);
/**
* desc:获取网格5级指标分数 明细
*
* @param customerId
* @param monthId
* @param offset
* @param pageSize
* @return
*/
List<GridSubScoreDTO> selectSubListGroup(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize);
} }

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java

@ -31,4 +31,6 @@ import org.apache.ibatis.annotations.Mapper;
public interface IndexGroupDao extends BaseDao<IndexGroupEntity> { public interface IndexGroupDao extends BaseDao<IndexGroupEntity> {
int inertGroupFromTable(String customerId); int inertGroupFromTable(String customerId);
int deleteByCustomerId(String customerId);
} }

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java

@ -36,4 +36,6 @@ public interface IndexGroupDetailDao extends BaseDao<IndexGroupDetailEntity> {
List<IndexGroupDetailEntity> getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode); List<IndexGroupDetailEntity> getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode);
List<IndexGroupDetailEntity> getAllIndexWeightList(String customerId); List<IndexGroupDetailEntity> getAllIndexWeightList(String customerId);
int deleteByCustomerId(@Param("customerId") String customerId);
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java

@ -73,10 +73,15 @@ public class IndexGroupDetailEntity extends BaseEpmetEntity {
private BigDecimal threshold; private BigDecimal threshold;
/** /**
* 所有指标code拼接的字符串 冒号隔开 * 所有有权重的指标code拼接的字符串 冒号隔开
*/ */
private String allParentIndexCode; private String allParentIndexCode;
/**
* 所有指标code 冒号隔开
*/
private String allIndexCodePath;
/** /**
* 正相关positive负相关negative * 正相关positive负相关negative
*/ */

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java

@ -68,10 +68,15 @@ public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity {
private BigDecimal threshold; private BigDecimal threshold;
/** /**
* 所有指标code拼接的字符串 冒号隔开 * 所有有权重的指标code拼接的字符串 冒号隔开
*/ */
private String allParentIndexCode; private String allParentIndexCode;
/**
* 所有指标code 冒号隔开
*/
private String allIndexCodePath;
/** /**
* 正相关positive负相关negative * 正相关positive负相关negative
*/ */

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java

@ -60,4 +60,9 @@ public class IndexGroupEntity extends BaseEpmetEntity {
*/ */
private String parentIndexGroupId; private String parentIndexGroupId;
/**
* 所有指标code 冒号隔开
*/
private String allIndexCodePath;
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java

@ -55,4 +55,9 @@ public class IndexGroupTemplateEntity extends BaseEpmetEntity {
*/ */
private String parentIndexGroupId; private String parentIndexGroupId;
/**
* 所有指标code 冒号隔开
*/
private String allIndexCodePath;
} }

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java

@ -139,6 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group1.setParentIndexGroupId("0"); group1.setParentIndexGroupId("0");
group1.setId(UniqueIdGenerator.generate()); group1.setId(UniqueIdGenerator.generate());
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), true, 4)); group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), true, 4));
group1.setAllIndexCodePath(index.getAllIndexCodePath(0));
indexGroupMap.put(index.getLevel1Index(), group1); indexGroupMap.put(index.getLevel1Index(), group1);
} }
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
@ -154,6 +155,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group2.setParentIndexGroupId(group1.getId()); group2.setParentIndexGroupId(group1.getId());
group2.setId(UniqueIdGenerator.generate()); group2.setId(UniqueIdGenerator.generate());
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4));
group2.setAllIndexCodePath(index.getAllIndexCodePath(3));
indexGroupMap.put(level4IndexDetailKey, group2); indexGroupMap.put(level4IndexDetailKey, group2);
//构建 分组明细 //构建 分组明细
templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index);
@ -164,6 +166,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation()); templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(3));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2);
indexGroupDetailMap.put(index.getLevel1Index() + level4Index, templateEntity); indexGroupDetailMap.put(index.getLevel1Index() + level4Index, templateEntity);
} }
@ -181,6 +184,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation()); templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5);
indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); indexGroupDetailMap.put(level5IndexDetailKey, templateEntity);
} }
@ -195,6 +199,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group1.setParentIndexGroupId("0"); group1.setParentIndexGroupId("0");
group1.setId(UniqueIdGenerator.generate()); group1.setId(UniqueIdGenerator.generate());
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4));
group1.setAllIndexCodePath(index.getAllIndexCodePath(0));
indexGroupMap.put(index.getLevel1Index(), group1); indexGroupMap.put(index.getLevel1Index(), group1);
} }
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
@ -209,7 +214,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group2.setParentIndexGroupId(group1.getId()); group2.setParentIndexGroupId(group1.getId());
group2.setId(UniqueIdGenerator.generate()); group2.setId(UniqueIdGenerator.generate());
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4));
group2.setAllIndexCodePath(index.getAllIndexCodePath(1));
indexGroupMap.put(level2IndexGroupKey, group2); indexGroupMap.put(level2IndexGroupKey, group2);
//构建 分组明细 //构建 分组明细
templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); templateEntity = indexGroupDetailMap.get(level2IndexGroupKey);
@ -220,6 +225,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation()); templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(1));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2);
indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); indexGroupDetailMap.put(level2IndexGroupKey, templateEntity);
} }
@ -236,6 +242,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation()); templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5);
indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); indexGroupDetailMap.put(level5IndexGroupKey, templateEntity);
} }

42
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java

@ -1,6 +1,8 @@
package com.epmet.model; package com.epmet.model;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.util.Pinyin4jUtil;
import lombok.Data; import lombok.Data;
@Data @Data
@ -29,4 +31,44 @@ public class IndexModel {
*/ */
@ExcelProperty(value = "相关性") @ExcelProperty(value = "相关性")
private String correlation; private String correlation;
/**
* desc:获取所有codepath 顶级为0
*
* @param level
* @return
*/
public String getAllIndexCodePath(Integer level) {
StringBuilder result = new StringBuilder();
switch (level) {
case 1:
result.append(Pinyin4jUtil.getSpellPinYin(level1Index, false, 4));
break;
case 2:
result.append(Pinyin4jUtil.getSpellPinYin(level1Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level2Index, false, 4));
break;
case 3:
result.append(Pinyin4jUtil.getSpellPinYin(level1Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level2Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level3Index, false, 4));
break;
case 4:
result.append(Pinyin4jUtil.getSpellPinYin(level1Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level2Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level3Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level4Index, false, 4));
break;
case 5:
result.append(Pinyin4jUtil.getSpellPinYin(level1Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level2Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level3Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level4Index, false, 4))
.append(StrConstant.COLON).append(Pinyin4jUtil.getSpellPinYin(level5Index, false, 4));
break;
default:
return "0";
}
return result.toString();
}
} }

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java

@ -90,9 +90,26 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
calculateGridFuWu(formDTO); calculateGridFuWu(formDTO);
//4、计算网格相关总分 //4、计算网格相关总分
calculateGridTotal(formDTO); calculateGridTotal(formDTO);
//4、计算自身和下级的分数
calculateSelfSubScore(formDTO);
return true; return true;
} }
private void calculateSelfSubScore(CalculateCommonFormDTO formDTO) {
/* List<String> gridIdList = gridScoreDao.selectListGridId(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(gridIdList)){
log.warn("calculateSelfSubScore have not any record");
return;
}
List<List<String>> partGridIds = ListUtils.partition(gridIdList, NumConstant.ONE_HUNDRED);
partGridIds.forEach(gridIds->{
int pageNo = NumConstant.ONE;
int pageSize = 2;//NumConstant.ONE_HUNDRED;
List<GridSubScoreDTO> list = gridSubScoreDao.selectSubListGroup(formDTO.getCustomerId(),formDTO.getMonthId(),(pageNo-NumConstant.ONE)*pageSize,pageSize);
});*/
}
/** /**
* @param formDTO * @param formDTO
* @return void * @return void

20
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupServiceImpl.java

@ -68,28 +68,22 @@ private IndexGroupTemplateDao indexGroupTemplateDao;
public Boolean initCustomerIndexGroup(String customerId) { public Boolean initCustomerIndexGroup(String customerId) {
List<IndexGroupTemplateEntity> groupTempList = indexGroupTemplateDao.selectAll(); List<IndexGroupTemplateEntity> groupTempList = indexGroupTemplateDao.selectAll();
List<IndexGroupDetailTemplateEntity> groupDetailTempList = indexGroupDetailTemplateDao.selectAll(); List<IndexGroupDetailTemplateEntity> groupDetailTempList = indexGroupDetailTemplateDao.selectAll();
if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)){ if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)) {
throw new RenException("没有需要初始化的数据"); throw new RenException("没有需要初始化的数据");
} }
Map<String, IndexGroupTemplateEntity> groupMap = groupTempList.stream().collect(Collectors.toMap(IndexGroupTemplateEntity::getId, o -> o)); Map<String, IndexGroupTemplateEntity> groupMap = groupTempList.stream().collect(Collectors.toMap(IndexGroupTemplateEntity::getId, o -> o));
Map<String,IndexGroupEntity> groupEntityMap = new HashMap<>(); Map<String, String> groupNewIdMap = new HashMap<>();
Map<String,String> groupNewIdMap = new HashMap<>();
indexGroupDetailDao.deleteByCustomerId(customerId);
baseDao.deleteByCustomerId(customerId);
List<IndexGroupEntity> insertGroupList = new ArrayList<>(); List<IndexGroupEntity> insertGroupList = new ArrayList<>();
groupMap.forEach((oldGroupTempId,o)->{ groupMap.forEach((oldGroupTempId, o) -> {
IndexGroupEntity newGroupEntity = ConvertUtils.sourceToTarget(o, IndexGroupEntity.class); IndexGroupEntity newGroupEntity = ConvertUtils.sourceToTarget(o, IndexGroupEntity.class);
String newGroupId = UniqueIdGenerator.generate(); String newGroupId = UniqueIdGenerator.generate();
newGroupEntity.setId(newGroupId); newGroupEntity.setId(newGroupId);
newGroupEntity.setCustomerId(customerId); newGroupEntity.setCustomerId(customerId);
String oldPid = newGroupEntity.getParentIndexGroupId(); groupNewIdMap.put(oldGroupTempId, newGroupId);
String newPid = groupNewIdMap.get(oldPid);
/*if (StringUtils.isBlank(newPid)){
newPid = UniqueIdGenerator.generate();
groupNewIdMap.put(oldPid,newPid);
}*/
//newGroupEntity.setParentIndexGroupId(newPid);
groupNewIdMap.put(oldGroupTempId,newGroupId);
//groupEntityMap.put(newGroupId,newGroupEntity);
insertGroupList.add(newGroupEntity); insertGroupList.add(newGroupEntity);
}); });
insertGroupList.forEach(o-> { insertGroupList.forEach(o-> {

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml

@ -110,8 +110,8 @@
m.YEAR_ID, m.YEAR_ID,
m.MONTH_ID, m.MONTH_ID,
m.IS_TOTAL, m.IS_TOTAL,
M.SCORE, m.SCORE,
M.INDEX_CODE m.INDEX_CODE
FROM FROM
fact_index_grid_score m fact_index_grid_score m
WHERE WHERE

32
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml

@ -65,4 +65,36 @@
limit #{deleteSize} limit #{deleteSize}
</if> </if>
</delete> </delete>
<resultMap id="GridScoreDTOMap" type="com.epmet.dto.indexcal.GridSubScoreDTO">
<result property="gridId" column="GRID_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="allParentIds" column="ALL_PARENT_IDS"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="monthId" column="MONTH_ID"/>
<collection property="detailList" ofType="com.epmet.dto.indexcal.GridScoreDetailDTO" >
<result property="isTotal" column="IS_TOTAL"/>
<result property="score" column="SCORE"/>
<result property="indexCode" column="INDEX_CODE"/>
</collection>
</resultMap>
<select id="selectSubListGroup" resultMap="GridScoreDTOMap">
SELECT
CUSTOMER_ID customerId,
GRID_ID gridId,
AGENCY_ID agencyId,
YEAR_ID yearId,
MONTH_ID monthId,
IS_TOTAL isTotal,
SCORE score,
INDEX_CODE indexCode,
WEIGHT weight
FROM
fact_index_grid_score
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
</select>
</mapper> </mapper>

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDao.xml

@ -6,4 +6,8 @@
<!--<insert id="inertGroupFromTable"> <!--<insert id="inertGroupFromTable">
insert into index_group_template () insert into index_group_template ()
</insert>--> </insert>-->
<delete id="deleteByCustomerId">
delete from index_group where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
</delete>
</mapper> </mapper>

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml

@ -6,7 +6,7 @@
<select id="getDetailListByParentCode" resultType="com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity"> <select id="getDetailListByParentCode" resultType="com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity">
select select
ID,CUSTOMER_ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD, ALL_PARENT_INDEX_CODE, CORRELATION ID,CUSTOMER_ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD, ALL_PARENT_INDEX_CODE, ALL_INDEX_CODE_PATH, CORRELATION
FROM index_group_detail FROM index_group_detail
WHERE WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0' CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0'
@ -18,4 +18,8 @@
WHERE WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0' CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0'
</select> </select>
<delete id="deleteByCustomerId">
delete from index_group_detail where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
</delete>
</mapper> </mapper>

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailTemplateDao.xml

@ -7,7 +7,7 @@
delete from index_group_detail_template delete from index_group_detail_template
</delete> </delete>
<select id="selectAll" resultType="com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity"> <select id="selectAll" resultType="com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity">
select ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD, ALL_PARENT_INDEX_CODE, CORRELATION select ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD, ALL_PARENT_INDEX_CODE, ALL_INDEX_CODE_PATH, CORRELATION
from index_group_detail_template from index_group_detail_template
where STATUS = 'enable' and DEL_FLAG = '0' where STATUS = 'enable' and DEL_FLAG = '0'
</select> </select>

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupTemplateDao.xml

@ -7,7 +7,7 @@
</delete> </delete>
<select id="selectAll" resultType="com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity"> <select id="selectAll" resultType="com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity">
select ID, INDEX_ID, INDEX_CODE, STATUS, PARENT_INDEX_GROUP_ID FROM INDEX_GROUP_TEMPLATE select ID, INDEX_ID, INDEX_CODE, STATUS, PARENT_INDEX_GROUP_ID, ALL_INDEX_CODE_PATH FROM INDEX_GROUP_TEMPLATE
where STATUS = 'enable' and DEL_FLAG = '0' where STATUS = 'enable' and DEL_FLAG = '0'
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save