diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java index 61c23453d9..cd3c278259 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java @@ -11,7 +11,6 @@ import java.util.List; * @dscription * @date 2020/5/11 15:33 */ -@NoArgsConstructor @Data public class ProjectDetailResultDTO implements Serializable { @@ -70,6 +69,11 @@ public class ProjectDetailResultDTO implements Serializable { */ private List platformIds; + public ProjectDetailResultDTO() { + this.processable = false; + this.isSend = false; + } + @NoArgsConstructor @Data public static class DepartmentNameListBean { 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 4a4cda864f..490c94a716 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 @@ -301,7 +301,6 @@ public class ProjectServiceImpl extends BaseServiceImpl NumConstant.ZERO) { //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录, // 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true - if (parameterValue.equals(NumConstant.ONE_STR)) { - List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); - // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 - ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); - if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { - resultDTO.setProcessable(true); - resultDTO.setIsSend(true); + if (StringUtils.isNotEmpty(parameterValue)){ + if (parameterValue.equals(NumConstant.ONE_STR)) { + List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); + // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 + ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); + if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { + resultDTO.setProcessable(true); + resultDTO.setIsSend(true); + } else { + resultDTO.setProcessable(false); + resultDTO.setIsSend(false); + } } else { - resultDTO.setProcessable(false); + resultDTO.setProcessable(true); resultDTO.setIsSend(false); } - } else { - resultDTO.setProcessable(true); - resultDTO.setIsSend(false); } } else { resultDTO.setProcessable(false); + resultDTO.setIsSend(false); } ReturnListFromDTO returnListFromDTO = new ReturnListFromDTO(); returnListFromDTO.setProjectId(fromDTO.getProjectId()); diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java index 57d20b24d7..04508ac6df 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java @@ -123,15 +123,6 @@ public interface OperCrmOpenFeignClient { @GetMapping("/oper/crm/customer/getallsubcustomerids/{customerId}") Result> getAllSubCustomerIds(@PathVariable("customerId") String customerId); - /** - * @Description 根据客户id列出该客户所有的apiService - * @return - * @author wxz - * @date 2021.03.15 15:13 - */ - @PostMapping("list-apiservice-by-customerid") - Result> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form); - /** * 获取外部客户,的父级 客户id * diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java index 8bf558a542..b718517d4b 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java @@ -96,11 +96,6 @@ public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient { return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getAllSubCustomerIds", customerId); } - @Override - public Result> listApiServiceByCustomerId(ApiServiceFormDTO form) { - return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "listApiServiceByCustomerId", form); - } - @Override public Result getExternalAndParentCustomerId(String customerId) { return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getExternalAndParentCustomerId", customerId); diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index dc4b77c7dd..30fe309079 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -377,19 +377,6 @@ public class CustomerController { return new Result<>(); } - /** - * @Description 根据客户id列出该客户所有的apiService - * @return - * @author wxz - * @date 2021.03.15 15:13 - */ - @PostMapping("list-apiservice-by-customerid") - public Result> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form) { - ValidatorUtils.validateEntity(form, ApiServiceFormDTO.GetByCustomerId.class); - String customerId = form.getCustomerId(); - return new Result>().ok(customerThirdplatApiServiceService.listByCustomerId(customerId)); - } - /** * 获取外部客户,的父级 客户id * diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java index eb6adbe6ec..59a9876535 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java @@ -15,11 +15,4 @@ public interface CustomerThirdplatApiServiceService { */ ThirdplatApiserviceResultDTO getByCustomerId(String customerId); - /** - * 根据客户id列出第三方平台列表 - * @param customerId - * @return - */ - List listByCustomerId(String customerId); - } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java index 9613f30f60..f5ff00ca39 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java @@ -25,10 +25,6 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat @Autowired private CustomerThirdplatApiserviceDao thirdplatApiserviceDao; - @Autowired - private RedisTemplate tpasRedisTemplate; - - @Override public ThirdplatApiserviceResultDTO getByCustomerId(String customerId) { ThirdplatApiserviceResultDTO apiService = null; @@ -46,16 +42,4 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat return apiService; } - - @Override - public List listByCustomerId(String customerId) { - List apiServices = tpasRedisTemplate.opsForList().range(RedisKeys.listCustomerApiServiceListKey(customerId), 0, -1); - if (!CollectionUtils.isEmpty(apiServices)) { - return apiServices; - } - - apiServices = thirdplatApiserviceDao.listByCustomerId(customerId); - tpasRedisTemplate.opsForList().rightPushAll(RedisKeys.listCustomerApiServiceListKey(customerId), apiServices); - return apiServices; - } }