Browse Source

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

dev_shibei_match
wxz 5 years ago
parent
commit
dc26486624
  1. 52
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridSubScoreDTO.java
  2. 18
      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. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
  6. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java
  7. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java
  8. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java
  9. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java
  10. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java
  11. 42
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java
  12. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java
  13. 27
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
  14. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
  15. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  16. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyService.java
  17. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyService.java
  18. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityCpcMonthlyServiceImpl.java
  19. 40
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityGridMonthlyServiceImpl.java
  20. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPioneerDataService.java
  21. 20
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupServiceImpl.java
  22. 42
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPioneerDataServiceImpl.java
  23. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java
  24. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml
  25. 32
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml
  26. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDao.xml
  27. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml
  28. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailTemplateDao.xml
  29. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupTemplateDao.xml
  30. 66
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.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;
}

18
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;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.GridSubScoreDTO;
import com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -52,7 +53,18 @@ public interface GridSubScoreDao extends BaseDao<GridSubScoreEntity> {
* @Date 2020/9/10 13:36
**/
int deleteBatches(@Param("customerId") String customerId,
@Param("monthId") String monthId,
@Param("allParentIndexCode") String allParentIndexCode,
@Param("deleteSize") Integer deleteSize);
@Param("monthId") String monthId,
@Param("allParentIndexCode") String allParentIndexCode,
@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> {
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> getAllIndexWeightList(String customerId);
int deleteByCustomerId(@Param("customerId") String customerId);
}

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java

@ -43,7 +43,10 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Integer deletePioneerData(@Param("customerId") String customerId);
Integer deletePioneerData(@Param("customerId") String customerId,
@Param("orgType") String orgType,
@Param("dataEndTime")String dataEndTime,
@Param("deleteSize") Integer deleteSize);
/**
* 10党建引领-先锋模范数据
@ -74,4 +77,13 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
* @Date 2020/9/22 15:03
**/
List<ScreenPioneerDataEntity> initAgencyPioneerDataList(@Param("customerId")String customerId, @Param("agencyLevel")String agencyLevel);
/**
* @return void
* @param list
* @author yinzuomei
* @description 插入 entity
* @Date 2020/9/22 15:55
**/
void insertBatchEntity(@Param("list") List<ScreenPioneerDataEntity> list);
}

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;
/**
* 所有指标code拼接的字符串 冒号隔开
* 所有有权重的指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/**
* 所有指标code 冒号隔开
*/
private String allIndexCodePath;
/**
* 正相关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;
/**
* 所有指标code拼接的字符串 冒号隔开
* 所有有权重的指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/**
* 所有指标code 冒号隔开
*/
private String allIndexCodePath;
/**
* 正相关positive负相关negative
*/

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

@ -50,14 +50,19 @@ public class IndexGroupEntity extends BaseEpmetEntity {
*/
private String indexCode;
/**
* 是否启用启用enable 禁用disabled
*/
/**
* 是否启用启用enable 禁用disabled
*/
private String status;
/**
* 当前指标关联的上一级指标分组如果没有上一级则为0
*/
/**
* 当前指标关联的上一级指标分组如果没有上一级则为0
*/
private String parentIndexGroupId;
/**
* 所有指标code 冒号隔开
*/
private String allIndexCodePath;
}

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

@ -45,14 +45,19 @@ public class IndexGroupTemplateEntity extends BaseEpmetEntity {
*/
private String indexCode;
/**
* 是否启用启用enable 禁用disabled
*/
/**
* 是否启用启用enable 禁用disabled
*/
private String status;
/**
* 当前指标关联的上一级指标分组如果没有上一级则为0
*/
/**
* 当前指标关联的上一级指标分组如果没有上一级则为0
*/
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.setId(UniqueIdGenerator.generate());
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), true, 4));
group1.setAllIndexCodePath(index.getAllIndexCodePath(0));
indexGroupMap.put(index.getLevel1Index(), group1);
}
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
@ -154,6 +155,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group2.setParentIndexGroupId(group1.getId());
group2.setId(UniqueIdGenerator.generate());
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4));
group2.setAllIndexCodePath(index.getAllIndexCodePath(3));
indexGroupMap.put(level4IndexDetailKey, group2);
//构建 分组明细
templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index);
@ -164,6 +166,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(3));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2);
indexGroupDetailMap.put(index.getLevel1Index() + level4Index, templateEntity);
}
@ -181,6 +184,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5);
indexGroupDetailMap.put(level5IndexDetailKey, templateEntity);
}
@ -195,6 +199,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group1.setParentIndexGroupId("0");
group1.setId(UniqueIdGenerator.generate());
group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4));
group1.setAllIndexCodePath(index.getAllIndexCodePath(0));
indexGroupMap.put(index.getLevel1Index(), group1);
}
StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode());
@ -209,7 +214,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
group2.setParentIndexGroupId(group1.getId());
group2.setId(UniqueIdGenerator.generate());
group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4));
group2.setAllIndexCodePath(index.getAllIndexCodePath(1));
indexGroupMap.put(level2IndexGroupKey, group2);
//构建 分组明细
templateEntity = indexGroupDetailMap.get(level2IndexGroupKey);
@ -220,6 +225,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(1));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2);
indexGroupDetailMap.put(level2IndexGroupKey, templateEntity);
}
@ -236,6 +242,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
templateEntity.setAllParentIndexCode(allIndexCodeSb.toString());
templateEntity.setId(UniqueIdGenerator.generate());
templateEntity.setCorrelation(index.getCorrelation());
templateEntity.setAllIndexCodePath(index.getAllIndexCodePath(4));
buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5);
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;
import com.alibaba.excel.annotation.ExcelProperty;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.util.Pinyin4jUtil;
import lombok.Data;
@Data
@ -29,4 +31,44 @@ public class IndexModel {
*/
@ExcelProperty(value = "相关性")
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();
}
}

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java

