Browse Source

Merge branch 'dev_issue_project' into dev

dev_shibei_match
sunyuchao 5 years ago
parent
commit
aead4e4c1b
  1. 5
      epmet-gateway/pom.xml
  2. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java
  3. 11
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  4. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffListResultDTO.java
  5. 66
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  6. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java
  7. 9
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  8. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  9. 2
      epmet-module/gov-project/gov-project-server/src/main/resources/db.migration/epmet_gov_project.sql
  10. 4
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
  11. 2
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java

5
epmet-gateway/pom.xml

@ -140,7 +140,7 @@
<!-- <gateway.routes.resi-mine-server.uri>http://localhost:8094</gateway.routes.resi-mine-server.uri>-->
<gateway.routes.resi-mine-server.uri>lb://resi-mine-server</gateway.routes.resi-mine-server.uri>
<!-- 16、居民端楼院校组 -->
<!--<gateway.routes.resi-group-server.uri>http://localhost:8095</gateway.routes.resi-group-server.uri>-->
<!-- <gateway.routes.resi-group-server.uri>http://localhost:8095</gateway.routes.resi-group-server.uri>-->
<gateway.routes.resi-group-server.uri>lb://resi-group-server</gateway.routes.resi-group-server.uri>
<!-- 17、党员认证、热心居民申请 -->
<!-- <gateway.routes.resi-partymember-server.uri>http://localhost:8096</gateway.routes.resi-partymember-server.uri>-->
@ -158,9 +158,10 @@
<!-- 21、居民端党群e事 -->
<gateway.routes.resi-hall-server.uri>lb://resi-hall-server</gateway.routes.resi-hall-server.uri>
<!-- 22、政府工作端议题管理 -->
<!--<gateway.routes.gov-issue-server.uri>http://localhost:8101</gateway.routes.gov-issue-server.uri>-->
<!-- <gateway.routes.gov-issue-server.uri>http://localhost:8101</gateway.routes.gov-issue-server.uri>-->
<gateway.routes.gov-issue-server.uri>lb://gov-issue-server</gateway.routes.gov-issue-server.uri>
<!-- 23、政府工作端项目管理 -->
<!-- <gateway.routes.gov-project-server.uri>http://localhost:8102</gateway.routes.gov-project-server.uri>-->
<gateway.routes.gov-project-server.uri>lb://gov-project-server</gateway.routes.gov-project-server.uri>
<!-- 24、公共服务 -->
<gateway.routes.common-service-server.uri>lb://common-service-server</gateway.routes.common-service-server.uri>

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

11
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -195,7 +195,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
shiftProject.setIssueTitle(issue.getIssueTitle());
shiftProject.setDepartmentNameList(project.getDepartmentNameList());
shiftProject.setPublicReply(project.getPublicReply());
shiftProject.setShiftedTime(project.getCreatedTime().getTime());
shiftProject.setShiftedTime(project.getCreatedTime().getTime()/NumConstant.ONE_THOUSAND);
shiftProject.setProjectStatus(project.getStatus());
return shiftProject;
})).collect(Collectors.toList());
@ -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";
/**
* 角色名称(机关领导部门领导网格长)
*/

