diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index aae5697447..39b8d0d9ed 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -486,7 +486,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol dto.setMobile(formDTO.getMobile()); Result> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto); if (!customerStaffResult.success()) { - logger.error(String.format("手机密码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); + logger.warn(String.format("手机密码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); throw new RenException(customerStaffResult.getCode()); } //2、密码是否正确 @@ -529,7 +529,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol if(result.success()&&null!=result.getData()){ return result.getData(); } - logger.error(String .format("手机验证码获取组织,调用%s服务失败,入参手机号%s,密码%s,返回错误码%s,错误提示信息%s", + logger.warn(String .format("手机验证码获取组织,调用%s服务失败,入参手机号%s,密码%s,返回错误码%s,错误提示信息%s", ServiceConstant.GOV_ORG_SERVER, formDTO.getMobile(), formDTO.getPassword(), diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java index 549530747b..d1af449333 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java @@ -66,7 +66,7 @@ public class WebMvcConfig implements WebMvcConfigurer { //日期格式转换 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.setDateFormat(new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); + mapper.setDateFormat(new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN)); mapper.setTimeZone(TimeZone.getTimeZone("GMT+8")); //Long类型转String类型 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java index 734d8d938b..3f323c0dd5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java @@ -62,7 +62,9 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao selectCustomerTypeCode(@Param("dataType")String dataType, @Param("customerId")String customerId); - WorkRecordSubRank selectUpToCalAgency(@Param("agencyId")String agencyId, @Param("dateId")String dateId,@Param("typeCodeList") List typeCodeList); + WorkRecordSubRank selectUpToCalAgency(@Param("agencyId")String agencyId, + @Param("dateId")String dateId, + @Param("typeCodeList") List typeCodeList); WorkRecordSubRank selectUpToCalGrid(@Param("gridId")String gridId, @Param("dateId")String dateId, @Param("typeCodeList")List typeCodeList); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index 313d7008b6..e779bf4cac 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -118,6 +118,9 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl SELECT - sca.AGENCY_ID AS orgId, - sca.AGENCY_NAME AS `NAME`, sum( m.PARTICIPATE_USER_TOTAL ) AS participateUserTotal, sum( m.ORGANIZE_TOTAL ) AS participateTotal FROM 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 6f83783845..0d940865f0 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 @@ -241,6 +241,7 @@ WHERE agency.DEL_FLAG = '0' AND agency.AREA_CODE like concat(#{areaCode},'%') + AND LENGTH(agency.PARENT_AREA_CODE) > 0 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java index 875efb82e1..ac3043d843 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java @@ -26,7 +26,8 @@ public interface StatsIssueDao extends BaseDao { * @author zhaoqifeng * @date 2020/6/17 14:13 */ - List selectAgencyIssueTotal(@Param("customerId") String customerId, @Param("date") String date); + List selectAgencyIssueTotal(@Param("customerId") String customerId, @Param("date") String date, + @Param("gridList") List gridList); /** * 获取当前日期组织下议题增量 @@ -37,7 +38,8 @@ public interface StatsIssueDao extends BaseDao { * @author zhaoqifeng * @date 2020/6/18 9:55 */ - List selectAgencyIssueInc(@Param("customerId") String customerId, @Param("date") String date); + List selectAgencyIssueInc(@Param("customerId") String customerId, @Param("date") String date, + @Param("gridList") List gridList); /** * 已关闭议题统计 @@ -48,7 +50,8 @@ public interface StatsIssueDao extends BaseDao { * @author zhaoqifeng * @date 2020/6/18 14:41 */ - List selectAgencyClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date); + List selectAgencyClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date, + @Param("gridList") List gridList); /** * 已关闭议题增量 @@ -59,7 +62,8 @@ public interface StatsIssueDao extends BaseDao { * @author zhaoqifeng * @date 2020/6/18 14:41 */ - List selectAgencyClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date); + List selectAgencyClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date, + @Param("gridList") List gridList); /** * @param issueEntity @@ -181,4 +185,14 @@ public interface StatsIssueDao extends BaseDao { List selectIssueVoteStatis(@Param("customerId") String customerId, @Param("dateId") String dateId); List selectCategory(@Param("customerId") String customerId, @Param("ids") Set set); + + + List getIssueTotalList(@Param("customerId") String customerId, @Param("date") String date); + + /** + * @Author sun + * @Description 查询议题库已删除网格下可能存在的项目Id集合 + **/ + List selectProjectByGrids(@Param("gridIds") List gridIds); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java index 93b72c077a..a2123a127f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java @@ -87,4 +87,12 @@ public interface CustomerGridDao extends BaseDao { * @return java.util.List */ List getCustomerStaffGridList(@Param("customerId") String customerId); + + List getDelGridList(@Param("customerId") String customerId); + + /** + * @Author sun + * @Description 查询客户已删除网格列表 + **/ + List selectDelGridList(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java index b920c0e29a..4096fcb500 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java @@ -28,7 +28,7 @@ public interface IssueService { * @param date * @return java.util.List */ - List getAgencyIssueTotal(String customerId, String date); + List getAgencyIssueTotal(String customerId, String date, List gridList); /** * 获取当前日期组织下议题增量 @@ -38,7 +38,7 @@ public interface IssueService { * @param date * @return java.util.List */ - List getAgencyIssueInc(String customerId, String date); + List getAgencyIssueInc(String customerId, String date, List gridList); /** * 获取截止当前日期组织下已关闭议题统计 @@ -48,7 +48,7 @@ public interface IssueService { * @param date * @return java.util.List */ - List getAgencyClosedIssueTotal(String customerId, String date); + List getAgencyClosedIssueTotal(String customerId, String date, List gridList); /** * 获取当前日期组织下已关闭议题增量 @@ -58,7 +58,7 @@ public interface IssueService { * @param date * @return java.util.List */ - List getAgencyClosedIssueInc(String customerId, String date); + List getAgencyClosedIssueInc(String customerId, String date, List gridList); /** * @param issueEntity @@ -183,4 +183,31 @@ public interface IssueService { * @date 2021.03.09 00:23 */ Map getIntegratedProjectCategory(Map> param,String customerId); + + /** + * 获取议题总数 + * @author zhaoqifeng + * @date 2021/7/20 16:20 + * @param customerId + * @param date + * @return java.util.List + */ + List getIssueTotalList(String customerId, String date); + + + /** + * 获取议题增量 + * @author zhaoqifeng + * @date 2021/7/20 16:20 + * @param customerId + * @param date + * @return java.util.List + */ + List getIssueIncrList(String customerId, String date); + + /** + * @Author sun + * @Description 查询议题库已删除网格下可能存在的项目Id集合 + **/ + List getProjectByGrids(List gridIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java index 44578a426a..fd5702c71b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java @@ -34,23 +34,23 @@ public class IssueServiceImpl implements IssueService { private StatsIssueDao statsIssueDao; @Override - public List getAgencyIssueTotal(String customerId, String date) { - return statsIssueDao.selectAgencyIssueTotal(customerId, date); + public List getAgencyIssueTotal(String customerId, String date, List gridList) { + return statsIssueDao.selectAgencyIssueTotal(customerId, date, gridList); } @Override - public List getAgencyIssueInc(String customerId, String date) { - return statsIssueDao.selectAgencyIssueInc(customerId, date); + public List getAgencyIssueInc(String customerId, String date, List gridList) { + return statsIssueDao.selectAgencyIssueInc(customerId, date, gridList); } @Override - public List getAgencyClosedIssueTotal(String customerId, String date) { - return statsIssueDao.selectAgencyClosedIssueTotal(customerId, date); + public List getAgencyClosedIssueTotal(String customerId, String date, List gridList) { + return statsIssueDao.selectAgencyClosedIssueTotal(customerId, date, gridList); } @Override - public List getAgencyClosedIssueInc(String customerId, String date) { - return statsIssueDao.selectAgencyClosedIssueInc(customerId, date); + public List getAgencyClosedIssueInc(String customerId, String date, List gridList) { + return statsIssueDao.selectAgencyClosedIssueInc(customerId, date, gridList); } /** @@ -169,4 +169,42 @@ public class IssueServiceImpl implements IssueService { return map; } + + /** + * 获取议题总数 + * + * @param customerId + * @param date + * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/20 16:20 + */ + @Override + public List getIssueTotalList(String customerId, String date) { + return null; + } + + /** + * 获取议题增量 + * + * @param customerId + * @param date + * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/20 16:20 + */ + @Override + public List getIssueIncrList(String customerId, String date) { + return null; + } + + /** + * @Author sun + * @Description 查询议题库已删除网格下可能存在的项目Id集合 + **/ + @Override + public List getProjectByGrids(List gridIds) { + return statsIssueDao.selectProjectByGrids(gridIds); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java index 7c0a98776f..c359035647 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java @@ -17,6 +17,7 @@ import com.epmet.dto.stats.FactIssueGridMonthlyDTO; import com.epmet.entity.stats.*; import com.epmet.service.Issue.IssueService; import com.epmet.service.StatsIssueService; +import com.epmet.service.org.CustomerGridService; import com.epmet.service.project.ProjectService; import com.epmet.service.stats.*; import com.epmet.util.DimIdGenerator; @@ -57,6 +58,8 @@ public class StatsIssueServiceImpl implements StatsIssueService { private FactIssueGridDailyService factIssueGridDailyService; @Autowired private FactIssueGridMonthlyService factIssueGridMonthlyService; + @Autowired + private CustomerGridService customerGridService; @Override public void agencyGridIssueStats(StatsFormDTO formDTO) { @@ -119,16 +122,17 @@ public class StatsIssueServiceImpl implements StatsIssueService { DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); //清空数据 factIssueAgencyDailyService.deleteByCustomerId(customerId, dimId.getDateId()); + List gridList = customerGridService.getDelGridList(customerId); //获取当前客户下所有机关 List agencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO); //获取机关下议题各种状态的数目统计 - List issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString); + List issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString, gridList); //获取机关下议题各种状态的数目增量 - List issueAgencyIncList = issueService.getAgencyIssueInc(customerId, dateString); + List issueAgencyIncList = issueService.getAgencyIssueInc(customerId, dateString, gridList); //获取机关下已关闭议题统计 - List issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString); + List issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString, gridList); //获取机关下已关闭议题增量 - List issueAgencyClosedIncList = issueService.getAgencyClosedIssueInc(customerId, dateString); + List issueAgencyClosedIncList = issueService.getAgencyClosedIssueInc(customerId, dateString, gridList); //已结案项目统计 List projectAgencyClosedTotalList = projectService.getAgencyClosedProjectTotal(customerId, dateString); //已结案项目增量 @@ -180,14 +184,15 @@ public class StatsIssueServiceImpl implements StatsIssueService { dimAgencyDTO.setCustomerId(customerId); //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); + List gridList = customerGridService.getDelGridList(customerId); //清空数据 factIssueAgencyMonthlyService.deleteByCustomerId(customerId, dimId.getMonthId()); //获取当前客户下所有机关 List agencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO); //获取机关下议题各种状态的数目统计 - List issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString); + List issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString, gridList); //获取机关下已关闭议题统计 - List issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString); + List issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString, gridList); //已结案项目统计 List projectAgencyClosedTotalList = projectService.getAgencyClosedProjectTotal(customerId, dateString); //统计机关下议题各个指标月度增量 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java index af00a87d3b..ca28b9fd3e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -12,6 +12,7 @@ import com.epmet.entity.project.ProjectProcessEntity; import com.epmet.entity.stats.*; import com.epmet.service.Issue.IssueService; import com.epmet.service.StatsProjectService; +import com.epmet.service.org.CustomerGridService; import com.epmet.service.project.ProjectProcessService; import com.epmet.service.project.ProjectService; import com.epmet.service.stats.*; @@ -29,6 +30,7 @@ import java.text.NumberFormat; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; /** * 数据统计-项目(独立于任何具体数据源外层的service) @@ -59,6 +61,8 @@ public class StatsProjectServiceImpl implements StatsProjectService { private FactGridProjectDailyService factGridProjectDailyService; @Autowired private FactGridProjectMonthlyService factGridProjectMonthlyService; + @Autowired + private CustomerGridService customerGridService; /** * @Author sun @@ -123,6 +127,31 @@ public class StatsProjectServiceImpl implements StatsProjectService { log.info("StatsProjectServiceImpl.customerAgencyStats-根据客户Id查询项目进展表业务数据,对应客户Id:" + customerId); List processList = projectProcessService.getProcessList(projectEntity); + //20210721 sun 业务逻辑调整,网格删除,组织没有删除情况,相应的组织层级数据统计应舍弃以删除网格数据 start + //处理逻辑:查询已删除网格下项目Id,将已查询的项目、节点数据中的脏数据剔除【项目库有张表有网格Id,可以查出每个项目所属网格,但是关联该表后sql查询效率极低固舍弃此方案】 + //4-1.查询客户下已删除网格列表下存在的项目Id集合 + List list = customerGridService.getdelGridProjectIdList(customerId); + if (list.size() > NumConstant.ZERO) { + Map map = list.stream().collect(Collectors.toMap(String::toString, v -> v, (c1, c2) -> c1)); + //4-2.遍历删除项目主表查询的无效数据 + Iterator proiter = projectList.iterator(); + while (proiter.hasNext()) { + ProjectEntity next = proiter.next(); + if (map.containsKey(next.getId())) { + proiter.remove(); + } + } + //4-3.遍历删除项目节点表查询的无效数据 + Iterator iterator = processList.iterator(); + while (iterator.hasNext()) { + ProjectProcessEntity next = iterator.next(); + if (map.containsKey(next.getProjectId())) { + iterator.remove(); + } + } + } + //20210721 sun end + //5:机关层级日月统计 if (null != dimAgencyList && dimAgencyList.size() > NumConstant.ZERO) { //5.1:执行机关日数据统计 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java index 392b90bc89..2da4de7518 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java @@ -61,4 +61,20 @@ public interface CustomerGridService extends BaseService { * @return java.util.List */ List getCustomerStaffGridList(String customerId); + + /** + * 获取已删除的grid + * @author zhaoqifeng + * @date 2021/7/20 16:33 + * @param customerId + * @return java.util.List + */ + List getDelGridList(String customerId); + + /** + * @Author sun + * @Description 查询客户下已删除网格列表下存在的项目Id集合 + **/ + List getdelGridProjectIdList(String customerId); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java index 680c9892bb..4d4ab8bee0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.org.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.org.CustomerGridDao; import com.epmet.dto.group.AgencyDTO; @@ -10,10 +11,12 @@ import com.epmet.dto.group.result.GridIdListByCustomerResultDTO; import com.epmet.dto.org.CustomerStaffGridDTO; import com.epmet.dto.org.GridInfoDTO; import com.epmet.entity.org.CustomerGridEntity; +import com.epmet.service.Issue.IssueService; import com.epmet.service.org.CustomerGridService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -23,6 +26,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl listGridsByCreateTime(Date start, Date end) { @@ -79,4 +84,35 @@ public class CustomerGridServiceImpl extends BaseServiceImpl getCustomerStaffGridList(String customerId) { return customerGridDao.getCustomerStaffGridList(customerId); } + + /** + * 获取已删除的grid + * + * @param customerId + * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/20 16:33 + */ + @Override + public List getDelGridList(String customerId) { + return customerGridDao.getDelGridList(customerId); + } + + /** + * @Author sun + * @Description 查询客户下已删除网格列表下存在的项目Id集合 + **/ + @Override + public List getdelGridProjectIdList(String customerId) { + List resultList = new ArrayList<>(); + //1.查询客户已删除网格列表 + List gridIds = customerGridDao.selectDelGridList(customerId); + if (gridIds.size() < NumConstant.ONE) { + return resultList; + } + //2.查询议题库已删除网格下可能存在的项目Id集合 + resultList = issueService.getProjectByGrids(gridIds); + return resultList; + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml index 59219341a1..3ee79011e8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml @@ -13,6 +13,11 @@ DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND DATE(UPDATED_TIME) #{date} + + + AND GRID_ID != #{gridId} + + GROUP BY ORG_ID, ISSUE_STATUS @@ -34,6 +39,11 @@ i.DEL_FLAG = '0' AND i.CUSTOMER_ID = #{customerId} AND DATE(ip.CREATED_TIME) = #{date} + + + AND i.GRID_ID != #{gridId} + + GROUP BY i.ORG_ID, ip.ISSUE_STATUS @@ -55,6 +65,11 @@ AND ISSUE_STATUS = 'closed' AND CUSTOMER_ID = #{customerId} AND DATE(UPDATED_TIME) #{date} + + + AND GRID_ID != #{gridId} + + GROUP BY ORG_ID, RESOLVE_TYPE @@ -72,6 +87,11 @@ AND ISSUE_STATUS = 'closed' AND CUSTOMER_ID = #{customerId} AND DATE(UPDATED_TIME) = #{date} + + + AND GRID_ID != #{gridId} + + GROUP BY ORG_ID, RESOLVE_TYPE @@ -301,4 +321,31 @@ order by a.category_type,a.sort + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml index ed9d05b49a..d84d884cb3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml @@ -106,4 +106,24 @@ csg.DEL_FLAG = '0' AND csg.CUSTOMER_ID = #{customerId} + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml index 4036d053b4..033e4e786c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml @@ -29,6 +29,8 @@ customer_id, month_id, org_id, + pid, + pids, org_name, meeting_code, type_code, @@ -51,6 +53,8 @@ #{monthId}, #{item.orgId}, + #{item.pid}, + #{item.pids}, #{item.orgName}, #{item.meetingCode}, diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java index feb2062219..cdaf52b710 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java @@ -25,16 +25,8 @@ import java.util.List; @RequestMapping("pacustomer") public class PaCustomerController { - @Autowired - private PaUserService paUserService; @Autowired private PaCustomerService paCustomerService; - @Autowired - private PaCustomerAgencyService paCustomerAgencyService; - @Autowired - private PaCustomerUserAgencyService paCustomerUserAgencyService; - @Autowired - private CustomerMpService customerMpService; @GetMapping("{id}") public Result get(@PathVariable("id") String id){ @@ -130,7 +122,7 @@ public class PaCustomerController { * @Description 根据初始化状态获取公众号注册的客户列表 **/ @PostMapping(value = "registerbyauth") - public Result> registerByAuth(@LoginUser TokenDto tokenDTO, @RequestBody RegisterByAuthFormDTO formDTO) { + public Result> registerByAuth(@RequestBody RegisterByAuthFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return new Result>().ok( paCustomerService.registerByAuth(formDTO)); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java index 09727f5e56..425b3f8cfc 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java @@ -439,6 +439,7 @@ public class AccessServiceImpl implements AccessService { @Override public Set listOperationPermissions(String staffId, String currAgencyId) { + Set filtedOps = new HashSet<>(); LoginUserDetailsResultDTO userDetails = getLoginUserDetails(loginUserUtil.getLoginUserApp(), loginUserUtil.getLoginUserClient(), loginUserUtil.getLoginUserId()); if (userDetails == null) { @@ -476,7 +477,9 @@ public class AccessServiceImpl implements AccessService { CustomerAgencyDTO currAgencyDto = currAgencyRst.getData(); if (currAgencyDto == null || currAgencyDto.getId() == null) { - throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode(), "操作权限不足,当前组织信息不存在"); + logger.warn(String.format("根据组织ID:{}未找到组织信息,返回空权限列表", currAgencyId)); + return filtedOps; + //throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode(), "操作权限不足,当前组织信息不存在"); } // 获取机关单位中的角色 @@ -489,8 +492,6 @@ public class AccessServiceImpl implements AccessService { String currOrgIdPath = getOrgIdPath(currAgencyDto); String currOrgRelation = getCurrOrgRelation(belongOrgIdPath, currOrgIdPath); - Set filtedOps = new HashSet<>(); - if (!CollectionUtils.isEmpty(roleList)) { roleList.forEach(role -> { List opeAndScopeDTO = listAllRoleOperationScopesByRoleId(role.getId()); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml index f27f4d16b0..cc77b03a28 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml @@ -38,7 +38,7 @@ hc.CONFIGURATION_DESCRIPTION, chd.REGION, chd.CONFIGURATION, - chd.DEMO_DATA, + hc.DEMO_DATA, chd.DISPLAY_ORDER FROM ( diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java index 93a3d454a6..f13010a93c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java @@ -224,6 +224,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl and rg.grid_id = #{gridId} + order by rgc.CREATED_TIME desc limit 1 diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java index ac4ac14ff4..fb8490ad0b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java @@ -290,6 +290,10 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService //补充信息更新到党员基本信息表 PartymemberInfoDTO partyMemberInfo = partymemberInfoService.getPartyMemberInfo(infoDTO); + if (null == partyMemberInfo) { + log.warn("partymemberInfoService.getPartyMemberInfo return null,this partyMember maybe have audited,param:{}", JSON.toJSON(infoDTO)); + return new Result(); + } infoDTO.setId(partyMemberInfo.getId()); partymemberInfoService.updateById(ConvertUtils.sourceToTarget(infoDTO, PartymemberInfoEntity.class)); PartymemberConfirmManualDTO partymemberConfirmManualDTO = diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java index bd6839ac59..b225205a4b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java @@ -74,7 +74,7 @@ public interface UserWechatDao extends BaseDao{ * @author wangc * @date 2020.07.27 00:58 **/ - List selectResiAndStrangerInfo(@Param("userIds") List userIds, @Param("realName")String realName); + List selectResiAndStrangerInfo(@Param("customerId") String customerId, @Param("realName")String realName); //临时用下in List selectNotInUserBaseInfoTemp(); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java index e25a4600eb..63a26443d9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -49,6 +49,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.*; import java.util.stream.Collectors; @@ -190,23 +191,10 @@ public class GridLatestServiceImpl extends BaseServiceImpl getCustomerUsers(CustomerUserFormDTO customerUserFormDTO) { - List allData = new LinkedList<>(); - List userIds = baseDao.selectAllUserByCustomerId(customerUserFormDTO.getCustomerId()); - if(null == userIds) userIds = new LinkedList<>(); - CommonCustomerFormDTO customerParam = new CommonCustomerFormDTO(); - customerParam.setCustomerId(customerUserFormDTO.getCustomerId()); - Result> volunteer = epmetHeartOpenFeignClient.volunteerUserIds(customerParam); - if(volunteer.success() && null != volunteer.getData() && !volunteer.getData().isEmpty()){ - userIds.addAll(volunteer.getData()); - userIds = userIds.stream().distinct().collect(Collectors.toList()); - } - if(null == userIds || userIds.isEmpty()){ - return allData; - } PageHelper.startPage(customerUserFormDTO.getPageNo(),customerUserFormDTO.getPageSize()); - allData = userWechatDao.selectResiAndStrangerInfo(userIds,customerUserFormDTO.getName()); - if(null == allData || allData.isEmpty()){ - return allData; + List allData = userWechatDao.selectResiAndStrangerInfo(customerUserFormDTO.getCustomerId(),customerUserFormDTO.getName()); + if (CollectionUtils.isEmpty(allData)){ + return new ArrayList<>(); } allData.forEach(info -> { if(StringUtils.isNotBlank(info.getUserId())){ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index af8191b9a2..53befc262c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -311,6 +311,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl ) - GROUP BY pr.STAFF_ID ORDER BY pr.CREATED_TIME DESC)t + ORDER BY pr.CREATED_TIME DESC)t GROUP BY STAFF_ID diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml index f3498237a6..06cbd5f02c 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml @@ -125,9 +125,7 @@ wechat.DEL_FLAG = '0' AND (wechat.NICKNAME IS NOT NULL OR wechat.NICKNAME ]]> '') AND (base.SURNAME IS NOT NULL OR base.SURNAME ]]> '') - - wechat.USER_ID = #{item} - + AND wechat.CUSTOMER_ID = #{customerId} AND (base.REAL_NAME LIKE concat('%',#{realName},'%') OR wechat.NICKNAME LIKE concat('%',#{realName},'%'))