Browse Source

议题管理、项目跟踪-人员选择

dev_shibei_match
sunyuchao 5 years ago
parent
commit
9b42a90264
  1. 20
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessorListFormDTO.java
  2. 0
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/.gitkeep
  3. 18
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java
  4. 10
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
  5. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java
  6. 0
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/.gitkeep
  7. 18
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  8. 0
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/.gitkeep
  9. 18
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  10. 43
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyResultDTO.java
  11. 52
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencySubResultDTO.java
  12. 48
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ProcessorListResultDTO.java
  13. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  14. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  15. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  16. 62
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  17. 17
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  18. 20
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessorListFormDTO.java
  19. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java
  20. 13
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
  21. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
  22. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java
  23. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java
  24. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  25. 19
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java

20
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessorListFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 议题人员选择(查询当前组织的上两级组织当前组织和所有下级组织)--接口入参
* @Author sun
*/
@Data
public class ProcessorListFormDTO implements Serializable {
private static final long serialVersionUID = 4859779755214502427L;
@NotBlank(message = "议题Id不能为空")
private String issueId;
}

0
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/.gitkeep

18
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java

@ -10,10 +10,7 @@ import com.epmet.dto.form.CloseIssueFormDTO;
import com.epmet.dto.form.DepartmentStaffListFormDTO;
import com.epmet.dto.form.ShiftProjectListFromDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.ShiftProjectListResultDTO;
import com.epmet.dto.result.EvaluationListResultDTO;
import com.epmet.dto.result.VotingTrendResultDTO;
import com.epmet.dto.result.*;
import com.epmet.service.IssueService;
import com.epmet.service.IssueVoteStatisticalService;
import org.springframework.beans.factory.annotation.Autowired;
@ -99,5 +96,18 @@ public class IssueManageController {
public Result<List<EvaluationListResultDTO>> evaluationList(@RequestBody EvaluationListFormDTO formDTO){
return new Result<List<EvaluationListResultDTO>>().ok(issueVoteStatisticalService.evaluationList(formDTO));
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题管理-议题人员选择
**/
@PostMapping("processorlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT)
public Result<ProcessorListResultDTO> processorList(@LoginUser TokenDto tokenDTO, @RequestBody ProcessorListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<ProcessorListResultDTO>().ok(issueService.processorList(formDTO));
}
}

10
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java

@ -6,6 +6,7 @@ import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.ProcessorListResultDTO;
import com.epmet.feign.fallback.GovOrgFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
@ -35,4 +36,13 @@ public interface GovOrgFeignClient {
**/
@PostMapping(value = "/gov/org/customeragency/departmentstafflist/{agencyId}")
Result<DepartmentStaffListResultDTO> departmentStaffList(@PathVariable("agencyId") String agencyId);
/**
* @param agencyId
* @return
* @Author sun
* @Description 根据当前组织ID查询上两级组织当前组织和所有下级(迭代)组织
**/
@PostMapping(value = "/gov/org/customeragency/getprocessorlist/{agencyId}")
Result<ProcessorListResultDTO> getProcessorList(@PathVariable("agencyId") String agencyId);
}

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.ProcessorListResultDTO;
import com.epmet.feign.GovOrgFeignClient;
import org.springframework.stereotype.Component;
@ -24,4 +25,9 @@ public class GovOrgFeignClientFallBack implements GovOrgFeignClient {
public Result<DepartmentStaffListResultDTO> departmentStaffList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "departmentStaffList", agencyId);
}
@Override
public Result<ProcessorListResultDTO> getProcessorList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getProcessorList", agencyId);
}
}

0
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/.gitkeep

18
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java

@ -1,14 +1,8 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.form.CloseIssueFormDTO;
import com.epmet.dto.form.DepartmentStaffListFormDTO;
import com.epmet.dto.form.IssueDetailFormDTO;
import com.epmet.dto.form.ShiftProjectListFromDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.GridVotingIssueCountResultDTO;
import com.epmet.dto.result.IssueResultDTO;
import com.epmet.dto.result.ShiftProjectListResultDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.IssueEntity;
import java.util.List;
@ -59,4 +53,12 @@ public interface IssueService extends BaseService<IssueEntity> {
* @Date 2020/5/13 22:53
**/
List<GridVotingIssueCountResultDTO> queryVotingIssueCount(List<String> gridIdList);
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题管理-议题人员选择
**/
ProcessorListResultDTO processorList(ProcessorListFormDTO formDTO);
}