66
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -198,48 +198,56 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
//2.1:查询组织下部门列表
List<DepartmentListResultDTO> listDept = customerDepartmentDao.selectDepartmentList(canTick.getAgencyId());
List<DeptListResultDTO> departmentList = ConvertUtils.sourceToTarget(listDept, DeptListResultDTO.class);
//2.2:查询每一个部门下人员列表
List<String> deptIdList = departmentList.stream().map(DeptListResultDTO::getDepartmentId).collect(Collectors.toList());
List<CustomerStaffDepartmentDTO> deptStaffs = customerStaffDepartmentDao.selectDeptStaffs(deptIdList);
departmentList.forEach(dept->{
List<StaffListResultDTO> departmentStaffList = new ArrayList<>();
deptStaffs.forEach(ds->{
if (dept.getDepartmentId().equals(ds.getDepartmentId())) {
if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !dept.getDepartmentId().equals(canTick.getDeptOrGridId())) {
StaffListResultDTO sf = new StaffListResultDTO();
sf.setStaffId(ds.getUserId());
departmentStaffList.add(sf);
List<CustomerStaffDepartmentDTO> deptStaffs = new ArrayList<>();
if (null != departmentList && departmentList.size() > NumConstant.ZERO) {
//2.2:查询每一个部门下人员列表
List<String> deptIdList = departmentList.stream().map(DeptListResultDTO::getDepartmentId).collect(Collectors.toList());
deptStaffs = customerStaffDepartmentDao.selectDeptStaffs(deptIdList);
List<CustomerStaffDepartmentDTO> finalDeptStaffs = deptStaffs;
departmentList.forEach(dept->{
List<StaffListResultDTO> departmentStaffList = new ArrayList<>();
finalDeptStaffs.forEach(ds->{
if (dept.getDepartmentId().equals(ds.getDepartmentId())) {
if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !dept.getDepartmentId().equals(canTick.getDeptOrGridId())) {
StaffListResultDTO sf = new StaffListResultDTO();
sf.setStaffId(ds.getUserId());
departmentStaffList.add(sf);
}
}
}
});
dept.setDepartmentStaffList(departmentStaffList);
});
dept.setDepartmentStaffList(departmentStaffList);
});
}
//3:根据组织Id查询该组织下网格、人员列表
//3.1:查询组织下网格列表
List<GridListResultDTO> gridList = customerGridDao.selectGridList(canTick.getAgencyId());
//3.2:查询每一个网格下人员列表
List<String> gridIdList = gridList.stream().map(GridListResultDTO::getGridId).collect(Collectors.toList());
List<CustomerStaffGridDTO> gridStaffs = customerStaffGridDao.selectGridStaffs(gridIdList);
gridList.forEach(grid->{
List<StaffListResultDTO> gridStaffList = new ArrayList<>();
gridStaffs.forEach(gs->{
if(grid.getGridId().equals(gs.getGridId())){
if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !grid.getGridId().equals(canTick.getDeptOrGridId())) {
StaffListResultDTO sf = new StaffListResultDTO();
sf.setStaffId(gs.getUserId());
gridStaffList.add(sf);
List<CustomerStaffGridDTO> gridStaffs = new ArrayList<>();
if (null != gridList && gridList.size() > NumConstant.ZERO) {
//3.2:查询每一个网格下人员列表
List<String> gridIdList = gridList.stream().map(GridListResultDTO::getGridId).collect(Collectors.toList());
gridStaffs = customerStaffGridDao.selectGridStaffs(gridIdList);
List<CustomerStaffGridDTO> finalGridStaffs = gridStaffs;
gridList.forEach(grid->{
List<StaffListResultDTO> gridStaffList = new ArrayList<>();
finalGridStaffs.forEach(gs->{
if(grid.getGridId().equals(gs.getGridId())){
if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !grid.getGridId().equals(canTick.getDeptOrGridId())) {
StaffListResultDTO sf = new StaffListResultDTO();
sf.setStaffId(gs.getUserId());
gridStaffList.add(sf);
}
}
}
});
grid.setGridStaffList(gridStaffList);
});
grid.setGridStaffList(gridStaffList);
});
}
//4:汇总组织下人员、组织下部门下人员、组织下网格下人员Id集合,调用epmet-user服务查询工作人员基本信息
List<String> staffIdList1 = agencyStaffList.stream().map(StaffListResultDTO::getStaffId).collect(Collectors.toList());
List<String> staffIdList2 = deptStaffs.stream().map(CustomerStaffDepartmentDTO::getUserId).collect(Collectors.toList());
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);

12
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -146,7 +146,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
PendProjectListResultDTO pend = new PendProjectListResultDTO();
pend.setProjectId(p.getId());
pend.setProjectTitle(p.getTitle());
pend.setProjectTime(p.getCreatedTime().getTime());
pend.setProjectTime(p.getCreatedTime().getTime()/NumConstant.ONE_THOUSAND);
String detentionDays = getDetentionDays(p);
if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > finalDays) {
pend.setWarningFlag(true);
@ -178,7 +178,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
created.setProjectTitle(p.getTitle());
created.setProjectStatus(p.getStatus());
created.setPublicReply(p.getPublicReply());
created.setProjectTime(p.getCreatedTime().getTime());
created.setProjectTime(p.getCreatedTime().getTime()/NumConstant.ONE_THOUSAND);
//获取当前处理部门
@ -221,7 +221,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
involved.setProjectTitle(p.getTitle());
involved.setProjectStatus(p.getStatus());
involved.setPublicReply(p.getPublicReply());
involved.setProjectTime(p.getCreatedTime().getTime());
involved.setProjectTime(p.getCreatedTime().getTime()/NumConstant.ONE_THOUSAND);
//获取当前处理部门
@ -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);

2
epmet-module/gov-project/gov-project-server/src/main/resources/db.migration/epmet_gov_project.sql

@ -150,3 +150,5 @@ alter table project_staff add column DEPARTMENT_NAME varchar(200) NOT NULL COMME
alter table project_process add column DEPARTMENT_NAME varchar(200) NOT NULL COMMENT '处理部门' after PROJECT_ID;
alter table project add column CUSTOMER_ID varchar(64) NOT NULL COMMENT '客户ID' after ID;
ALTER TABLE project_staff MODIFY COLUMN ORG_ID_PATH varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '所属机关(11:22:33)';

4
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml

@ -425,10 +425,10 @@
resi_topic_attachment attachment
ON
topic.ID = attachment.TOPIC_ID
WHERE
topic.DEL_FLAG = '0'
AND
attachment.DEL_FLAG = '0'
WHERE
topic.DEL_FLAG = '0'
AND
topic.ID = #{topicId}
ORDER BY

2
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java

@ -173,7 +173,7 @@ public class IssueController {
}
/**
* @Description 满意度评价列表已转项目
* @Description 已转项目列表
* @param formDTO
* @author zxc
*/

Loading…
Cancel
Save