Browse Source

/epmetuser/dataSyncRecordDisability/detail/1585903730961670146

master
yinzuomei 2 years ago
parent
commit
eb4f51bd64
  1. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDisabilityServiceImpl.java

13
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDisabilityServiceImpl.java

@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.GenderEnum; import com.epmet.commons.tools.enums.GenderEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -41,6 +42,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -111,7 +113,11 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
} }
IcResiUserDTO icResiUserDTO = icResiUserService.get(entity.getIcResiUserId()); IcResiUserDTO icResiUserDTO = icResiUserService.get(entity.getIcResiUserId());
ResiInfoDTO resiInfoDTO = ConvertUtils.sourceToTarget(icResiUserDTO, ResiInfoDTO.class); ResiInfoDTO resiInfoDTO = ConvertUtils.sourceToTarget(icResiUserDTO, ResiInfoDTO.class);
resiInfoDTO.setGenderCn(resiInfoDTO.getGender().equals(NumConstant.ONE_STR) ? "男" : "女"); if (StringUtils.isNotBlank(resiInfoDTO.getGender())) {
resiInfoDTO.setGenderCn(resiInfoDTO.getGender().equals(NumConstant.ONE_STR) ? "男" : "女");
} else {
resiInfoDTO.setGenderCn(GenderEnum.UN_KNOWN.getName());
}
resiInfoDTO.setCjzkCn(getCj(resiInfoDTO.getCjzk())); resiInfoDTO.setCjzkCn(getCj(resiInfoDTO.getCjzk()));
resiInfoDTO.setCjlbCn(getCjlb(resiInfoDTO.getCjlb(),entity.getCustomerId())); resiInfoDTO.setCjlbCn(getCjlb(resiInfoDTO.getCjlb(),entity.getCustomerId()));
result.setResiInfo(resiInfoDTO); result.setResiInfo(resiInfoDTO);
@ -152,7 +158,10 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
throw new EpmetException("operCustomizeOpenFeignClient.getOptionsMap执行失败"); throw new EpmetException("operCustomizeOpenFeignClient.getOptionsMap执行失败");
} }
Map<String, String> data = cjlbOptionsMap.getData(); Map<String, String> data = cjlbOptionsMap.getData();
return data.get(cjlb); if(MapUtils.isNotEmpty(data)&&data.containsKey(cjlb)){
return data.get(cjlb);
}
return StrConstant.EPMETY_STR;
} }
@Override @Override

Loading…
Cancel
Save