0
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/.gitkeep

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

@ -196,4 +196,22 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
})).collect(Collectors.toList());
return resultList;
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题管理-议题人员选择
**/
@Override
public ProcessorListResultDTO processorList(ProcessorListFormDTO formDTO) {
//1:查询当前议题工作人员所属组织Id
IssueEntity entity = baseDao.selectById(formDTO.getIssueId());
if (null == entity) {
throw new RenException(IssueConstant.SELECT_EXCEPTION);
}
//2:调用gov-org服务,查询组织树
Result<ProcessorListResultDTO> resultDTOResult = govOrgFeignClient.getProcessorList(entity.getOrgId());
return resultDTOResult.getData();
}
}

43
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyResultDTO.java

@ -0,0 +1,43 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 组织信息
*
* @author sun
*/
@Data
public class AgencyResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 机关组织Id
*/
private String agencyId = "";
/**
* 机关组织名称
*/
private String agencyName = "";
}

52
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencySubResultDTO.java

@ -0,0 +1,52 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 下级组织信息(迭代对象)
*
* @author sun
*/
@Data
public class AgencySubResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 机关组织Id
*/
private String agencyId = "";
/**
* 机关组织名称
*/
private String agencyName = "";
/**
* 下级组织信息
*/
private List<AgencySubResultDTO> subAgencyList;
/**
* 当前组织的所有上级组织Id
*/
private String pids = "";
}

48
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ProcessorListResultDTO.java

@ -0,0 +1,48 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 项目人员选择(查询当前组织的上两级组织和所有下级组织)--接口返参
*
* @author sun
*/
@Data
public class ProcessorListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当前组织的上两级组织信息
*/
private List<AgencyResultDTO> parentAgencyList;
/**
* 当前组织信息
*/
private AgencyResultDTO agencyList;
/**
* 下级组织信息(迭代)
*/
private List<AgencySubResultDTO> subAgencyList;
}

18
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -17,7 +17,9 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -28,10 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.AgencyDeptGridFormDTO;
import com.epmet.dto.form.StaffOrgFormDTO;
import com.epmet.dto.result.AgencyDeptGridResultDTO;
import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.dto.result.*;
import com.epmet.excel.CustomerAgencyExcel;
import com.epmet.service.CustomerAgencyService;
import org.springframework.beans.factory.annotation.Autowired;
@ -142,4 +141,15 @@ public class CustomerAgencyController {
return new Result<AgencyDeptGridResultDTO>().ok(customerAgencyService.getAgencyDeptGridList(formDTO));
}
/**
* @param agencyId
* @return
* @Author sun
* @Description 根据当前组织ID查询上两级组织本级组织和所有下级(迭代)组织
**/
@PostMapping("getprocessorlist/{agencyId}")
public Result<ProcessorListResultDTO> getProcessorList(@PathVariable("agencyId") String agencyId) {
return new Result<ProcessorListResultDTO>().ok(customerAgencyService.getProcessorList(agencyId));
}
}

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -19,10 +19,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.result.AgencyListResultDTO;
import com.epmet.dto.result.ParentListResultDTO;
import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.dto.result.SubListResultDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -95,4 +92,12 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @Description 批量查询组织信息
**/
List<CustomerAgencyDTO> selectAgencyListByIds(@Param("agencyIdList") List<String> agencyIdList);
/**
* @param subAgencyPids
* @return
* @Author sun
* @Description 查询当前组织的下一级组织列表
**/
List<AgencySubResultDTO> selectSubAgencyList(@Param("subAgencyPids") String subAgencyPids);
}

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -23,10 +23,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.AgencyDeptGridFormDTO;
import com.epmet.dto.form.StaffOrgFormDTO;
import com.epmet.dto.result.AgencyDeptGridResultDTO;
import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
import java.util.List;
@ -132,4 +129,12 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
* @Description 根据组织Id集合部门Id集合网格Id集合查询各自对应详细信息
**/
AgencyDeptGridResultDTO getAgencyDeptGridList(AgencyDeptGridFormDTO formDTO);
/**
* @param agencyId
* @return
* @Author sun
* @Description 根据当前组织ID查询上两级组织本级组织和所有下级(迭代)组织
**/
ProcessorListResultDTO getProcessorList(String agencyId);
}

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

