Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_temp

dev_shibei_match
zxc 5 years ago
parent
commit
74dd4ae278
  1. 3
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenCentralZoneDataFormDTO.java
  2. 18
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java
  5. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
  6. 106
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java
  7. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  8. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPartyUserRankDataServiceImpl.java
  9. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
  10. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  11. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml
  12. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyUserRankDataDao.xml
  13. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/point/UserPointDao.xml
  14. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
  15. 8
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml

3
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenCentralZoneDataFormDTO.java

@ -1,6 +1,9 @@
package com.epmet.dto.screen.form; package com.epmet.dto.screen.form;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;
import java.io.Serializable; import java.io.Serializable;

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

@ -38,6 +38,7 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetServ
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService;
import com.epmet.service.evaluationindex.extract.todata.GroupExtractService; import com.epmet.service.evaluationindex.extract.todata.GroupExtractService;
import com.epmet.service.evaluationindex.extract.todata.ProjectExtractService;
import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.extract.toscreen.*;
import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimAgencyService;
@ -104,14 +105,9 @@ public class DemoController {
@Autowired @Autowired
private IndexCollStreetService indexCollStreetService; private IndexCollStreetService indexCollStreetService;
@Autowired @Autowired
private ScreenCentralZoneDataAbsorptionService screenCentralZoneDataAbsorptionService;
@Autowired
private GovernRankDataExtractService governRankDataExtractService; private GovernRankDataExtractService governRankDataExtractService;
@Autowired @Autowired
private GroupExtractService groupExtractService;
@Autowired
private OrgRankExtractService orgRankExtractService; private OrgRankExtractService orgRankExtractService;
@GetMapping("testAlarm") @GetMapping("testAlarm")
public void testAlarm() { public void testAlarm() {
//for (int i = 0; i < 20; i++) { //for (int i = 0; i < 20; i++) {
@ -663,12 +659,6 @@ public class DemoController {
return new Result(); return new Result();
} }
@PostMapping("centralzonedatacleaning")
public Result centralZoneDataCleaning(@RequestBody ScreenCentralZoneDataFormDTO param){
screenCentralZoneDataAbsorptionService.centralZoneDataHub(param);
return new Result();
}
@PostMapping("governRank") @PostMapping("governRank")
public Result governRank(@RequestBody CustomerIdAndDateIdFormDTO formDTO){ public Result governRank(@RequestBody CustomerIdAndDateIdFormDTO formDTO){
governRankDataExtractService.extractGridData(formDTO.getCustomerId(), formDTO.getDateId()); governRankDataExtractService.extractGridData(formDTO.getCustomerId(), formDTO.getDateId());
@ -712,12 +702,8 @@ public class DemoController {
orgRankExtractService.extractStreetData(formDTO.getCustomerId(), formDTO.getDateId()); orgRankExtractService.extractStreetData(formDTO.getCustomerId(), formDTO.getDateId());
return new Result(); return new Result();
} }
@PostMapping("extractgroup")
public Result extractGroup(@RequestBody ExtractOriginFormDTO param){
groupExtractService.extractGroupData(param);
return new Result();
}
} }

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

@ -83,7 +83,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
List<ProjectProcessEntity> closedList = projectProcessService.getClosedProjectList(customerId, dateString); List<ProjectProcessEntity> closedList = projectProcessService.getClosedProjectList(customerId, dateString);
List<FactOriginProjectMainDailyDTO> pendingList = factOriginProjectMainDailyService.getPendingList(customerId); List<FactOriginProjectMainDailyDTO> pendingList = factOriginProjectMainDailyService.getPendingList(customerId);
List<FinishOrgDTO> finishOrgList = projectProcessService.getFinishOrg(customerId, dateString); List<FinishOrgDTO> finishOrgList = projectProcessService.getFinishOrg(customerId, dateString);
if (CollectionUtils.isEmpty(closedList)) { if (!CollectionUtils.isEmpty(closedList)) {
List<FactOriginProjectMainDailyEntity> closeProjects = List<FactOriginProjectMainDailyEntity> closeProjects =
pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> { pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> {
FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity();
@ -112,7 +112,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
} }
//获取项目信息 //获取项目信息
List<ProjectDTO> projectList = projectService.getProjectInfo(customerId, dateString); List<ProjectDTO> projectList = projectService.getProjectInfo(customerId, dateString);
if (CollectionUtils.isEmpty(projectList)) { if (!CollectionUtils.isEmpty(projectList)) {
//提取议题ID //提取议题ID
List<String> issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList()); List<String> issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList());
//获取议题信息 //获取议题信息
@ -182,7 +182,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
final List<FactOriginProjectMainDailyEntity> mainList = list; final List<FactOriginProjectMainDailyEntity> mainList = list;
//节点发起人 //节点发起人
List<ProcessInfoDTO> processList = projectProcessService.getProcessListByCustomer(customerId, dateString); List<ProcessInfoDTO> processList = projectProcessService.getProcessListByCustomer(customerId, dateString);
if (CollectionUtils.isEmpty(processList)) { if (!CollectionUtils.isEmpty(processList)) {
List<FactOriginProjectLogDailyEntity> logList = processList.stream().map(process -> { List<FactOriginProjectLogDailyEntity> logList = processList.stream().map(process -> {
//获取日期相关维度 //获取日期相关维度
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime());

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

@ -301,7 +301,7 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService {
//项目数 //项目数
List<OrgStatisticsResultDTO> projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.DISTRICT); List<OrgStatisticsResultDTO> projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.DISTRICT);
if (!CollectionUtils.isEmpty(projectList)) { if (!CollectionUtils.isEmpty(projectList)) {
list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> list.forEach(entity -> projectList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto ->
entity.setProjectTotal(dto.getCount()) entity.setProjectTotal(dto.getCount())
)); ));
} }

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

@ -108,7 +108,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
return; return;
} }
List<GridUserCountResultDTO> userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId()); List<GridUserCountResultDTO> userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(issueTotal)) { if (CollectionUtils.isEmpty(userCountList)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空"); log.error("抽取【公众参与-人均议题】,获取注册用户数为空");
return; return;
} }

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

