From 63e51504abdec075d5b908edc58abf1f63a7ea1b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 09:22:45 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=8B=86=E5=88=86sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ResiBuzzLeftPieChartResultDTO.java | 2 +- .../src/main/java/com/epmet/dao/IssueDao.java | 17 +++++++++++ .../epmet/service/impl/IssueServiceImpl.java | 9 ++++-- .../src/main/resources/mapper/IssueDao.xml | 30 +++++++++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) 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..8db3918fab 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 @@ -41,6 +41,6 @@ public class ResiBuzzLeftPieChartResultDTO implements Serializable { this.count = NumConstant.ZERO; this.categoryCode = ""; this.categoryName = ""; - this.color = ""; + this.color = "#0091ed"; } } 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..8ab346293c 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,23 @@ 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); + + /** + * @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 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 3ff149d81d..09310d3091 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 @@ -1651,8 +1651,13 @@ 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 result = baseDao.resiBuzzLeftPieChartByIssueIds(length, issueIds); + if (CollectionUtils.isEmpty(result)){ return new ArrayList<>(); } return result; 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 ecc7dd39f0..884186e2f2 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 @@ -676,4 +676,34 @@ ) + + + + + \ No newline at end of file From 44f8675de4c4b601c74302c30f4ed5294c247017 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 09:29:52 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=8B=86=E5=88=86sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-issue-server/src/main/resources/mapper/IssueDao.xml | 1 + 1 file changed, 1 insertion(+) 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 884186e2f2..cf309c8106 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 @@ -695,6 +695,7 @@ - SELECT COUNT(issueId) AS count,categoryCode,categoryName,color FROM - (SELECT - i.ID AS issueId, - IFNULL(LEFT(ic.CATEGORY_CODE,#{length}),'') AS categoryCode, - IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName, - IFNULL(cd.color,'#0091ed') AS color - FROM issue i - INNER JOIN issue_vote_statistical s ON (s.ISSUE_ID = i.ID AND s.DEL_FLAG = '0') - LEFT JOIN issue_category ic ON (ic.ISSUE_ID = i.ID AND ic.DEL_FLAG = '0' AND ic.CUSTOMER_ID = i.CUSTOMER_ID) - LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID) - WHERE i.DEL_FLAG = '0' - - AND i.GRID_ID = #{orgId} - - - AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%') - - ORDER BY (s.SUPPORT_COUNT + s.OPPOSITION_COUNT) DESC,i.created_time DESC LIMIT 50)temp - GROUP BY categoryName + + SELECT COUNT(t2.issueId) AS count,cd.CATEGORY_CODE,IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName, IFNULL(cd.COLOR,'#0091ed') AS color FROM + (SELECT t1.issueId AS issueId,IFNULL(LEFT(ic.CATEGORY_CODE,#{length}),'') AS categoryCode FROM + (SELECT + i.ID AS issueId + FROM issue i + INNER JOIN issue_vote_statistical s ON (s.ISSUE_ID = i.ID AND s.DEL_FLAG = '0') + WHERE i.DEL_FLAG = '0' + + AND i.GRID_ID = #{orgId} + + + AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%') + + ORDER BY (s.SUPPORT_COUNT + s.OPPOSITION_COUNT) DESC,i.created_time DESC LIMIT 50)t1 + LEFT JOIN issue_category ic ON (t1.issueId = ic.ISSUE_ID AND ic.DEL_FLAG = '0') + GROUP BY t1.issueId,categoryCode)t2 + LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t2.categoryCode AND cd.CUSTOMER_ID = #{customerId} AND cd.DEL_FLAG = '0' ) + GROUP BY cd.CATEGORY_NAME @@ -700,11 +700,38 @@ IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName, IFNULL(cd.color,'#0091ed') AS color FROM issue_category ic - INNER JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID) + LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID) AND ic.ISSUE_ID IN ( #{issueId} - ) GROUP BY categoryName + ) GROUP BY categoryCode + + + \ No newline at end of file From d33c784105d8290fdd675af883556ca45bf299e2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 13:03:30 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=8B=86=E5=88=86sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ResiBuzzLeftPieChartResultDTO.java | 4 ++++ .../src/main/java/com/epmet/dao/IssueDao.java | 2 ++ .../epmet/service/impl/IssueServiceImpl.java | 17 ++++++++++++++++- .../src/main/resources/mapper/IssueDao.xml | 18 +++++++++++++++++- 4 files changed, 39 insertions(+), 2 deletions(-) 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 9c12da7c91..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 @@ -40,10 +40,14 @@ public class ResiBuzzLeftPieChartResultDTO implements Serializable { @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/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 5e7e0029d0..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 @@ -290,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 9271042bcf..2753105e1d 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 @@ -1605,7 +1605,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()))); } 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 659f8c1322..be37e267ae 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 @@ -711,7 +711,7 @@ resultType="com.epmet.dto.result.ResiBuzzLeftPieChartResultDTO"> SELECT ISSUE_ID , - IFNULL(LEFT(CATEGORY_CODE,2),'') AS categoryCode + IFNULL(LEFT(CATEGORY_CODE,#{length}),'') AS categoryCode FROM issue_category WHERE DEL_FLAG = '0' AND ISSUE_ID IN( @@ -734,4 +734,20 @@ LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t1.categoryCode AND cd.CUSTOMER_ID = #{customerId} AND cd.DEL_FLAG = '0' ) )t2 + + + + + + + + \ No newline at end of file From cc290ca05e279cfef5a4075bb638deb29a6f2603 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Dec 2021 13:14:55 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=8B=86=E5=88=86sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueServiceImpl.java | 5 +++-- .../gov-issue-server/src/main/resources/mapper/IssueDao.xml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) 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 2753105e1d..5a1eaaeb1c 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 @@ -1676,8 +1676,9 @@ public class IssueServiceImpl extends BaseServiceImpl imp Iterator list = pieChat.iterator(); while (list.hasNext()){ ResiBuzzLeftPieChartResultDTO next = list.next(); - for (ResiBuzzLeftPieChartResultDTO category : categories) { - if (next.getIssueId().equals(category.getIssueId())){ + for (int i = 0; i < categories.size(); i++) { + if (next.getIssueId().equals(categories.get(i).getIssueId()) && !next.getStatus()){ + next.setStatus(true); list.remove(); continue; } 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 be37e267ae..a65070fd4a 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 @@ -733,6 +733,7 @@ from (select #{c.issueId} as issueId,#{c.categoryCode} as categoryCode) t1 LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t1.categoryCode AND cd.CUSTOMER_ID = #{customerId} AND cd.DEL_FLAG = '0' ) )t2 + group by t2.categoryName From bc242593ce2c7d96206db50d5fb6bd6420d9f3bf Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 30 Dec 2021 13:20:27 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E8=80=85=E5=88=86=E5=B8=83=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/VolunteerServiceImpl.java | 18 +++++++++++++----- .../main/resources/mapper/IcResiUserDao.xml | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index e383f91664..2d5e776c8f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -16,6 +16,8 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.VolunteerService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -96,7 +98,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve // 1.分页查询出所有志愿者列表 int pageNo = 1; - int pageSize = 100; + int pageSize = 200; // 志愿者epmet user id List volunteerEpmetUserIds = new ArrayList<>(); @@ -142,11 +144,17 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve for (VolunteerDistributionResultDTO.Distribution icResiInfo : icResiInfos) { // 将志愿者类型列表字符串,切割放到set中 Set volunteerTypes = new HashSet(); - String[] vTypes = icResiInfo.getVolunteerCategoriesStr().split(","); - if (vTypes != null && vTypes.length > 0) { - volunteerTypes.addAll(Arrays.asList(vTypes)); + String volunteerCategoriesStr = icResiInfo.getVolunteerCategoriesStr(); + + if (StringUtils.isNotEmpty(volunteerCategoriesStr)) { + String[] vTypes = volunteerCategoriesStr.split(","); + if (vTypes != null && vTypes.length > 0) { + volunteerTypes.addAll(Arrays.asList(vTypes)); + } + icResiInfo.setVolunteerCategories(volunteerTypes); + } else { + icResiInfo.setVolunteerCategories(new HashSet<>()); } - icResiInfo.setVolunteerCategories(volunteerTypes); // 填充建筑坐标 String msg = "【志愿者分布】查询楼栋信息失败"; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 6b07136f1c..784a2b1427 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -498,7 +498,7 @@ icvol.VOLUNTEER_CATEGORY as volunteerCategoriesStr from user_base_info userbaseinfo inner join ic_resi_user icuser on (userbaseinfo.ID_NUM = icuser.ID_CARD and icuser.DEL_FLAG = '0') - inner join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') + left join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') where userbaseinfo.DEL_FLAG = '0' and userbaseinfo.ID_NUM is not null and userbaseinfo.USER_ID in From f1afa6550d7912ed65bdbabad46625f4920f90a5 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Dec 2021 13:26:33 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=AD=98=E4=BB=96=E4=B8=AA=2024=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=20=E7=BB=99=E6=88=91=E7=82=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CustomerAgencyController.java | 4 +- .../java/com/epmet/dao/CustomerAgencyDao.java | 59 ++++++++++++------- .../impl/CustomerAgencyServiceImpl.java | 4 +- .../resources/mapper/CustomerAgencyDao.xml | 34 +++++++++++ 4 files changed, 75 insertions(+), 26 deletions(-) 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 64660eec85..2125390944 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 @@ -365,8 +365,8 @@ public class CustomerAgencyController { * @Date 2021/9/8 15:20 */ @PostMapping("agencygridtree") - public Result getOrgTreeData(@LoginUser TokenDto tokenDTO) { - //tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955"); + 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 d1a49f7ba3..f379824aae 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,40 +256,46 @@ 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); } 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 5e0dc73b52..a1024cead5 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 @@ -1131,9 +1131,9 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + + +