diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 56e304e016..7c07ab89e9 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -466,6 +466,7 @@ epmet: - /data/aggregator/** - /gov/voice/** - /resi/voice/** + - /epmet/point/** # 内部认证url白名单(在白名单中的,就不会再校验登录了) internalAuthUrlsWhiteList: @@ -473,6 +474,7 @@ epmet: - /**/druid/** - /gov/project/project/platformcallback - /oper/customize/customerstartpage/homestartpage + - /epmet/point/mqCallback/** # 外部应用认证,使用AccessToken等头进行认证 externalOpenUrls: diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridDTO.java new file mode 100644 index 0000000000..10c2a503c3 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridDTO.java @@ -0,0 +1,119 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 网格(党支部)信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-26 + */ +@Data +public class ScreenCustomerGridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID 主键ID + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部(=网格)的位置 + */ + private String partyMark; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + private String pid; + private String pids; + private String areaCode; +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java index 2c867a6398..19a92f93bd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java @@ -3,7 +3,6 @@ package com.epmet.project.dto.result; import lombok.Data; import java.io.Serializable; -import java.util.List; /** * @Description 难点赌点-当前登录人员本级一级下一级组织机构/网格 返参DTO @@ -30,5 +29,5 @@ public class ProjectNextAgencyResultDTO implements Serializable { * */ private String orgType; - + private String areaCode; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index b7deb3d9dd..bd79972f8f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -135,6 +135,20 @@ public class ProjectController { return new Result>().ok(projectService.getMyNextAgency(tokenDto)); } + /** + * @return com.epmet.commons.tools.utils.Result> + * @param tokenDto + * @author yinzuomei + * @description 001、难点堵点-组织下拉框 + * 需求描述:下拉框显示当前用户所属组织和下级组织 ;1)如果当前用户是街道工作人员, 显示所属街道和该街道下的社区+直属网格;2)如果当前用户是社区人员, 显示所属社区和该社区下的网格+直属网格。 + * 210622: 新增此API, 后端改为从指标库取值 , 保证平阴县的工作人员,看到的下拉框是平阴县、以及8个街道 + * @Date 2021/6/22 14:20 + **/ + @PostMapping("mynextagency-multic") + public Result> myNextAgencyMultic(@LoginUser TokenDto tokenDto){ + return new Result>().ok(projectService.myNextAgencyMultic(tokenDto.getUserId(),tokenDto.getCustomerId())); + } + /** * 002、项目分类字典查询 * 查询当前客户的父客户下,项目分类字典 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 986a880aac..3c1e1a05c8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.result.ScreenCustomerAgencyDTO; import com.epmet.dto.result.plugins.AgencyNodeDTO; import com.epmet.dto.result.plugins.DeptNodeDTO; @@ -170,4 +171,22 @@ public interface ScreenCustomerAgencyDao { * @date 2021/6/8 1:27 下午 */ List selectGrid(@Param("agencyId")String agencyId,@Param("areaCode")String areaCode); + + /** + * 查询当前组织的下一级组织,可根据areaCode查询,也可根据pid查询 + * + * @param areaCode + * @param pid + * @return java.util.List + */ + List selectNextAgencyList(@Param("areaCode") String areaCode, @Param("pid") String pid); + + /** + * 查询当前组织的下面的网格,可根据areaCode查询,也可根据parentAgencyId查询 + * + * @param areaCode + * @param parentAgencyId + * @return java.util.List + */ + List selectGridDTOList(@Param("areaCode") String areaCode, @Param("parentAgencyId") String parentAgencyId); } \ 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/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index 4f11f160ab..48e8e8946b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -1,6 +1,7 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.dto.AgencyInfoDTO; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; @@ -73,4 +74,22 @@ public interface AgencyService { List getNextAgencyIds(String areaCode,String agencyId); AgencyInfoDTO getAgencyInfoDTO(String areaCode, String agencyId); + + /** + * 查询当前组织的下一级组织,可根据areaCode查询,也可根据pid查询 + * + * @param areaCode + * @param pid + * @return java.util.List + */ + List queryNextAgencyList(String areaCode, String pid); + + /** + * 查询当前组织的下面的网格,可根据areaCode查询,也可根据parentAgencyId查询 + * + * @param areaCode + * @param parentAgencyId + * @return java.util.List + */ + List queryGridList(String areaCode, String parentAgencyId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 535362f3ea..8e9ebf8fe5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.dto.AgencyInfoDTO; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; @@ -322,4 +323,28 @@ public class AgencyServiceImpl implements AgencyService { agencyInfoDTO.setSubGridIds(screenCustomerGridDao.selectSubGridIds(areaCode,agencyId)); return agencyInfoDTO; } + + /** + * 查询当前组织的下一级组织,可根据areaCode查询,也可根据pid查询 + * + * @param areaCode + * @param pid + * @return java.util.List + */ + @Override + public List queryNextAgencyList(String areaCode, String pid) { + return screenCustomerAgencyDao.selectNextAgencyList(areaCode,pid); + } + + /** + * 查询当前组织的下面的网格,可根据areaCode查询,也可根据parentAgencyId查询 + * + * @param areaCode + * @param parentAgencyId + * @return java.util.List + */ + @Override + public List queryGridList(String areaCode, String parentAgencyId) { + return screenCustomerAgencyDao.selectGridDTOList(areaCode,parentAgencyId); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java index 917113fe12..25f111af73 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java @@ -80,4 +80,15 @@ public interface ProjectService { * @Date 14:26 2021-03-22 **/ List getCategoryDict(String customerId); + + /** + * 001、难点堵点-组织下拉框 + * 需求描述:下拉框显示当前用户所属组织和下级组织 ;1)如果当前用户是街道工作人员, 显示所属街道和该街道下的社区+直属网格;2)如果当前用户是社区人员, 显示所属社区和该社区下的网格+直属网格。 + * 210622: 新增此API, 后端改为从指标库取值 , 保证平阴县的工作人员,看到的下拉框是平阴县、以及8个街道 + * + * @param staffId 当前登录用户id + * @param currentCustomerId 当前客户id + * @return com.epmet.project.dto.result.ProjectNextAgencyResultDTO + */ + List myNextAgencyMultic(String staffId,String currentCustomerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 034c86d324..e15a610e28 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; @@ -11,9 +12,10 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.project.ProjectDao; -import com.epmet.datareport.service.evaluationindex.screen.ScreenDifficultyDataService; +import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.datareport.service.project.ProjectService; import com.epmet.dto.CustomerAgencyDTO; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.SubAgencyFormDTO; @@ -25,12 +27,13 @@ import com.epmet.project.dto.CustomerCategoryDTO; import com.epmet.project.dto.FactAgencyProjectDailyDTO; import com.epmet.project.dto.form.DifficultyRankFormDTO; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; -import com.epmet.project.dto.result.*; import com.epmet.project.dto.result.ProjectDetailResultDTO; +import com.epmet.project.dto.result.*; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.github.pagehelper.PageHelper; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -59,9 +62,6 @@ public class ProjectServiceImpl implements ProjectService { private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Autowired private GovProjectOpenFeignClient govProjectOpenFeignClient; - @Autowired - private ScreenDifficultyDataService screenDifficultyDataService; - @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; @Autowired @@ -70,6 +70,8 @@ public class ProjectServiceImpl implements ProjectService { private GovIssueOpenFeignClient govIssueOpenFeignClient; @Autowired private OperCrmOpenFeignClient operCrmOpenFeignClient; + @Autowired + private AgencyService screenAgencyService; /** * @Author sun @@ -394,4 +396,73 @@ public class ProjectServiceImpl implements ProjectService { } return result; } + + /** + * 001、难点堵点-组织下拉框 + * 需求描述:下拉框显示当前用户所属组织和下级组织 ;1)如果当前用户是街道工作人员, 显示所属街道和该街道下的社区+直属网格;2)如果当前用户是社区人员, 显示所属社区和该社区下的网格+直属网格。 + * 210622: 新增此API, 后端改为从指标库取值 , 保证平阴县的工作人员,看到的下拉框是平阴县、以及8个街道 + * + * @param staffId 当前登录用户id + * @param currentCustomerId 当前客户id + * @return com.epmet.project.dto.result.ProjectNextAgencyResultDTO + */ + @Override + public List myNextAgencyMultic(String staffId,String currentCustomerId) { + //多客户测试写死值,别忘了注释掉呀 + // staffId="3f04e397cc226e4e2f2531ac4363e3f9"; + // currentCustomerId="613cc61a6b8ce4c70d21bd413dac72cc"; + //1、当前工作人员所属组织信息 + Result staffResult = govOrgOpenFeignClient.getAgencyByStaff(staffId); + if (!staffResult.success() || null == staffResult.getData()) { + throw new RenException(String.format("查询当前工作人员所属组织信息异常,staffId:%s", staffId)); + } + List resultList = new ArrayList<>(); + ProjectNextAgencyResultDTO staffAgency = new ProjectNextAgencyResultDTO(); + staffAgency.setOrgId(staffResult.getData().getId()); + staffAgency.setOrgName(staffResult.getData().getOrganizationName()); + staffAgency.setOrgType("agency"); + staffAgency.setAreaCode(staffResult.getData().getAreaCode()); + resultList.add(staffAgency); + //2、查询指标库当前组织的下级组织 + List agencyDTOList =new ArrayList<>(); + Result> crmRes = operCrmOpenFeignClient.getAllSubCustomerIds(currentCustomerId); + if (crmRes.success() && CollectionUtils.isNotEmpty(crmRes.getData())) { + log.warn("❤当前客户存在子客户❤"); + //如果包含子客户,则根据areaCode查询下一级 + agencyDTOList = screenAgencyService.queryNextAgencyList(staffResult.getData().getAreaCode(), StrConstant.EPMETY_STR); + } else { + //当前客户没有子客户,根据agencyId查询下一级组织 + agencyDTOList = screenAgencyService.queryNextAgencyList(StrConstant.EPMETY_STR, staffResult.getData().getId()); + } + if (CollectionUtils.isNotEmpty(agencyDTOList)) { + agencyDTOList.forEach(agencyDTO -> { + ProjectNextAgencyResultDTO nextAgency = new ProjectNextAgencyResultDTO(); + nextAgency.setOrgId(agencyDTO.getAgencyId()); + nextAgency.setOrgName(agencyDTO.getAgencyName()); + nextAgency.setOrgType("agency"); + nextAgency.setAreaCode(agencyDTO.getAreaCode()); + resultList.add(nextAgency); + }); + } + //3、查询指标库当前组织的下级网格 + List gridList = new ArrayList<>(); + if (crmRes.success() && CollectionUtils.isNotEmpty(crmRes.getData())) { + //如果包含子客户,则根据areaCode查询下一级网格 + gridList=screenAgencyService.queryGridList(staffResult.getData().getAreaCode(), StrConstant.EPMETY_STR); + } else { + //当前客户没有子客户,根据agencyId查询下一级网格 + gridList=screenAgencyService.queryGridList(StrConstant.EPMETY_STR,staffResult.getData().getId()); + } + if (CollectionUtils.isNotEmpty(gridList)) { + gridList.forEach(gridDTO -> { + ProjectNextAgencyResultDTO grid = new ProjectNextAgencyResultDTO(); + grid.setOrgId(gridDTO.getGridId()); + grid.setOrgName(gridDTO.getGridName()); + grid.setOrgType("grid"); + grid.setAreaCode(gridDTO.getAreaCode()); + resultList.add(grid); + }); + } + return resultList; + } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 4397b99fd6..e590de142d 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -340,4 +340,36 @@ AND cg.PARENT_AGENCY_ID = #{agencyId} + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index bdcd026d07..b19e564503 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -679,7 +679,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ partition.forEach(publish -> { List index1SampleValues = new ArrayList<>(); publish.forEach(c -> { - c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); +// c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); pid.put(c.getAgencyId(),c.getParentId()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); index1SampleValues.add(s); @@ -769,7 +769,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { - c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); +// c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); pid.put(c.getAgencyId(),c.getParentId()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); index1SampleValues.add(s); @@ -860,7 +860,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); List index1SampleValues = new ArrayList<>(); serviceAvg.forEach(c -> { - c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); +// c.setParentId(customerAgencyDao.selectAgencyId(form.getCustomerAreaCode())); pid.put(c.getAgencyId(),c.getParentId()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); index1SampleValues.add(s); @@ -962,6 +962,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ orgIds.forEach(org -> { SubCommunityAvgResultDTO s = new SubCommunityAvgResultDTO(); s.setAgencyId(org.getOrgId()); + s.setParentId(org.getPid()); subAvgScores.add(s); }); // 把除去孔村镇的数据赋值,孔村在下边单独处理 @@ -1013,7 +1014,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (!CollectionUtils.isEmpty(kongCunGovernAbility)){ kongCunGovernAbility.forEach(k -> { k.put("AGENCY_ID",k.get("AGENCY_ID")); - k.put("PARENT_ID",NumConstant.ZERO_STR); + k.put("PARENT_ID",k.get("PARENT_ID")); }); } if (!CollectionUtils.isEmpty(communityGovernAbility)){ @@ -1042,7 +1043,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (!CollectionUtils.isEmpty(kongCunActivityCountList)){ kongCunActivityCountList.forEach(k -> { k.put("AGENCY_ID",k.get("AGENCY_ID")); - k.put("PARENT_ID",NumConstant.ZERO_STR); + k.put("PARENT_ID",k.get("PARENT_ID")); }); } if (!CollectionUtils.isEmpty(ActivityCountList)){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index d1db2b9588..76ab745264 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -288,7 +288,7 @@ SELECT sca.AGENCY_ID, - sca.PID AS PARENT_ID, + IF(sca.PID = '0',(SELECT AGENCY_ID FROM screen_customer_agency WHERE AREA_CODE = #{areaCode} AND DEL_FLAG = 0),sca.PID) AS PARENT_ID, #{monthId} AS MONTH_ID, #{quarterId} AS QUARTER_ID, #{yearId} AS YEAR_ID, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 016cd62b24..1c0941a04b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -176,7 +176,7 @@ SELECT sca.AGENCY_ID, - sca.PID AS PARENT_ID, + IF(sca.PID = '0',(SELECT AGENCY_ID FROM screen_customer_agency WHERE AREA_CODE = #{areaCode} AND DEL_FLAG = 0),sca.PID) AS PARENT_ID, #{monthId} AS MONTH_ID, #{quarterId} AS QUARTER_ID, #{yearId} AS YEAR_ID, @@ -222,7 +222,7 @@