@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO;
import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.extract.toscreen.*;
import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateService;
import com.epmet.service.stats.DimCustomerService; import com.epmet.service.stats.DimCustomerService;
@ -48,6 +49,10 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
@Autowired @Autowired
private IndexCalculateService indexCalculateService; private IndexCalculateService indexCalculateService;
@Autowired
private ScreenCentralZoneDataAbsorptionService screenCentralZoneDataAbsorptionService;
@Autowired
private ScreenGrassrootsGovernDataAbsorptionService screenGrassrootsGovernDataAbsorptionService;
/** /**
* @param extractOriginFormDTO * @param extractOriginFormDTO
* @Description 抽取数据到大屏 * @Description 抽取数据到大屏
@ -120,13 +125,40 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
*/ */
public void extractDaily(String customerId, String dateId) { public void extractDaily(String customerId, String dateId) {
//党员基本情况screen_cpc_base_data //党员基本情况screen_cpc_base_data
partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId,dateId); try {
partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId,dateId);
}catch (Exception e){
log.error("党员基本情况抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e);
}
//先锋模范screen_pioneer_data //先锋模范screen_pioneer_data
pioneerDataExtractService.extractGridPioneerData(customerId, dateId); try {
pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); pioneerDataExtractService.extractGridPioneerData(customerId, dateId);
pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); }catch (Exception e){
log.error("先锋模范【网格】抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e);
}
try {
pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId);
}catch (Exception e){
log.error("先锋模范【社区】抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e);
}
try {
pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId);
}catch (Exception e){
log.error("先锋模范【extractExceptCommunityPioneerData】抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e);
}
//公众参与排行(注册人数、参与人数、话题数、议题数、项目数)screen_public_parti_total_data //公众参与排行(注册人数、参与人数、话题数、议题数、项目数)screen_public_parti_total_data
publicPartiTotalDataExtractService.extractPublicPartiTotalData(customerId,dateId); try {
publicPartiTotalDataExtractService.extractPublicPartiTotalData(customerId,dateId);
}catch (Exception e){
log.error("公众参与排行抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e);
}
ScreenCentralZoneDataFormDTO param = new ScreenCentralZoneDataFormDTO();
param.setCustomerId(customerId);param.setDateId(dateId);
//中央区 screen_user_total_data
screenCentralZoneDataAbsorptionService.centralZoneDataHub(param);
//基层治理- 难点赌点 screen_difficulty_data | screen_difficulty_img_data
screenGrassrootsGovernDataAbsorptionService.difficultyDataHub(param);
} }
/** /**
@ -140,19 +172,59 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
formDTO.setMonthId(monthId); formDTO.setMonthId(monthId);
//基层治理-公众参与screen_user_join //基层治理-公众参与screen_user_join
publicPartExtractService.extractTotalDataMonthly(formDTO); try {
publicPartExtractService.extractTotalDataMonthly(formDTO);
}catch (Exception e){
log.error("基层治理-公众参与抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
//治理能力排行screen_govern_rank_data //治理能力排行screen_govern_rank_data
governRankDataExtractService.extractGridData(customerId, monthId); try {
governRankDataExtractService.extractCommunityData(customerId, monthId); governRankDataExtractService.extractGridData(customerId, monthId);
governRankDataExtractService.extractStreetData(customerId, monthId); }catch (Exception e){
governRankDataExtractService.extractDistrictData(customerId, monthId); log.error("治理能力排行【网格】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
try {
governRankDataExtractService.extractCommunityData(customerId, monthId);
}catch (Exception e){
log.error("治理能力排行【社区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
try {
governRankDataExtractService.extractStreetData(customerId, monthId);
}catch (Exception e){
log.error("治理能力排行【街道】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
try {
governRankDataExtractService.extractDistrictData(customerId, monthId);
}catch (Exception e){
log.error("治理能力排行【全区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
//先进排行 screen_org_rank_data //先进排行 screen_org_rank_data
orgRankExtractService.extractGridData(customerId, monthId); try {
orgRankExtractService.extractCommunityData(customerId, monthId); orgRankExtractService.extractGridData(customerId, monthId);
orgRankExtractService.extractStreetData(customerId, monthId); }catch (Exception e){
orgRankExtractService.extractDistrictData(customerId, monthId); log.error("先进排行【网格】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
try {
orgRankExtractService.extractCommunityData(customerId, monthId);
}catch (Exception e){
log.error("先进排行【社区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
try {
orgRankExtractService.extractStreetData(customerId, monthId);
}catch (Exception e){
log.error("先进排行【街道】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
try {
orgRankExtractService.extractDistrictData(customerId, monthId);
}catch (Exception e){
log.error("先进排行【全区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
// 党建引领 screen_party_branch_data,screen_party_link_masses_data // 党建引领 screen_party_branch_data,screen_party_link_masses_data
partyGuideService.partyGuideExtract(formDTO); try {
partyGuideService.partyGuideExtract(formDTO);
}catch (Exception e){
log.error("党建引领抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e);
}
//计算分数 todo 优化 手动创建线程池 控制任务数量 //计算分数 todo 优化 手动创建线程池 控制任务数量
ExecutorService pool = Executors.newSingleThreadExecutor(); ExecutorService pool = Executors.newSingleThreadExecutor();
@ -166,5 +238,9 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
log.error("extractMonthly 计算分数异常,参数:{}", JSON.toJSONString(formDTO1)); log.error("extractMonthly 计算分数异常,参数:{}", JSON.toJSONString(formDTO1));
} }
}); });
//基层治理 - 热心市民 screen_party_user_rank_data
ScreenCentralZoneDataFormDTO param = new ScreenCentralZoneDataFormDTO();
param.setCustomerId(customerId);param.setDateId(monthId);
screenGrassrootsGovernDataAbsorptionService.userScoreDataHub(param);
} }
} }

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

@ -144,9 +144,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
Map<String,String> latestOperationMap = projectProcessService.selectLatestOperation(projectIds,param.getCustomerId()); Map<String,String> latestOperationMap = projectProcessService.selectLatestOperation(projectIds,param.getCustomerId());
boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false; boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false;
//图片 //图片
List<ProjectSourceMapFormDTO> projectSourceMap; List<ProjectSourceMapFormDTO> projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds);
projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds);
Map<String,List<ScreenDifficultyImgDataEntity>> imgMap = Map<String,List<ScreenDifficultyImgDataEntity>> imgMap =
topicService.getTopicImgs(projectSourceMap); topicService.getTopicImgs(projectSourceMap);
@ -164,6 +162,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
if(!isOperationNull){ if(!isOperationNull){
diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId())); diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId()));
} }
diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE));
}); });
List<ScreenDifficultyImgDataEntity> imgList = new LinkedList<>(); List<ScreenDifficultyImgDataEntity> imgList = new LinkedList<>();
imgMap.values().forEach(list -> {imgList.addAll(list);}); imgMap.values().forEach(list -> {imgList.addAll(list);});

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

@ -18,13 +18,16 @@
package com.epmet.service.evaluationindex.screen.impl; 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.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.screen.ScreenPartyUserRankDataDao; import com.epmet.dao.evaluationindex.screen.ScreenPartyUserRankDataDao;
import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity;
import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService; import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@ -35,6 +38,7 @@ import java.util.List;
* @since v1.0.0 2020-09-22 * @since v1.0.0 2020-09-22
*/ */
@Service @Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenPartyUserRankDataServiceImpl extends BaseServiceImpl<ScreenPartyUserRankDataDao, ScreenPartyUserRankDataEntity> implements ScreenPartyUserRankDataService { public class ScreenPartyUserRankDataServiceImpl extends BaseServiceImpl<ScreenPartyUserRankDataDao, ScreenPartyUserRankDataEntity> implements ScreenPartyUserRankDataService {
@Autowired @Autowired
@ -49,6 +53,7 @@ public class ScreenPartyUserRankDataServiceImpl extends BaseServiceImpl<ScreenPa
* @date 2020.09.27 09:44 * @date 2020.09.27 09:44
**/ **/
@Override @Override
@Transactional(rollbackFor = Exception.class)
public void dataClean(List<ScreenPartyUserRankDataEntity> dataList, String customerId, String dateId) { public void dataClean(List<ScreenPartyUserRankDataEntity> dataList, String customerId, String dateId) {
int affectedRows; int affectedRows;
do{ do{

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java

@ -149,11 +149,13 @@ public class TopicServiceImpl implements TopicService {
Map<String,List<ScreenDifficultyImgDataEntity>> result Map<String,List<ScreenDifficultyImgDataEntity>> result
= imgs.stream().collect(Collectors.groupingBy(ScreenDifficultyImgDataEntity :: getEventId)); = imgs.stream().collect(Collectors.groupingBy(ScreenDifficultyImgDataEntity :: getEventId));
Map<String,List<ScreenDifficultyImgDataEntity>> projectResult = new HashMap<>(); Map<String,List<ScreenDifficultyImgDataEntity>> projectResult = new HashMap<>();
projectTopicMap.forEach((topic,project) -> { result.forEach((topic,imgList) -> {
result.get(topic).forEach( dest -> { if(!CollectionUtils.isEmpty(imgList)){
dest.setEventId(project); imgList.forEach(img -> {
}); img.setEventId(projectTopicMap.get(topic));
projectResult.put(project,result.get(topic)); });
}
projectResult.put(projectTopicMap.get(topic),imgList);
}); });
return projectResult; return projectResult;

10
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -319,18 +319,20 @@
project.AGENCY_ID AS parentId, project.AGENCY_ID AS parentId,
project.TOPIC_ID AS eventImgUrl, project.TOPIC_ID AS eventImgUrl,
gridInfo.allPathName AS eventSource, gridInfo.allPathName AS eventSource,
gridInfo.gridName AS orgName,
project.PROJECT_STATUS AS eventStatusCode, project.PROJECT_STATUS AS eventStatusCode,
IF IF
( project.PROJECT_STATUS = 'pending', '处理中', '已结案' ) AS eventStatusDesc, ( project.PROJECT_STATUS = 'pending', '处理中', '已结案' ) AS eventStatusDesc,
relation.reOrg AS eventReOrg, IFNULL(relation.reOrg,0) AS eventReOrg,
handleCount.HandledCount AS eventHandledCount, IFNULL(handleCount.HandledCount,0) AS eventHandledCount,
costTime.costTime AS eventCostTime , IFNULL(costTime.costTime,0) AS eventCostTime ,
gridInfo.allParentIds gridInfo.allParentIds
FROM FROM
fact_origin_project_main_daily project fact_origin_project_main_daily project
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
grid.ID AS dimGridId, grid.ID AS dimGridId,
grid.GRID_NAME as gridName,
concat( concat(
IF IF
( (
@ -408,7 +410,7 @@
<select id="selectNewProject" resultType="com.epmet.dto.screen.form.ProjectSourceMapFormDTO"> <select id="selectNewProject" resultType="com.epmet.dto.screen.form.ProjectSourceMapFormDTO">
SELECT SELECT
ID as projectId, ID as projectId,
TOPIC_ID as gridId TOPIC_ID as sourceId
FROM FROM
fact_origin_project_main_daily fact_origin_project_main_daily
WHERE WHERE

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

@ -82,7 +82,7 @@
<!-- 查找库中已经存在的结案项目Id --> <!-- 查找库中已经存在的结案项目Id -->
<select id="selectClosedProjectId" resultType="java.lang.String"> <select id="selectClosedProjectId" resultType="java.lang.String">
SELECT SELECT
PROJECT_ID ID
FROM FROM
screen_difficulty_data screen_difficulty_data
WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND EVENT_STATUS_CODE = 'closed' WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND EVENT_STATUS_CODE = 'closed'

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

@ -94,7 +94,7 @@
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
( (
(SELECT REPLACE(UUID(), '-', '') AS id), (SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId}, #{item.customerId},
#{item.gridId}, #{item.gridId},
#{item.gridName}, #{item.gridName},
#{item.orgId}, #{item.orgId},

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/point/UserPointDao.xml

@ -6,7 +6,7 @@
<select id="selectUserPointByCustomerId" resultType="com.epmet.dto.point.UserPointDTO"> <select id="selectUserPointByCustomerId" resultType="com.epmet.dto.point.UserPointDTO">
SELECT SELECT
USER_ID, USER_ID,
TOTAL_POINT TOTAL_POINT as pointTotal
FROM FROM
USER_POINT_TOTAL point USER_POINT_TOTAL point
WHERE WHERE

10
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml

@ -218,7 +218,7 @@
<select id="selectTopicImgs" resultType="com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity"> <select id="selectTopicImgs" resultType="com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity">
SELECT SELECT
TOPIC_ID AS eventId TOPIC_ID AS eventId,
ATTACHMENT_URL AS eventImgUrl, ATTACHMENT_URL AS eventImgUrl,
SORT SORT
FROM FROM
@ -226,19 +226,19 @@
WHERE WHERE
DEL_FLAG = '0' DEL_FLAG = '0'
<foreach collection="list" item="item" open="AND (" separator=" OR " close=")"> <foreach collection="list" item="item" open="AND (" separator=" OR " close=")">
TOPIC_ID = {item.topicId} TOPIC_ID = #{item.sourceId}
</foreach> </foreach>
ORDER BY TOPIC_ID , SORT ASC ORDER BY TOPIC_ID , SORT ASC
</select> </select>
<select id="selectTopicContent" resultType="com.epmet.dto.group.result.TopicContentResultDTO"> <select id="selectTopicContent" resultType="com.epmet.dto.group.result.TopicContentResultDTO">
SELECT SELECT
TOPIC_ID, ID AS topicId,
TOPIC_CONTENT AS content TOPIC_CONTENT AS content
FROM RESI_TOPIC FROM RESI_TOPIC
WHERE DEL_FLAG = '0' WHERE DEL_FLAG = '0'
<foreach collection="list" item="item" open="AND (" separator=" OR " close=")"> <foreach collection="list" item="item" open="AND (" separator=" OR " close=")">
TOPIC_ID = {item.topicId} ID = #{item.sourceId}
</foreach> </foreach>
</select> </select>
</mapper> </mapper>

8
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml

@ -479,9 +479,9 @@
register.CUSTOMER_ID, register.CUSTOMER_ID,
register.GRID_ID, register.GRID_ID,
register.USER_ID, register.USER_ID,
base.SURNAME, IFNULL(base.SURNAME,resi.SURNAME) AS surname,
base.NAME, IFNULL(base.NAME,resi.NAME) AS name,
base.REAl_NAME AS userName, IFNULL(base.REAl_NAME,concat(resi.SURNAME,resi.NAME)) AS userName,
0 AS partyFlag, 0 AS partyFlag,
0 AS POINT_TOTAL, 0 AS POINT_TOTAL,
0 AS INDEX_SCORE 0 AS INDEX_SCORE
@ -489,6 +489,8 @@
REGISTER_RELATION register REGISTER_RELATION register
LEFT JOIN USER_BASE_INFO base ON register.USER_ID = base.USER_ID LEFT JOIN USER_BASE_INFO base ON register.USER_ID = base.USER_ID
AND base.DEL_FLAG = '0' AND base.DEL_FLAG = '0'
LEFT JOIN USER_RESI_INFO resi ON register.USER_ID = resi.USER_ID
AND resi.DEL_FLAG = '0'
WHERE WHERE
register.DEL_FLAG = '0' register.DEL_FLAG = '0'
AND register.CUSTOMER_ID = #{customerId} AND register.CUSTOMER_ID = #{customerId}

Loading…
Cancel
Save