From 7b031417bf878a5d5ac0df06bae0022287a7f856 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 May 2020 09:07:52 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=8F=91=E5=B8=83dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-mine/gov-mine-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-mine/gov-mine-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml index 57ca9f2f4e..4a12a19e35 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-mine-server: container_name: gov-mine-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.11 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.12 ports: - "8098:8098" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 52fb15e28e..41d113ec99 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.11 + 0.3.12 com.epmet gov-mine diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index ca5bdc1094..4bb60fd355 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.34 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.35 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 8bae1a2d21..7a51925c4c 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.34 + 0.3.35 com.epmet gov-org diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 8e2903fed2..8f8df757fe 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.8 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.9 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 9b1397bf37..57ad325ec3 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.8 + 0.3.9 com.epmet oper-customize From 0c808ae5aa03c6d17f13c414e69b3bb4ba6cbc9b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 May 2020 10:47:04 +0800 Subject: [PATCH 02/11] =?UTF-8?q?getMyGrids=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8Cresigroup=20=E7=BC=93=E5=AD=98=E5=BA=93db1,ga?= =?UTF-8?q?teway=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/pom.xml | 4 ++++ .../service/impl/StaffAgencyServiceImpl.java | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index b96276ef8a..ee6408e6d3 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -130,14 +130,17 @@ lb://resi-guide-server + lb://gov-org-server lb://oper-access-server + lb://resi-mine-server lb://resi-group-server + lb://resi-partymember-server lb://gov-grid-server @@ -146,6 +149,7 @@ lb://gov-access-server + lb://gov-mine-server lb://resi-hall-server diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java index ae7a56de8f..ec96daa291 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java @@ -112,7 +112,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService { private boolean checkIssueProcessing(String gridId, List issueProcessingList) { boolean flag = false; for (GridProcessingCountResultDTO gridProcessingCountResultDTO : issueProcessingList) { - if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) { + if (gridId.equals(gridProcessingCountResultDTO.getGridId()) + && null!=gridProcessingCountResultDTO.getCount() + && gridProcessingCountResultDTO.getCount() > 0) { flag = true; break; } @@ -123,7 +125,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService { private boolean checkPartyMemberProcessing(String gridId, List partyMemberProcessingList) { boolean flag = false; for (GridProcessingCountResultDTO gridProcessingCountResultDTO : partyMemberProcessingList) { - if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) { + if (gridId.equals(gridProcessingCountResultDTO.getGridId()) + && null != gridProcessingCountResultDTO.getCount() + && gridProcessingCountResultDTO.getCount() > 0) { flag = true; break; } @@ -134,7 +138,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService { private boolean checkResiProcessing(String gridId, List resiProcessingList) { boolean flag = false; for (GridProcessingCountResultDTO gridProcessingCountResultDTO : resiProcessingList) { - if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) { + if (gridId.equals(gridProcessingCountResultDTO.getGridId()) + && null!=gridProcessingCountResultDTO.getCount() + && gridProcessingCountResultDTO.getCount() > 0) { flag = true; break; } @@ -145,7 +151,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService { private boolean checkGroupProcessing(String gridId, List groupProcessingList) { boolean flag = false; for (GridProcessingCountResultDTO gridProcessingCountResultDTO : groupProcessingList) { - if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) { + if (gridId.equals(gridProcessingCountResultDTO.getGridId()) + && null!=gridProcessingCountResultDTO.getCount() + && gridProcessingCountResultDTO.getCount() > 0) { flag = true; break; } From 0ccd5515fc7a785694c37f9545806899ea30e623 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 May 2020 10:48:10 +0800 Subject: [PATCH 03/11] =?UTF-8?q?getMyGrids=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8Cresigroup=20=E7=BC=93=E5=AD=98=E5=BA=93db1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/feign/GovIssueFeignClient.java | 3 ++- epmet-module/resi-group/resi-group-server/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java index 1b7642c82a..a1a86b35a4 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java @@ -2,6 +2,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.GridProcessingCountResultDTO; import com.epmet.feign.fallback.GovIssueFeignClientFallBack; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; @@ -25,5 +26,5 @@ public interface GovIssueFeignClient { * @Date 2020/5/13 15:47 **/ @PostMapping(value = "/gov/issue/issue/queryvotingissuecount",consumes = MediaType.APPLICATION_JSON_VALUE) - Result queryVotingIssueCount(@RequestBody List gridIdList); + Result> queryVotingIssueCount(@RequestBody List gridIdList); } diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index 277302d93e..ff65886f95 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -118,7 +118,7 @@ epmet_resi_group_user EpmEt-db-UsEr - 0 + 1 192.168.1.130 6379 123456 @@ -148,7 +148,7 @@ epmet elink@833066 - 0 + 1 r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com 6379 EpmEtrEdIs!q@w From 245f45167626ae8ecc5fb61fbdcc8e276091e2a5 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 15 May 2020 10:50:17 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ShiftProjectFormDTO.java | 43 ++++++ .../com/epmet/dto/form/TickStaffFormDTO.java | 32 +++++ .../dto/result/IssueProjectResultDTO.java | 31 +++++ .../com/epmet/constant/IssueConstant.java | 2 +- .../epmet/constant/UserMessageConstant.java | 5 + .../controller/IssueManageController.java | 16 +++ .../epmet/feign/GovProjectFeignClient.java | 11 ++ .../GovProjectFeignClientFallBack.java | 7 + .../java/com/epmet/service/IssueService.java | 8 ++ .../epmet/service/impl/IssueServiceImpl.java | 124 ++++++++++++++---- .../impl/CustomerAgencyServiceImpl.java | 3 +- .../gov-project/gov-project-server/pom.xml | 6 + .../epmet/controller/ProjectController.java | 13 ++ .../com/epmet/service/ProjectService.java | 8 ++ .../impl/ProjectProcessServiceImpl.java | 1 - .../service/impl/ProjectServiceImpl.java | 104 +++++++++++++++ 16 files changed, 384 insertions(+), 30 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TickStaffFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java new file mode 100644 index 0000000000..3ef4e65555 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IssueDTO; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 议题管理-议题转项目-接口入参 + * @Author sun + */ +@Data +public class ShiftProjectFormDTO implements Serializable { + private static final long serialVersionUID = 4859779755214502427L; + + @NotBlank(message = "项目Id不能为空") + private String issueId; + + @Length(max=1000,message = "公开答复内容不能超过1000位") + private String publicReply; + + @NotBlank(message = "内部备注不能为空") + @Length(max=1000,message = "内部备注不能超过1000位") + private String internalRemark; + + @Valid + private List staffList; + + /** + * 议题详细数据 + */ + private IssueDTO issueDTO; + /** + * token中工作人员Id + */ + private String staffId; + +} + diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TickStaffFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TickStaffFormDTO.java new file mode 100644 index 0000000000..b163fd5781 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TickStaffFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 议题管理-议题转项目-勾选的人员信息-接口入参 + * @Author sun + */ +@Data +public class TickStaffFormDTO implements Serializable { + private static final long serialVersionUID = 4859779755214502427L; + + @NotBlank(message = "机关Id不能为空") + private String agencyId; + + /** + * 部门Id(为空表示勾选的人不是部门下的,可能是组织下的也可能是网格下的) + */ + private String departmentId; + + /** + * 网格Id(为空表示勾选的人不是网格下的,可能是组织下的也可能是部门下的) + */ + private String gridId; + + @NotBlank(message = "内部备注不能为空") + private String staffId; +} + diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java new file mode 100644 index 0000000000..bcad9ff776 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java @@ -0,0 +1,31 @@ + +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 议题转项目调用gov-project服务--接口返参 + * @Author sun + */ +@Data +public class IssueProjectResultDTO implements Serializable { + + private static final long serialVersionUID = -1L; + + /** + * 项目Id + */ + private String projectId; + /** + * 议题转项目当前操作人对应的处理部门名称(组织-网格) + */ + private String orgName; + /** + * 议题转项目时间(项目表创建时间) + */ + private Date shiftedTime; + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java index c5170b7e79..cf436dfdbb 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java @@ -44,7 +44,7 @@ public interface IssueConstant { String ISSUE_RESI_TOPIC = "resi_topic"; String SELECT_TOPIC_EXCEPTION = "获取话题数据失败"; - String SAVE_MSG_EXCEPTION = "关闭议题时给用户发送消息失败"; + String SAVE_MSG_EXCEPTION = "发送消息失败"; /** * 议题管理-操作人所属机构类型(机构:agency | 部门:dept | 网格:grid) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java index ccbb7faa87..26dcf4e53c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java @@ -21,5 +21,10 @@ public interface UserMessageConstant { */ String ISSUE_UNRESLOVED_MSG = "您好,您发表的话题\"%s\"问题无需解决,原因:%s"; + /** + * 议题转项目消息模板 + */ + String ISSUE_SHIFT_PROJECT_MSG = "您好,您发表的话题\"%s\"的问题,已由%s部门处理,请查看。"; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java index 2a20b116ca..922c7824ab 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java @@ -148,5 +148,21 @@ public class IssueManageController { ValidatorUtils.validateEntity(issueDetail); return new Result().ok(issueService.issueDetailGov(issueDetail)); } + + /** + * @param formDTO + * @return + * @Author sun + * @Description 议题管理-议题转项目 + **/ + @PostMapping("shiftproject") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT) + public Result shiftProject(@LoginUser TokenDto tokenDTO, @RequestBody ShiftProjectFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + ValidatorUtils.validateEntity(formDTO); + issueService.shiftProject(formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java index d5e801c8ce..abf27d9410 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java @@ -2,7 +2,9 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ShiftProjectFormDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.result.IssueProjectResultDTO; import com.epmet.dto.result.ShiftProjectResultDTO; import com.epmet.feign.fallback.GovProjectFeignClientFallBack; import org.springframework.cloud.openfeign.FeignClient; @@ -27,4 +29,13 @@ public interface GovProjectFeignClient { */ @PostMapping("/gov/project/project/shiftprojectlist") Result> getProjectByIssue(@RequestBody ShiftProjectsFromDTO fromDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 议题管理-议题转项目 + **/ + @PostMapping("/gov/project/project/issueshiftproject") + Result issueShiftProject(@RequestBody ShiftProjectFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java index b48e24873f..05102bb2ce 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java @@ -3,7 +3,9 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ShiftProjectFormDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.result.IssueProjectResultDTO; import com.epmet.dto.result.ShiftProjectResultDTO; import com.epmet.feign.GovProjectFeignClient; import org.springframework.stereotype.Component; @@ -21,4 +23,9 @@ public class GovProjectFeignClientFallBack implements GovProjectFeignClient { public Result> getProjectByIssue(ShiftProjectsFromDTO fromDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProjectByIssue", fromDTO); } + + @Override + public Result issueShiftProject(ShiftProjectFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "issueShiftProject", formDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 935e4e6067..3f4ea086af 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -101,4 +101,12 @@ public interface IssueService extends BaseService { * @Description 议题管理-议题人员选择 **/ ProcessorListResultDTO processorList(ProcessorListFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 议题管理-议题转项目 + **/ + void shiftProject(ShiftProjectFormDTO formDTO); } 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 794d64760a..2813b0f98c 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 @@ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IssueDao; +import com.epmet.dao.IssueProjectRelationDao; import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueProcessDTO; import com.epmet.dto.IssueVoteStatisticalDTO; @@ -28,6 +29,7 @@ import com.epmet.dto.result.*; import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.entity.IssueEntity; import com.epmet.entity.IssueProcessEntity; +import com.epmet.entity.IssueProjectRelationEntity; import com.epmet.feign.GovOrgFeignClient; import com.epmet.feign.GovProjectFeignClient; import com.epmet.feign.MessageFeignClient; @@ -77,6 +79,8 @@ public class IssueServiceImpl extends BaseServiceImpl imp private GovIssueRedis govIssueRedis; @Autowired private GovProjectFeignClient govProjectFeignClient; + @Autowired + private IssueProjectRelationDao issueProjectRelationDao; protected static final Logger logger = LoggerFactory.getLogger(IssueServiceImpl.class); @@ -106,6 +110,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp * @Author sun * @Description 议题管理-关闭议题 **/ + @Override @Transactional(rollbackFor = Exception.class) public void closeIssue(CloseIssueFormDTO formDTO) { @@ -123,12 +128,14 @@ public class IssueServiceImpl extends BaseServiceImpl imp if (baseDao.updateById(entity) < NumConstant.ONE) { throw new RenException(IssueConstant.UPPDATE_EXCEPTION); } + //2:调用gov-org服务,查询组织网格名称 AgencyGridResultDTO agencyGridResultDTO = new AgencyGridResultDTO(); agencyGridResultDTO.setAgencyId(entity.getOrgId()); agencyGridResultDTO.setGridId(entity.getGridId()); Result resultDTO = govOrgFeignClient.getAgencyAndGrid(agencyGridResultDTO); agencyGridResultDTO = resultDTO.getData(); + //3:议题进展记录表新增数据 IssueProcessEntity processEntity = new IssueProcessEntity(); processEntity.setIssueId(formDTO.getIssueId()); @@ -138,36 +145,35 @@ public class IssueServiceImpl extends BaseServiceImpl imp processEntity.setOperationExplain(formDTO.getCloseReason()); processEntity.setOrgName(agencyGridResultDTO.getAgencyName() + "-" + agencyGridResultDTO.getGridName()); issueProcessDao.insert(processEntity); + //4:调用epmet-message服务,给居民端话题创建人和议题发起人发送消息 - if (!saveUserMessageList(formDTO, entity).success()) { + //4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题) + Result resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); + if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { + throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION); + } + ResiTopicDTO topicDTO = resultTopicDTO.getData(); + //4.2:创建消息模板 + String messageContent = ""; + if (IssueConstant.ISSUE_RESLOVED.equals(formDTO.getResolveType())) { + messageContent = String.format(UserMessageConstant.ISSUE_RESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); + } else if (IssueConstant.ISSUE_UNRESLOVED.equals(formDTO.getResolveType())) { + messageContent = String.format(UserMessageConstant.ISSUE_UNRESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); + } + //4.3:调用服务,发送消息 + if (!saveUserMessageList(topicDTO, messageContent, entity).success()) { throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION); } - } - @Override - public List queryVotingIssueCount(List gridIdList) { - List list = new ArrayList<>(); - for (String gridId : gridIdList) { - GridVotingIssueCountResultDTO gridVotingIssueCountResultDTO = new GridVotingIssueCountResultDTO(); - gridVotingIssueCountResultDTO.setGridId(gridId); - Long auditingCount = govIssueRedis.queryVotingIssueCount(gridId); - gridVotingIssueCountResultDTO.setCount(auditingCount); - list.add(gridVotingIssueCountResultDTO); - } - return list; + //5:缓存中网格下表决中的议题总数减1 + govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId()); } /** - * @Description 关闭议题给话题创建人和议题发起人发送消息 + * @Description 关闭议题、议题转项目时给话题创建人和议题发起人发送消息 * @author sun */ - private Result saveUserMessageList(CloseIssueFormDTO formDTO, IssueEntity entity) { - //1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题) - Result resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); - if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { - throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION); - } - ResiTopicDTO topicDTO = resultTopicDTO.getData(); + private Result saveUserMessageList(ResiTopicDTO topicDTO, String messageContent, IssueEntity entity) { //2:分别给话题创建人、议题发起人发送消息 List msgList = new ArrayList<>(); UserMessageFormDTO msgDTO = new UserMessageFormDTO(); @@ -175,12 +181,6 @@ public class IssueServiceImpl extends BaseServiceImpl imp msgDTO.setGridId(entity.getGridId()); msgDTO.setApp(AppClientConstant.APP_RESI); msgDTO.setTitle(UserMessageConstant.ISSUE_TITLE); - String messageContent = ""; - if (IssueConstant.ISSUE_RESLOVED.equals(formDTO.getResolveType())) { - messageContent = String.format(UserMessageConstant.ISSUE_RESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); - } else if (IssueConstant.ISSUE_UNRESLOVED.equals(formDTO.getResolveType())) { - messageContent = String.format(UserMessageConstant.ISSUE_UNRESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); - } msgDTO.setMessageContent(messageContent); msgDTO.setReadFlag(ReadFlagConstant.UN_READ); msgDTO.setUserId(topicDTO.getCreatedBy()); @@ -190,6 +190,19 @@ public class IssueServiceImpl extends BaseServiceImpl imp return messageFeignClient.saveUserMessageList(msgList); } + @Override + public List queryVotingIssueCount(List gridIdList) { + List list = new ArrayList<>(); + for (String gridId : gridIdList) { + GridVotingIssueCountResultDTO gridVotingIssueCountResultDTO = new GridVotingIssueCountResultDTO(); + gridVotingIssueCountResultDTO.setGridId(gridId); + Long auditingCount = govIssueRedis.queryVotingIssueCount(gridId); + gridVotingIssueCountResultDTO.setCount(auditingCount); + list.add(gridVotingIssueCountResultDTO); + } + return list; + } + /** * @param formDTO * @return @@ -377,4 +390,61 @@ public class IssueServiceImpl extends BaseServiceImpl imp return null; } + /** + * @param formDTO + * @return + * @Author sun + * @Description 议题管理-议题转项目 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void shiftProject(ShiftProjectFormDTO formDTO) { + //因需要保证议题表中的转项目时间与创建项目时间一致 因此先新增项目数据再更新议题数据 + //1:查询议题数据 + IssueEntity entity = baseDao.selectById(formDTO.getIssueId()); + formDTO.setIssueDTO(ConvertUtils.sourceToTarget(entity, IssueDTO.class)); + + //2:调用gov-project服务,新增项目各业务表初始数据 + Result resultDTO = govProjectFeignClient.issueShiftProject(formDTO); + IssueProjectResultDTO issueProjectResultDTO = resultDTO.getData(); + + //3:更新议题相关业务表数据 + //3.1:更新议题表数据 + entity.setIssueStatus(IssueConstant.ISSUE_SHIFT_PROJECT); + entity.setShiftedTime(issueProjectResultDTO.getShiftedTime()); + baseDao.updateById(entity); + + //3.2:议题处理进展表新增数据 + IssueProcessEntity processEntity = new IssueProcessEntity(); + processEntity.setIssueId(entity.getId()); + processEntity.setIssueStatus(IssueConstant.ISSUE_SHIFT_PROJECT); + processEntity.setOrgType(IssueConstant.ISSUE_GRID); + processEntity.setOrgId(entity.getGridId()); + processEntity.setOrgName(issueProjectResultDTO.getOrgName()); + issueProcessDao.insert(processEntity); + + //3.3:议题项目关系表新增数据 + IssueProjectRelationEntity relationEntity = new IssueProjectRelationEntity(); + relationEntity.setIssueId(entity.getId()); + relationEntity.setProjectId(issueProjectResultDTO.getProjectId()); + issueProjectRelationDao.insert(relationEntity); + + //4:调用epmet-message服务,给居民端话题创建人和议题发起人发送消息 + //4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题) + Result resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); + if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { + throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION); + } + ResiTopicDTO topicDTO = resultTopicDTO.getData(); + //4.2:创建消息模板 + String messageContent = String.format(UserMessageConstant.ISSUE_SHIFT_PROJECT_MSG, topicDTO.getTopicContent(), issueProjectResultDTO.getOrgName()); + //4.3:调用服务,发送消息 + if (!saveUserMessageList(topicDTO, messageContent, entity).success()) { + throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION); + } + + //5:缓存中网格下表决中的议题总数减1 + govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId()); + } + } 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 2981b5919b..d046a50c14 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 @@ -369,7 +369,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl getDepartmentList(String subAgencyPids) { List subAgencyList = baseDao.selectSubAgencyList(subAgencyPids); diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 95f677175b..974c0877fd 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -78,6 +78,12 @@ 2.0.0 compile + + com.epmet + gov-issue-client + 2.0.0 + compile + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 804be2a6d3..70d127d92f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -26,7 +26,9 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.ProjectDTO; +import com.epmet.dto.form.ShiftProjectFormDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.result.IssueProjectResultDTO; import com.epmet.dto.result.ShiftProjectResultDTO; import com.epmet.excel.ProjectExcel; import com.epmet.service.ProjectService; @@ -106,4 +108,15 @@ public class ProjectController { return new Result>().ok(list); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 议题转项目-项目各业务表初始化数据 + **/ + @PostMapping("issueshiftproject") + public Result issueShiftProject(@RequestBody ShiftProjectFormDTO formDTO) { + return new Result().ok(projectService.issueShiftProject(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index f482b79abd..6dc0c7308e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -162,4 +162,12 @@ public interface ProjectService extends BaseService { * @return java.util.List */ List getProjectByIssue(ShiftProjectsFromDTO fromDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 议题转项目-项目各业务表初始化数据 + **/ + IssueProjectResultDTO issueShiftProject(ShiftProjectFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index 0939efc749..c8aafa9826 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -181,7 +181,6 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl staffList = formDTO.getStaffList(); + IssueDTO issueDTO = formDTO.getIssueDTO(); + //1:调用gov-org服务,获取所有勾选人员以及议题数据对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值使用 + List agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList()); + agencyIdList.add(issueDTO.getOrgId()); + agencyIdList = new ArrayList(new LinkedHashSet<>(agencyIdList)); + List deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList()); + deptIdList = new ArrayList(new LinkedHashSet<>(deptIdList)); + List gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList()); + gridIdList.add(issueDTO.getGridId()); + gridIdList = new ArrayList(new LinkedHashSet<>(gridIdList)); + AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO(); + agencyDeptGridFormDTO.setAgencyIdList(agencyIdList); + agencyDeptGridFormDTO.setDeptIdList(deptIdList); + agencyDeptGridFormDTO.setGridIdList(gridIdList); + Result resultDTO = govOrgFeignClient.getAgencyDeptGridList(agencyDeptGridFormDTO); + AgencyDeptGridResultDTO agencyDeptGrid = resultDTO.getData(); + + //2:项目表新增数据 + ProjectEntity projectEntity = new ProjectEntity(); + projectEntity.setAgencyId(issueDTO.getOrgId()); + projectEntity.setCustomerId(issueDTO.getCustomerId()); + projectEntity.setOrigin(ProjectConstant.ISSUE); + projectEntity.setOriginId(issueDTO.getId()); + projectEntity.setTitle(issueDTO.getIssueTitle()); + projectEntity.setStatus(ProjectConstant.PENDING); + projectEntity.setOrgIdPath(issueDTO.getOrgIdPath()); + baseDao.insert(projectEntity); + + //3:项目处理进展表新增数据 + ProjectProcessEntity processEntity = new ProjectProcessEntity(); + processEntity.setProjectId(projectEntity.getId()); + processEntity.setStaffId(formDTO.getStaffId()); + processEntity.setOperation(ProjectConstant.OPERATION_CREATED); + processEntity.setOperationName(ProjectConstant.OPERATION_CREATED_NAME); + processEntity.setPublicReply(formDTO.getPublicReply()); + processEntity.setInternalRemark(formDTO.getInternalRemark()); + agencyDeptGrid.getAgencyList().forEach(agency -> { + if (issueDTO.getOrgId().equals(agency.getId())) { + processEntity.setDepartmentName(agency.getOrganizationName()); + } + }); + agencyDeptGrid.getGridList().forEach(grid -> { + if (issueDTO.getGridId().equals(grid.getId())) { + processEntity.setDepartmentName(processEntity.getDepartmentName() + "-" + grid.getGridName()); + } + }); + projectProcessService.insert(processEntity); + + //4:项目人员关联表批量新增数据 + List entityList = new ArrayList<>(); + staffList.forEach(ts -> { + ProjectStaffEntity entity = ConvertUtils.sourceToTarget(ts, ProjectStaffEntity.class); + entity.setOrgId(ts.getAgencyId()); + entity.setProjectId(projectEntity.getId()); + entity.setProcessId(processEntity.getId()); + entity.setIsHandle(ProjectConstant.UNHANDLED); + agencyDeptGrid.getAgencyList().forEach(agency -> { + if (ts.getAgencyId().equals(agency.getId())) { + entity.setCustomerId(agency.getCustomerId()); + entity.setOrgIdPath(agency.getPids() + ":" + agency.getId()); + entity.setDepartmentName(agency.getOrganizationName()); + } + }); + if (StringUtils.isNotBlank(ts.getDepartmentId())) { + agencyDeptGrid.getDeptList().forEach(dept -> { + if (ts.getDepartmentId().equals(dept.getId())) { + entity.setDepartmentName(entity.getDepartmentName() + "-" + dept.getDepartmentName()); + } + }); + } + if (StringUtils.isNotBlank(ts.getGridId())) { + agencyDeptGrid.getGridList().forEach(grid -> { + if (ts.getGridId().equals(grid.getId())) { + entity.setDepartmentName(entity.getDepartmentName() + "-" + grid.getGridName()); + } + }); + } + entityList.add(entity); + }); + projectStaffService.insertBatch(entityList); + + //5:返回接口参数 + issueProjectResultDTO.setProjectId(projectEntity.getId()); + issueProjectResultDTO.setOrgName(processEntity.getDepartmentName()); + issueProjectResultDTO.setShiftedTime(projectEntity.getCreatedTime()); + return issueProjectResultDTO; + } + } \ No newline at end of file From 712c8d226605b58c584135452f1b272f4971cb00 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 May 2020 11:32:47 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E7=BA=A2=E7=82=B9?= =?UTF-8?q?=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueServiceImpl.java | 6 +++++- .../modules/group/service/impl/ResiGroupServiceImpl.java | 6 +++++- .../service/impl/PartymemberInfoServiceImpl.java | 6 +++++- .../service/impl/ResiWarmheartedApplyServiceImpl.java | 6 +++++- 4 files changed, 20 insertions(+), 4 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 2813b0f98c..6e45ccf40a 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 @@ -197,7 +197,11 @@ public class IssueServiceImpl extends BaseServiceImpl imp GridVotingIssueCountResultDTO gridVotingIssueCountResultDTO = new GridVotingIssueCountResultDTO(); gridVotingIssueCountResultDTO.setGridId(gridId); Long auditingCount = govIssueRedis.queryVotingIssueCount(gridId); - gridVotingIssueCountResultDTO.setCount(auditingCount); + if (null == auditingCount) { + gridVotingIssueCountResultDTO.setCount(0L); + } else { + gridVotingIssueCountResultDTO.setCount(auditingCount); + } list.add(gridVotingIssueCountResultDTO); } return list; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 3d5b6e2f1d..97c4b17d1a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -791,7 +791,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl Date: Fri, 15 May 2020 11:36:40 +0800 Subject: [PATCH 06/11] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-issue/gov-issue-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-issue/gov-issue-server/pom.xml | 2 +- .../gov-mine/gov-mine-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-mine/gov-mine-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- .../gov-project-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-project/gov-project-server/pom.xml | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-group/resi-group-server/pom.xml | 2 +- .../resi-hall/resi-hall-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-hall/resi-hall-server/pom.xml | 2 +- .../resi-partymember-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-partymember/resi-partymember-server/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml index bfaab5b48d..a549be7509 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-issue-server: container_name: gov-issue-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.2 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.3 ports: - "8101:8101" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index a72b9835c0..43d709813d 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.2 + 0.3.3 gov-issue com.epmet diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml index 4a12a19e35..3aca7b592a 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-mine-server: container_name: gov-mine-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.12 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.13 ports: - "8098:8098" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 41d113ec99..45bc38c28f 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.12 + 0.3.13 com.epmet gov-mine diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index 4bb60fd355..696013f764 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.35 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.36 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 7a51925c4c..4ec0fb67b0 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.35 + 0.3.36 com.epmet gov-org diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml index f81da526df..7a356440b8 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-project-server: container_name: gov-project-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.2 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.3 ports: - "8102:8102" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 974c0877fd..a4f4fd5ffb 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.2 + 0.3.3 gov-project com.epmet diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml index f45a475f69..2b883c7c94 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-group-server: container_name: resi-group-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.18 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.19 ports: - "8095:8095" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index 2a8e80986a..f82b9c4302 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.18 + 0.3.19 com.epmet resi-group diff --git a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml index befeeecbad..d2d61e3145 100644 --- a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-hall-server: container_name: resi-hall-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-hall-server:0.3.2 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-hall-server:0.3.3 ports: - "8100:8100" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-hall/resi-hall-server/pom.xml b/epmet-module/resi-hall/resi-hall-server/pom.xml index 132ecfa98c..cf9e75f2e4 100644 --- a/epmet-module/resi-hall/resi-hall-server/pom.xml +++ b/epmet-module/resi-hall/resi-hall-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 0.3.2 + 0.3.3 resi-hall com.epmet diff --git a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml index 51f180e0d3..1d6d61a52f 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-partymember-server: container_name: resi-partymember-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-partymember-server:0.3.19 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-partymember-server:0.3.20 ports: - "8096:8096" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index 0c076571b1..d4f2df77a1 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.19 + 0.3.20 com.epmet resi-partymember From 7fef4da39fa712aabd670beb2a651d129485e8b6 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Fri, 15 May 2020 14:13:55 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=BF=9B=E5=B1=95=E3=80=81=E8=A1=A8=E5=86=B3=E4=B8=AD=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E3=80=81=E5=8F=8D=E5=AF=B9=E6=95=B0=E9=87=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ProcessProjectIdFormDTO.java | 20 +++++ .../com/epmet/dto/form/checkVoteFormDTO.java | 24 ++++++ .../epmet/dto/result/CheckVoteResultDTO.java | 24 ++++++ .../com/epmet/dto/result/GridIdResultDTO.java | 21 +++++ .../dto/result/IssueProcessResultDTO.java | 40 ++++++++++ .../dto/result/ProcessListResultDTO.java | 41 ++++++++++ .../com/epmet/dto/result/VoteResultDTO.java | 5 ++ .../com/epmet/controller/IssueController.java | 28 ++++++- .../controller/IssueProcessController.java | 12 +++ .../java/com/epmet/dao/IssueProcessDao.java | 15 ++++ .../epmet/dao/IssueVoteStatisticalDao.java | 2 +- .../com/epmet/feign/GovOrgFeignClient.java | 11 +++ .../epmet/feign/GovProjectFeignClient.java | 10 +++ .../fallback/GovOrgFeignClientFallBack.java | 7 ++ .../GovProjectFeignClientFallBack.java | 7 ++ .../epmet/service/IssueProcessService.java | 10 +++ .../java/com/epmet/service/IssueService.java | 79 ++++++++++++++++++ .../service/impl/IssueProcessServiceImpl.java | 75 +++++++++++++++++ .../epmet/service/impl/IssueServiceImpl.java | 80 ++++++++++++++++--- .../impl/IssueVoteStatisticalServiceImpl.java | 5 +- .../main/resources/mapper/IssueProcessDao.xml | 34 ++++++++ .../mapper/IssueVoteStatisticalDao.xml | 4 +- .../dto/form/ProcessProjectIdFormDTO.java | 20 +++++ .../result/ProjectProcessListResultDTO.java | 57 +++++++++++++ .../controller/ProjectProcessController.java | 7 ++ .../java/com/epmet/dao/ProjectProcessDao.java | 9 +++ .../epmet/service/ProjectProcessService.java | 14 +++- .../impl/ProjectProcessServiceImpl.java | 15 +++- .../resources/mapper/ProjectProcessDao.xml | 16 ++++ .../group/dto/group/form/GridIdFormDTO.java | 24 ++++++ .../group/result/CheckJoinTeamResultDTO.java | 20 +++++ .../group/controller/ResiGroupController.java | 10 +++ .../epmet/modules/group/dao/ResiGroupDao.java | 7 ++ .../group/service/ResiGroupService.java | 8 ++ .../service/impl/ResiGroupServiceImpl.java | 17 ++++ .../resources/mapper/group/ResiGroupDao.xml | 12 +++ .../com/epmet/dto/form/CheckVoteFormDTO.java | 24 ++++++ .../com/epmet/dto/form/GridIdFormDTO.java | 24 ++++++ .../dto/result/CheckJoinTeamResultDTO.java | 20 +++++ .../epmet/dto/result/CheckVoteResultDTO.java | 24 ++++++ .../com/epmet/dto/result/GridIdResultDTO.java | 21 +++++ .../dto/result/ProcessListResultDTO.java | 41 ++++++++++ .../epmet/dto/result/VoteInitResultDTO.java | 31 +++++++ .../com/epmet/dto/result/VoteResultDTO.java | 10 +++ .../com/epmet/controller/IssueController.java | 16 +++- .../com/epmet/feign/GovIssueFeignClient.java | 16 ++++ .../com/epmet/feign/ResiGroupFeignClient.java | 11 +++ .../fallback/GovIssueFeignClientFallBack.java | 10 +++ .../ResiGroupFeignClientFallBack.java | 7 ++ .../java/com/epmet/service/IssueService.java | 9 ++- .../epmet/service/impl/IssueServiceImpl.java | 33 +++++++- 51 files changed, 1053 insertions(+), 34 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/checkVoteFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProcessResultDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GridIdFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CheckJoinTeamResultDTO.java create mode 100644 epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/CheckVoteFormDTO.java create mode 100644 epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/GridIdFormDTO.java create mode 100644 epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/CheckJoinTeamResultDTO.java create mode 100644 epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java create mode 100644 epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java create mode 100644 epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java create mode 100644 epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteInitResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java new file mode 100644 index 0000000000..c2c5395932 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 处理进展——已转项目 + */ +@Data +public class ProcessProjectIdFormDTO implements Serializable { + + private static final long serialVersionUID = 2185544562374036005L; + + /** + * 项目Id + */ + private String projectId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/checkVoteFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/checkVoteFormDTO.java new file mode 100644 index 0000000000..f930a2e05e --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/checkVoteFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 校验是否投票——表决中 + */ +@Data +public class checkVoteFormDTO implements Serializable { + + private static final long serialVersionUID = -2170063271034172650L; + /** + * 用户id + */ + private String userId; + + /** + * 议题id + */ + private String issueId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java new file mode 100644 index 0000000000..3266e5b63d --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 校验是否投票——表决中 + */ +@Data +public class CheckVoteResultDTO implements Serializable { + + private static final long serialVersionUID = 1908314603146050709L; + /** + * 是否投票 已投票:true,未投票:false + */ + private Boolean voteStatus; + + /** + * 支持:support,反对:opposition + */ + private String voteType; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java new file mode 100644 index 0000000000..013ebc2aad --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 表决中议题详情——支持、反对数 + */ +@Data +public class GridIdResultDTO implements Serializable { + + private static final long serialVersionUID = 1968505337707779785L; + + /** + * 网格ID + */ + private String gridId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProcessResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProcessResultDTO.java new file mode 100644 index 0000000000..568f88ecf9 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProcessResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 议题处理进展 + */ +@Data +public class IssueProcessResultDTO implements Serializable { + + private static final long serialVersionUID = 8437703271418235334L; + /** + * 处理进展名称(表决中、转项目、流转中已结案、已关闭) + */ + private String processName; + + /** + * 已转项目进展记录时间 + */ + private Long processTime; + + /** + * 进展说明 + */ + private String progressDesc; + + /** + * 进展id(操作记录表id) + */ + private String processId; + + /** + * 网格Id + */ + private String gridId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java new file mode 100644 index 0000000000..05b17f9d57 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 议题处理进展 + */ +@Data +public class ProcessListResultDTO implements Serializable { + + private static final long serialVersionUID = -702803628652751983L; + + /** + * 处理进展名称(表决中、转项目、流转中已结案、已关闭) + */ + private String processName; + + /** + * 已转项目进展记录时间 + */ + private Long processTime; + + /** + * 处理部门(处理人所属的机关单位名称) + */ + private String departmentName; + + /** + * 进展说明 + */ + private String progressDesc; + + /** + * 进展id(操作记录表id) + */ + private String processId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java index 3d4db2594e..99f4e6d1cd 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java @@ -28,5 +28,10 @@ public class VoteResultDTO implements Serializable { */ private Integer oppositionCount; + /** + * 支持:support 反对:oppose + */ + private String voteType = ""; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index 4996d5e69f..1d66cbf7d7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -1,24 +1,34 @@ package com.epmet.controller; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.CommonIssueListFormDTO; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.IssueDTO; import com.epmet.dto.form.IssueDetailFormDTO; import com.epmet.dto.result.ClosedIssueListResultDTO; +import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.result.GridIdResultDTO; import com.epmet.dto.form.ShiftProjectListFromDTO; import com.epmet.dto.result.GridVotingIssueCountResultDTO; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.dto.result.IssueResultDTO; import com.epmet.dto.result.VotingIssueListResultDTO; +import com.epmet.excel.IssueExcel; import com.epmet.dto.result.ShiftProjectListResultDTO; import com.epmet.service.IssueService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.Map; /** * @Description 居民端党群议事 @@ -104,5 +114,15 @@ public class IssueController { ValidatorUtils.validateEntity(issueListFormDTO); return new Result>().ok(issueService.closedList(issueListFormDTO)); } + + /** + * @Description 根据issueId查询gridId + * @param issueId + * @author zxc + */ + @PostMapping("selectgrididbyissueid") + public Result selectGridIdByIssueId(@RequestBody IssueIdFormDTO issueId){ + return new Result().ok(issueService.selectGridIdByIssueId(issueId)); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java index bf6c57f863..86addc77a7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java @@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IssueProcessDTO; +import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.result.ProcessListResultDTO; import com.epmet.excel.IssueProcessExcel; import com.epmet.service.IssueProcessService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +93,14 @@ public class IssueProcessController { ExcelUtils.exportExcelToTarget(response, null, list, IssueProcessExcel.class); } + /** + * @Description 议题处理进展 + * @param issueId + * @author zxc + */ + @PostMapping("processlist") + public Result> processList(@RequestBody IssueIdFormDTO issueId){ + return new Result>().ok(issueProcessService.processList(issueId)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProcessDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProcessDao.java index 2ad711fd01..d48ecb94cb 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProcessDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProcessDao.java @@ -18,9 +18,14 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.result.IssueProcessResultDTO; import com.epmet.dto.IssueProcessDTO; import com.epmet.entity.IssueProcessEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 议题进展记录表 @@ -39,4 +44,14 @@ public interface IssueProcessDao extends BaseDao { **/ int insertOne(IssueProcessDTO issueProcessDTO); + + /** + * @Description 议题处理进展——已关闭 + * @param issueId + * @author zxc + */ + List issueProcess(IssueIdFormDTO issueId); + + IssueProcessResultDTO issueBeginInfo(IssueIdFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java index f6aa7956ee..d20d18f501 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java @@ -50,7 +50,7 @@ public interface IssueVoteStatisticalDao extends BaseDao getProcessorList(@PathVariable("agencyId") String agencyId); + + /** + * @Description 查询网格名 + * @param formDTO + * @author zxc + */ + @PostMapping(value = "/gov/org/customergrid/getgridnamebygridid") + Result getGridNameByGridId(@RequestBody BelongGridNameFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java index abf27d9410..1ebc259209 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java @@ -2,8 +2,10 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ProcessProjectIdFormDTO; import com.epmet.dto.form.ShiftProjectFormDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.result.ProcessListResultDTO; import com.epmet.dto.result.IssueProjectResultDTO; import com.epmet.dto.result.ShiftProjectResultDTO; import com.epmet.feign.fallback.GovProjectFeignClientFallBack; @@ -38,4 +40,12 @@ public interface GovProjectFeignClient { **/ @PostMapping("/gov/project/project/issueshiftproject") Result issueShiftProject(@RequestBody ShiftProjectFormDTO formDTO); + + /** + * @Description 议题处理进展——已转项目 + * @param formDTO + * @author zxc + */ + @PostMapping("/gov/project/projectprocess/projectprocesslist") + Result> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java index 8b9d94fd3e..d216667d86 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java @@ -3,7 +3,9 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.BelongGridNameFormDTO; import com.epmet.dto.result.AgencyGridResultDTO; +import com.epmet.dto.result.BelongGridNameResultDTO; import com.epmet.dto.result.DepartmentStaffListResultDTO; import com.epmet.dto.result.ProcessorListResultDTO; import com.epmet.feign.GovOrgFeignClient; @@ -30,4 +32,9 @@ public class GovOrgFeignClientFallBack implements GovOrgFeignClient { public Result getProcessorList(String agencyId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getProcessorList", agencyId); } + + @Override + public Result getGridNameByGridId(BelongGridNameFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridNameByGridId", formDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java index 05102bb2ce..d147041562 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java @@ -3,8 +3,10 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ProcessProjectIdFormDTO; import com.epmet.dto.form.ShiftProjectFormDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.result.ProcessListResultDTO; import com.epmet.dto.result.IssueProjectResultDTO; import com.epmet.dto.result.ShiftProjectResultDTO; import com.epmet.feign.GovProjectFeignClient; @@ -24,6 +26,11 @@ public class GovProjectFeignClientFallBack implements GovProjectFeignClient { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProjectByIssue", fromDTO); } + @Override + public Result> projectProcessList(ProcessProjectIdFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "projectProcessList", formDTO); + } + @Override public Result issueShiftProject(ShiftProjectFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "issueShiftProject", formDTO); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java index 7a0de275b2..73e54adaca 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java @@ -20,7 +20,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueProcessDTO; +import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.result.ProcessListResultDTO; import com.epmet.entity.IssueProcessEntity; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -93,6 +96,13 @@ public interface IssueProcessService extends BaseService { */ void delete(String[] ids); + /** + * @Description 议题处理进展 + * @param issueId + * @author zxc + */ + List processList(IssueIdFormDTO issueId); + /** * @Description 议题流程新增记录 * @param issueProcessDTO diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 3f4ea086af..daa7c9d499 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -1,6 +1,16 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IssueDTO; +import com.epmet.dto.form.CloseIssueFormDTO; +import com.epmet.dto.form.DepartmentStaffListFormDTO; +import com.epmet.dto.form.IssueDetailFormDTO; +import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.result.DepartmentStaffListResultDTO; +import com.epmet.dto.result.GridIdResultDTO; +import com.epmet.dto.result.GridVotingIssueCountResultDTO; +import com.epmet.dto.result.IssueResultDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.dto.form.CloseIssueFormDTO; @@ -10,8 +20,10 @@ import com.epmet.dto.form.IssueDetailFormDTO; import com.epmet.dto.result.*; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.entity.IssueEntity; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; +import java.util.Map; /** * @Author zxc @@ -19,6 +31,66 @@ import java.util.List; */ public interface IssueService extends BaseService { + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-05-14 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-05-14 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IssueDTO + * @author generator + * @date 2020-05-14 + */ + IssueDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-05-14 + */ + void save(IssueDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-05-14 + */ + void update(IssueDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-05-14 + */ + void delete(String[] ids); + /** * @Description 议题详情 * @param issueDetail @@ -94,6 +166,13 @@ public interface IssueService extends BaseService { **/ GovIssueDetailResultDTO issueDetailGov(IssueDetailFormDTO issueDetail); + /** + * @Description 根据issueId查询gridId + * @param issueId + * @author zxc + */ + GridIdResultDTO selectGridIdByIssueId(IssueIdFormDTO issueId); + /** * @param formDTO * @return diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java index 99b507d9b6..20d678832e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java @@ -20,19 +20,34 @@ 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; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.IssueConstant; import com.epmet.dao.IssueProcessDao; +import com.epmet.dao.IssueProjectRelationDao; +import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueProcessDTO; +import com.epmet.dto.form.BelongGridNameFormDTO; +import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.form.ProcessProjectIdFormDTO; +import com.epmet.dto.result.BelongGridNameResultDTO; +import com.epmet.dto.result.IssueProcessResultDTO; +import com.epmet.dto.result.ProcessListResultDTO; import com.epmet.entity.IssueProcessEntity; +import com.epmet.feign.GovOrgFeignClient; +import com.epmet.feign.GovProjectFeignClient; import com.epmet.redis.IssueProcessRedis; import com.epmet.service.IssueProcessService; +import com.epmet.service.IssueService; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -48,6 +63,16 @@ public class IssueProcessServiceImpl extends BaseServiceImpl page(Map params) { @@ -113,4 +138,54 @@ public class IssueProcessServiceImpl extends BaseServiceImpl processList(IssueIdFormDTO issueId) { + List listResult = new ArrayList(); + IssueDTO issueDTO = issueService.get(issueId.getIssueId()); + String issueStatus = issueDTO.getIssueStatus(); + if (issueStatus.equals(IssueConstant.ISSUE_CLOSED)){//已关闭——处理进展 + List issueProcessResultDTOS = baseDao.issueProcess(issueId); + if (issueProcessResultDTOS.size()!=NumConstant.ZERO){ + String gridId = issueProcessResultDTOS.get(NumConstant.ZERO).getGridId(); + BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO(); + formDTO.setGridId(gridId); + //处理部门(处理人所属的机关单位名称) eg:阜新路社区——第一网格 + BelongGridNameResultDTO data = govOrgFeignClient.getGridNameByGridId(formDTO).getData(); + BeanUtils.copyProperties(issueProcessResultDTOS,listResult); + for (IssueProcessResultDTO issueProcessResultDTO : issueProcessResultDTOS) { + ProcessListResultDTO process = new ProcessListResultDTO(); + BeanUtils.copyProperties(issueProcessResultDTO,process); + process.setDepartmentName(data.getBelongsGridName()); + listResult.add(process); + } + } + }else if (issueStatus.equals(IssueConstant.ISSUE_SHIFT_PROJECT)){//已转项目——处理进展 + String projectId = issueProjectRelationDao.selectProjectIdByIssueId(issueId.getIssueId()); + if (!StringUtils.isBlank(projectId)) { + ProcessProjectIdFormDTO formDTO = new ProcessProjectIdFormDTO(); + formDTO.setProjectId(projectId); + listResult = govProjectFeignClient.projectProcessList(formDTO).getData(); + //转议题时间 + IssueProcessResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId); + String gridId = issueProcessResultDTO.getGridId(); + BelongGridNameFormDTO gridName = new BelongGridNameFormDTO(); + gridName.setGridId(gridId); + //处理部门(处理人所属的机关单位名称) eg:阜新路社区——第一网格 + BelongGridNameResultDTO data = govOrgFeignClient.getGridNameByGridId(gridName).getData(); + ProcessListResultDTO process = new ProcessListResultDTO(); + BeanUtils.copyProperties(issueProcessResultDTO,process); + process.setDepartmentName(data.getBelongsGridName()); + listResult.add(process); + } + }else { + return new ArrayList<>(); + } + return listResult; + } + } \ 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 6e45ccf40a..6a0e3e296b 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 @@ -1,16 +1,19 @@ package com.epmet.service.impl; +import com.alibaba.nacos.client.utils.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.IssueConstant; import com.epmet.constant.ReadFlagConstant; import com.epmet.constant.UserMessageConstant; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IssueDao; import com.epmet.dao.IssueProjectRelationDao; import com.epmet.dto.IssueDTO; @@ -18,14 +21,12 @@ import com.epmet.dto.IssueProcessDTO; import com.epmet.dto.IssueVoteStatisticalDTO; import com.epmet.dto.form.CommonIssueListFormDTO; import com.epmet.dao.IssueProcessDao; -import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.dto.form.CloseIssueFormDTO; import com.epmet.dto.form.DepartmentStaffListFormDTO; import com.epmet.dto.form.IssueDetailFormDTO; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; -import com.epmet.dto.result.*; import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.entity.IssueEntity; import com.epmet.entity.IssueProcessEntity; @@ -43,20 +44,17 @@ import com.epmet.service.IssueProjectRelationService; import com.epmet.service.IssueService; import com.epmet.service.IssueVoteStatisticalService; import com.epmet.utils.ModuleConstants; -import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.*; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.stream.Collectors; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; /** * @Author zxc @@ -91,6 +89,57 @@ public class IssueServiceImpl extends BaseServiceImpl imp @Autowired private IssueProjectRelationService issueProjectRelationService; + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IssueDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IssueDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IssueDTO get(String id) { + IssueEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IssueDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IssueDTO dto) { + IssueEntity entity = ConvertUtils.sourceToTarget(dto, IssueEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IssueDTO dto) { + IssueEntity entity = ConvertUtils.sourceToTarget(dto, IssueEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } /** * @param issueDetail * @Description 议题详情 @@ -169,6 +218,19 @@ public class IssueServiceImpl extends BaseServiceImpl imp govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId()); } + /** + * @Description 根据issueId查询gridId + * @param issueId + * @author zxc + */ + @Override + public GridIdResultDTO selectGridIdByIssueId(IssueIdFormDTO issueId) { + GridIdResultDTO gridIdResult = new GridIdResultDTO(); + IssueDTO issueDTO = get(issueId.getIssueId()); + gridIdResult.setGridId(issueDTO.getGridId()); + return gridIdResult; + } + /** * @Description 关闭议题、议题转项目时给话题创建人和议题发起人发送消息 * @author sun diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index 5058c84832..5fa16e9c84 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -132,12 +132,13 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl + + + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml index 5fe5c88507..3d35fea463 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml @@ -30,9 +30,9 @@ - SELECT - COUNT(*) AS voteStatus + attitude AS voteType FROM issue_vote_detail WHERE diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java new file mode 100644 index 0000000000..c2c5395932 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 处理进展——已转项目 + */ +@Data +public class ProcessProjectIdFormDTO implements Serializable { + + private static final long serialVersionUID = 2185544562374036005L; + + /** + * 项目Id + */ + private String projectId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java new file mode 100644 index 0000000000..5c12be99ee --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java @@ -0,0 +1,57 @@ +/** + * 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.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 项目跟踪-项目处理进展列表-接口返参 + */ +@Data +public class ProjectProcessListResultDTO implements Serializable { + + private static final long serialVersionUID = 5342591979112900804L; + + /** + * 项目处理进展Id + */ + private String processId = ""; + + /** + * 处理进展名称 + */ + private String processName = ""; + + /** + * 处理进展时间 + */ + private Long processTime; + + /** + * 处理部门 + */ + private String departmentName = ""; + + /** + * 进展说明 + */ + private String progressDesc = ""; +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java index 116ad85e3a..f5958bd7fc 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java @@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.ProjectProcessDTO; +import com.epmet.dto.form.ProcessProjectIdFormDTO; +import com.epmet.dto.result.ProjectProcessListResultDTO; import com.epmet.excel.ProjectProcessExcel; import com.epmet.service.ProjectProcessService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +93,9 @@ public class ProjectProcessController { ExcelUtils.exportExcelToTarget(response, null, list, ProjectProcessExcel.class); } + @PostMapping("projectprocesslist") + public Result> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO){ + return new Result>().ok(projectProcessService.projectProcessList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java index 71f0b72b72..53583222b0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java @@ -18,7 +18,9 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.ProcessProjectIdFormDTO; import com.epmet.dto.result.ProcesslistResultDTO; +import com.epmet.dto.result.ProjectProcessListResultDTO; import com.epmet.entity.ProjectProcessEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -43,4 +45,11 @@ public interface ProjectProcessDao extends BaseDao { List getProcessListByProjectId(@Param("projectId") String projectId); List selectReturnableList(@Param("projectId") String projectId); + + /** + * @Description 议题处理进展——已转项目 + * @param formDTO + * @author zxc + */ + List projectProcessList(ProcessProjectIdFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java index 751e31ba03..99a642f700 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java @@ -21,14 +21,13 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.ProjectProcessDTO; -import com.epmet.dto.form.ProcessListFormDTO; -import com.epmet.dto.form.ProjectDetailFromDTO; -import com.epmet.dto.form.ReturnListFromDTO; -import com.epmet.dto.form.TransferFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.DepartmentResultDTO; import com.epmet.dto.result.ProcesslistResultDTO; +import com.epmet.dto.result.ProjectProcessListResultDTO; import com.epmet.dto.result.ReturnListResultDTO; import com.epmet.entity.ProjectProcessEntity; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -126,4 +125,11 @@ public interface ProjectProcessService extends BaseService **/ void transfer(TransferFormDTO formDTO); + /** + * @Description 议题处理进展——已转项目 + * @param formDTO + * @author zxc + */ + List projectProcessList(ProcessProjectIdFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index c8aafa9826..f26a6b84e4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -32,10 +32,7 @@ import com.epmet.dao.ProjectStaffDao; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.ProjectProcessDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.AgencyDeptGridResultDTO; -import com.epmet.dto.result.ProcesslistResultDTO; -import com.epmet.dto.result.ReturnListResultDTO; -import com.epmet.dto.result.StaffInfoResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import com.epmet.entity.ProjectProcessEntity; import com.epmet.entity.ProjectStaffEntity; @@ -244,4 +241,14 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl projectProcessList(ProcessProjectIdFormDTO formDTO) { + return baseDao.projectProcessList(formDTO); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml index d93c09e825..49024c5fe6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml @@ -30,4 +30,20 @@ ORDER BY CREATED_TIME DESC + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GridIdFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GridIdFormDTO.java new file mode 100644 index 0000000000..ab9536e8dc --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GridIdFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.resi.group.dto.group.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 查询某用户是否加入过小组 + */ +@Data +public class GridIdFormDTO implements Serializable { + + private static final long serialVersionUID = -8535773441961516653L; + /** + * 用户id + */ + private String userId; + + /** + * 网格Id + */ + private String gridId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CheckJoinTeamResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CheckJoinTeamResultDTO.java new file mode 100644 index 0000000000..732571d09d --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CheckJoinTeamResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * 校验用户是否加入小组 + */ +@Data +public class CheckJoinTeamResultDTO implements Serializable { + + private static final long serialVersionUID = -1590972041272087570L; + + /** + * 是否加入小组 eg:已加入:true,未加入:false + */ + private Boolean voteAuthorization; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java index 98eb905c13..da16e3fc25 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java @@ -311,4 +311,14 @@ public class ResiGroupController { resultDTO2.setResultName("group返参"); return new Result().ok(resultDTO2); } + + /** + * @Description 校验用户是否加入小组 + * @param gridId + * @author zxc + */ + @PostMapping("checkjointeam") + public Result checkjointeam(@RequestBody GridIdFormDTO gridId){ + return new Result().ok(resiGroupService.checkjointeam(gridId)); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java index 064f1731a4..38dc060246 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java @@ -148,4 +148,11 @@ public interface ResiGroupDao extends BaseDao { * @date 2020.05.14 10:54 **/ List getGroupIdByGridId(@Param("gridId") String gridId); + + /** + * @Description 校验用户是否加入小组 + * @param gridId + * @author zxc + */ + Integer checkjointeam(GridIdFormDTO gridId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java index 26b616a346..83a4a6e275 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java @@ -27,6 +27,7 @@ import com.epmet.resi.group.dto.group.GroupProcessingCountResultDTO; import com.epmet.resi.group.dto.group.ResiGroupDTO; import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.result.*; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -260,4 +261,11 @@ public interface ResiGroupService extends BaseService { * @date 2020.05.14 10:54 **/ List getGroupIdByGridId(String gridId); + + /** + * @Description 校验用户是否加入小组 + * @param gridId + * @author zxc + */ + CheckJoinTeamResultDTO checkjointeam(GridIdFormDTO gridId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 97c4b17d1a..b55ed95902 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -815,6 +815,23 @@ public class ResiGroupServiceImpl extends BaseServiceImpl + + + @@ -102,10 +114,22 @@ FROM project_staff WHERE DEL_FLAG = '0' - AND IS_HANDLE = 'unhandled' + AND IS_HANDLE = 'handle' GROUP BY PROJECT_ID) ps ON p.ID = ps.PROJECT_ID LEFT JOIN project_process pp ON p.ID = pp.PROJECT_ID AND pp.OPERATION = 'close' - WHERE p.DEL_FLAG = '0' + WHERE + NOT EXISTS ( + SELECT + PROJECT_ID + FROM + project_staff + WHERE + DEL_FLAG = '0' + AND PROJECT_ID = p.ID + AND STAFF_ID = #{userId} + AND IS_HANDLE = 'unhandled' + ) + AND p.DEL_FLAG = '0' ORDER BY p.CREATED_TIME ASC LIMIT #{pageNo}, #{pageSize} From a8d2f58e5d741fce8ffd73827ba0ecb6ae4c8990 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 15 May 2020 15:21:18 +0800 Subject: [PATCH 09/11] =?UTF-8?q?reddot=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/feign/GovIssueFeignClient.java | 3 +- .../feign/ResiPartymemberFeignClient.java | 2 +- .../fallback/GovIssueFeignClientFallBack.java | 3 +- .../epmet/service/impl/RemindServiceImpl.java | 49 ++++++++++--------- .../result/GridVotingIssueCountResultDTO.java | 2 +- .../java/com/epmet/redis/GovIssueRedis.java | 6 +-- .../epmet/service/impl/IssueServiceImpl.java | 4 +- .../feign/ResiPartymemberFeignClient.java | 2 +- .../fallback/GovIssueFeignClientFallBack.java | 3 +- .../group/GroupProcessingCountResultDTO.java | 2 +- .../resi-group/resi-group-server/pom.xml | 6 +++ .../modules/group/redis/ResiGroupRedis.java | 6 +-- .../service/impl/ResiGroupServiceImpl.java | 4 +- .../PartyAuthProcessingCountResultDTO.java | 2 +- .../result/ResiProcessingCountResultDTO.java | 2 +- .../impl/PartymemberInfoServiceImpl.java | 4 +- .../impl/ResiWarmheartedApplyServiceImpl.java | 4 +- .../com/epmet/redis/ResiPartyMemberRedis.java | 12 ++--- 18 files changed, 65 insertions(+), 51 deletions(-) diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java index 1b7642c82a..a1a86b35a4 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java @@ -2,6 +2,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.GridProcessingCountResultDTO; import com.epmet.feign.fallback.GovIssueFeignClientFallBack; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; @@ -25,5 +26,5 @@ public interface GovIssueFeignClient { * @Date 2020/5/13 15:47 **/ @PostMapping(value = "/gov/issue/issue/queryvotingissuecount",consumes = MediaType.APPLICATION_JSON_VALUE) - Result queryVotingIssueCount(@RequestBody List gridIdList); + Result> queryVotingIssueCount(@RequestBody List gridIdList); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java index 9d4cd796fa..7c13e1f6a4 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java @@ -166,7 +166,7 @@ public interface ResiPartymemberFeignClient { * @Description 查询网格下待审核的党员数 * @Date 2020/5/13 15:41 **/ - @PostMapping(value = "/resi/partymember/partymemberbaseinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/resi/partymember/partymemberinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE) Result> queryPartyMemberProcessingCount(@RequestBody List gridIdList); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java index 3a1ccf8714..3bff98858d 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java @@ -3,6 +3,7 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.GridProcessingCountResultDTO; import com.epmet.feign.GovIssueFeignClient; import org.springframework.stereotype.Component; @@ -16,7 +17,7 @@ import java.util.List; @Component public class GovIssueFeignClientFallBack implements GovIssueFeignClient { @Override - public Result queryVotingIssueCount(List gridIdList) { + public Result> queryVotingIssueCount(List gridIdList) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryVotingIssueCount", gridIdList); } } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java index f9dea745a0..6bb67369ff 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java @@ -52,18 +52,19 @@ public class RemindServiceImpl implements RemindService { Result> govOrgResult = govOrgFeignClient.getMyGrids(formDTO.getStaffId()); if (!govOrgResult.success()) { logger.error(String.format("调用gov-org-server服务查询工作人员网格列表失败返回结果", govOrgResult.toString())); - } - List gridList = govOrgResult.getData(); - for (CustomerGridByUserIdResultDTO gridInfo : gridList) { - if(formDTO.getGridId().equals(gridInfo)){ - //查询非当前网格的 - break; - } - //其他网格,只要存在有待办事项的网格,就需要在工作首页网格名称后面显示红点 - List functionList = this.getRedDotFunctionList(gridInfo.getGridId()); - if (null != functionList && functionList.size() > 0) { - redDotResultDTO.setOtherGridRedDot(true); - break; + }else{ + List gridList = govOrgResult.getData(); + for (CustomerGridByUserIdResultDTO gridInfo : gridList) { + if(formDTO.getGridId().equals(gridInfo)){ + //查询非当前网格的 + break; + } + //其他网格,只要存在有待办事项的网格,就需要在工作首页网格名称后面显示红点 + List functionList = this.getRedDotFunctionList(gridInfo.getGridId()); + if (null != functionList && functionList.size() > 0) { + redDotResultDTO.setOtherGridRedDot(true); + break; + } } } return redDotResultDTO; @@ -80,10 +81,10 @@ public class RemindServiceImpl implements RemindService { if (this.getWorkGrassRootsResi(gridIdList)) { functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI); } - if (getWorkGrassRootsPartyAuth(gridIdList)) { + if (this.getWorkGrassRootsPartyAuth(gridIdList)) { functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH); } - if (getWorkGrassRootsIssue(gridIdList)) { + if (this.getWorkGrassRootsIssue(gridIdList)) { functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE); } return functionList; @@ -101,9 +102,10 @@ public class RemindServiceImpl implements RemindService { } } } + }else{ + logger.error(String.format("调用%s服务,查询网格%s待审核小组数失败code%s,msg:", ServiceConstant.RESI_GROUP_SERVER, gridIdList.get(0), groupProcessingCountResult.getCode(), + groupProcessingCountResult.getMsg())); } - logger.error(String.format("调用%s服务,查询网格%s待审核小组数失败code%s,msg:", ServiceConstant.RESI_GROUP_SERVER, gridIdList.get(0), groupProcessingCountResult.getCode(), - groupProcessingCountResult.getMsg())); return false; } @@ -119,9 +121,10 @@ public class RemindServiceImpl implements RemindService { } } } + } else { + logger.error(String.format("调用%s服务,查询网格%s待审核热心居民数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), resiGroupProcessingCountResult.getCode(), + resiGroupProcessingCountResult.getMsg())); } - logger.error(String.format("调用%s服务,查询网格%s待审核热心居民数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), resiGroupProcessingCountResult.getCode(), - resiGroupProcessingCountResult.getMsg())); return false; } @@ -137,9 +140,10 @@ public class RemindServiceImpl implements RemindService { } } } + }else{ + logger.error(String.format("调用%s服务,查询网格%s待审核党员数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), partyMemberProcessingCountResult.getCode(), + partyMemberProcessingCountResult.getMsg())); } - logger.error(String.format("调用%s服务,查询网格%s待审核党员数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), partyMemberProcessingCountResult.getCode(), - partyMemberProcessingCountResult.getMsg())); return false; } @@ -155,9 +159,10 @@ public class RemindServiceImpl implements RemindService { } } } + }else{ + logger.error(String.format("调用%s服务,查询网格%s表决中议题总数失败code%s,msg:", ServiceConstant.GOV_ISSUE_SERVER, gridIdList.get(0), issueResult.getCode(), + issueResult.getMsg())); } - logger.error(String.format("调用%s服务,查询网格%s表决中议题总数失败code%s,msg:", ServiceConstant.GOV_ISSUE_SERVER, gridIdList.get(0), issueResult.getCode(), - issueResult.getMsg())); return false; } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridVotingIssueCountResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridVotingIssueCountResultDTO.java index 61a4aecfbc..b48a153421 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridVotingIssueCountResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridVotingIssueCountResultDTO.java @@ -19,6 +19,6 @@ public class GridVotingIssueCountResultDTO implements Serializable { /** * 表决中的议题总数 */ - private Long count; + private Integer count; } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java index 1dacca6b18..7eb3487767 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java @@ -65,11 +65,11 @@ public class GovIssueRedis { * @Description 获取某网格下表决中的议题总数 * @Date 2020/5/14 9:40 **/ - public Long queryVotingIssueCount(String gridId) { - Long auditingGroupCount = 0L; + public Integer queryVotingIssueCount(String gridId) { + Integer auditingGroupCount = 0; try { String workGrassrootsGroupRedDotKey = GovIssueRedisKeys.getWorkGrassrootsIssueRedDotKey(gridId); - auditingGroupCount = (Long) redisUtils.get(workGrassrootsGroupRedDotKey); + auditingGroupCount = (Integer) redisUtils.get(workGrassrootsGroupRedDotKey); } catch (Exception e) { logger.error(String.format("网格id%s,查询网格下表决中议题总数异常%s", gridId, e.getMessage())); e.printStackTrace(); 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 6a0e3e296b..7479376c42 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 @@ -258,9 +258,9 @@ public class IssueServiceImpl extends BaseServiceImpl imp for (String gridId : gridIdList) { GridVotingIssueCountResultDTO gridVotingIssueCountResultDTO = new GridVotingIssueCountResultDTO(); gridVotingIssueCountResultDTO.setGridId(gridId); - Long auditingCount = govIssueRedis.queryVotingIssueCount(gridId); + Integer auditingCount = govIssueRedis.queryVotingIssueCount(gridId); if (null == auditingCount) { - gridVotingIssueCountResultDTO.setCount(0L); + gridVotingIssueCountResultDTO.setCount(0); } else { gridVotingIssueCountResultDTO.setCount(auditingCount); } diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java index cb7c2eceed..b3f6ffc426 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java @@ -35,7 +35,7 @@ public interface ResiPartymemberFeignClient { * @Description 查询网格下待审核的党员数 * @Date 2020/5/13 15:41 **/ - @PostMapping(value = "/resi/partymember/partymemberbaseinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/resi/partymember/partymemberinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE) Result> queryPartyMemberProcessingCount(@RequestBody List gridIdList); } diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java index 3a1ccf8714..3bff98858d 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java @@ -3,6 +3,7 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.GridProcessingCountResultDTO; import com.epmet.feign.GovIssueFeignClient; import org.springframework.stereotype.Component; @@ -16,7 +17,7 @@ import java.util.List; @Component public class GovIssueFeignClientFallBack implements GovIssueFeignClient { @Override - public Result queryVotingIssueCount(List gridIdList) { + public Result> queryVotingIssueCount(List gridIdList) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryVotingIssueCount", gridIdList); } } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupProcessingCountResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupProcessingCountResultDTO.java index 4ef970e52b..4b966dae09 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupProcessingCountResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupProcessingCountResultDTO.java @@ -20,6 +20,6 @@ public class GroupProcessingCountResultDTO implements Serializable { /** * 待审核的小组总数 */ - private Long count; + private Integer count; } diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index f82b9c4302..018fc70677 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -82,6 +82,12 @@ 2.0.0 compile + + com.epmet + gov-issue-client + 2.0.0 + compile + diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java index 15197a9fd3..10b581ca2e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java @@ -195,11 +195,11 @@ public class ResiGroupRedis { * @Description 获取某网格下待审核小组总数 * @Date 2020/5/13 21:40 **/ - public Long getWorkGrassrootsGroupRedDotValue(String gridId) { - Long auditingGroupCount = 0L; + public Integer getWorkGrassrootsGroupRedDotValue(String gridId) { + Integer auditingGroupCount = 0; try { String workGrassrootsGroupRedDotKey = ResiGroupRedisKeys.getWorkGrassrootsGroupRedDotKey(gridId); - auditingGroupCount = (Long) redisUtils.get(workGrassrootsGroupRedDotKey); + auditingGroupCount = (Integer) redisUtils.get(workGrassrootsGroupRedDotKey); } catch (Exception e) { logger.error(String.format("网格id%s,查询网格下待审核小组总数异常%s", gridId, e.getMessage())); e.printStackTrace(); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index b55ed95902..0ff6d6a103 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -790,9 +790,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl Date: Fri, 15 May 2020 15:23:26 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=9C=AC=E6=9C=BAurl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index ee6408e6d3..0f9465f2b4 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -108,6 +108,7 @@ + lb://epmet-auth-server lb://epmet-admin-server @@ -120,6 +121,7 @@ lb://epmet-job-server + lb://epmet-user-server lb://epmet-demo-server @@ -138,11 +140,13 @@ lb://resi-mine-server + lb://resi-group-server lb://resi-partymember-server + lb://gov-grid-server @@ -154,6 +158,7 @@ lb://resi-hall-server + lb://gov-issue-server lb://gov-project-server From 470fabcfc4976964db9b74837bb82af9f99a6163 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Fri, 15 May 2020 15:31:08 +0800 Subject: [PATCH 11/11] =?UTF-8?q?controller=E6=B7=BB=E5=8A=A0=E4=BC=A0?= =?UTF-8?q?=E5=8F=82=E5=88=A4=E6=96=AD=EF=BC=8C=E8=AE=AE=E9=A2=98=E5=A4=84?= =?UTF-8?q?=E7=90=86=E8=BF=9B=E5=B1=95=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IssueController.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java index 47f8c2293e..16749ff7a7 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java @@ -42,6 +42,7 @@ public class IssueController { @PostMapping(value = "/detail") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result detail(@RequestBody IssueDetailFormDTO issueDetail){ + ValidatorUtils.validateEntity(issueDetail); return new Result().ok(issueService.detail(issueDetail)); } @@ -53,6 +54,7 @@ public class IssueController { @PostMapping(value = "votingtrend") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result votingTrend(@RequestBody IssueIdFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); return new Result().ok(issueService.votingTrend(formDTO)); } @@ -64,6 +66,7 @@ public class IssueController { @PostMapping(value = "support") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result support(@LoginUser TokenDto tokenDto, @RequestBody IssueIdFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); issueService.support(tokenDto,formDTO); return new Result(); } @@ -76,6 +79,7 @@ public class IssueController { @PostMapping(value = "oppose") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result oppose(@LoginUser TokenDto tokenDto,@RequestBody IssueIdFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); issueService.oppose(tokenDto,formDTO); return new Result(); } @@ -88,6 +92,7 @@ public class IssueController { @PostMapping(value = "vote") // @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result vote(@LoginUser TokenDto tokenDto,@RequestBody IssueIdFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); return new Result().ok(issueService.vote(tokenDto,formDTO)); } @@ -100,6 +105,7 @@ public class IssueController { @PostMapping("initevaluation") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result initEvaluation(@LoginUser TokenDto tokenDto, @RequestBody IssueIdFormDTO issueId){ + ValidatorUtils.validateEntity(issueId); return new Result().ok(issueService.initEvaluation(tokenDto,issueId)); } @@ -112,6 +118,7 @@ public class IssueController { @PostMapping("projectinitevaluation") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result projectInitEvaluation(@LoginUser TokenDto tokenDto, @RequestBody ProjectIdFormDTO projectId){ + ValidatorUtils.validateEntity(projectId); return new Result().ok(issueService.projectInitEvaluation(tokenDto,projectId)); } @@ -123,6 +130,7 @@ public class IssueController { @PostMapping("evaluate") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result evaluate(@LoginUser TokenDto tokenDto,@RequestBody EvaluateFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); issueService.evaluate(tokenDto,formDTO); return new Result(); } @@ -135,6 +143,7 @@ public class IssueController { @PostMapping("projectevaluate") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result projectEvaluate(@LoginUser TokenDto tokenDto,@RequestBody ProjectEvaluateFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); issueService.projectEvaluate(tokenDto,formDTO); return new Result(); } @@ -147,6 +156,7 @@ public class IssueController { @PostMapping("evaluationlist") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result> evaluationList(@RequestBody EvaluationListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); return new Result>().ok(issueService.evaluationList(formDTO)); } @@ -158,6 +168,7 @@ public class IssueController { @PostMapping("projectevaluationlist") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result> projectEvaluationList(@RequestBody ProjectEvaluationListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); return new Result>().ok(issueService.projectEvaluationList(formDTO)); } @@ -169,6 +180,7 @@ public class IssueController { @PostMapping("shiftproject") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT) public Result> getShiftProjectList(@RequestBody ShiftProjectListFromDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); return new Result>().ok(issueService.getShiftProjectList(formDTO)); } @@ -204,7 +216,9 @@ public class IssueController { * @author zxc */ @PostMapping("processlist") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result> processList(@RequestBody IssueIdFormDTO issueId){ + ValidatorUtils.validateEntity(issueId); return new Result>().ok(issueService.processList(issueId)); }