wangyingyang

fix contract no user

......@@ -27,29 +27,32 @@ public class ClientCustomerServiceImpl implements ClientCustomerService {
@Override
public ClientCustomerDto getClientCustomerByHISCustomerId(String hisCustomerId) {
final var response = clientCustomerServiceRpcClient.getClientCustomerByHISCustomerId(hisCustomerId);
var response = clientCustomerServiceRpcClient.getClientCustomerByHISCustomerId(hisCustomerId).getResponse();
if (response.getId() == 0) {
response = clientCustomerServiceRpcClient.getClientCustomerByContactNo(hisCustomerId).getResponse();
}
return ClientCustomerDto.builder()
.id(response.getResponse().getId())
.clientId(response.getResponse().getClientId())
.enterpriseId(response.getResponse().getEnterpriseId())
.age(response.getResponse().getAge())
.height(response.getResponse().getHeight())
.HISCustomerId(response.getResponse().getHISCustomerId())
.identityCardNo(response.getResponse().getIdentityCardNo())
.mobile(response.getResponse().getMobile())
.name(response.getResponse().getName())
.openId(response.getResponse().getOpenId())
.sex(response.getResponse().getSex())
.stallId(response.getResponse().getStallId())
.weight(response.getResponse().getWeight())
.isDeleted(response.getResponse().getIsDeleted())
.birthday(DateUtil.formatDate(response.getResponse().getBirthday()))
.createdAt(DateUtil.formatDate(response.getResponse().getCreatedAt()))
.createdBy(response.getResponse().getCreatedBy())
.creationSource(response.getResponse().getCreationSource())
.updatedAt(DateUtil.formatDate(response.getResponse().getUpdatedAt()))
.updateSource(response.getResponse().getUpdateSource())
.updatedBy(response.getResponse().getUpdatedBy())
.id(response.getId())
.clientId(response.getClientId())
.enterpriseId(response.getEnterpriseId())
.age(response.getAge())
.height(response.getHeight())
.HISCustomerId(response.getHISCustomerId())
.identityCardNo(response.getIdentityCardNo())
.mobile(response.getMobile())
.name(response.getName())
.openId(response.getOpenId())
.sex(response.getSex())
.stallId(response.getStallId())
.weight(response.getWeight())
.isDeleted(response.getIsDeleted())
.birthday(DateUtil.formatDate(response.getBirthday()))
.createdAt(DateUtil.formatDate(response.getCreatedAt()))
.createdBy(response.getCreatedBy())
.creationSource(response.getCreationSource())
.updatedAt(DateUtil.formatDate(response.getUpdatedAt()))
.updateSource(response.getUpdateSource())
.updatedBy(response.getUpdatedBy())
.build();
}
......