Browse Source

Merge branch 'dev_thirdplatform' into dev_temp

# Conflicts:
#	epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java
#	epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java
#	epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java
master
wxz 4 years ago
parent
commit
e032a11f75
  1. 6
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java
  2. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  3. 9
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java
  4. 5
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java
  5. 13
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java
  6. 7
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java
  7. 16
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java

6
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 * @dscription
* @date 2020/5/11 15:33 * @date 2020/5/11 15:33
*/ */
@NoArgsConstructor
@Data @Data
public class ProjectDetailResultDTO implements Serializable { public class ProjectDetailResultDTO implements Serializable {
@ -70,6 +69,11 @@ public class ProjectDetailResultDTO implements Serializable {
*/ */
private List<String> platformIds; private List<String> platformIds;
public ProjectDetailResultDTO() {
this.processable = false;
this.isSend = false;
}
@NoArgsConstructor @NoArgsConstructor
@Data @Data
public static class DepartmentNameListBean { public static class DepartmentNameListBean {

4
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<ProjectDao, ProjectEntit
ProjectDetailResultDTO resultDTO = baseDao.selectProjectDetail(fromDTO.getProjectId()); ProjectDetailResultDTO resultDTO = baseDao.selectProjectDetail(fromDTO.getProjectId());
// 查询当前流转到外部系统的ID // 查询当前流转到外部系统的ID
resultDTO.setPlatformIds(projectProcessService.selectPlatFormIds(fromDTO.getProjectId())); resultDTO.setPlatformIds(projectProcessService.selectPlatFormIds(fromDTO.getProjectId()));
resultDTO.setIsSend((StringUtils.isEmpty(parameterValue) || parameterValue.equals(NumConstant.ZERO_STR)) ? false : resultDTO.getProcessable());
if (ProjectConstant.CLOSED.equals(resultDTO.getProjectStatus())) { if (ProjectConstant.CLOSED.equals(resultDTO.getProjectStatus())) {
resultDTO.setProcessable(false); resultDTO.setProcessable(false);
resultDTO.setReturnable(false); resultDTO.setReturnable(false);
@ -314,6 +313,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
if (null != departmentList && departmentList.size() > NumConstant.ZERO) { if (null != departmentList && departmentList.size() > NumConstant.ZERO) {
//TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录, //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录,
// 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true // 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true
if (StringUtils.isNotEmpty(parameterValue)){
if (parameterValue.equals(NumConstant.ONE_STR)) { if (parameterValue.equals(NumConstant.ONE_STR)) {
List<String> projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); List<String> projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList());
// 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录
@ -329,8 +329,10 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
resultDTO.setProcessable(true); resultDTO.setProcessable(true);
resultDTO.setIsSend(false); resultDTO.setIsSend(false);
} }
}
} else { } else {
resultDTO.setProcessable(false); resultDTO.setProcessable(false);
resultDTO.setIsSend(false);
} }
ReturnListFromDTO returnListFromDTO = new ReturnListFromDTO(); ReturnListFromDTO returnListFromDTO = new ReturnListFromDTO();
returnListFromDTO.setProjectId(fromDTO.getProjectId()); returnListFromDTO.setProjectId(fromDTO.getProjectId());

9
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}") @GetMapping("/oper/crm/customer/getallsubcustomerids/{customerId}")
Result<List<String>> getAllSubCustomerIds(@PathVariable("customerId") String customerId); Result<List<String>> getAllSubCustomerIds(@PathVariable("customerId") String customerId);
/**
* @Description 根据客户id列出该客户所有的apiService
* @return
* @author wxz
* @date 2021.03.15 15:13
*/
@PostMapping("list-apiservice-by-customerid")
Result<List<ThirdplatApiserviceResultDTO>> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form);
/** /**
* 获取外部客户的父级 客户id * 获取外部客户的父级 客户id
* *

5
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); return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getAllSubCustomerIds", customerId);
} }
@Override
public Result<List<ThirdplatApiserviceResultDTO>> listApiServiceByCustomerId(ApiServiceFormDTO form) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "listApiServiceByCustomerId", form);
}
@Override @Override
public Result<String> getExternalAndParentCustomerId(String customerId) { public Result<String> getExternalAndParentCustomerId(String customerId) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getExternalAndParentCustomerId", customerId); return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getExternalAndParentCustomerId", customerId);

13
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<>(); return new Result<>();
} }
/**
* @Description 根据客户id列出该客户所有的apiService
* @return
* @author wxz
* @date 2021.03.15 15:13
*/
@PostMapping("list-apiservice-by-customerid")
public Result<List<ThirdplatApiserviceResultDTO>> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form) {
ValidatorUtils.validateEntity(form, ApiServiceFormDTO.GetByCustomerId.class);
String customerId = form.getCustomerId();
return new Result<List<ThirdplatApiserviceResultDTO>>().ok(customerThirdplatApiServiceService.listByCustomerId(customerId));
}
/** /**
* 获取外部客户的父级 客户id * 获取外部客户的父级 客户id
* *

7
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); ThirdplatApiserviceResultDTO getByCustomerId(String customerId);
/**
* 根据客户id列出第三方平台列表
* @param customerId
* @return
*/
List<ThirdplatApiserviceResultDTO> listByCustomerId(String customerId);
} }

16
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 @Autowired
private CustomerThirdplatApiserviceDao thirdplatApiserviceDao; private CustomerThirdplatApiserviceDao thirdplatApiserviceDao;
@Autowired
private RedisTemplate<String, ThirdplatApiserviceResultDTO> tpasRedisTemplate;
@Override @Override
public ThirdplatApiserviceResultDTO getByCustomerId(String customerId) { public ThirdplatApiserviceResultDTO getByCustomerId(String customerId) {
ThirdplatApiserviceResultDTO apiService = null; ThirdplatApiserviceResultDTO apiService = null;
@ -46,16 +42,4 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat
return apiService; return apiService;
} }
@Override
public List<ThirdplatApiserviceResultDTO> listByCustomerId(String customerId) {
List<ThirdplatApiserviceResultDTO> 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;
}
} }

Loading…
Cancel
Save