@ -2,7 +2,6 @@ package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.IndexCalConstant;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.service.evaluationindex.extract.dataToIndex.CalCpcIndexService;
import com.epmet.service.evaluationindex.extract.todata.*;
@ -10,7 +9,6 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthl
import com.epmet.service.stats.DimCustomerPartymemberService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -63,9 +61,6 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
}
String quarterId= DateUtils.getQuarterId(monthId);
String yearId=DateUtils.getYearId(monthId);
//2、删除之前统计过的
factIndexPartyAblityCpcMonthlyService.deleteFactIndexPartyAblityCpcMonthly(customerId, monthId);
//1、党员提出话题数
Map<String, Integer> createTopicCountMap = calCreateTopicCount(customerId, monthId);
@ -88,7 +83,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
//9、自建群活跃度——议题转项目率
Map<String, BigDecimal> topicToIssueRatioMap = caltopicToIssueRatio(customerId, monthId, indexPartyAblityCpcList, userCreatedGroups);
//3、计算实际值,更新
//2、计算实际值,更新
for (FactIndexPartyAblityCpcMonthlyEntity indexPartyAblityCpcEntity : indexPartyAblityCpcList) {
indexPartyAblityCpcEntity.setMonthId(monthId);
indexPartyAblityCpcEntity.setQuarterId(quarterId);
@ -127,12 +122,8 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
indexPartyAblityCpcEntity.setTopicToIssueRatio(topicToIssueRatioMap.get(indexPartyAblityCpcEntity.getUserId()));
}
}
//4、分批插入批量插入
List<List<FactIndexPartyAblityCpcMonthlyEntity>> partition = ListUtils.partition(indexPartyAblityCpcList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
factIndexPartyAblityCpcMonthlyService.saveFactIndexPartyAblityCpcMonthlyEntity(list);
});
//3、删除之前统计过的、批插入批量插入
factIndexPartyAblityCpcMonthlyService.delAndSavePartyAblityCpcMonthly(customerId,monthId,indexPartyAblityCpcList);
}

27
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

@ -1,11 +1,8 @@
package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.ExtractConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.ProjectEvaluateConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
@ -72,8 +69,6 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
@Autowired
private FactIndexServiceAblityGridMonthlyService factIndexServiceAbilityGridMonthlyService;
@Autowired
private FactIndexServiceAblityGridMonthlyService factIndexServiceAblityGridMonthlyService;
@Autowired
private ActInfoService actInfoService;
@Autowired
private UserService userService;
@ -459,13 +454,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
}
}
//3、批量删
factIndexServiceAblityGridMonthlyService.deleteBatchIndexServiceAblityGridMonthly(customerId,monthId);
//4、批量增
List<List<FactIndexServiceAblityGridMonthlyEntity>> partition = ListUtils.partition(entityList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
this.saveFactIndexServiceAblityGridMonthlyEntity(list);
});
//3、批量删、批量增
factIndexServiceAbilityGridMonthlyService.delAndSaveServiceAbilityGridMonthly(customerId,monthId,entityList);
return true;
}
@ -479,19 +469,6 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
System.out.println(partyVolunteerRatio);
}*/
/**
* @param list
* @return void
* @author yinzuomei
* @description 批量插入网格相关-服务能力指标表
* @Date 2020/9/21 10:04
**/
@DataSource(DataSourceConstant.EVALUATION_INDEX)
private void saveFactIndexServiceAblityGridMonthlyEntity(List<FactIndexServiceAblityGridMonthlyEntity> list) {
factIndexServiceAbilityGridMonthlyService.insertBatchEntity(list);
}
/**
* @Description 小数四舍五入保留六位小数
* @param d

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService;
import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService;
@ -48,6 +49,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
**/
@Override
public void extractGridPioneerData(String customerId, String dateId) {
//查询客户下所有的网格,初始数据值为0
List<ScreenPioneerDataEntity> gridList=screenPioneerDataService.initPioneerDataList(customerId,"grid", StrConstant.EPMETY_STR);
if(CollectionUtils.isEmpty(gridList)){
return;
@ -56,7 +58,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
entity.setDataEndTime(dateId);
});
screenPioneerDataService.delAndSavePioneerData(customerId,"grid",dateId, IndexCalConstant.DELETE_SIZE,gridList);
}
@Override

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);
//4、计算网格相关总分
calculateGridTotal(formDTO);
//4、计算自身和下级的分数
calculateSelfSubScore(formDTO);
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
* @return void

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyService.java

