Browse Source

Merge remote-tracking branch 'origin/dev_bugfix_ljj' into develop

dev
yinzuomei 4 years ago
parent
commit
87bcf6410c
  1. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
  2. 13
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/UserGroupIdDTO.java
  3. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
  5. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java
  6. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicLogDailyDao.java
  7. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/CalCpcIndexService.java
  8. 290
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java
  9. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  10. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
  11. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicLogDailyService.java
  12. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/IssueExtractService.java
  13. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
  14. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicLogDailyServiceImpl.java
  15. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java
  16. 5
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.29__addindex_forcpcability.sql
  17. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
  18. 22
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml
  19. 23
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml
  20. 3
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  21. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java

@ -204,6 +204,7 @@ public class ScreenProjectController {
//tokenDto.setUserId("36bc0fb38565ecdebf8ab9b476b44548");
//tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc");
ValidatorUtils.validateEntity(formDTO, ProjectCategoryFormDTO.CategoryProjectExportForm.class);
String openTime = formDTO.getStartTime();
List<ProjectCategoryResultDTO> data = screenProjectService.selectProjectCategory(formDTO, tokenDto);
String templatePath = "excel/project_category_temp.xlsx";
@ -216,7 +217,7 @@ public class ScreenProjectController {
Map<String,Object> mapData = new HashMap<>();
mapData.put("list",resultDTOList);
mapData.put("orgName", formDTO.getOrgName());
mapData.put("exportDate",getExportDateStr(formDTO.getStartTime(),formDTO.getEndTime()));
mapData.put("exportDate", getExportDateStr(openTime, formDTO.getEndTime()));
Workbook workbook = ExcelExportUtil.exportExcel(new TemplateExportParams(templatePath), mapData);
response.setHeader("content-Type", "application/vnd.ms-excel");
response.addHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode("项目分类统计.xls", "UTF-8"));

13
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/UserGroupIdDTO.java

@ -0,0 +1,13 @@
package com.epmet.dto.extract;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class UserGroupIdDTO implements Serializable {
private String userId;
private List<String> groupIdList;
}

24
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -54,7 +54,6 @@ import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.DimCustomerPartymemberService;
import com.epmet.service.stats.DimCustomerService;
import com.epmet.util.DimIdGenerator;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -65,7 +64,9 @@ import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
@RequestMapping("demo")
@RestController
@ -620,20 +621,23 @@ public class DemoController {
private CalCpcIndexService calCpcIndexService;
@PostMapping("calCpcPartyAbility")
public Result calCpcPartyAbility(@RequestParam("customerId") String customerId, @RequestParam("monthId")String monthId) {
public Result calCpcPartyAbility(@RequestParam("customerId") String customerId, @RequestParam("monthId") String monthId) {
long startCpc = System.currentTimeMillis();
if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(monthId)) {
calCpcIndexService.calCpcPartyAbility(customerId,monthId);
}else{
calCpcIndexService.calCpcPartyAbilityV2(customerId, monthId);
// calCpcIndexService.calCpcPartyAbility(customerId, monthId);
} else {
QueryWrapper<DimCustomerEntity> customerEntityQueryWrapper = new QueryWrapper<>();
List<DimCustomerEntity> customerEntityList=dimCustomerDao.selectList(customerEntityQueryWrapper);
List<DimCustomerEntity> customerEntityList = dimCustomerDao.selectList(customerEntityQueryWrapper);
QueryWrapper<DimMonthEntity> wrapper = new QueryWrapper<>();
List<DimMonthEntity> dimMonthEntityList= dimMonthDao.selectList(wrapper);
for(DimCustomerEntity customerEntity:customerEntityList){
for(DimMonthEntity monthEntity:dimMonthEntityList) {
calCpcIndexService.calCpcPartyAbility(customerEntity.getId(),monthEntity.getId());
List<DimMonthEntity> dimMonthEntityList = dimMonthDao.selectList(wrapper);
for (DimCustomerEntity customerEntity : customerEntityList) {
for (DimMonthEntity monthEntity : dimMonthEntityList) {
calCpcIndexService.calCpcPartyAbilityV2(customerEntity.getId(), monthEntity.getId());
}
}
}
log.error("手动调用党员相关-党建能力执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return new Result();
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java

@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.UserGroupIdDTO;
import com.epmet.dto.extract.form.GridHeartedFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
@ -225,4 +226,6 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> selectPartyMemberGroupStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId);
List<UserGroupIdDTO> selectGroupAndLeader(String customerId);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java

@ -170,4 +170,12 @@ public interface FactOriginIssueLogDailyDao extends BaseDao<FactOriginIssueLogDa
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> getClosedIssueIncr(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* 查询出本月内做过议题表决的用户id
* @param customerId
* @param monthId
* @return
*/
List<String> queryVoteUserIds(@Param("customerId")String customerId, @Param("monthId")String monthId);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicLogDailyDao.java

@ -103,4 +103,12 @@ public interface FactOriginTopicLogDailyDao extends BaseDao<FactOriginTopicLogDa
* @date 2020/9/21 9:37 上午
*/
List<PartyActiveResultDTO> selectPartyActiveTopic(@Param("customerId")String customerId,@Param("monthId") String monthId,@Param("isParty") Integer isParty);
/**
* 查询出本月内评论过话题的用户id
* @param customerId
* @param monthId
* @return
*/
List<String> queryCommentTopicUserIds(@Param("customerId") String customerId, @Param("monthId")String monthId);
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/CalCpcIndexService.java

@ -1,7 +1,5 @@
package com.epmet.service.evaluationindex.extract.dataToIndex;
import java.util.Map;
/**
* 党员相关
*
@ -18,4 +16,7 @@ public interface CalCpcIndexService {
* @Date 2020/9/17 14:08
**/
void calCpcPartyAbility(String customerId, String monthId);
void calCpcPartyAbilityV2(String customerId, String monthId);
}

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

@ -1,7 +1,10 @@
package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.extract.UserGroupIdDTO;
import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.service.evaluationindex.extract.dataToIndex.CalCpcIndexService;
@ -9,8 +12,10 @@ import com.epmet.service.evaluationindex.extract.todata.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyService;
import com.epmet.service.group.GroupDataService;
import com.epmet.service.stats.DimCustomerPartymemberService;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -20,6 +25,8 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
/**
* 党员相关
@ -134,6 +141,237 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
factIndexPartyAblityCpcMonthlyService.delAndSavePartyAblityCpcMonthly(customerId,monthId,indexPartyAblityCpcList);
}
@Override
public void calCpcPartyAbilityV2(String customerId, String monthId) {
//1、构造初始值 当前客户下所有的党员
List<FactIndexPartyAblityCpcMonthlyEntity> indexPartyAblityCpcList = dimCustomerPartymemberService.selectPartyMemberList(customerId);
if (CollectionUtils.isEmpty(indexPartyAblityCpcList)) {
log.info("dim_customer_partymember do not any records customerId=" + customerId);
return;
}
//可以先查询出每个党员的 自建群
Map<String, List<String>> userCreatedGroups = queryUserCreatedGroups(customerId, indexPartyAblityCpcList);
CompletableFuture<Map<String, Integer>> createTopicCountFuture = CompletableFuture.supplyAsync(() -> {
return calCreateTopicCount(customerId, monthId);
});
CompletableFuture<Map<String, Integer>> joinTopicCountFuture = CompletableFuture.supplyAsync(() -> {
return calJoinTopicCount(customerId, monthId);
});
CompletableFuture<Map<String, Integer>> shiftIssueCountFuture = CompletableFuture.supplyAsync(() -> {
return calShiftIssueCount(customerId, monthId);
});
CompletableFuture<Map<String, Integer>> shiftProjectCountFuture = CompletableFuture.supplyAsync(() -> {
return calShiftProjectCount(customerId, monthId);
});
CompletableFuture<Map<String, Integer>> joinThreeMeetsCountFuture = CompletableFuture.supplyAsync(() -> {
return calJoinThreeMeetsCount(customerId, monthId);
});
CompletableFuture<Map<String, Integer>> groupUserCountFuture = CompletableFuture.supplyAsync(() -> {
return calgroupUserCount(customerId, monthId, indexPartyAblityCpcList, userCreatedGroups);
});
CompletableFuture<Map<String, Integer>> groupActiveUserCountFuture = CompletableFuture.supplyAsync(() -> {
return calGroupActiveUserCount(customerId, monthId, indexPartyAblityCpcList, userCreatedGroups);
});
CompletableFuture<Map<String, Integer>> groupTopicCountFuture = CompletableFuture.supplyAsync(() -> {
return calGroupTopicCount(customerId, monthId);
});
CompletableFuture<Map<String, BigDecimal>> topicToIssueRatioFuture = CompletableFuture.supplyAsync(() -> {
return caltopicToIssueRatio(customerId, monthId, indexPartyAblityCpcList, userCreatedGroups);
});
Map<String, Integer> createTopicCountMap = new HashMap<>();
Map<String, Integer> joinTopicCountMap = new HashMap<>();
Map<String, Integer> shiftIssueCountMap = new HashMap<>();
Map<String, Integer> shiftProjectCountMap = new HashMap<>();
Map<String, Integer> joinThreeMeetsCountMap = new HashMap<>();
Map<String, Integer> groupUserCountMap = new HashMap<>();
Map<String, Integer> groupActiveUserCountMap = new HashMap<>();
Map<String, Integer> groupTopicCountMap = new HashMap<>();
Map<String, BigDecimal> topicToIssueRatioMap = new HashMap<>();
try {
//1、党员提出话题数
createTopicCountMap = createTopicCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【党员提出话题数】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//2、党员参与话题数(支持、反对、评论、浏览)---目前只统计 党员评论话题次数之和
joinTopicCountMap = joinTopicCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【党员参与话题数】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//3、党员提出的话题转议题数
shiftIssueCountMap = shiftIssueCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【党员提出的话题转议题数】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//4、党员提出的议题转项目数
shiftProjectCountMap = shiftProjectCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【党员提出的议题转项目数】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//5、参加“三会一课”次数 默认0 :当前用户在本月内活动签到次数 限制活动分类编码100001 三会一课
joinThreeMeetsCountMap = joinThreeMeetsCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【参加“三会一课”次数】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//6、党员自建群群众人数 :和评价周期无关
groupUserCountMap = groupUserCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【党员自建群群众人数】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//7、党员自建群活跃群众人数
groupActiveUserCountMap = groupActiveUserCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【党员自建群活跃群众人数】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//8、党员自建群活跃度——话题数:从话题表中统计党员自建群i的话题总数;对所有自建群话题数累加。
groupTopicCountMap = groupTopicCountFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【党员自建群活跃度】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
try{
//9、自建群活跃度——议题转项目率
topicToIssueRatioMap = topicToIssueRatioFuture.get();
} catch (Exception e) {
log.error("党员相关-党建能力原始指标值【自建群活跃度】计算异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
List<FactIndexPartyAblityCpcMonthlyEntity> list = new ArrayList<>();
List<List<FactIndexPartyAblityCpcMonthlyEntity>> partionList = Lists.partition(indexPartyAblityCpcList, 500);
List<CompletableFuture<List<FactIndexPartyAblityCpcMonthlyEntity>>> entityFutures = new ArrayList<>();
//2、计算实际值,更新
for (List<FactIndexPartyAblityCpcMonthlyEntity> partList : partionList) {
String quarterId = DateUtils.getQuarterId(monthId);
String yearId = DateUtils.getYearId(monthId);
Map<String, Integer> finalCreateTopicCountMap = createTopicCountMap;
Map<String, Integer> finalJoinTopicCountMap = joinTopicCountMap;
Map<String, Integer> finalShiftIssueCountMap = shiftIssueCountMap;
Map<String, Integer> finalShiftProjectCountMap = shiftProjectCountMap;
Map<String, Integer> finalJoinThreeMeetsCountMap = joinThreeMeetsCountMap;
Map<String, Integer> finalGroupUserCountMap = groupUserCountMap;
Map<String, Integer> finalGroupActiveUserCountMap = groupActiveUserCountMap;
Map<String, Integer> finalGroupTopicCountMap = groupTopicCountMap;
Map<String, BigDecimal> finalTopicToIssueRatioMap = topicToIssueRatioMap;
//目前平阴2100多个党员,200个一组,开一个线程
CompletableFuture<List<FactIndexPartyAblityCpcMonthlyEntity>> future = CompletableFuture.supplyAsync(() -> {
return constructEntity(monthId,
quarterId,
yearId,
partList,
finalCreateTopicCountMap,
finalJoinTopicCountMap,
finalShiftIssueCountMap,
finalShiftProjectCountMap,
finalJoinThreeMeetsCountMap,
finalGroupUserCountMap,
finalGroupActiveUserCountMap,
finalGroupTopicCountMap,
finalTopicToIssueRatioMap);
});
entityFutures.add(future);
}
for (CompletableFuture<List<FactIndexPartyAblityCpcMonthlyEntity>> entityFuture : entityFutures) {
try {
List<FactIndexPartyAblityCpcMonthlyEntity> partList = entityFuture.get();
list.addAll(partList);
} catch (InterruptedException e) {
log.error("党员相关-党建能力原始指标构造异常:{}", ExceptionUtils.getErrorStackTrace(e));
} catch (Exception e) {
log.error("党员相关-党建能力原始指标构造异常:{}", ExceptionUtils.getErrorStackTrace(e));
}
}
//3、删除之前统计过的、批插入批量插入
factIndexPartyAblityCpcMonthlyService.delAndSavePartyAblityCpcMonthly(customerId, monthId, list);
}
private List<FactIndexPartyAblityCpcMonthlyEntity> constructEntity(String monthId,
String quarterId,
String yearId,
List<FactIndexPartyAblityCpcMonthlyEntity> partList,
Map<String, Integer> createTopicCountMap,
Map<String, Integer> joinTopicCountMap,
Map<String, Integer> shiftIssueCountMap,
Map<String, Integer> shiftProjectCountMap,
Map<String, Integer> joinThreeMeetsCountMap,
Map<String, Integer> groupUserCountMap,
Map<String, Integer> groupActiveUserCountMap,
Map<String, Integer> groupTopicCountMap,
Map<String, BigDecimal> topicToIssueRatioMap) {
List<FactIndexPartyAblityCpcMonthlyEntity> resultList = new ArrayList<>();
for (FactIndexPartyAblityCpcMonthlyEntity temp : partList) {
FactIndexPartyAblityCpcMonthlyEntity indexPartyAblityCpcEntity = ConvertUtils.sourceToTarget(temp, FactIndexPartyAblityCpcMonthlyEntity.class);
indexPartyAblityCpcEntity.setMonthId(monthId);
indexPartyAblityCpcEntity.setQuarterId(quarterId);
indexPartyAblityCpcEntity.setYearId(yearId);
//1、党员提出话题数
if (MapUtils.isNotEmpty(createTopicCountMap) && createTopicCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setCreateTopicCount(createTopicCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//2、党员参与话题数(支持、反对、评论、浏览)---目前只统计 党员评论话题次数之和
if (MapUtils.isNotEmpty(joinTopicCountMap) && joinTopicCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setJoinTopicCount(joinTopicCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//3、党员提出的话题转议题数
if (MapUtils.isNotEmpty(shiftIssueCountMap) && shiftIssueCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setShiftIssueCount(shiftIssueCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//4、党员提出的议题转项目数
if (MapUtils.isNotEmpty(shiftProjectCountMap) && shiftProjectCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setShiftProjectCount(shiftProjectCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//5、参加“三会一课”次数 目前没有此业务,默认0 : 当前用户在本月内活动签到次数 限制活动分类编码100001 三会一课
if (MapUtils.isNotEmpty(joinThreeMeetsCountMap) && joinThreeMeetsCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setJoinThreeMeetsCount(joinThreeMeetsCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//6、党员自建群群众人数
if (MapUtils.isNotEmpty(groupUserCountMap) && groupUserCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setGroupUserCount(groupUserCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//7、党员自建群活跃群众人数
if (MapUtils.isNotEmpty(groupActiveUserCountMap) && groupActiveUserCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setGroupActiveUserCount(groupActiveUserCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//8、党员自建群活跃度——话题数
if (MapUtils.isNotEmpty(groupTopicCountMap) && groupTopicCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setGroupTopicCount(groupTopicCountMap.get(indexPartyAblityCpcEntity.getUserId()));
}
//9、自建群活跃度——议题转项目率
if (MapUtils.isNotEmpty(topicToIssueRatioMap) && topicToIssueRatioMap.containsKey(indexPartyAblityCpcEntity.getUserId())) {
indexPartyAblityCpcEntity.setTopicToIssueRatio(topicToIssueRatioMap.get(indexPartyAblityCpcEntity.getUserId()));
}
resultList.add(indexPartyAblityCpcEntity);
}
return resultList;
}
/**
* @param customerId
* @param partyMemberList
@ -144,7 +382,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
**/
private Map<String, List<String>> queryUserCreatedGroups(String customerId, List<FactIndexPartyAblityCpcMonthlyEntity> partyMemberList) {
Map<String, List<String>> map = new HashMap<>();
for (FactIndexPartyAblityCpcMonthlyEntity partyMember : partyMemberList) {
/*for (FactIndexPartyAblityCpcMonthlyEntity partyMember : partyMemberList) {
//查询当前党员建了多少个组
List<String> groupIdList=factOriginGroupMainDailyService.selectGroupIds(customerId,partyMember.getUserId());
if (CollectionUtils.isEmpty(groupIdList)) {
@ -153,6 +391,17 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
} else {
map.put(partyMember.getUserId(), groupIdList);
}
}*/
//查询出所有的小组,按照组长
List<UserGroupIdDTO> list = factOriginGroupMainDailyService.selectGroupAndLeader(customerId);
Map<String, List<String>> userGroupIdMap = list.stream().collect(Collectors.toMap(UserGroupIdDTO::getUserId, UserGroupIdDTO::getGroupIdList));
for (FactIndexPartyAblityCpcMonthlyEntity partyMember : partyMemberList) {
if (MapUtils.isEmpty(userGroupIdMap) || !userGroupIdMap.containsKey(partyMember.getUserId())) {
map.put(partyMember.getUserId(), new ArrayList<>());
continue;
} else {
map.put(partyMember.getUserId(), userGroupIdMap.get(partyMember.getUserId()));
}
}
return map;
}
@ -166,11 +415,13 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
* @Date 2020/9/18 10:59
**/
private Map<String, Integer> calCreateTopicCount(String customerId, String monthId) {
long startCpc = System.currentTimeMillis();
List<CpcIndexCommonDTO> list = factOriginTopicMainDailyService.selectPartyCreateTopicCount(customerId, monthId);
Map<String, Integer> resultMap = new HashMap<>();
for (CpcIndexCommonDTO cpcIndexCommonDTO: list) {
resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue());
}
log.warn("1、党员相关-党建能力【党员提出话题数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return resultMap;
}
@ -183,11 +434,13 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
* @Date 2020/9/18 13:33
**/
private Map<String, Integer> calJoinTopicCount(String customerId, String monthId) {
long startCpc = System.currentTimeMillis();
List<CpcIndexCommonDTO> list = factOriginTopicLogDailyService.selectJoinTopicCount(customerId, monthId);
Map<String, Integer> resultMap = new HashMap<>();
for (CpcIndexCommonDTO cpcIndexCommonDTO : list) {
resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue());
}
log.warn("2、党员相关-党建能力【党员参与话题数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return resultMap;
}
@ -201,11 +454,13 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
* @Date 2020/9/18 13:53
**/
private Map<String, Integer> calShiftIssueCount(String customerId, String monthId) {
long startCpc = System.currentTimeMillis();
List<CpcIndexCommonDTO> list = issueExtractService.selectShiftIssueCount(customerId, monthId);
Map<String, Integer> resultMap = new HashMap<>();
for (CpcIndexCommonDTO cpcIndexCommonDTO : list) {
resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue());
}
log.warn("3、党员相关-党建能力【党员提出的话题转议题数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return resultMap;
}
@ -218,12 +473,14 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
* @Date 2020/9/18 14:10
**/
private Map<String, Integer> calShiftProjectCount(String customerId, String monthId) {
long startCpc = System.currentTimeMillis();
//查询fact_origin_project_main_daily 表 中议题的议题的状态为 shift_
List<CpcIndexCommonDTO> list = factOriginProjectMainDailyService.selectShiftProjectCount(customerId, monthId);
Map<String, Integer> resultMap = new HashMap<>();
for (CpcIndexCommonDTO cpcIndexCommonDTO : list) {
resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue());
}
log.warn("4、党员相关-党建能力【党员提出的议题转项目数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return resultMap;
}
@ -236,12 +493,14 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
* @Date 2021/5/12 13:38
**/
private Map<String, Integer> calJoinThreeMeetsCount(String customerId, String monthId) {
long startCpc = System.currentTimeMillis();
//查询小组活动签到表,计算用户在本月内签到的活动次数
List<CpcIndexCommonDTO> list=groupDataService.selectJoinThreeMeetsCount(customerId,monthId);
Map<String, Integer> resultMap = new HashMap<>();
for (CpcIndexCommonDTO cpcIndexCommonDTO : list) {
resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue());
}
log.warn("5、党员相关-党建能力【参加“三会一课”次数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return resultMap;
}
@ -256,6 +515,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
private Map<String, Integer> calgroupUserCount(String customerId, String monthId,
List<FactIndexPartyAblityCpcMonthlyEntity> partyMemberList,
Map<String, List<String>> userCreatedGroups) {
long startCpc = System.currentTimeMillis();
/*含义评价周期内党员自建群中群众成员数
数据来源用户社群关系表
计算方法对党员i的所有j个自建群从用户社群关系表中统计属于每个自建群的群众用户总人数并对j个群众用户总数进行不重复累加
@ -265,7 +525,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
//查询当前党员建了多少个组
List<String> groupIdList = userCreatedGroups.get(partyMember.getUserId());
if (CollectionUtils.isEmpty(groupIdList)) {
log.info("当前党员userId="+partyMember.getUserId()+"没有创建过小组, 【党员相关-党员自建群群众人数】赋值0");
// log.info("当前党员userId="+partyMember.getUserId()+"没有创建过小组, 【党员相关-党员自建群群众人数】赋值0");
map.put(partyMember.getUserId(), NumConstant.ZERO);
continue;
}
@ -279,6 +539,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
map.put(partyMember.getUserId(), memberIdList.size());
}
}
log.warn("6、党员相关-党建能力【党员自建群群众人数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return map;
}
@ -294,6 +555,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
private Map<String, Integer> calGroupActiveUserCount(String customerId, String monthId,
List<FactIndexPartyAblityCpcMonthlyEntity> partyMemberList,
Map<String, List<String>> userCreatedGroups) {
long startCpc = System.currentTimeMillis();
/*含义评价周期内党员自建群中活跃群众成员数所谓活跃群成员即评价周期内参与话题事件评论点赞点踩总次数大于给定阈值的群众用户
数据来源话题用户阅读表话题评论用户表态表话题评论表事件点赞点踩表事件评论点赞点踩表事件评论表用户信息表
计算方法
@ -311,7 +573,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
//1、查询当前党员建了多少个组
List<String> groupIdList = userCreatedGroups.get(partyMember.getUserId());
if (CollectionUtils.isEmpty(groupIdList)) {
log.warn("当前党员userId="+partyMember.getUserId()+"没有创建过小组, 【党员相关-党员自建群活跃群众人数】赋值0");
// log.warn("当前党员userId="+partyMember.getUserId()+"没有创建过小组, 【党员相关-党员自建群活跃群众人数】赋值0");
map.put(partyMember.getUserId(), NumConstant.ZERO);
continue;
}
@ -321,23 +583,35 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
map.put(partyMember.getUserId(), NumConstant.ZERO);
continue;
}
//可以先把本月内评论的用户+本月内表决过的用户 集合查询出来。避免循环查询
List<String> commentTopicUserIds=factOriginTopicLogDailyService.queryCommentTopicUserIds(customerId,monthId);
List<String> voteUserIds=issueExtractService.queryVoteUserIds(customerId,monthId);
//3、判断每个成员是否 “活跃”
for (String memberId : memberIdList) {
//注释2022.03.02
//1、判断成员在本月内是否评论过
Integer topicCommentCount = factOriginTopicLogDailyService.selectUserCommentCount(memberId, customerId, monthId);
/*Integer topicCommentCount = factOriginTopicLogDailyService.selectUserCommentCount(memberId, customerId, monthId);
if (topicCommentCount > 0) {
groupActiveUserCount++;
continue;
}
}*/
//2、判断成员在本月内是否表决过(支持or反对)议题
Integer voteCount = issueExtractService.selectCountUserVote(memberId, customerId, monthId);
/*Integer voteCount = issueExtractService.selectCountUserVote(memberId, customerId, monthId);
if (voteCount > 0) {
groupActiveUserCount++;
}*/
if (CollectionUtils.isNotEmpty(commentTopicUserIds) && commentTopicUserIds.contains(memberId)) {
groupActiveUserCount++;
continue;
}
if (CollectionUtils.isNotEmpty(voteUserIds) && voteUserIds.contains(memberId)) {
groupActiveUserCount++;
}
}
//赋值每个党员的 -- 党员自建群活跃群众人数
map.put(partyMember.getUserId(), groupActiveUserCount);
}
log.warn("7、党员相关-党建能力【党员自建群活跃群众人数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return map;
}
@ -351,6 +625,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
* @Date 2020/9/18 14:31
**/
private Map<String, Integer> calGroupTopicCount(String customerId, String monthId) {
long startCpc = System.currentTimeMillis();
/*含义评价周期内党员自建群中话题发布数
数据来源话题表
计算方法从话题表中统计党员自建群i的话题总数对所有自建群话题数累加
@ -360,6 +635,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
for (CpcIndexCommonDTO dto : list) {
resultMap.put(dto.getUserId(), dto.getIndexValue());
}
log.warn("8、党员相关-党建能力【党员自建群活跃度——话题数】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return resultMap;
}
@ -374,6 +650,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
String monthId,
List<FactIndexPartyAblityCpcMonthlyEntity> partyMemberList,
Map<String, List<String>> userCreatedGroups) {
long startCpc = System.currentTimeMillis();
Map<String, BigDecimal> map = new HashMap<>();
for (FactIndexPartyAblityCpcMonthlyEntity partyMember : partyMemberList) {
//如果党员自建群为空,直接赋值0
@ -408,6 +685,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
BigDecimal topicToIssueRatio = new BigDecimal(topicToIssueRatioStr).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
map.put(partyMember.getUserId(), topicToIssueRatio);
}
log.warn("9、党员相关-党建能力【自建群活跃度——议题转项目率】执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, customerId);
return map;
}

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

@ -101,7 +101,8 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
executorService.submit(() -> {
try {
long startCpc = System.currentTimeMillis();
calCpcIndexService.calCpcPartyAbility(customerId, monthId);
// calCpcIndexService.calCpcPartyAbility(customerId, monthId);
calCpcIndexService.calCpcPartyAbilityV2(customerId, monthId);
log.info("党员相关-党建能力执行完毕======总耗时:{}ms,customerId:{}", System.currentTimeMillis() - startCpc, param.getCustomerId());
} catch (Exception e) {
log.error("抽取【党员相关数据】发生异常,参数:" + JSON.toJSONString(param), e);

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java

@ -19,6 +19,7 @@ package com.epmet.service.evaluationindex.extract.todata;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.UserGroupIdDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
@ -125,4 +126,10 @@ public interface FactOriginGroupMainDailyService extends BaseService<FactOriginG
*/
Map<String, OrgStatisticsResultDTO> getPartyMemberGroupStatic(String customerId, String dateId, String type);
/**
* 查询出小组id ,组长userId
* @param customerId
* @return
*/
List<UserGroupIdDTO> selectGroupAndLeader(String customerId);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicLogDailyService.java

@ -79,4 +79,12 @@ public interface FactOriginTopicLogDailyService extends BaseService<FactOriginTo
* @date 2020/9/21 9:37 上午
*/
List<PartyActiveResultDTO> selectPartyActiveTopic(String customerId, String monthId,Integer isParty);
/**
* 查询出本月内评论过话题的用户id
* @param customerId
* @param monthId
* @return
*/
List<String> queryCommentTopicUserIds(String customerId, String monthId);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/IssueExtractService.java

@ -107,4 +107,12 @@ public interface IssueExtractService {
* @date 2020/9/21 9:37 上午
*/
List<PartyActiveResultDTO> selectPartyActiveIssueVote(String customerId, String monthId, Integer isParty);
/**
* 查询出本月内做过议题表决的用户id
* @param customerId
* @param monthId
* @return
*/
List<String> queryVoteUserIds(String customerId, String monthId);
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java

@ -22,8 +22,8 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.OrgTypeConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMemberDailyDao;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.UserGroupIdDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
@ -198,4 +198,15 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl<FactOri
}
}
/**
* 查询出小组id ,组长userId
*
* @param customerId
* @return
*/
@Override
public List<UserGroupIdDTO> selectGroupAndLeader(String customerId) {
return baseDao.selectGroupAndLeader(customerId);
}
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicLogDailyServiceImpl.java

@ -108,4 +108,16 @@ public class FactOriginTopicLogDailyServiceImpl extends BaseServiceImpl<FactOrig
public List<PartyActiveResultDTO> selectPartyActiveTopic(String customerId, String monthId, Integer isParty) {
return baseDao.selectPartyActiveTopic(customerId, monthId, isParty);
}
/**
* 查询出本月内评论过话题的用户id
*
* @param customerId
* @param monthId
* @return
*/
@Override
public List<String> queryCommentTopicUserIds(String customerId, String monthId) {
return baseDao.queryCommentTopicUserIds(customerId,monthId);
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java

@ -374,4 +374,17 @@ public class IssueExtractServiceImpl implements IssueExtractService {
public List<PartyActiveResultDTO> selectPartyActiveIssueVote(String customerId, String monthId, Integer isParty) {
return issueLogDailyDao.selectPartyActiveIssueVote(customerId, monthId, isParty);
}
/**
* 查询出本月内做过议题表决的用户id
*
* @param customerId
* @param monthId
* @return
*/
@Override
public List<String> queryVoteUserIds(String customerId, String monthId) {
return issueLogDailyDao.queryVoteUserIds(customerId,monthId);
}
}

5
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.29__addindex_forcpcability.sql

@ -0,0 +1,5 @@
-- stat库执行
alter table fact_origin_topic_main_daily add index `IDX_TOPIC_MAIN_GROUP_ID` (`GROUP_ID`);
alter table fact_origin_project_main_daily add index `IDX_P_MAIN_TOPIC_ID` (`TOPIC_ID`);
alter table fact_origin_issue_main_daily add index `IDX_ISSUE_MAIN_TOPIC_ID` (`TOPIC_ID`);
alter table fact_origin_group_member_daily add index `IDX_GM_GROUP_ID` (`GROUP_ID`);

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml

@ -382,4 +382,22 @@
GRID_ID
</select>
<resultMap id="UserGroupIdDTOMap" type="com.epmet.dto.extract.UserGroupIdDTO">
<id property="userId" column="GROUP_OWNER_ID"/>
<collection property="groupIdList" ofType="java.lang.String">
<constructor>
<arg column="ID"/>
</constructor>
</collection>
</resultMap>
<select id="selectGroupAndLeader" parameterType="java.lang.String" resultMap="UserGroupIdDTOMap">
SELECT
t1.GROUP_OWNER_ID,
t1.ID
FROM
fact_origin_group_main_daily t1
WHERE t1.DEL_FLAG='0'
and t1.CUSTOMER_ID = #{customerId}
</select>
</mapper>

22
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml

@ -237,4 +237,26 @@
GRID_ID,
OPERATION_USER_ID
</select>
<select id="queryVoteUserIds" parameterType="map" resultType="java.lang.String">
SELECT
*
FROM
(
SELECT
T1.OPERATION_USER_ID AS userId,
COUNT( 1 ) AS TOTAL
FROM
fact_origin_issue_log_daily T1
WHERE
T1.DEL_FLAG = '0'
AND T1.CUSTOMER_ID = #{customerId}
AND T1.MONTH_ID = #{monthId}
AND ( T1.ACTION_CODE = 'vote_support' OR T1.ACTION_CODE = 'vote_opposition' )
GROUP BY
T1.OPERATION_USER_ID
) temp
WHERE
total >0
</select>
</mapper>

23
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml

@ -143,4 +143,27 @@
AND CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
</select>
<!-- 查询出本月内,评论过话题的用户id -->
<select id="queryCommentTopicUserIds" parameterType="map" resultType="java.lang.String">
SELECT
userId
FROM
(
SELECT
t1.OPERATE_USER_ID AS userId,
COUNT( 1 ) AS total
FROM
fact_origin_topic_log_daily T1
WHERE
T1.DEL_FLAG = '0'
AND T1.CUSTOMER_ID = #{customerId}
AND T1.MONTH_ID = #{monthId}
AND t1.ACTION_CODE = 'comment'
GROUP BY
t1.OPERATE_USER_ID
) temp
WHERE
total >0
</select>
</mapper>

3
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java

@ -19,6 +19,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.security.dto.TokenDto;
@ -218,6 +219,7 @@ public class ArticleController {
* @param formDTO
* @throws Exception
*/
@NoRepeatSubmit
@PostMapping("publish")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<Boolean> publishArticle(@LoginUser TokenDto tokenDto, @RequestBody PublishArticleFormDTO formDTO) throws Exception {
@ -234,6 +236,7 @@ public class ArticleController {
* @param formDTO
* @throws Exception
*/
@NoRepeatSubmit
@PostMapping("manualpublish")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<Boolean> manualPublish(@LoginUser TokenDto tokenDto, @RequestBody PublishArticleFormDTO formDTO) throws Exception {

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -644,7 +644,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
}
List<String> nameList=new ArrayList<>();
for(String codePath:demandCodePath){
if(codePath.contains(StrConstant.COMMA)){
if (StringUtils.isNotBlank(codePath) && codePath.contains(StrConstant.COMMA)) {
String[] codeAtt=codePath.split(StrConstant.COMMA);
String code=codeAtt[codeAtt.length-1];
if(StringUtils.isNotBlank(code)&&demandDictMap.containsKey(code)){

Loading…
Cancel
Save