@ -21,6 +21,7 @@ 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.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;
@ -320,4 +321,65 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
return agencyDeptGrid;
}
/**
* @param agencyId
* @return
* @Author sun
* @Description 根据当前组织ID查询上两级组织本级组织和所有下级(迭代)组织
**/
@Override
public ProcessorListResultDTO getProcessorList(String agencyId) {
ProcessorListResultDTO processorList = new ProcessorListResultDTO();
List<AgencyResultDTO> parentAgencyList = new ArrayList<>();
//1:查询当前组织信息
CustomerAgencyEntity entity = baseDao.selectById(agencyId);
AgencyResultDTO agencyList = new AgencyResultDTO();
agencyList.setAgencyId(entity.getId());
agencyList.setAgencyName(entity.getOrganizationName());
processorList.setAgencyList(agencyList);
//2:查询当前组织的上两级组织,按层级排序
String pids = entity.getPids();
String[] args = pids.split(":");
List<String> agencyIdList = new ArrayList<>();
if (args.length < NumConstant.ONE) {
processorList.setParentAgencyList(parentAgencyList);
} else {
if (args.length > NumConstant.ONE) {
agencyIdList.add(args[args.length - NumConstant.TWO]);
}
if (args.length > NumConstant.ZERO) {
agencyIdList.add(args[args.length - NumConstant.ONE]);
}
List<CustomerAgencyDTO> parentList = baseDao.selectAgencyListByIds(agencyIdList);
parentList.forEach(parent->{
AgencyResultDTO agency = new AgencyResultDTO();
agency.setAgencyId(parent.getId());
agency.setAgencyName(parent.getOrganizationName());
parentAgencyList.add(agency);
});
processorList.setParentAgencyList(parentAgencyList);
}
//3:迭代查询当前组织的所有下级组织列表
List<AgencySubResultDTO> subAgencyList = getDepartmentList(entity.getPids() + ":" + entity.getId());
processorList.setSubAgencyList(subAgencyList);
return processorList;
}
/**
* @param subAgencyPids 当前组织的下一级组织的pids字段值(当前组织的pids+":"+当前组织Id)
* @return
* @Author 迭代查询当前组织的所有下级组织树结构数据
*/
private List<AgencySubResultDTO> getDepartmentList(String subAgencyPids) {
List<AgencySubResultDTO> subAgencyList = baseDao.selectSubAgencyList(subAgencyPids);
if (subAgencyList.size() > NumConstant.ZERO) {
for (AgencySubResultDTO sub : subAgencyList) {
List<AgencySubResultDTO> subAgency = getDepartmentList(sub.getPids() + ":" + sub.getAgencyId());
sub.setSubAgencyList(subAgency);
}
}
return subAgencyList;
}
}

