diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java new file mode 100644 index 0000000000..9860f9d1ad --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java @@ -0,0 +1,15 @@ +package com.epmet.commons.tools.constant; + +/** + * desc: + * + * @author: LiuJanJun + * @date: 2021/12/27 10:22 上午 + * @version: 1.0 + */ +public interface CustomerIdConstant { + /** + * 市北生产-客户ID + */ + String SHI_BEI_CUSTOMER_ID = "b09527201c4409e19d1dbc5e3c3429a1"; +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 1558df9b36..f3c669d7cd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -628,4 +628,12 @@ public class RedisKeys { return rootPrefix.concat("resi:").concat("export").concat(":template:changed").concat(customerId); } + /** + * desc:临时方案 + * @param agencyId + * @return + */ + public static String getOrgTreeCacheKey(String agencyId) { + return rootPrefix.concat("org:temp:orgtree").concat(agencyId); + } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java index 200054ae6d..071926bf1b 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java @@ -487,9 +487,9 @@ public class GovProjectServiceImpl implements GovProjectService { if (!org.springframework.util.CollectionUtils.isEmpty(userList)) { //2-1.根据身份证号查询负能平台用户信息 IcResiUserDTO icResiUserDTO = epmetUserService.getIcResiUser(userList.get(0).getIdNum(), formDTO.getCustomerId()); - resultDTO.setIcUserId(icResiUserDTO.getId()); - resultDTO.setIcUserName(icResiUserDTO.getName()); if (null != icResiUserDTO) { + resultDTO.setIcUserId(icResiUserDTO.getId()); + resultDTO.setIcUserName(icResiUserDTO.getName()); //2-2.查询人员的家庭成员数据 List homeList = epmetUserService.getHomeUserList(icResiUserDTO.getHomeId(), icResiUserDTO.getId()); resultDTO.setHomeUserList(homeList); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java index f3c2a545c5..42dc88cd77 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java @@ -97,4 +97,17 @@ public class GrassRootsGovernController { return new Result>().ok(grassRootsGovernService.governCapacityRank(param)); } + /** + * @Description 治理能力榜单查询 screen_govern_rank_data + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @param param + * @return + * @author wangc + * @date 2020.08.20 17:46 + **/ + @PostMapping("governcapacityrank-origin") + public Result> governCapacityRankOrigin(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(grassRootsGovernService.governCapacityRankOrigin(param)); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java index 405144008a..c95897f2af 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java @@ -50,4 +50,7 @@ public interface ScreenGovernRankDataDao{ * @date 2021/2/26 上午9:22 */ List selectGovernCapacityRatioNew(@Param("monthId") String monthId,@Param("orgIds") List orgIds); + + List selectGovernCapacityRatioBak(@Param("monthId") String monthId,@Param("agencyId") String agencyId); + List selectGovernCapacityRatioNewBak(@Param("monthId") String monthId,@Param("orgIds") List orgIds); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java index fecde12a9f..bcfb7e7d51 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java @@ -65,6 +65,12 @@ public interface GrassRootsGovernService { **/ List governCapacityRank(AgencyAndNumFormDTO param); + /** + * 治理能力榜单查询 screen_govern_rank_data + * @param param + * @return + */ + List governCapacityRankOrigin(AgencyAndNumFormDTO param); /** * @Description 6、公众参与-柱状折线图 * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=322434 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index f0bce3bf50..b64a4e7490 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java @@ -295,6 +295,62 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { return result; } + /** + * 治理能力榜单查询 screen_govern_rank_data + * @param param + * @return + */ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) + @Override + public List governCapacityRankOrigin(AgencyAndNumFormDTO param) { + List orderList = new ArrayList<>(); + if (null == param.getTopNum() || NumConstant.ZERO == param.getTopNum()) { + param.setTopNum(NumConstant.TEN); + } + String monthId = dateUtils.getCurrentMonthId(); + + if (StringUtils.isNotEmpty(param.getAreaCode())){ + List nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId()); + if (CollectionUtils.isEmpty(nextAgencyIds)){ + return new ArrayList<>(); + } + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + orderList = screenGovernRankDataDao.selectGovernCapacityRatioNewBak(monthId,nextAgencyIds); + int time = NumConstant.TWELVE; + while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){ + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null, monthId); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + orderList = screenGovernRankDataDao.selectGovernCapacityRatioNewBak(monthId,nextAgencyIds); + } + }else { + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + orderList = screenGovernRankDataDao.selectGovernCapacityRatioBak(monthId, param.getAgencyId()); + int time = NumConstant.TWELVE; + while (CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE) { + time++; + monthId = dateUtils.getPreviousMonthIdByDest(null, monthId); + PageHelper.startPage(NumConstant.ONE, param.getTopNum()); + orderList = screenGovernRankDataDao.selectGovernCapacityRatioBak(monthId, param.getAgencyId()); + } + } + if(null == orderList || orderList.isEmpty()) { + return new ArrayList<>(); + } + List result = new LinkedList<>(); + orderList.forEach(o -> { + GovernCapacityRankResultDTO rank = new GovernCapacityRankResultDTO(); + rank.setAgencyName(o.getAgencyName()); + rank.setGovernRatio(convertPercentStr(o.getGovernRatio(),NumConstant.ONE)); + rank.setResolvedRatio(convertPercentStr(o.getResolvedRatio(),NumConstant.ONE)); + rank.setResponseRatio(convertPercentStr(o.getResponseRatio(),NumConstant.ONE)); + rank.setSatisfactionRatio(convertPercentStr(o.getSatisfactionRatio(),NumConstant.ONE)); + rank.setParentAgencyName(o.getParentAgencyName()); + rank.setMonthId(o.getMonthId()); + result.add(rank); + }); + return result; + } /** * @Description 6、公众参与-柱状折线图 * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=322434 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml index 1568e078b5..ca3642230b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -82,4 +82,83 @@ RESPONSE_RATIO DESC + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index c04e3d18e6..230082385f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -260,10 +260,10 @@ WHERE dm.del_flag = '0' AND rd.del_flag = '0' + + AND org.CUSTOMER_ID = #{customerId} + - - AND org.CUSTOMER_ID = #{customerId} - AND org.AREA_CODE LIKE concat(#{areaCode}, '%') diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java index 6bc96d1006..a30c0e3169 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.evaluationindex.extract.dataToIndex.impl; import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.constant.CustomerIdConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.extract.form.ExtractIndexFormDTO; @@ -67,6 +68,8 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService log.error("indexOriginExtractAll 获取客户Id为空"); return; } + //去除 市北客户id的抽取 + customerIds.remove(CustomerIdConstant.SHI_BEI_CUSTOMER_ID); } String finalMonthId = monthId; 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 a36e2c6577..0d3d541634 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 @@ -1,6 +1,7 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl; import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.constant.CustomerIdConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.distributedlock.DistributedLock; @@ -461,6 +462,11 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } catch (Exception e) { log.error("项目(事件)数量分析按组织_按月统计失败,参数为{}" + JSON.toJSONString(formDTO), e); } + //去除 市北客户id的抽取 + if (CustomerIdConstant.SHI_BEI_CUSTOMER_ID.equals(customerId)){ + log.info("===== extractMonthly method end not contains shi bei:{}======", customerId); + return; + } //此方法保持在最后即可 计算指标分数 todo 优化 手动创建线程池 控制任务数量 ExecutorService pool = Executors.newSingleThreadExecutor(); pool.submit(() -> { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 9af32bf5a5..d1e449b4a0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -15,7 +15,6 @@ import com.epmet.dto.indexcal.IndexStatisticsFormDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.redis.IndexCalRedis; import com.epmet.service.crm.CustomerRelationService; -import com.epmet.service.evaluationindex.extract.dataToIndex.IndexOriginExtractService; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import com.epmet.util.DimIdGenerator; @@ -59,8 +58,6 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { private ScreenCustomerAgencyDao screenCustomerAgencyDao; @Autowired private CustomerRelationService customerRelationService; - @Autowired - private IndexOriginExtractService indexOriginExtractService; @Override public Boolean indexCalculate(CalculateCommonFormDTO formDTO) { diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java index 22ae365945..ad9a746ca6 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java @@ -37,10 +37,17 @@ public class ResiBuzzLeftPieChartResultDTO implements Serializable { */ private String color; + @JsonIgnore + private String issueId; + + @JsonIgnore + private Boolean status; + public ResiBuzzLeftPieChartResultDTO() { this.count = NumConstant.ZERO; this.categoryCode = ""; this.categoryName = ""; this.color = ""; + this.status = false; } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java index 7a7c4530f1..5265af8079 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java @@ -35,6 +35,7 @@ import com.epmet.dto.result.VoteResultDTO; import com.epmet.dto.result.VotingTrendResultDTO; import com.epmet.excel.IssueVoteStatisticalExcel; import com.epmet.service.IssueVoteStatisticalService; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -49,10 +50,11 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-05-11 */ +@Slf4j @RestController @RequestMapping("issuevotestatistical") public class IssueVoteStatisticalController { - + @Autowired private IssueVoteStatisticalService issueVoteStatisticalService; @@ -129,7 +131,8 @@ public class IssueVoteStatisticalController { **/ @PostMapping("syncvotingcacheanddb") public Result syncVotingCacheAndDb(){ - issueVoteStatisticalService.syncVotingCacheToDb(); + //issueVoteStatisticalService.syncVotingCacheToDb(); + log.error("syncvotingcacheanddb 又执行了"); return new Result(); } @@ -159,4 +162,4 @@ public class IssueVoteStatisticalController { return new Result>().ok(issueVoteStatisticalService.myPartIssues(myPartIssuesFormDTO)); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 4fb4664534..b3b6430af1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -254,6 +254,26 @@ public interface IssueDao extends BaseDao { */ List resiBuzzLeftPieChart(@Param("orgId")String orgId,@Param("orgType")String orgType,@Param("length")Integer length,@Param("customerId")String customerId); + /** + * @Description + * @param length + * @author zxc + * @date 2021/12/30 9:18 上午 + */ + List resiBuzzLeftPieChartByIssueIds(@Param("length")Integer length,@Param("issueIds")List issueIds); + + List resiBuzzIssueCategoryByIssueIds(@Param("length")Integer length,@Param("issueIds")List issueIds); + List resiBuzzIssueCategoryNameByIssueIds(List categories,@Param("customerId")String customerId); + + /** + * @Description 查询前50名的议题ID + * @param orgId + * @param orgType + * @author zxc + * @date 2021/12/30 9:16 上午 + */ + List resiBuzzLeftPieChartIssueIds(@Param("orgId")String orgId,@Param("orgType")String orgType); + /** * @Description 查询组织下每个网格的项目数 * @param orgId @@ -270,4 +290,6 @@ public interface IssueDao extends BaseDao { */ List selectCategoryNameByIssueIds(@Param("issueIds")List issueIds); + List selectCategoryNameByIssueList(List issueIds,@Param("customerId")String customerId); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 0f22bd1c63..3a67b227d6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1616,7 +1616,22 @@ public class IssueServiceImpl extends BaseServiceImpl imp } List list = allList.stream().skip(formDTO.getPageSize() * (formDTO.getPageNo() - NumConstant.ONE)) .limit(formDTO.getPageSize()).collect(Collectors.toList()); - List names = baseDao.selectCategoryNameByIssueIds(allList.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + List categories = baseDao.resiBuzzIssueCategoryByIssueIds(length, list.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + List pieChat = getPieChat(list.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + Iterator listIterator = pieChat.iterator(); + while (listIterator.hasNext()){ + ResiBuzzLeftPieChartResultDTO next = listIterator.next(); + for (int i = 0; i < categories.size(); i++) { + if (next.getIssueId().equals(categories.get(i).getIssueId()) && !next.getStatus()){ + next.setStatus(true); + listIterator.remove(); + continue; + } + } + } + categories.addAll(pieChat); +// List names = baseDao.selectCategoryNameByIssueIds(allList.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); + List names = baseDao.selectCategoryNameByIssueList(categories,tokenDto.getCustomerId()); if (CollectionUtils.isNotEmpty(names)){ list.forEach(l -> names.stream().filter(n -> l.getIssueId().equals(n.getIssueId())).forEach(n -> l.setCategoryName(n.getCn()))); } @@ -1662,13 +1677,43 @@ public class IssueServiceImpl extends BaseServiceImpl imp } // 分类编码长度 Integer length = baseDao.selectOneLevelCategoryLength(tokenDto.getCustomerId()); - List result = baseDao.resiBuzzLeftPieChart(formDTO.getOrgId(), formDTO.getOrgType(), length, tokenDto.getCustomerId()); - if(CollectionUtils.isEmpty(result)){ +// List result = baseDao.resiBuzzLeftPieChart(formDTO.getOrgId(), formDTO.getOrgType(), length, tokenDto.getCustomerId()); + List issueIds = baseDao.resiBuzzLeftPieChartIssueIds(formDTO.getOrgId(), formDTO.getOrgType()); + if(CollectionUtils.isEmpty(issueIds)){ + return new ArrayList<>(); + } + List categories = baseDao.resiBuzzIssueCategoryByIssueIds(length, issueIds); + List pieChat = getPieChat(issueIds); + Iterator list = pieChat.iterator(); + while (list.hasNext()){ + ResiBuzzLeftPieChartResultDTO next = list.next(); + for (int i = 0; i < categories.size(); i++) { + if (next.getIssueId().equals(categories.get(i).getIssueId()) && !next.getStatus()){ + next.setStatus(true); + list.remove(); + continue; + } + } + } + categories.addAll(pieChat); +// List result = baseDao.resiBuzzLeftPieChartByIssueIds(length, issueIds); + List result = baseDao.resiBuzzIssueCategoryNameByIssueIds(categories, tokenDto.getCustomerId()); + if (CollectionUtils.isEmpty(result)){ return new ArrayList<>(); } return result; } + public List getPieChat(List issueIds){ + List resultDTOS = new ArrayList<>(); + issueIds.forEach(i -> { + ResiBuzzLeftPieChartResultDTO dto = new ResiBuzzLeftPieChartResultDTO(); + dto.setIssueId(i); + resultDTOS.add(dto); + }); + return resultDTOS; + } + /** * @Description 查询组织下每个网格的项目数 * @param formDTO diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 044de4a3ed..d34986581d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -617,25 +617,25 @@ @@ -672,4 +672,79 @@ ) + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index daceb9b531..434a305c90 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -366,6 +366,7 @@ public class CustomerAgencyController { */ @PostMapping("agencygridtree") public Result getOrgTreeData(@LoginUser TokenDto tokenDTO) { + //tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); return new Result().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId())); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index a1aa0b631a..107a2061be 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -58,6 +58,7 @@ public interface CustomerAgencyDao extends BaseDao { * @Description 组织首页-下级机关列表 **/ List selectSubAgencyById(@Param("pId") String pId, @Param("agencyNum") Integer agencyNum); + List selectSubAgencyByAgencyId(@Param("pId") String pId); /** @@ -79,8 +80,8 @@ public interface CustomerAgencyDao extends BaseDao { CustomerAgencyEntity getAgencyByStaffId(@Param("staffId") String staffId); /** - * @Description 根据agencyId查询地区编码 * @param agencyId 所属机关id + * @Description 根据agencyId查询地区编码 * @author zxc * @date 2020/4/28 15:50 */ @@ -104,6 +105,7 @@ public interface CustomerAgencyDao extends BaseDao { /** * 查询客户根级组织 + * * @param customerId * @return */ @@ -111,10 +113,11 @@ public interface CustomerAgencyDao extends BaseDao { /** * 获取所属机关单位名称(上级-所属) - * @author zhaoqifeng - * @date 2020/5/22 17:53 + * * @param agencyId * @return java.lang.String + * @author zhaoqifeng + * @date 2020/5/22 17:53 */ String selectAgencyName(@Param("agencyId") String agencyId); @@ -127,46 +130,48 @@ public interface CustomerAgencyDao extends BaseDao { List selectAllSubAgency(@Param("subAgencyPids") String subAgencyPids); /** - * @Description 查询一个工作人员最近登录的网格以及机关信息 * @param gridId * @return + * @Description 查询一个工作人员最近登录的网格以及机关信息 * @author wangc * @date 2020.08.17 09:50 - **/ + **/ ExtStaffInfoResultDTO selectAgencyAndGridInfoExt(@Param("gridId") String gridId); + /** - * @Description 当没有工作人员最近访问的gridId时查询该用户所属的组织机关信息 * @param staffId * @return + * @Description 当没有工作人员最近访问的gridId时查询该用户所属的组织机关信息 * @author wangc * @date 2020.08.17 09:50 **/ - ExtStaffInfoResultDTO selectAgencyInfoWhenGridIdIsNull(@Param("staffId")String staffId); + ExtStaffInfoResultDTO selectAgencyInfoWhenGridIdIsNull(@Param("staffId") String staffId); + /** - * @Description 根据agencyId查找指定机构的信息,直属网格、部门 * @param agencyId * @return + * @Description 根据agencyId查找指定机构的信息,直属网格、部门 * @author wangc * @date 2020.08.18 13:41 - **/ - ExtStaffPermissionResultDTO selectAgencyById(@Param("agencyId")String agencyId); + **/ + ExtStaffPermissionResultDTO selectAgencyById(@Param("agencyId") String agencyId); /** - * @Description 根绝agencyId查找其下属机构的信息 * @param pid * @return + * @Description 根绝agencyId查找其下属机构的信息 * @author wangc * @date 2020.08.18 13:42 - **/ + **/ List selectSubAgencyByPid(@Param("pid") String pid); /** - * @Description 根据agencyId查找指定机构直属的部门,将grid与dept分开是因为grid与dept的数量可能不等,造成重复数据无法去重 * @param agencyId * @return + * @Description 根据agencyId查找指定机构直属的部门,将grid与dept分开是因为grid与dept的数量可能不等,造成重复数据无法去重 * @author wangc * @date 2020.08.18 13:42 - **/ + **/ List selectDeptList(@Param("agencyId") String agencyId); /** @@ -186,30 +191,33 @@ public interface CustomerAgencyDao extends BaseDao { AgencyResultDTO selectAgencyByStaffId(@Param("staffId") String staffId); /** - * @Description 返回elementTree结构的agency树 * @param customerId * @param pid * @return java.util.List + * @Description 返回elementTree结构的agency树 * @Author liushaowen * @Date 2020/11/6 14:57 */ - List getAgencyElementTree(@Param("customerId") String customerId,@Param("pid") String pid); + List getAgencyElementTree(@Param("customerId") String customerId, @Param("pid") String pid); /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun **/ OrganizeTreeResultDTO selectorganizeTree(@Param("agencyId") String agencyId); + /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun **/ List selectAgencyGridList(@Param("agencyId") String agencyId); + /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun **/ List selectAgencyDeptList(@Param("agencyId") String agencyId); + /** * @Description 外挂-获取当前组织及部门、网格数据,递归查询所有下级数据 * @author sun @@ -236,6 +244,7 @@ public interface CustomerAgencyDao extends BaseDao { /** * 根据新增人员类型判断查询机关信息 + * * @author sun */ OrgResultDTO selectAgencyDetail(@Param("orgId") String orgId, @Param("orgType") String orgType); @@ -247,41 +256,47 @@ public interface CustomerAgencyDao extends BaseDao { List getStaffOrgListByStaffId(@Param("staffId") String staffId); /** - * @Description 【地图配置】删除 * @param orgId * @param level + * @Description 【地图配置】删除 * @author zxc * @date 2021/10/25 9:39 上午 */ void delMapArea(@Param("orgId") String orgId, @Param("level") String level); /** - * @Description 【地图配置】新增 * @param orgId * @param level * @param coordinates + * @Description 【地图配置】新增 * @author zxc * @date 2021/10/25 9:59 上午 */ - void addMapArea(@Param("orgId") String orgId, @Param("level") String level,@Param("coordinates")String coordinates); + void addMapArea(@Param("orgId") String orgId, @Param("level") String level, @Param("coordinates") String coordinates); /** - * @Description 地图查询下级组织 * @param pid * @param type + * @Description 地图查询下级组织 * @author zxc * @date 2021/10/25 2:30 下午 */ - List selectSonOrg(@Param("pid")String pid,@Param("type")String type); + List selectSonOrg(@Param("pid") String pid, @Param("type") String type); /** - * @Description 查询下级agencyId * @param orgId + * @Description 查询下级agencyId * @author zxc * @date 2021/12/9 4:42 下午 */ List getSonAgencyId(@Param("orgId") String orgId); + /** + * desc:获取组织和网格的数据 树形sql + * @param agencyId + * @return + */ + ExtStaffPermissionResultDTO selectAgencyAndGridById(@Param("agencyId") String agencyId); /** * @Description 【事件】社区服务热线 * @author sun diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 35d3c7477a..6e6bc84e49 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -16,6 +16,7 @@ */ package com.epmet.service.impl; + import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -24,6 +25,8 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerAgencyConstant; @@ -81,6 +84,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl page(Map params) { @@ -1125,8 +1130,17 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + + + + +