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 57630deaaf..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 @@ -630,10 +630,10 @@ public class RedisKeys { /** * desc:临时方案 - * @param userId + * @param agencyId * @return */ - public static String getOrgTreeCacheKey(String userId) { - return rootPrefix.concat("ic:temp:orgtree").concat("userId"); + public static String getOrgTreeCacheKey(String agencyId) { + return rootPrefix.concat("org:temp:orgtree").concat(agencyId); } } 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 6f040d326b..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 @@ -91,7 +91,8 @@ rankData.RESOLVED_RATIO, rankData.GOVERN_RATIO, rankData.SATISFACTION_RATIO, - agency.AGENCY_NAME AS parentAgencyName + agency.AGENCY_NAME AS parentAgencyName, + rankData.MONTH_ID as monthId FROM screen_govern_rank_data rankData LEFT JOIN 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-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java index ced0df2da5..a733afaa2f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java @@ -8,6 +8,7 @@ package com.epmet.constant; public interface PartyServiceCenterConstant { String ORG_TYPE_AGENCY = "agency"; + String ORG_TYPE_GRID = "grid"; String APPOINTMENT_STATUS_APPOINTING = "appointing"; String APPOINTMENT_STATUS_CANCEL = "cancel"; 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 e4fb99d157..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 @@ -20,8 +20,6 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; 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.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; @@ -55,8 +53,6 @@ import java.util.Set; @RestController @RequestMapping("customeragency") public class CustomerAgencyController { - @Autowired - private RedisUtils redisUtils; @Autowired private CustomerAgencyService customerAgencyService; @@ -371,16 +367,7 @@ public class CustomerAgencyController { @PostMapping("agencygridtree") public Result getOrgTreeData(@LoginUser TokenDto tokenDTO) { //tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); - String orgTreeCacheKey = RedisKeys.getOrgTreeCacheKey(tokenDTO.getUserId()); - Object o = redisUtils.get(orgTreeCacheKey); - AgencyTreeResultDTO result = null; - if (o == null){ - result = customerAgencyService.getOrgTreeData(tokenDTO.getUserId()); - redisUtils.set(orgTreeCacheKey,result,RedisUtils.MINUTE_THIRTY_EXPIRE); - }else { - result = (AgencyTreeResultDTO) o; - } - return new Result().ok(result); + 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 registerRelation = userOpenFeignClient.resiRelationInfo(tokenDto.getUserId()); + if (!registerRelation.success()){ + throw new EpmetException(String.format("查询居民{%s}信息失败",tokenDto.getUserId())); } IcMatterAppointmentRecordEntity e = ConvertUtils.sourceToTarget(formDTO, IcMatterAppointmentRecordEntity.class); e.setCustomerId(customerId); @@ -361,11 +358,24 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml index f6e9b17e34..74c1691615 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml @@ -82,5 +82,10 @@ SELECT GRID_ID FROM register_relation WHERE DEL_FLAG = 0 and USER_ID = #{userId} + + +