Browse Source

gridFullPath修改

master
zxc 5 years ago
parent
commit
0049861d4e
  1. 27
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java

27
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java

@ -28,6 +28,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CreatedTimeByUserIdFormDTO;
import com.epmet.dto.result.CertifiedResultDTO;
import com.epmet.dto.result.CreatedTimeByUserIdResultDTO;
import com.epmet.dto.result.GridInfoResultDTO;
import com.epmet.dto.result.SelectGridNameByGridIdResultDTO;
import com.epmet.modules.feign.EpmetUserFeignClient;
import com.epmet.modules.feign.GovOrgFeignClient;
@ -152,9 +153,16 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl<PartymemberInfoD
certifiedResultDTO.setApplyTime(certifiedResultDTO.getApplyTime()*1000L);
}
Result<List<CertifiedResultDTO>> listResult = epmetUserFeignClient.selectUserHeadPhotoByUserId(certifiedResultDTOS);
Result<SelectGridNameByGridIdResultDTO> gridName = govOrgFeignClient.selectGridNameByGridId(certifiedFormDTO);
Result<GridInfoResultDTO> gridInfoResult = govOrgFeignClient.queryGridInfo(certifiedFormDTO.getGridId());
String gridFullPath = "";
if (gridInfoResult.success() && null != gridInfoResult.getData()) {
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName());
gridFullPath = gridFullPath.replaceAll("--", "").trim();
}
for (CertifiedResultDTO datum : listResult.getData()) {
datum.setGridFullPath(gridName.getData().getGridName());
datum.setGridFullPath(gridFullPath);
}
return listResult.getData();
}
@ -178,11 +186,16 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl<PartymemberInfoD
//查询用户注册时间
Result<CreatedTimeByUserIdResultDTO> registerTime = epmetUserFeignClient.createdTimeByUserId(time);
certifiedDetail.setCertifyTime(registerTime.getData().getRegisterTime());
CertifiedFormDTO certifiedFormDTO = new CertifiedFormDTO();
certifiedFormDTO.setGridId(certifiedDetail.getGridId());
//查询网格名称
Result<SelectGridNameByGridIdResultDTO> gridName = govOrgFeignClient.selectGridNameByGridId(certifiedFormDTO);
certifiedDetail.setGridFullPath(gridName.getData().getGridName());
//查询gridFullName
Result<GridInfoResultDTO> gridInfoResult = govOrgFeignClient.queryGridInfo(certifiedDetail.getGridId());
String gridFullPath = "";
if (gridInfoResult.success() && null != gridInfoResult.getData()) {
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName());
gridFullPath = gridFullPath.replaceAll("--", "").trim();
}
certifiedDetail.setGridFullPath(gridFullPath);
return certifiedDetail;
}

Loading…
Cancel
Save