From 9f63625c0e03186f6276f07a46ac973205ca4c99 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 19 May 2020 10:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E7=AE=A1=E7=90=86=E3=80=81?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B7=9F=E8=B8=AA-=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/constant/IssueConstant.java | 2 ++ .../java/com/epmet/service/impl/IssueServiceImpl.java | 9 +++++++++ .../java/com/epmet/dto/result/StaffListResultDTO.java | 2 +- .../epmet/service/impl/CustomerAgencyServiceImpl.java | 2 +- .../main/java/com/epmet/constant/ProjectConstant.java | 4 ++++ .../epmet/service/impl/ProjectProcessServiceImpl.java | 9 ++++++--- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 6 +++--- 7 files changed, 26 insertions(+), 8 deletions(-) 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 d2f4938490..b3b9381487 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 @@ -57,4 +57,6 @@ public interface IssueConstant { String SELECT_GOV_ORG_EXCEPTION = "获取议题所属组织、网格信息失败"; String OPERATION_EXCEPTION = "议题已关闭,不能再次关闭"; String GOV_PRJECT_EXCEPTION = "议题转项目,获取项目数据失败"; + String ISSUE_VOTING_EXCEPTION = "非表决中议题,不允许转成项目"; + String ISSUE_SHIFT_PROJECT_EXCEPTION = "议题已转项目,不允许再次操作"; } 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 822055a280..7eac6655c3 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 @@ -469,6 +469,15 @@ public class IssueServiceImpl extends BaseServiceImpl imp //因需要保证议题表中的转项目时间与创建项目时间一致 因此先新增项目数据再更新议题数据 //1:查询议题数据 IssueEntity entity = baseDao.selectById(formDTO.getIssueId()); + if (null == entity) { + throw new RenException(IssueConstant.SELECT_EXCEPTION); + } + if (IssueConstant.ISSUE_SHIFT_PROJECT.equals(entity.getIssueStatus())) { + throw new RenException(IssueConstant.ISSUE_SHIFT_PROJECT_EXCEPTION); + } + if (!IssueConstant.ISSUE_VOTING.equals(entity.getIssueStatus())) { + throw new RenException(IssueConstant.ISSUE_VOTING_EXCEPTION); + } formDTO.setIssueDTO(ConvertUtils.sourceToTarget(entity, IssueDTO.class)); //2:调用gov-project服务,新增项目各业务表初始数据 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffListResultDTO.java index ef496b28e5..fe4d260c8f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffListResultDTO.java @@ -27,7 +27,7 @@ public class StaffListResultDTO implements Serializable { /** * 性别 */ - private String gender; + private String gender="0"; /** * 角色名称(机关领导、部门领导、网格长) */ 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 b333f09cd3..142a3d05aa 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 @@ -247,7 +247,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl staffIdList3 = gridStaffs.stream().map(CustomerStaffGridDTO::getUserId).collect(Collectors.toList()); List staffIdList = new ArrayList<>(); staffIdList.addAll(staffIdList1); staffIdList.addAll(staffIdList2); staffIdList.addAll(staffIdList3); - staffIdList = new ArrayList(new LinkedHashSet<>(staffIdList)); + staffIdList = new ArrayList(new LinkedHashSet<>(staffIdList));staffIdList.removeAll(Collections.singleton("")); Result userList = epmetUserFeignClient.getCustomerStaffList(staffIdList); if(!userList.success()||null==userList.getData()){ throw new RenException(CustomerAgencyConstant.SELECT_USER_EXCEPTION); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java index c2919ffbfd..ecd82ff5d3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -89,4 +89,8 @@ public interface ProjectConstant { * 调用gov-org服务查询数据失败 */ String SELECT_GOV_ORG_EXCEPTION = "获取组织、部门、网格信息失败"; + /** + * 调用gov-org服务查询数据失败 + */ + String UNHANDLED_EXCEPTION = "已转过其他部门,不能再次操作"; } 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 b7ab25727b..9afab22488 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 @@ -178,6 +178,9 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList()); - agencyIdList = new ArrayList(new LinkedHashSet<>(agencyIdList)); + agencyIdList = new ArrayList(new LinkedHashSet<>(agencyIdList));agencyIdList.removeAll(Collections.singleton("")); List deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList()); - deptIdList = new ArrayList(new LinkedHashSet<>(deptIdList)); + deptIdList = new ArrayList(new LinkedHashSet<>(deptIdList));deptIdList.removeAll(Collections.singleton("")); List gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList()); - gridIdList = new ArrayList(new LinkedHashSet<>(gridIdList)); + gridIdList = new ArrayList(new LinkedHashSet<>(gridIdList));gridIdList.removeAll(Collections.singleton("")); AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO(); agencyDeptGridFormDTO.setAgencyIdList(agencyIdList); agencyDeptGridFormDTO.setDeptIdList(deptIdList); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 6aa25ec3b8..11089feddb 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -422,12 +422,12 @@ public class ProjectServiceImpl extends BaseServiceImpl agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList()); agencyIdList.add(issueDTO.getOrgId()); - agencyIdList = new ArrayList(new LinkedHashSet<>(agencyIdList)); + agencyIdList = new ArrayList(new LinkedHashSet<>(agencyIdList));agencyIdList.removeAll(Collections.singleton("")); List deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList()); - deptIdList = new ArrayList(new LinkedHashSet<>(deptIdList)); + deptIdList = new ArrayList(new LinkedHashSet<>(deptIdList));deptIdList.removeAll(Collections.singleton("")); List gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList()); gridIdList.add(issueDTO.getGridId()); - gridIdList = new ArrayList(new LinkedHashSet<>(gridIdList)); + gridIdList = new ArrayList(new LinkedHashSet<>(gridIdList));gridIdList.removeAll(Collections.singleton("")); AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO(); agencyDeptGridFormDTO.setAgencyIdList(agencyIdList); agencyDeptGridFormDTO.setDeptIdList(deptIdList);