Browse Source

提交建议bug修复

master
liushaowen 5 years ago
parent
commit
1bce7e8d49
  1. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java
  2. 11
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  3. 6
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  4. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  5. 28
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java

@ -113,4 +113,14 @@ public class CustomerGridDTO implements Serializable {
* 所有上级组织ID * 所有上级组织ID
*/ */
private String pids; private String pids;
/**
* 所属组织机构名
*/
private String agencyName;
/**
* 所有上级组织名
*/
private String allParentName;
} }

11
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -3,6 +3,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerPartyBranchDTO; import com.epmet.dto.CustomerPartyBranchDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
@ -294,4 +295,14 @@ public interface GovOrgOpenFeignClient {
@PostMapping("/gov/org/customergrid/getgridlistbygridids") @PostMapping("/gov/org/customergrid/getgridlistbygridids")
Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList); Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList);
/**
* @Description 根据网格Id查询用户数据
* @param customerGridFormDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerGridDTO>
* @Author liushaowen
* @Date 2020/11/18 15:34
*/
@PostMapping("/gov/org/customergrid/getcustomergridbygridid")
Result<CustomerGridDTO> getCustomerGridByGridId(CustomerGridFormDTO customerGridFormDTO);
} }

6
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerPartyBranchDTO; import com.epmet.dto.CustomerPartyBranchDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
@ -171,4 +172,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList) { public Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridListByGridIds", gridIdList); return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridListByGridIds", gridIdList);
} }
@Override
public Result<CustomerGridDTO> getCustomerGridByGridId(CustomerGridFormDTO customerGridFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getCustomerGridByGridId", customerGridFormDTO);
}
} }

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -16,7 +16,9 @@
gr.pids, gr.pids,
gr.longitude, gr.longitude,
gr.latitude, gr.latitude,
gr.area_code gr.area_code,
ag.all_parent_name AS allParentName,
ag.ORGANIZATION_NAME AS agencyName
FROM customer_grid gr FROM customer_grid gr
LEFT JOIN customer_agency ag LEFT JOIN customer_agency ag
ON gr.PID = ag.ID ON gr.PID = ag.ID

28
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java

@ -39,11 +39,9 @@ import com.epmet.constant.UserAdviceConstant;
import com.epmet.dao.UserAdviceDao; import com.epmet.dao.UserAdviceDao;
import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerDTO; import com.epmet.dto.CustomerDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.UserAdviceDTO; import com.epmet.dto.UserAdviceDTO;
import com.epmet.dto.form.AdviceListFormDTO; import com.epmet.dto.form.*;
import com.epmet.dto.form.ReplyAdviceFormDTO;
import com.epmet.dto.form.SubmitAdviceFormDTO;
import com.epmet.dto.form.UserResiInfoFormDTO;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.entity.UserAdviceEntity; import com.epmet.entity.UserAdviceEntity;
import com.epmet.entity.UserAdviceImgEntity; import com.epmet.entity.UserAdviceImgEntity;
@ -322,7 +320,7 @@ public class UserAdviceServiceImpl extends BaseServiceImpl<UserAdviceDao, UserAd
* @param dto * @param dto
* @param loginUserId * @param loginUserId
* @return void * @return void
* @Description 居民端-回复建议 * @Description 居民端提交建议
* @Author liushaowen * @Author liushaowen
* @Date 2020/11/10 10:57 * @Date 2020/11/10 10:57
*/ */
@ -344,21 +342,17 @@ public class UserAdviceServiceImpl extends BaseServiceImpl<UserAdviceDao, UserAd
logger.error("customerId:{},获取customerName失败",dto.getCustomerId()); logger.error("customerId:{},获取customerName失败",dto.getCustomerId());
} }
//获取gridName,agencyId //获取gridName,agencyId
Result<GridInfoResultDTO> gridInfoResultDTOResult = govOrgOpenFeignClient.queryGridInfo(dto.getGridId()); CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO();
customerGridFormDTO.setGridId(dto.getGridId());
Result<CustomerGridDTO> gridInfoResultDTOResult = govOrgOpenFeignClient.getCustomerGridByGridId(customerGridFormDTO);
if (gridInfoResultDTOResult.success()){ if (gridInfoResultDTOResult.success()){
userAdviceDTO.setGridName(gridInfoResultDTOResult.getData().getGridName()); userAdviceDTO.setGridName(gridInfoResultDTOResult.getData().getGridName());
userAdviceDTO.setAgencyId(gridInfoResultDTOResult.getData().getParentAgencyId()); userAdviceDTO.setAgencyId(gridInfoResultDTOResult.getData().getPid());
//获取agencyName userAdviceDTO.setAgencyPids(gridInfoResultDTOResult.getData().getPids());
Result<CustomerAgencyDTO> agencyById = govOrgOpenFeignClient.getAgencyById(gridInfoResultDTOResult.getData().getParentAgencyId()); userAdviceDTO.setAgencyName(gridInfoResultDTOResult.getData().getAgencyName());
if (agencyById.success()){ userAdviceDTO.setAgencyAllParentName(gridInfoResultDTOResult.getData().getAllParentName());
userAdviceDTO.setAgencyName(agencyById.getData().getAllParentName());
userAdviceDTO.setAgencyAllParentName(agencyById.getData().getAllParentName());
userAdviceDTO.setAgencyPids(agencyById.getData().getPids());
}else { }else {
logger.error("agencyId:{},获取组织详情失败",gridInfoResultDTOResult.getData().getParentAgencyId()); logger.error("gridId:{},获取网格和所属组织详情失败",dto.getGridId());
}
}else {
logger.error("gridId:{},获取网格详情失败",dto.getGridId());
} }
//获取userName,regPhone //获取userName,regPhone

Loading…
Cancel
Save