Browse Source

微调

master
jianjun 4 years ago
parent
commit
d7ee218258
  1. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  2. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

6
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -649,7 +649,7 @@ public class IcResiUserController {
@PostMapping("search")
public Result<PageData<Map<String, Object>>> searchResi(@RequestBody IcResiUserPageFormDTO input, @LoginUser TokenDto loginUser) {
if (StringUtils.isBlank(input.getKeyword())) {
PageData<Map<String, Object>> r = new PageData<Map<String, Object>>(new ArrayList<>(), 0);
PageData<Map<String, Object>> r = new PageData<Map<String, Object>>(new ArrayList<>(), NumConstant.ZERO_L);
return new Result<PageData<Map<String, Object>>>().ok(r);
}
@ -658,11 +658,11 @@ public class IcResiUserController {
input.setStaffId(loginUser.getUserId());
input.setFormCode(IcFormCodeEnum.RESI_BASE_INFO.getCode());
if (input.getPageNo() == null) {
input.setPageNo(1);
input.setPageNo(NumConstant.ONE);
}
if (input.getPageSize() == null) {
input.setPageSize(20);
input.setPageSize(NumConstant.TWENTY);
}
PageData<Map<String, Object>> r = icResiUserService.pageResiMap(input);

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -476,7 +476,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
@Override
public PageData<Map<String, Object>> pageResiMap(IcResiUserPageFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfoCacheResult=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId());
String staffOrgPath=StrConstant.EPMETY_STR;
String staffOrgPath;
if(StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds())&& !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())){
staffOrgPath=staffInfoCacheResult.getAgencyPIds().concat(":").concat(staffInfoCacheResult.getAgencyId());
}else{
@ -542,14 +542,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
for (Map<String, Object> resultMap : list) {
String gridIdValue = null != resultMap.get(UserConstant.GRID_ID) ? resultMap.get(UserConstant.GRID_ID).toString() : StrConstant.EPMETY_STR;
resultMap.put("GRID_ID_VALUE", gridIdValue);
if (null != gridInfoMap && gridInfoMap.containsKey(gridIdValue) && null != gridInfoMap.get(gridIdValue)) {
if (gridInfoMap.containsKey(gridIdValue) && null != gridInfoMap.get(gridIdValue)) {
//GRID_NAME
resultMap.put(UserConstant.GRID_ID, gridInfoMap.get(gridIdValue).getGridName());
}
String homeId = null != resultMap.get(UserConstant.HOME_ID) ? resultMap.get(UserConstant.HOME_ID).toString() : StrConstant.EPMETY_STR;
resultMap.put("HOME_ID_VALUE", homeId);
if (null != houseInfoMap && houseInfoMap.containsKey(homeId) && null != houseInfoMap.get(homeId)) {
if (houseInfoMap.containsKey(homeId) && null != houseInfoMap.get(homeId)) {
HouseInfoDTO houseInfoDTO = houseInfoMap.get(homeId);
String buildName = StringUtils.isNotBlank(houseInfoDTO.getBuildingName()) ? houseInfoDTO.getBuildingName() : StrConstant.EPMETY_STR;
resultMap.put("BUILD_NAME", buildName);

Loading…
Cancel
Save