Browse Source

Merge branch 'dev_screen_data' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_screen_data

dev_shibei_match
wxz 5 years ago
parent
commit
926d02a15d
  1. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
  2. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  3. 4
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  4. 1
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java
  5. 28
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java
  6. 1
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java
  7. 60
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java
  8. 116
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java
  9. 28
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java
  10. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java
  11. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java
  12. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java
  13. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java
  14. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java
  15. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java
  16. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java
  17. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java
  18. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java
  19. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java
  20. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java
  21. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java
  22. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java
  23. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java
  24. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java
  25. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java
  26. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java
  27. 39
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java
  28. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java
  29. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java
  30. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java
  31. 5
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml
  32. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml
  33. 29
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml
  34. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
  35. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml
  36. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  37. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml

@ -22,7 +22,7 @@
AND eve.DEL_FLAG = '0'
WHERE
diff.DEL_FLAG = '0'
AND diff.PARENT_ID = #{agencyId}
AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
ORDER BY
CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME
WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml

@ -17,7 +17,7 @@
screen_org_rank_data
WHERE
DEL_FLAG = '0'
AND PARENT_ID = #{agencyId}
AND all_parent_ids LIKE CONCAT('%',#{agencyId},'%')
AND MONTH_ID = #{monthId}
ORDER BY
(PARTY_TOTAL + GROUP_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL + CLOSE_PROJECT_RATIO + SATISFACTION_RATIO) DESC,

4
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml

@ -12,7 +12,7 @@
screen_party_user_rank_data
WHERE
del_flag = '0'
AND org_id = #{agencyId}
AND all_parent_ids LIKE CONCAT('%',#{agencyId},'%')
ORDER BY
point_total DESC,
user_name
@ -30,7 +30,7 @@
screen_party_user_rank_data
WHERE
DEL_FLAG = '0'
AND ORG_ID = #{agencyId}
AND all_parent_ids LIKE CONCAT('%',#{agencyId},'%')
AND PARTY_FLAG = '1'
ORDER BY
POINT_TOTAL DESC

1
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java

@ -12,6 +12,7 @@ import java.io.Serializable;
*/
@Data
public class CalculateCommonFormDTO implements Serializable {
private static final long serialVersionUID = -5689788391963427717L;
/**
* 月份id: yyyyMM
*/

28
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.indexcal;
import com.epmet.dto.ScreenCustomerGridDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 客户下所有网格
*
* @author yinzuomei@elink-cn.com
* @date 2020/8/26 13:45
*/
@Data
public class CustomerGridInfoDTO implements Serializable {
private static final long serialVersionUID = -3211409107659568304L;
/**
* 网格总数
*/
private Integer total;
/**
* 网格列表
*/
private List<ScreenCustomerGridDTO> gridList;
}

1
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java

@ -14,6 +14,7 @@ import java.math.BigDecimal;
@Data
public class ExtremeValueCommonDTO implements Serializable {
private static final long serialVersionUID = -6295067080250068024L;
/**
* 最小值
*/

60
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java

@ -0,0 +1,60 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import lombok.Data;
import java.math.BigDecimal;
/**
* 客户指标详情
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Data
public class IndexGroupDetailDTO {
private static final long serialVersionUID = 1L;
/**
* index_group.id
*/
private String indexGroupId;
/**
* 指标id
*/
private String indexId;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
/**
* 是否启用启用enable 禁用disabled
*/
private String status;
/**
* 阈值 如果是百分比 则为除以100以后的值
*/
private BigDecimal threshold;
}

116
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java

@ -0,0 +1,116 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 网格(党支部)信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-26
*/
@Data
public class ScreenCustomerGridDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID 主键ID
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 网格id
*/
private String gridId;
/**
* 组织名称
*/
private String gridName;
/**
* 网格所属组织id
*/
private String parentAgencyId;
/**
* 坐标区域
*/
private String areaMarks;
/**
* 中心点位
*/
private String centerMark;
/**
* 党支部=网格的位置
*/
private String partyMark;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
}

28
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java

@ -0,0 +1,28 @@
package com.epmet.dto.screen.result;
import com.epmet.dto.screen.IndexGroupDetailDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* desc计算指标时 获取要计算的组的指标
*
* @author liujianjun
*/
@Data
public class IndexGroupDetailResult implements Serializable {
private static final long serialVersionUID = 3937041236261115759L;
/**
* 是否有下一组
*/
private Boolean hasNextGroup;
/**
* desc:指标详情列表 如果hasNextGroup是true则返回的是明细否则返回的是上级的分组的指标明细
* 例如网格的三大能力上次已经返回完毕下一次调用时返回的是网格相关的三大能力的 指标明细
*/
private List<IndexGroupDetailDTO> indexGroupDetailList;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java

@ -48,4 +48,9 @@ public class CustomerGridFormDTO implements Serializable {
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

6
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java

@ -94,9 +94,13 @@ public class DifficultyDataFormDTO implements Serializable {
*/
private Integer eventHandledCount;
/**
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java

@ -121,4 +121,9 @@ public class EventDataFormDTO implements Serializable {
* 数据更新至: yyyy|yyyMM|yyyyMMdd 8.21增加字段
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java

@ -79,4 +79,9 @@ public class OrgRankDataFormDTO implements Serializable {
* 满意率最大值100保留小数点后四位
*/
private BigDecimal satisfactionRatio;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java

@ -73,4 +73,9 @@ public class PartyUserRankDataFormDTO implements Serializable {
*
*/
private String name;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

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

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

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

@ -20,6 +20,9 @@ package com.epmet.dao.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.screen.IndexGroupDetailEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 客户指标详情
@ -30,4 +33,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IndexGroupDetailDao extends BaseDao<IndexGroupDetailEntity> {
List<IndexGroupDetailEntity> getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode);
}

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.screencoll.form.CustomerGridFormDTO;
import com.epmet.entity.screen.ScreenCustomerGridEntity;
import org.apache.ibatis.annotations.Mapper;
@ -55,4 +56,22 @@ public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity>
* @Date 10:52 2020-08-18
**/
void batchInsertCustomerGrid(@Param("list") List<CustomerGridFormDTO> list, @Param("customerId")String customerId);
/**
* @return java.lang.Integer
* @param customerId
* @author yinzuomei
* @description 查询客户下网格总数
* @Date 2020/8/26 15:33
**/
Integer selectCountByCustomerId(@Param("customerId") String customerId);
/**
* @return java.util.List<com.epmet.dto.ScreenCustomerGridDTO>
* @param customerId
* @author yinzuomei
* @description 查询客户下网格信息
* @Date 2020/8/26 15:33
**/
List<ScreenCustomerGridDTO> selectListByCustomerId(@Param("customerId")String customerId);
}

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

@ -62,4 +62,14 @@ public class IndexGroupDetailEntity extends BaseEpmetEntity {
*/
private String status;
/**
* 阈值 如果是百分比 则为除以100以后的值
*/
private BigDecimal threshold;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
}

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

@ -62,4 +62,9 @@ public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity {
*/
private BigDecimal threshold;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java

@ -78,4 +78,8 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity {
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java

@ -127,4 +127,8 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity {
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java

@ -144,4 +144,8 @@ public class ScreenEventDataEntity extends BaseEpmetEntity {
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java

@ -109,4 +109,8 @@ public class ScreenOrgRankDataEntity extends BaseEpmetEntity {
*/
private BigDecimal satisfactionRatio;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java

@ -98,4 +98,8 @@ public class ScreenPartyUserRankDataEntity extends BaseEpmetEntity {
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

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

@ -3,6 +3,7 @@ package com.epmet.model;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.UniqueIdGenerator;
import com.epmet.entity.screen.IndexDictEntity;
import com.epmet.entity.screen.IndexGroupDetailTemplateEntity;
@ -122,7 +123,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true));
indexGroupMap.put(index.getLevel1Index(), group1);
}
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
String level4Index = index.getLevel4Index();
indexDictEntity = indexDicMap.get(level4Index);
String level2GroupId = UniqueIdGenerator.generate();
@ -139,14 +140,16 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
//构建 分组明细
templateEntity = indexGroupDetailMap.get(level4Index);
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2);
buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2);
}
}
indexDictEntity = indexDicMap.get(index.getLevel5Index());
allIndexCodeSb.append(StrConstant.COLON);
allIndexCodeSb.append(group2.getIndexCode());
templateEntity = indexGroupDetailMap.get(index.getLevel5Index());
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5);
buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5);
}
} else {
//todo 测试完去掉
@ -162,7 +165,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true));
indexGroupMap.put(index.getLevel1Index(), group1);
}
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
String level2Index = index.getLevel2Index();
indexDictEntity = indexDicMap.get(level2Index);
String level2GroupId = UniqueIdGenerator.generate();
@ -179,14 +182,15 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
//构建 分组明细
templateEntity = indexGroupDetailMap.get(level2Index);
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2);
buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2);
}
}
indexDictEntity = indexDicMap.get(index.getLevel5Index());
allIndexCodeSb.append(StrConstant.COLON);
allIndexCodeSb.append(group2.getIndexCode());
templateEntity = indexGroupDetailMap.get(index.getLevel5Index());
if (templateEntity == null) {
buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5);
buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5);
}
}
//}
@ -195,10 +199,11 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values()));
}
private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, String groupId, Integer level) {
private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, String allIndexCode, Integer level) {
IndexGroupDetailTemplateEntity templateEntity;
templateEntity = new IndexGroupDetailTemplateEntity();
templateEntity.setIndexGroupId(groupId);
templateEntity.setIndexGroupId(parentGroup.getId());
templateEntity.setAllParentIndexCode(allIndexCode);
templateEntity.setIndexId(indexDictEntity.getId());
if (level == 5) {

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java

@ -1,5 +1,6 @@
package com.epmet.service.indexcal;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
/**

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

@ -1,7 +1,18 @@
package com.epmet.service.indexcal.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao;
import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao;
import com.epmet.dao.screen.ScreenCustomerGridDao;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.CustomerGridInfoDTO;
import com.epmet.service.indexcal.GridCorreLationService;
import io.swagger.annotations.Authorization;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@ -12,6 +23,16 @@ import org.springframework.stereotype.Service;
*/
@Service
public class GridCorreLationServiceImpl implements GridCorreLationService {
private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class);
@Autowired
private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao;
@Autowired
private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao;
@Autowired
private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao;
@Autowired
private ScreenCustomerGridDao screenCustomerGridDao;
/**
* @param formDTO
@ -22,6 +43,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
**/
@Override
public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) {
return null;
return true;
}
/**
* @return com.epmet.dto.indexcal.CustomerGridInfoDTO
* @param customerId
* @author yinzuomei
* @description 查询客户下网格信息
* @Date 2020/8/26 15:37
**/
public CustomerGridInfoDTO queryCustomerGridInfo(String customerId){
CustomerGridInfoDTO customerGridInfoDTO=new CustomerGridInfoDTO();
customerGridInfoDTO.setTotal(screenCustomerGridDao.selectCountByCustomerId(customerId));
customerGridInfoDTO.setGridList(screenCustomerGridDao.selectListByCustomerId(customerId));
return customerGridInfoDTO;
}
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java

@ -20,6 +20,8 @@ package com.epmet.service.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.screen.IndexGroupDetailEntity;
import java.util.List;
/**
* 客户指标详情
*
@ -27,5 +29,10 @@ import com.epmet.entity.screen.IndexGroupDetailEntity;
* @since v1.0.0 2020-08-19
*/
public interface IndexGroupDetailService extends BaseService<IndexGroupDetailEntity> {
/**
* desc根据all_parent_index_code 获取指标明细
* @param customerId
* @param indexCode
*/
List<IndexGroupDetailEntity> getDetailListByParentCode(String customerId,String... indexCode);
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java

@ -3,6 +3,8 @@ package com.epmet.service.screen.impl;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao;
import com.epmet.dao.screen.IndexGroupDao;
import com.epmet.dao.screen.IndexGroupDetailDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.screen.form.IndexCalculateForm;
import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
@ -31,6 +33,10 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao;
@Autowired
private GridCorreLationService gridCorreLationService;
@Autowired
private IndexGroupDao indexGroupDao;
@Autowired
private IndexGroupDetailDao indexGroupDetailDao;
@Override
public Boolean indexCalculate(IndexCalculateForm formDTO) {

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

@ -18,11 +18,15 @@
package com.epmet.service.screen.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.screen.IndexGroupDetailDao;
import com.epmet.entity.screen.IndexGroupDetailEntity;
import com.epmet.service.screen.IndexGroupDetailService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 客户指标详情
*
@ -33,4 +37,16 @@ import org.springframework.stereotype.Service;
public class IndexGroupDetailServiceImpl extends BaseServiceImpl<IndexGroupDetailDao, IndexGroupDetailEntity> implements IndexGroupDetailService {
@Override
public List<IndexGroupDetailEntity> getDetailListByParentCode(String customerId,String... indexCode) {
if (indexCode == null || indexCode.length == 0){
throw new RenException("参数错误");
}
StringBuilder sb = new StringBuilder();
for (String code:indexCode){
sb.append(code).append(StrConstant.COLON);
}
sb = sb.deleteCharAt(sb.length());
return baseDao.getDetailListByParentCode(customerId,sb.toString());
}
}

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

@ -3,4 +3,9 @@
<mapper namespace="com.epmet.dao.screen.IndexGroupDetailDao">
<select id="getDetailListByParentCode" resultType="com.epmet.entity.screen.IndexGroupDetailEntity">
select ID, INDEX_GROUP_ID, INDEX_ID, WEIGHT, THRESHOLD FROM index_group_detail_template
where STATUS = 'enable' and DEL_FLAG = '0'
</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
select ID, INDEX_GROUP_ID, INDEX_ID, WEIGHT, THRESHOLD, ALL_PARENT_INDEX_CODE
from index_group_detail_template
where STATUS = 'enable' and DEL_FLAG = '0'
</select>

29
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

@ -29,7 +29,8 @@
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DATA_END_TIME
DATA_END_TIME,
ALL_PARENT_IDS
) values
<foreach collection="list" item="item" index="index" separator=",">
(
@ -47,9 +48,33 @@
now(),
'APP_USER',
now(),
#{item.dataEndTime}
#{item.dataEndTime},
#{item.allParentIds}
)
</foreach>
</insert>
<!-- 查询客户下网格总数 -->
<select id="selectCountByCustomerId" parameterType="map" resultType="java.lang.Integer">
SELECT
count( GRID_ID ) AS total
FROM
screen_customer_grid m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
</select>
<!-- 查询客户下网格信息 -->
<select id="selectListByCustomerId" parameterType="map" resultType="com.epmet.dto.ScreenCustomerGridDTO">
SELECT
m.GRID_ID,
m.CUSTOMER_ID,
m.GRID_NAME
FROM
screen_customer_grid m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID = #{customerId}
</select>
</mapper>

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

@ -35,7 +35,8 @@
UPDATED_BY,
UPDATED_TIME,
LATEST_OPERATE_DESC,
DATA_END_TIME
DATA_END_TIME,
ALL_PARENT_IDS
) values
<foreach collection="list" item="item" index="index" separator=",">
(
@ -63,7 +64,8 @@
'APP_USER',
now(),
#{item.latestOperateDesc},
#{item.dataEndTime}
#{item.dataEndTime},
#{item.allParentIds}
)
</foreach>
</insert>

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

@ -38,7 +38,8 @@
EVENT_STATUS_CODE,
EVENT_STATUS_DESC,
LATEST_OPERATE_DESC,
DATA_END_TIME
DATA_END_TIME,
ALL_PARENT_IDS
) values
<foreach collection="list" item="item" index="index" separator=",">
(
@ -69,7 +70,8 @@
#{item.eventStatusCode},
#{item.eventStatusDesc},
#{item.latestOperateDesc},
#{item.dataEndTime}
#{item.dataEndTime},
#{item.allParentIds}
)
</foreach>
</insert>

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

@ -35,7 +35,8 @@
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
UPDATED_TIME,
ALL_PARENT_IDS
) values
<foreach collection="list" item="item" index="index" separator=",">
(
@ -59,7 +60,8 @@
'APP_USER',
now(),
'APP_USER',
now()
now(),
#{item.allParentIds}
)
</foreach>
</insert>

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

@ -29,7 +29,8 @@
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DATA_END_TIME
DATA_END_TIME,
ALL_PARENT_IDS
) values
<foreach collection="list" item="item" index="index" separator=",">
(
@ -51,7 +52,8 @@
now(),
'APP_USER',
now(),
#{item.dataEndTime}
#{item.dataEndTime},
#{item.allParentIds}
)
</foreach>
</insert>

Loading…
Cancel
Save