Browse Source

议题管理、项目跟踪-程序优化

master
sunyuchao 5 years ago
parent
commit
9f63625c0e
  1. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java
  2. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  3. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffListResultDTO.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  5. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java
  6. 9
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  7. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

2
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 = "议题已转项目,不允许再次操作";
}

9
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<IssueDao, IssueEntity> 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服务,新增项目各业务表初始数据

2
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";
/**
* 角色名称(机关领导部门领导网格长)
*/

2
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<CustomerAgencyDao
List<String> staffIdList3 = gridStaffs.stream().map(CustomerStaffGridDTO::getUserId).collect(Collectors.toList());
List<String> staffIdList = new ArrayList<>();
staffIdList.addAll(staffIdList1); staffIdList.addAll(staffIdList2); staffIdList.addAll(staffIdList3);
staffIdList = new ArrayList<String>(new LinkedHashSet<>(staffIdList));
staffIdList = new ArrayList<String>(new LinkedHashSet<>(staffIdList));staffIdList.removeAll(Collections.singleton(""));
Result<CustomerStaffListResultDTO> userList = epmetUserFeignClient.getCustomerStaffList(staffIdList);
if(!userList.success()||null==userList.getData()){
throw new RenException(CustomerAgencyConstant.SELECT_USER_EXCEPTION);

4
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 = "已转过其他部门,不能再次操作";
}

9
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<ProjectProcessDao
if (null == staffEntity) {
throw new RenException(ProjectConstant.SELECT_PROJECTSTAFF_EXCEPTION);
}
if (!ProjectConstant.UNHANDLED.equals(staffEntity.getIsHandle())) {
throw new RenException(ProjectConstant.UNHANDLED_EXCEPTION);
}
staffEntity.setIsHandle(ProjectConstant.HANDLE);
if (projectStaffDao.updateById(staffEntity) < NumConstant.ONE) {
throw new RenException(ProjectConstant.UPDATE_PROJECTSTAFF_EXCEPTION);
@ -196,11 +199,11 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
}
//3.1:调用gov-org服务,获取所有勾选人员对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值
List<String> agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList());
agencyIdList = new ArrayList<String>(new LinkedHashSet<>(agencyIdList));
agencyIdList = new ArrayList<String>(new LinkedHashSet<>(agencyIdList));agencyIdList.removeAll(Collections.singleton(""));
List<String> deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList());
deptIdList = new ArrayList<String>(new LinkedHashSet<>(deptIdList));
deptIdList = new ArrayList<String>(new LinkedHashSet<>(deptIdList));deptIdList.removeAll(Collections.singleton(""));
List<String> gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList());
gridIdList = new ArrayList<String>(new LinkedHashSet<>(gridIdList));
gridIdList = new ArrayList<String>(new LinkedHashSet<>(gridIdList));gridIdList.removeAll(Collections.singleton(""));
AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO();
agencyDeptGridFormDTO.setAgencyIdList(agencyIdList);
agencyDeptGridFormDTO.setDeptIdList(deptIdList);

6
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<ProjectDao, ProjectEntit
//1:调用gov-org服务,获取所有勾选人员以及议题数据对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值使用
List<String> agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList());
agencyIdList.add(issueDTO.getOrgId());
agencyIdList = new ArrayList<String>(new LinkedHashSet<>(agencyIdList));
agencyIdList = new ArrayList<String>(new LinkedHashSet<>(agencyIdList));agencyIdList.removeAll(Collections.singleton(""));
List<String> deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList());
deptIdList = new ArrayList<String>(new LinkedHashSet<>(deptIdList));
deptIdList = new ArrayList<String>(new LinkedHashSet<>(deptIdList));deptIdList.removeAll(Collections.singleton(""));
List<String> gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList());
gridIdList.add(issueDTO.getGridId());
gridIdList = new ArrayList<String>(new LinkedHashSet<>(gridIdList));
gridIdList = new ArrayList<String>(new LinkedHashSet<>(gridIdList));gridIdList.removeAll(Collections.singleton(""));
AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO();
agencyDeptGridFormDTO.setAgencyIdList(agencyIdList);
agencyDeptGridFormDTO.setDeptIdList(deptIdList);

Loading…
Cancel
Save