diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenCentralZoneDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenCentralZoneDataFormDTO.java index 6eb609fc5d..3482e2cab9 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenCentralZoneDataFormDTO.java +++ b/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; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.RequiredArgsConstructor; import java.io.Serializable; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 4e275c8a12..9cfdb628ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/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.FactOriginTopicMainDailyService; 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.indexcal.*; import com.epmet.service.stats.DimAgencyService; @@ -104,14 +105,9 @@ public class DemoController { @Autowired private IndexCollStreetService indexCollStreetService; @Autowired - private ScreenCentralZoneDataAbsorptionService screenCentralZoneDataAbsorptionService; - @Autowired private GovernRankDataExtractService governRankDataExtractService; @Autowired - private GroupExtractService groupExtractService; - @Autowired private OrgRankExtractService orgRankExtractService; - @GetMapping("testAlarm") public void testAlarm() { //for (int i = 0; i < 20; i++) { @@ -663,12 +659,6 @@ public class DemoController { return new Result(); } - @PostMapping("centralzonedatacleaning") - public Result centralZoneDataCleaning(@RequestBody ScreenCentralZoneDataFormDTO param){ - screenCentralZoneDataAbsorptionService.centralZoneDataHub(param); - return new Result(); - } - @PostMapping("governRank") public Result governRank(@RequestBody CustomerIdAndDateIdFormDTO formDTO){ governRankDataExtractService.extractGridData(formDTO.getCustomerId(), formDTO.getDateId()); @@ -712,12 +702,8 @@ public class DemoController { orgRankExtractService.extractStreetData(formDTO.getCustomerId(), formDTO.getDateId()); return new Result(); } - @PostMapping("extractgroup") - public Result extractGroup(@RequestBody ExtractOriginFormDTO param){ - groupExtractService.extractGroupData(param); - return new Result(); - } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 3753b69c31..4237449875 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/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 closedList = projectProcessService.getClosedProjectList(customerId, dateString); List pendingList = factOriginProjectMainDailyService.getPendingList(customerId); List finishOrgList = projectProcessService.getFinishOrg(customerId, dateString); - if (CollectionUtils.isEmpty(closedList)) { + if (!CollectionUtils.isEmpty(closedList)) { List closeProjects = pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> { FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); @@ -112,7 +112,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } //获取项目信息 List projectList = projectService.getProjectInfo(customerId, dateString); - if (CollectionUtils.isEmpty(projectList)) { + if (!CollectionUtils.isEmpty(projectList)) { //提取议题ID List issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList()); //获取议题信息 @@ -182,7 +182,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { final List mainList = list; //节点发起人 List processList = projectProcessService.getProcessListByCustomer(customerId, dateString); - if (CollectionUtils.isEmpty(processList)) { + if (!CollectionUtils.isEmpty(processList)) { List logList = processList.stream().map(process -> { //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java index cc61d54242..35f6de43e5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java +++ b/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 projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.DISTRICT); 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()) )); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java index 2f1a6b2c52..bd126af18c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java +++ b/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; } List userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId()); - if (CollectionUtils.isEmpty(issueTotal)) { + if (CollectionUtils.isEmpty(userCountList)) { log.error("抽取【公众参与-人均议题】,获取注册用户数为空"); return; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 5038508c51..e06ba65809 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/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.ExtractScreenFormDTO; 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.indexcal.IndexCalculateService; import com.epmet.service.stats.DimCustomerService; @@ -48,6 +49,10 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { @Autowired private IndexCalculateService indexCalculateService; + @Autowired + private ScreenCentralZoneDataAbsorptionService screenCentralZoneDataAbsorptionService; + @Autowired + private ScreenGrassrootsGovernDataAbsorptionService screenGrassrootsGovernDataAbsorptionService; /** * @param extractOriginFormDTO * @Description 抽取数据到大屏【天】 @@ -120,13 +125,40 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { */ public void extractDaily(String customerId, String dateId) { //党员基本情况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 - pioneerDataExtractService.extractGridPioneerData(customerId, dateId); - pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); - pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); + try { + pioneerDataExtractService.extractGridPioneerData(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 - 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); //基层治理-公众参与screen_user_join - publicPartExtractService.extractTotalDataMonthly(formDTO); + try { + publicPartExtractService.extractTotalDataMonthly(formDTO); + }catch (Exception e){ + log.error("基层治理-公众参与抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } //治理能力排行screen_govern_rank_data - governRankDataExtractService.extractGridData(customerId, monthId); - governRankDataExtractService.extractCommunityData(customerId, monthId); - governRankDataExtractService.extractStreetData(customerId, monthId); - governRankDataExtractService.extractDistrictData(customerId, monthId); + try { + governRankDataExtractService.extractGridData(customerId, monthId); + }catch (Exception e){ + 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 - orgRankExtractService.extractGridData(customerId, monthId); - orgRankExtractService.extractCommunityData(customerId, monthId); - orgRankExtractService.extractStreetData(customerId, monthId); - orgRankExtractService.extractDistrictData(customerId, monthId); + try { + orgRankExtractService.extractGridData(customerId, monthId); + }catch (Exception e){ + 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 - partyGuideService.partyGuideExtract(formDTO); + try { + partyGuideService.partyGuideExtract(formDTO); + }catch (Exception e){ + log.error("党建引领抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } //计算分数 todo 优化 手动创建线程池 控制任务数量 ExecutorService pool = Executors.newSingleThreadExecutor(); @@ -166,5 +238,9 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { log.error("extractMonthly 计算分数异常,参数:{}", JSON.toJSONString(formDTO1)); } }); + //基层治理 - 热心市民 screen_party_user_rank_data + ScreenCentralZoneDataFormDTO param = new ScreenCentralZoneDataFormDTO(); + param.setCustomerId(customerId);param.setDateId(monthId); + screenGrassrootsGovernDataAbsorptionService.userScoreDataHub(param); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 27a651eb3c..be0f66d42e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/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 latestOperationMap = projectProcessService.selectLatestOperation(projectIds,param.getCustomerId()); boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false; //图片 - List projectSourceMap; - - projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); + List projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); Map> imgMap = topicService.getTopicImgs(projectSourceMap); @@ -164,6 +162,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr if(!isOperationNull){ diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId())); } + diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE)); }); List imgList = new LinkedList<>(); imgMap.values().forEach(list -> {imgList.addAll(list);}); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPartyUserRankDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPartyUserRankDataServiceImpl.java index a543e07fff..9d165c2b60 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPartyUserRankDataServiceImpl.java +++ b/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; +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.dao.evaluationindex.screen.ScreenPartyUserRankDataDao; import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -35,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-09-22 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenPartyUserRankDataServiceImpl extends BaseServiceImpl implements ScreenPartyUserRankDataService { @Autowired @@ -49,6 +53,7 @@ public class ScreenPartyUserRankDataServiceImpl extends BaseServiceImpl dataList, String customerId, String dateId) { int affectedRows; do{ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java index 327b44c4b7..61c926507d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java +++ b/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> result = imgs.stream().collect(Collectors.groupingBy(ScreenDifficultyImgDataEntity :: getEventId)); Map> projectResult = new HashMap<>(); - projectTopicMap.forEach((topic,project) -> { - result.get(topic).forEach( dest -> { - dest.setEventId(project); - }); - projectResult.put(project,result.get(topic)); + result.forEach((topic,imgList) -> { + if(!CollectionUtils.isEmpty(imgList)){ + imgList.forEach(img -> { + img.setEventId(projectTopicMap.get(topic)); + }); + } + projectResult.put(projectTopicMap.get(topic),imgList); }); return projectResult; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index 417296bbfe..4bd90e9773 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/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.TOPIC_ID AS eventImgUrl, gridInfo.allPathName AS eventSource, + gridInfo.gridName AS orgName, project.PROJECT_STATUS AS eventStatusCode, IF ( project.PROJECT_STATUS = 'pending', '处理中', '已结案' ) AS eventStatusDesc, - relation.reOrg AS eventReOrg, - handleCount.HandledCount AS eventHandledCount, - costTime.costTime AS eventCostTime , + IFNULL(relation.reOrg,0) AS eventReOrg, + IFNULL(handleCount.HandledCount,0) AS eventHandledCount, + IFNULL(costTime.costTime,0) AS eventCostTime , gridInfo.allParentIds FROM fact_origin_project_main_daily project LEFT JOIN ( SELECT grid.ID AS dimGridId, + grid.GRID_NAME as gridName, concat( IF ( @@ -408,7 +410,7 @@ SELECT - PROJECT_ID + ID FROM screen_difficulty_data WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND EVENT_STATUS_CODE = 'closed' diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyUserRankDataDao.xml index 6ca1f5da66..1404eeb70c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPartyUserRankDataDao.xml @@ -94,7 +94,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, + #{item.customerId}, #{item.gridId}, #{item.gridName}, #{item.orgId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/point/UserPointDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/point/UserPointDao.xml index 418d4dd49f..9c082f3ea2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/point/UserPointDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/point/UserPointDao.xml @@ -6,7 +6,7 @@ SELECT - TOPIC_ID AS eventId + TOPIC_ID AS eventId, ATTACHMENT_URL AS eventImgUrl, SORT FROM @@ -226,19 +226,19 @@ WHERE DEL_FLAG = '0' - TOPIC_ID = {item.topicId} + TOPIC_ID = #{item.sourceId} ORDER BY TOPIC_ID , SORT ASC \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml index 55bc599470..90c573cb4a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml @@ -479,9 +479,9 @@ register.CUSTOMER_ID, register.GRID_ID, register.USER_ID, - base.SURNAME, - base.NAME, - base.REAl_NAME AS userName, + IFNULL(base.SURNAME,resi.SURNAME) AS surname, + IFNULL(base.NAME,resi.NAME) AS name, + IFNULL(base.REAl_NAME,concat(resi.SURNAME,resi.NAME)) AS userName, 0 AS partyFlag, 0 AS POINT_TOTAL, 0 AS INDEX_SCORE @@ -489,6 +489,8 @@ REGISTER_RELATION register LEFT JOIN USER_BASE_INFO base ON register.USER_ID = base.USER_ID AND base.DEL_FLAG = '0' + LEFT JOIN USER_RESI_INFO resi ON register.USER_ID = resi.USER_ID + AND resi.DEL_FLAG = '0' WHERE register.DEL_FLAG = '0' AND register.CUSTOMER_ID = #{customerId}