Browse Source

Merge remote-tracking branch 'origin/dev_bugfix' into dev

master
yinzuomei 5 years ago
parent
commit
afb50f7303
  1. 31
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java
  2. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberBaseInfoDao.xml

31
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;
@ -149,12 +150,19 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl<PartymemberInfoD
return new ArrayList<>();
}
for (CertifiedResultDTO certifiedResultDTO : certifiedResultDTOS) {
certifiedResultDTO.setApplyTime(certifiedResultDTO.getApplyTime()*1000L);
certifiedResultDTO.setApplyTime(certifiedResultDTO.getApplyTime());
}
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();
}
@ -172,17 +180,22 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl<PartymemberInfoD
if (certifiedDetail==null){
return new CertifiedDetailResultDTO();
}
certifiedDetail.setApplyTime(certifiedDetail.getApplyTime() * 1000L);//时间戳转换毫秒级
certifiedDetail.setApplyTime(certifiedDetail.getApplyTime());
CreatedTimeByUserIdFormDTO time = new CreatedTimeByUserIdFormDTO();
time.setUserId(certifiedDetail.getUserId());
//查询用户注册时间
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;
}

6
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberBaseInfoDao.xml

@ -60,7 +60,7 @@
SELECT
pi.USER_ID AS userId,
concat( pi.SURNAME, pi.NAME ) AS realName,
unix_timestamp(pi.CREATED_TIME)*1000 AS applyTime,
unix_timestamp(pi.CREATED_TIME) AS applyTime,
pcm.READ_FLAG AS readFlag,
pi.id as partyMemberId,
pca.id as autoId,
@ -85,7 +85,7 @@
SELECT
pi.USER_ID AS userId,
concat( pi.SURNAME, pi.NAME ) AS realName,
unix_timestamp(pi.CREATED_TIME)*1000 AS applyTime,
unix_timestamp(pi.CREATED_TIME) AS applyTime,
pi.CONFIRM_RESULT AS status,
pi.id as partyMemberId,
pca.id as autoId,
@ -102,7 +102,7 @@
SELECT
pi.USER_ID AS userId,
concat( pi.SURNAME, pi.NAME ) AS realName,
unix_timestamp(pi.CREATED_TIME)*1000 AS applyTime,
unix_timestamp(pi.CREATED_TIME) AS applyTime,
pi.CONFIRM_RESULT AS status,
pi.id as partyMemberId,
pca.id as autoId,

Loading…
Cancel
Save