Browse Source

提交建议bug修复

master
liushaowen 5 years ago
parent
commit
1bce7e8d49
  1. 12
      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. 6
      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

12
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
*/
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.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerPartyBranchDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@ -294,4 +295,14 @@ public interface GovOrgOpenFeignClient {
@PostMapping("/gov/org/customergrid/getgridlistbygridids")
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.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerPartyBranchDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@ -171,4 +172,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> 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);
}
}

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

@ -16,7 +16,9 @@
gr.pids,
gr.longitude,
gr.latitude,
gr.area_code
gr.area_code,
ag.all_parent_name AS allParentName,
ag.ORGANIZATION_NAME AS agencyName
FROM customer_grid gr
LEFT JOIN customer_agency ag
ON gr.PID = ag.ID
@ -541,4 +543,4 @@
ID = #{orgId}
</foreach>
</select>
</mapper>
</mapper>

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

Loading…
Cancel
Save