@ -34,18 +34,10 @@ public interface FactIndexPartyAblityCpcMonthlyService extends BaseService<FactI
* @return void
* @param customerId
* @param monthId
* @param indexPartyAblityCpcList
* @author yinzuomei
* @description 删除这个客户这个月 党员相关-党建能力的数据
* @Date 2020/9/21 16:01
* @description 先删后增
* @Date 2020/9/22 16:30
**/
void deleteFactIndexPartyAblityCpcMonthly(String customerId, String monthId);
/**
* @return void
* @param list
* @author yinzuomei
* @description 批量插入党员相关党建能力表
* @Date 2020/9/21 16:04
**/
void saveFactIndexPartyAblityCpcMonthlyEntity(List<FactIndexPartyAblityCpcMonthlyEntity> list);
void delAndSavePartyAblityCpcMonthly(String customerId, String monthId, List<FactIndexPartyAblityCpcMonthlyEntity> indexPartyAblityCpcList);
}

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyService.java

@ -31,15 +31,6 @@ import java.util.List;
* @since v1.0.0 2020-09-21
*/
public interface FactIndexServiceAblityGridMonthlyService extends BaseService<FactIndexServiceAblityGridMonthlyEntity> {
/**
* @return void
* @param customerId
* @param monthId
* @author yinzuomei
* @description 批量删除网格相关-服务能力指标表
* @Date 2020/9/21 16:38
**/
void deleteBatchIndexServiceAblityGridMonthly(String customerId, String monthId);
/**
* @return java.util.List<com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity>
@ -52,10 +43,12 @@ public interface FactIndexServiceAblityGridMonthlyService extends BaseService<Fa
/**
* @return void
* @param list
* @param customerId
* @param monthId
* @param entityList
* @author yinzuomei
* @description 批量插入网格相关-服务能力指标表
* @Date 2020/9/21 10:05
* @description 先删后增
* @Date 2020/9/22 16:45
**/
void insertBatchEntity(List<FactIndexServiceAblityGridMonthlyEntity> list);
void delAndSaveServiceAbilityGridMonthly(String customerId, String monthId, List<FactIndexServiceAblityGridMonthlyEntity> entityList);
}

34
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityCpcMonthlyServiceImpl.java

@ -21,50 +21,46 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyService;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 党建能力-党员相关的事实表
* 党建能力-党员相关的事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-21
*/
@Service
public class FactIndexPartyAblityCpcMonthlyServiceImpl extends BaseServiceImpl<FactIndexPartyAblityCpcMonthlyDao, FactIndexPartyAblityCpcMonthlyEntity> implements FactIndexPartyAblityCpcMonthlyService {
/**
* @param customerId
* @param monthId
* @param indexPartyAblityCpcList
* @return void
* @author yinzuomei
* @description 删除这个客户这个月 党员相关-党建能力的数据
* @Date 2020/9/18 10:20
* @description 先删后增
* @Date 2020/9/22 16:30
**/
@Override
@Transactional(rollbackFor = Exception.class)
@DataSource(value = DataSourceConstant.EVALUATION_INDEX)
public void deleteFactIndexPartyAblityCpcMonthly(String customerId, String monthId) {
@Override
public void delAndSavePartyAblityCpcMonthly(String customerId, String monthId, List<FactIndexPartyAblityCpcMonthlyEntity> indexPartyAblityCpcList) {
int deleteNum;
do {
deleteNum = baseDao.deleteFactIndexPartyAblityCpcMonthly(customerId, monthId);
} while (deleteNum > NumConstant.ZERO);
}
/**
* @param list
* @return void
* @author yinzuomei
* @description 批量插入党员相关党建能力表
* @Date 2020/9/18 10:27
**/
@Override
@DataSource(value = DataSourceConstant.EVALUATION_INDEX)
public void saveFactIndexPartyAblityCpcMonthlyEntity(List<FactIndexPartyAblityCpcMonthlyEntity> list) {
baseDao.insertBatchEntity(list);
List<List<FactIndexPartyAblityCpcMonthlyEntity>> partition = ListUtils.partition(indexPartyAblityCpcList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
baseDao.insertBatchEntity(list);
});
}
}

