Browse Source

Merge remote-tracking branch 'origin/dev_screen_data' into dev_temp

dev_shibei_match
zhangyongzhangyong 5 years ago
parent
commit
fc86b79ab0
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java
  2. 92
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java
  3. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java
  5. 40
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java
  6. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java
  7. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java
  8. 36
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml
  9. 8
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml
  10. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml

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

@ -21,8 +21,6 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.screen.IndexGroupEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 客户指标分组
*
@ -33,6 +31,4 @@ import java.util.List;
public interface IndexGroupDao extends BaseDao<IndexGroupEntity> {
int inertGroupFromTable(String customerId);
List<IndexGroupEntity> getDetailByCode(String indexCode, Integer offset);
}

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

@ -112,85 +112,109 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
List<IndexModel> collect = indexModelList.stream().sorted(Comparator.comparing(IndexModel::getLevel1Index)).collect(Collectors.toList());
collect.forEach(index -> {
if (index.getLevel1Index().equals("党员相关")) {
IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index());
String level1GroupId = UniqueIdGenerator.generate();
IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index());
if (group1 == null) {
group1 = new IndexGroupTemplateEntity();
group1.setIndexId(indexDictEntity.getId());
group1.setParentIndexGroupId("0");
group1.setId(level1GroupId);
group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true));
group1.setId(UniqueIdGenerator.generate());
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),true,4));
indexGroupMap.put(index.getLevel1Index(), group1);
}
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
String level4Index = index.getLevel4Index();
indexDictEntity = indexDicMap.get(level4Index);
String level2GroupId = UniqueIdGenerator.generate();
IndexGroupTemplateEntity group2 = indexGroupMap.get(level4Index);
IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index()+level4Index);
IndexGroupDetailTemplateEntity templateEntity = null;
if (group2 == null) {
group2 = new IndexGroupTemplateEntity();
group2.setIndexId(indexDictEntity.getId());
group2.setParentIndexGroupId(level1GroupId);
group2.setId(level2GroupId);
group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true));
indexGroupMap.put(level4Index, group2);
group2.setParentIndexGroupId(group1.getId());
group2.setId(UniqueIdGenerator.generate());
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 ));
indexGroupMap.put(index.getLevel1Index()+level4Index, group2);
//构建 分组明细
templateEntity = indexGroupDetailMap.get(level4Index);
templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+level4Index);
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2);
templateEntity = new IndexGroupDetailTemplateEntity();
templateEntity.setIndexGroupId(group1.getId());
templateEntity.setIndexId(indexDictEntity.getId());
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2);
indexGroupDetailMap.put(index.getLevel1Index()+level4Index,templateEntity);
}
}
indexDictEntity = indexDicMap.get(index.getLevel5Index());
allIndexCodeSb.append(StrConstant.COLON);
allIndexCodeSb.append(group2.getIndexCode());
templateEntity = indexGroupDetailMap.get(index.getLevel5Index());
templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+index.getLevel5Index());
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5);
templateEntity = new IndexGroupDetailTemplateEntity();
templateEntity.setIndexGroupId(group2.getId());
System.out.println("=========="+group2.getId());
templateEntity.setIndexId(indexDictEntity.getId());
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
buildIndexGroupDetail(templateEntity,indexDictEntity, index, group2, 5);
indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity);
}
} else {
//todo 测试完去掉
//if ("街道相关".equals(index.getLevel1Index())) {
IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index());
String level1GroupId = UniqueIdGenerator.generate();
IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index());
if (group1 == null) {
group1 = new IndexGroupTemplateEntity();
group1.setIndexId(indexDictEntity.getId());
group1.setParentIndexGroupId("0");
group1.setId(level1GroupId);
group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true));
group1.setId(UniqueIdGenerator.generate());
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 ));
indexGroupMap.put(index.getLevel1Index(), group1);
}
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
String level2Index = index.getLevel2Index();
indexDictEntity = indexDicMap.get(level2Index);
String level2GroupId = UniqueIdGenerator.generate();
IndexGroupTemplateEntity group2 = indexGroupMap.get(level2Index);
String groupMapKey = index.getLevel1Index() + level2Index;
IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey);
IndexGroupDetailTemplateEntity templateEntity = null;
if (group2 == null) {
group2 = new IndexGroupTemplateEntity();
group2.setIndexId(indexDictEntity.getId());
group2.setParentIndexGroupId(level1GroupId);
group2.setId(level2GroupId);
group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true));
indexGroupMap.put(level2Index, group2);
group2.setParentIndexGroupId(group1.getId());
group2.setId(UniqueIdGenerator.generate());
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 ));
indexGroupMap.put(groupMapKey, group2);
//构建 分组明细
templateEntity = indexGroupDetailMap.get(level2Index);
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2);
templateEntity = new IndexGroupDetailTemplateEntity();
templateEntity.setIndexGroupId(group2.getId());
templateEntity.setIndexId(indexDictEntity.getId());
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2);
indexGroupDetailMap.put(level2Index,templateEntity);
}
}
indexDictEntity = indexDicMap.get(index.getLevel5Index());
allIndexCodeSb.append(StrConstant.COLON);
allIndexCodeSb.append(group2.getIndexCode());
templateEntity = indexGroupDetailMap.get(index.getLevel5Index());
templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+index.getLevel5Index());
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5);
templateEntity = new IndexGroupDetailTemplateEntity();
templateEntity.setIndexGroupId(group2.getId());
templateEntity.setIndexId(indexDictEntity.getId());
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
buildIndexGroupDetail(templateEntity, indexDictEntity, index, group2, 5);
indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity);
}
}
//}
@ -199,24 +223,16 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values()));
}
private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, String allIndexCode, Integer level) {
IndexGroupDetailTemplateEntity templateEntity;
templateEntity = new IndexGroupDetailTemplateEntity();
templateEntity.setIndexGroupId(parentGroup.getId());
templateEntity.setAllParentIndexCode(allIndexCode);
templateEntity.setIndexId(indexDictEntity.getId());
private void buildIndexGroupDetail( IndexGroupDetailTemplateEntity templateEntity,IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, Integer level) {
if (level == 5) {
templateEntity.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(index.getLevel5Index(),true));
templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(index.getLevel5Index(),false,4 ));
String level5WeightStr = index.getLevel5Weight().replace("%", "");
templateEntity.setWeight(new BigDecimal(level5WeightStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP));
indexGroupDetailMap.put(index.getLevel5Index(), templateEntity);
} else {
templateEntity.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true));
indexGroupDetailMap.put(indexDictEntity.getIndexName(), templateEntity);
templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 ));
templateEntity.setWeight(new BigDecimal(index.getWeight()).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP));
}
templateEntity.setId(UniqueIdGenerator.generate());
if (StringUtils.isNotBlank(index.getThreshold())) {
String thresholdStr = index.getThreshold().replace("%", "");
templateEntity.setThreshold(new BigDecimal(thresholdStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP));

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java

@ -2,8 +2,12 @@ package com.epmet.service.screen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao;
import com.epmet.dao.screen.IndexCodeFieldReDao;
import com.epmet.dao.screen.IndexGroupDetailDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.entity.screen.IndexGroupDetailEntity;
import com.epmet.eum.IndexCodeEnum;
import com.epmet.service.screen.CpcIndexCalculateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -19,14 +23,25 @@ import java.util.Map;
public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
@Autowired
private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao;
@Autowired
private IndexCodeFieldReDao indexCodeFieldReDao;
@Autowired
private IndexGroupDetailDao indexGroupDetailDao;
@Override
public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) {
//计算最大最小值
Map<String, BigDecimal> minAndMaxList = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(minAndMaxList)){
log.warn("customerId:{} have not any record",formDTO.getCustomerId());
log.warn("customerId:{} have not any fact record",formDTO.getCustomerId());
return false;
}
//获取指标权重信息
List<IndexGroupDetailEntity> indexDetails = indexGroupDetailDao.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
if (CollectionUtils.isEmpty(indexDetails)){
log.warn("customerId:{} have not any indexGroupDetail",formDTO.getCustomerId());
return false;
}
log.info(JSON.toJSONString(minAndMaxList));
List<FactIndexPartyAblityCpcMonthlyEntity> list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId());
return null;

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java