17
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -118,5 +118,22 @@
<foreach item="agencyId" collection="agencyIdList" open="(" separator="or" close=")" index="">
ca.id = #{agencyId}
</foreach>
ORDER BY field(
ca.id,
<foreach item="agencyId" collection="agencyIdList" separator=",">
#{agencyId}
</foreach>
</select>
<select id="selectSubAgencyList" resultType="com.epmet.dto.result.AgencySubResultDTO">
SELECT
id AS "agencyId",
organization_name AS "agencyName",
pids AS "pids"
FROM customer_agency
WHERE del_flag = '0'
AND pids = #{subAgencyPids}
ORDER BY created_time DESC
</select>
</mapper>

20
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessorListFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 项目人员选择(查询当前组织的上两级组织当前组织和所有下级组织)--接口入参
* @Author sun
*/
@Data
public class ProcessorListFormDTO implements Serializable {
private static final long serialVersionUID = 4859779755214502427L;
@NotBlank(message = "项目人员关联Id不能为空")
private String projectStaffId;
}

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java

@ -84,5 +84,5 @@ public interface ProjectConstant {
/**
* 更新项目人员关联表数据失败
*/
String DATe_EXCEPTION = "未勾选流转人员";
String DATE_EXCEPTION = "未勾选流转人员";
}

13
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java

@ -219,5 +219,18 @@ public class ProjectTraceController {
public Result<List<DepartmentResultDTO>> myDepartmentList(@LoginUser TokenDto tokenDto, @RequestBody ProjectDetailFromDTO fromDTO) {
return new Result<List<DepartmentResultDTO>>().ok(projectTraceService.myDepartmentList(tokenDto, fromDTO));
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 项目跟踪-项目人员选择
**/
@PostMapping("processorlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_TRANSFER)
public Result<ProcessorListResultDTO> processorList(@LoginUser TokenDto tokenDTO, @RequestBody ProcessorListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<ProcessorListResultDTO>().ok(projectTraceService.processorList(formDTO));
}
}

10
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java

@ -8,6 +8,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.AgencyDeptGridFormDTO;
import com.epmet.dto.result.AgencyDeptGridResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.ProcessorListResultDTO;
import com.epmet.feign.fallback.GovOrgFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
@ -46,4 +47,13 @@ public interface GovOrgFeignClient {
@PostMapping(value = "/gov/org/customeragency/getagencydeptgridlist")
Result<AgencyDeptGridResultDTO> getAgencyDeptGridList(AgencyDeptGridFormDTO formDTO);
/**
* @param agencyId
* @return
* @Author sun
* @Description 根据当前组织ID查询上两级组织当前组织和所有下级(迭代)组织
**/
@PostMapping(value = "/gov/org/customeragency/getprocessorlist/{agencyId}")
Result<ProcessorListResultDTO> getProcessorList(@PathVariable("agencyId") String agencyId);
}

6
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java

@ -10,6 +10,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.AgencyDeptGridFormDTO;
import com.epmet.dto.result.AgencyDeptGridResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.ProcessorListResultDTO;
import com.epmet.feign.GovOrgFeignClient;
import org.springframework.stereotype.Component;
@ -33,4 +34,9 @@ public class GovOrgFeignClientFallBack implements GovOrgFeignClient {
public Result<AgencyDeptGridResultDTO> getAgencyDeptGridList(AgencyDeptGridFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyDeptGridList", formDTO);
}
@Override
public Result<ProcessorListResultDTO> getProcessorList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getProcessorList", agencyId);
}
}

8
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java

@ -99,4 +99,12 @@ public interface ProjectTraceService {
* @date 2020/5/14 14:24
*/
List<DepartmentResultDTO> myDepartmentList(TokenDto tokenDto, ProjectDetailFromDTO fromDTO);
/**
* @param formDTO
* @return
* @Author sun
* @Description 项目跟踪-项目人员选择
**/
ProcessorListResultDTO processorList(ProcessorListFormDTO formDTO);
}

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -196,7 +196,7 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
//3:项目人员关联表新增部门流转数据
List<TickStaffFormDTO> staffList = formDTO.getStaffList();
if (null == staffList || staffList.size() < NumConstant.ONE) {
throw new RenException(ProjectConstant.DATe_EXCEPTION);
throw new RenException(ProjectConstant.DATE_EXCEPTION);
}
//3.1:调用gov-org服务,获取所有勾选人员对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值
List<String> agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList());

19
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java

@ -1,9 +1,14 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.ProjectConstant;
import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.service.ProjectProcessService;
import com.epmet.service.ProjectService;
import com.epmet.service.ProjectStaffService;
@ -26,6 +31,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceService {
private ProjectProcessService projectProcessService;
@Autowired
private ProjectStaffService projectStaffService;
@Autowired
private GovOrgFeignClient govOrgFeignClient;
@Override
public List<PendProjectListResultDTO> getPendProjectList(TokenDto tokenDto, ProjectListFromDTO fromDTO) {
@ -76,4 +83,16 @@ public class ProjectTraceServiceImpl implements ProjectTraceService {
projectStaffDTO.setStaffId(fromDTO.getUserId());
return projectStaffService.getDepartmentNameList(projectStaffDTO);
}
@Override
public ProcessorListResultDTO processorList(ProcessorListFormDTO formDTO) {
//1:查询当前工作人员所属组织Id
ProjectStaffEntity staffEntity = projectStaffService.selectById(formDTO.getProjectStaffId());
if (null == staffEntity) {
throw new RenException(ProjectConstant.SELECT_PROJECTSTAFF_EXCEPTION);
}
//2:调用gov-org服务,查询组织树
Result<ProcessorListResultDTO> resultDTOResult = govOrgFeignClient.getProcessorList(staffEntity.getOrgId());
return resultDTOResult.getData();
}
}

Loading…
Cancel
Save