40
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityGridMonthlyServiceImpl.java

@ -21,10 +21,13 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyService;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -37,23 +40,6 @@ import java.util.List;
@Service
public class FactIndexServiceAblityGridMonthlyServiceImpl extends BaseServiceImpl<FactIndexServiceAblityGridMonthlyDao, FactIndexServiceAblityGridMonthlyEntity> implements FactIndexServiceAblityGridMonthlyService {
/**
* @return void
* @param customerId
* @param monthId
* @author yinzuomei
* @description 批量删除网格相关-服务能力指标表
* @Date 2020/9/21 10:16
**/
@Override
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public void deleteBatchIndexServiceAblityGridMonthly(String customerId, String monthId) {
int deleteNum;
do {
deleteNum = baseDao.deleteFactIndexServiceAblityGridMonthly(customerId, monthId);
} while (deleteNum > NumConstant.ZERO);
}
/**
* @param customerId
* @return java.util.List<com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity>
@ -67,16 +53,18 @@ public class FactIndexServiceAblityGridMonthlyServiceImpl extends BaseServiceImp
return baseDao.initAllGridList(customerId);
}
/**
* @param list
* @return void
* @author yinzuomei
* @description 批量插入网格相关-服务能力指标表
* @Date 2020/9/21 10:05
**/
@Transactional(rollbackFor = Exception.class)
@Override
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public void insertBatchEntity(List<FactIndexServiceAblityGridMonthlyEntity> list) {
baseDao.insertBatchEntity(list);
public void delAndSaveServiceAbilityGridMonthly(String customerId, String monthId, List<FactIndexServiceAblityGridMonthlyEntity> entityList) {
int deleteNum;
do {
deleteNum = baseDao.deleteFactIndexServiceAblityGridMonthly(customerId, monthId);
} while (deleteNum > NumConstant.ZERO);
List<List<FactIndexServiceAblityGridMonthlyEntity>> partition = ListUtils.partition(entityList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
baseDao.insertBatchEntity(list);
});
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPioneerDataService.java

@ -40,4 +40,17 @@ public interface ScreenPioneerDataService extends BaseService<ScreenPioneerDataE
* @Date 2020/9/22 14:41
**/
List<ScreenPioneerDataEntity> initPioneerDataList(String customerId, String orgType,String agencyLevel);
/**
* @return void
* @param customerId
* @param orgType grid, agency
* @param dataEndTime
* @param deleteSize
* @param entityList 待插入的数据
* @author yinzuomei
* @description 保存抽取结果
* @Date 2020/9/22 15:54
**/
void delAndSavePioneerData(String customerId, String orgType, String dataEndTime, Integer deleteSize, List<ScreenPioneerDataEntity> entityList);
}

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) {
List<IndexGroupTemplateEntity> groupTempList = indexGroupTemplateDao.selectAll();
List<IndexGroupDetailTemplateEntity> groupDetailTempList = indexGroupDetailTemplateDao.selectAll();
if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)){
if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)) {
throw new RenException("没有需要初始化的数据");
}
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<>();
groupMap.forEach((oldGroupTempId,o)->{
groupMap.forEach((oldGroupTempId, o) -> {
IndexGroupEntity newGroupEntity = ConvertUtils.sourceToTarget(o, IndexGroupEntity.class);
String newGroupId = UniqueIdGenerator.generate();
newGroupEntity.setId(newGroupId);
newGroupEntity.setCustomerId(customerId);
String oldPid = newGroupEntity.getParentIndexGroupId();
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);
groupNewIdMap.put(oldGroupTempId, newGroupId);
insertGroupList.add(newGroupEntity);
});
insertGroupList.forEach(o-> {

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

@ -20,12 +20,16 @@ package com.epmet.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.screen.ScreenPioneerDataDao;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@ -53,12 +57,40 @@ public class ScreenPioneerDataServiceImpl extends BaseServiceImpl<ScreenPioneerD
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Override
public List<ScreenPioneerDataEntity> initPioneerDataList(String customerId, String orgType, String agencyLevel) {
List<ScreenPioneerDataEntity> list=new ArrayList<>();
if("grid".equals(orgType)){
list=baseDao.initGridPioneerDataList(customerId);
}else if("agency".equals(orgType)){
list=baseDao.initAgencyPioneerDataList(customerId,agencyLevel);
List<ScreenPioneerDataEntity> list = new ArrayList<>();
if ("grid".equals(orgType)) {
list = baseDao.initGridPioneerDataList(customerId);
} else if ("agency".equals(orgType)) {
list = baseDao.initAgencyPioneerDataList(customerId, agencyLevel);
}
return list;
}
/**
* @param customerId
* @param orgType grid, agency
* @param dataEndTime
* @param deleteSize
* @param entityList 待插入的数据
* @return void
* @author yinzuomei
* @description 保存抽取结果
* @Date 2020/9/22 15:54
**/
@Transactional(rollbackFor = Exception.class)
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Override
public void delAndSavePioneerData(String customerId, String orgType, String dataEndTime, Integer deleteSize, List<ScreenPioneerDataEntity> entityList) {
int deleteNum;
do {
deleteNum = baseDao.deletePioneerData(customerId, orgType, dataEndTime, deleteSize);
} while (deleteNum != NumConstant.ZERO);
List<List<ScreenPioneerDataEntity>> partition = ListUtils.partition(entityList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
baseDao.insertBatchEntity(list);
});
}
}

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

@ -22,6 +22,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.CompareConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.screen.*;
import com.epmet.dto.screencoll.form.*;
import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity;
@ -447,7 +448,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
if (formDTO.getIsFirst()) {
int deleteNum;
do {
deleteNum = screenPioneerDataDao.deletePioneerData(customerId);
deleteNum = screenPioneerDataDao.deletePioneerData(customerId,null,null, IndexCalConstant.DELETE_SIZE);
} while (deleteNum != NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {

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

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

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

@ -65,4 +65,36 @@
limit #{deleteSize}
</if>
</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>

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

@ -6,4 +6,8 @@
<!--<insert id="inertGroupFromTable">
insert into index_group_template ()
</insert>-->
<delete id="deleteByCustomerId">
delete from index_group where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
</delete>
</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,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
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0'
@ -18,4 +18,8 @@
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0'
</select>
<delete id="deleteByCustomerId">
delete from index_group_detail where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
</delete>
</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>
<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
where STATUS = 'enable' and DEL_FLAG = '0'
</select>

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

@ -7,7 +7,7 @@
</delete>
<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'
</select>
</mapper>

66
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

@ -3,10 +3,16 @@
<mapper namespace="com.epmet.dao.evaluationindex.screen.ScreenPioneerDataDao">
<delete id="deletePioneerData">
<delete id="deletePioneerData" parameterType="map">
delete from screen_pioneer_data
where CUSTOMER_ID = #{customerId}
limit 1000;
<if test='null != orgType and "" != orgType'>
and ORG_TYPE=#{orgType}
</if>
<if test='null != dataEndTime and "" != dataEndTime'>
and DATA_END_TIME=#{dataEndTime}
</if>
limit #{deleteSize}
</delete>
<insert id="batchInsertPioneerData" parameterType="map">
@ -117,4 +123,60 @@
and sca.`LEVEL`=#{agencyLevel}
AND sca.CUSTOMER_ID = #{customerId}
</select>
<insert id="insertBatchEntity" parameterType="map">
insert into screen_pioneer_data
(
ID,
CUSTOMER_ID,
ORG_TYPE,
ORG_ID,
PARENT_ID,
ORG_NAME,
PUBLISH_ISSUE_TOTAL,
ISSUE_TOTAL,
TOPIC_TOTAL,
SHIFT_PROJECT_TOTAL,
RESOLVED_PROJECT_TOTAL,
PUBLISH_ISSUE_RATIO,
ISSUE_RATIO,
TOPIC_RATIO,
SHIFT_PROJECT_RATIO,
RESOLVED_PROJECT_RATIO,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DATA_END_TIME
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},
#{item.orgName},
#{item.publishIssueTotal},
#{item.issueTotal},
#{item.topicTotal},
#{item.shiftProjectTotal},
#{item.resolvedProjectTotal},
#{item.publishIssueRatio},
#{item.issueRatio},
#{item.topicRatio},
#{item.shiftProjectRatio},
#{item.resolvedProjectRatio},
0,
0,
'APP_USER',
now(),
'APP_USER',
now(),
#{item.dataEndTime}
)
</foreach>
</insert>
</mapper>

Loading…
Cancel
Save