@ -46,7 +46,6 @@ public class IndexGroupDetailServiceImpl extends BaseServiceImpl<IndexGroupDetai
for (String code:indexCode){
sb.append(code).append(StrConstant.COLON);
}
sb = sb.deleteCharAt(sb.length());
return baseDao.getDetailListByParentCode(customerId,sb.toString());
return baseDao.getDetailListByParentCode(customerId,sb.deleteCharAt(sb.length()-1).toString());
}
}

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

@ -17,6 +17,7 @@
package com.epmet.service.screen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
@ -35,7 +36,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@ -62,13 +65,44 @@ private IndexGroupTemplateDao indexGroupTemplateDao;
if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)){
throw new RenException("没有需要初始化的数据");
}
List<IndexGroupEntity> groupEntityList = groupTempList.stream().map(groupTemp -> {
Map<String, IndexGroupTemplateEntity> groupMap = groupTempList.stream().collect(Collectors.toMap(IndexGroupTemplateEntity::getId, o -> o));
Map<String,IndexGroupEntity> groupEntityMap = new HashMap<>();
groupDetailTempList.forEach(groupDetailTemp->{
String indexGroupId = groupDetailTemp.getIndexGroupId();
IndexGroupTemplateEntity group = groupMap.get(indexGroupId);
if (group == null){
System.out.println(JSON.toJSONString(groupDetailTemp));
}
IndexGroupEntity groupEntity = groupEntityMap.get(indexGroupId);
if (groupEntity == null){
groupEntity = ConvertUtils.sourceToTarget(group, IndexGroupEntity.class);
String groupId = UniqueIdGenerator.generate();
groupEntity.setId(groupId);
groupEntity.setCustomerId(customerId);
groupEntityMap.put(indexGroupId,groupEntity);
}
IndexGroupDetailEntity entity = ConvertUtils.sourceToTarget(groupDetailTemp, IndexGroupDetailEntity.class);
entity.setId(UniqueIdGenerator.generate());
entity.setIndexGroupId(groupEntity.getId());
entity.setCustomerId(customerId);
indexGroupDetailDao.insert(entity);
});
this.insertBatch(groupEntityMap.values(),10);
/* List<IndexGroupEntity> groupEntityList = groupTempList.stream().map(groupTemp -> {
IndexGroupEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupEntity.class);
entity.setId(UniqueIdGenerator.generate());
entity.setCustomerId(customerId);
return entity;
}).collect(Collectors.toList());
this.insertBatch(groupEntityList,10);
groupEntityList.forEach(group->{
});
List<IndexGroupDetailEntity> groupTempEntityList = groupDetailTempList.stream().map(groupTemp -> {
IndexGroupDetailEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupDetailEntity.class);
@ -78,7 +112,7 @@ private IndexGroupTemplateDao indexGroupTemplateDao;
}).collect(Collectors.toList());
groupTempEntityList.forEach(o->{
indexGroupDetailDao.insert(o);
});
});*/
return true;
}
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java

@ -410,6 +410,9 @@ public class ScreenCollServiceImpl implements ScreenCollService {
* @Date 15:38 2020-08-21
**/
private BigDecimal calculateGrowthRateNumber(Integer old, Integer now){
if (NumConstant.ZERO == old){
return new BigDecimal(now * NumConstant.ONE_HUNDRED);
}
BigDecimal bignum1 = new BigDecimal((now - old) * NumConstant.ONE_HUNDRED);
BigDecimal bignum2 = bignum1.divide(new BigDecimal(old),2,BigDecimal.ROUND_HALF_UP);
return bignum2;

32
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java

@ -22,6 +22,9 @@ public class Pinyin4jUtil {
duoyinMap = new HashMap<>();
duoyinMap.put('区',new String[]{"qu"});
duoyinMap.put('系',new String[]{"xi"});
duoyinMap.put('率',new String[]{"lv"});
duoyinMap.put('员',new String[]{"yuan"});
duoyinMap.put('提',new String[]{"ti"});
}
/**
@ -32,7 +35,24 @@ public class Pinyin4jUtil {
* @return 第一个拼音
*/
public static String getFirstSpellPinYin(String src, boolean isFullSpell) {
String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell));
String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, 1));
System.out.println(targetStr);
String[] split = targetStr.split(",");
if (split.length > 1) {
targetStr = split[0];
}
return targetStr;
}
/**
* getFirstSpellPinYin:(多音字的时候获取第一个). <br/>
*
* @param src 传入的拼音字符串以逗号隔开
* @param isFullSpell 是否全拼true:全拼false:第一个汉字全拼(其它汉字取首字母)
* @return 第一个拼音
*/
public static String getSpellPinYin(String src, boolean isFullSpell,Integer preFont) {
String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, preFont));
System.out.println(targetStr);
String[] split = targetStr.split(",");
if (split.length > 1) {
@ -68,9 +88,10 @@ public class Pinyin4jUtil {
*
* @param src 汉字
* @param isFullSpell 是否全拼,如果为true全拼false:首字全拼
* @param preFont isFullSpell =true时,前几个字全拼
* @return
*/
public static Set<String> getPinyin(String src, boolean isFullSpell) {
public static Set<String> getPinyin(String src, boolean isFullSpell, int preFont) {
if (src != null && !src.trim().equalsIgnoreCase("")) {
char[] srcChar;
srcChar = src.toCharArray();
@ -95,7 +116,7 @@ public class Pinyin4jUtil {
}
if (!isFullSpell) {
if (i == 0) {
if (i < preFont) {
temp[i] = temp[i];
} else {
String[] tTemps = new String[temp[i].length];
@ -167,4 +188,9 @@ public class Pinyin4jUtil {
return strJaggedArray;
}
}
public static void main(String[] args) {
System.out.println(getFirstSpellPinYin("区直部门",false));
System.out.println(getSpellPinYin("党员提出话题数",false,4));
}
}

36
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml

@ -114,24 +114,24 @@
<select id="getExtremeValue" resultType="java.util.Map">
SELECT
MIN( CREATE_TOPIC_COUNT ) minValue1,
MAX( CREATE_TOPIC_COUNT ) maxValue1,
MAX( JOIN_TOPIC_COUNT ) minValue2,
MAX( JOIN_TOPIC_COUNT ) maxValue2,
MIN( SHIFT_ISSUE_COUNT ) minValue3,
MAX( SHIFT_ISSUE_COUNT ) maxValue3,
MIN( SHIFT_PROJECT_COUNT ) minValue4,
MAX( SHIFT_PROJECT_COUNT ) maxValue4,
MIN( JOIN_THREE_MEETS_COUNT ) minValue5,
MAX( JOIN_THREE_MEETS_COUNT ) maxValue5,
MIN( GROUP_USER_COUNT ) minValue6,
MAX( GROUP_USER_COUNT ) maxValue6,
MIN( GROUP_ACTIVE_USER_COUNT ) minValue7,
MAX( GROUP_ACTIVE_USER_COUNT ) maxValue7,
MIN( GROUP_TOPIC_COUNT ) minValue8,
MAX( GROUP_TOPIC_COUNT ) maxValue8,
MIN( TOPIC_TO_ISSUE_RATIO ) minValue9,
MAX( TOPIC_TO_ISSUE_RATIO ) maxValue9
MIN( CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MIN,
MAX( CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MAX,
MAX( JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MIN,
MAX( JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MAX,
MIN( SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MIN,
MAX( SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MAX,
MIN( SHIFT_PROJECT_COUNT ) SHIFT_PROJECT_COUNT_MIN,
MAX( SHIFT_PROJECT_COUNT ) SHIFT_PROJECT_COUNT_MAX,
MIN( JOIN_THREE_MEETS_COUNT ) JOIN_THREE_MEETS_COUNT_MIN,
MAX( JOIN_THREE_MEETS_COUNT ) JOIN_THREE_MEETS_COUNT_MAX,
MIN( GROUP_USER_COUNT ) GROUP_USER_COUNT_MIN,
MAX( GROUP_USER_COUNT ) GROUP_USER_COUNT_MAX,
MIN( GROUP_ACTIVE_USER_COUNT ) GROUP_ACTIVE_USER_COUNT_MIN,
MAX( GROUP_ACTIVE_USER_COUNT ) GROUP_ACTIVE_USER_COUNT_MAX,
MIN( GROUP_TOPIC_COUNT ) GROUP_TOPIC_COUNT_MIN,
MAX( GROUP_TOPIC_COUNT ) GROUP_TOPIC_COUNT_MAX,
MIN( TOPIC_TO_ISSUE_RATIO ) TOPIC_TO_ISSUE_RATIO_MIN,
MAX( TOPIC_TO_ISSUE_RATIO ) TOPIC_TO_ISSUE_RATIO_MAX
FROM
fact_index_party_ablity_cpc_monthly
WHERE

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

@ -5,7 +5,11 @@
<select id="getDetailListByParentCode" resultType="com.epmet.entity.screen.IndexGroupDetailEntity">
select ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD FROM index_group_detail
where STATUS = 'enable' and DEL_FLAG = '0'
select
ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD
FROM index_group_detail
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0'
and ALL_PARENT_INDEX_CODE = #{indexCode,jdbcType=VARCHAR}
</select>
</mapper>

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

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

Loading…
Cancel
Save