feature:MDM同步客户信息地址电话更新至明细里

release
gaorl 2 years ago
parent 5ae2b03445
commit 4db3ece123
  1. 39
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java

@ -220,12 +220,13 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
buyerEntity.setModifyTime(new Date());
// 处理开户行银行
List<BuyerEntityDetail> buyerEntityDetails = new ArrayList<>();
String buyerAddress = "";
buyerAddress = buyerAddress.concat(StringUtils.isEmpty(tempMdmGmfxxtbReqBO.getDESC22()) ? "" : tempMdmGmfxxtbReqBO.getDESC22());
buyerAddress = buyerAddress.concat(StringUtils.isEmpty(tempMdmGmfxxtbReqBO.getDESC23()) ? "" : tempMdmGmfxxtbReqBO.getDESC23());
buyerAddress = buyerAddress.concat(StringUtils.isEmpty(tempMdmGmfxxtbReqBO.getDESC24()) ? "" : tempMdmGmfxxtbReqBO.getDESC24());
buyerEntity.setAddress(buyerAddress);
if (tempMdmGmfxxtbReqBO.getMULTICODE() != null && !CollectionUtils.isEmpty(tempMdmGmfxxtbReqBO.getMULTICODE().getVALUELIST())) {
String buyerAddress = "";
buyerAddress = buyerAddress.concat(StringUtils.isEmpty(tempMdmGmfxxtbReqBO.getDESC22()) ? "" : tempMdmGmfxxtbReqBO.getDESC22());
buyerAddress = buyerAddress.concat(StringUtils.isEmpty(tempMdmGmfxxtbReqBO.getDESC23()) ? "" : tempMdmGmfxxtbReqBO.getDESC23());
buyerAddress = buyerAddress.concat(StringUtils.isEmpty(tempMdmGmfxxtbReqBO.getDESC24()) ? "" : tempMdmGmfxxtbReqBO.getDESC24());
buyerEntity.setAddress(buyerAddress);
List<MdmGmfxxtbMulticodeValuelistBO> valuelistBOS = tempMdmGmfxxtbReqBO.getMULTICODE().getVALUELIST();
if(valuelistBOS != null && valuelistBOS.size() > 0){
MdmGmfxxtbMulticodeValuelistBO firstValueList = valuelistBOS.get(0);
@ -249,22 +250,22 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
buyerEntityDetails.add(buyerEntityDetail);
i++;
}
}else if(StringUtils.isNotBlank(tempMdmGmfxxtbReqBO.getDESC27())||StringUtils.isNotBlank(buyerAddress)){
BuyerEntityDetail buyerEntityDetail = new BuyerEntityDetail();
buyerEntityDetail.setDefaultMark("0");
buyerEntityDetail.setBuyerManageId(buyerEntity.getId());
buyerEntityDetail.setAddress(StringUtils.isNotBlank(buyerEntity.getAddress())?buyerEntity.getAddress():"");
buyerEntityDetail.setPhone(StringUtils.isNotBlank(buyerEntity.getPhone())?buyerEntity.getPhone():"");
buyerEntityDetail.setBankName("");
buyerEntityDetail.setBankAccount("");
buyerEntityDetail.setCreateTime(new Date());
buyerEntityDetail.setUpdateTime(new Date());
buyerEntityDetails.add(buyerEntityDetail);
}
buyerEntity.setBuyerEntityDetail(buyerEntityDetails);
}
//buyerEntity.setBuyerEntityDetail(buyerEntityDetails);
}else if(StringUtils.isNotBlank(tempMdmGmfxxtbReqBO.getDESC27())||StringUtils.isNotBlank(buyerAddress)){
BuyerEntityDetail buyerEntityDetail = new BuyerEntityDetail();
buyerEntityDetail.setDefaultMark("0");
buyerEntityDetail.setBuyerManageId(buyerEntity.getId());
buyerEntityDetail.setAddress(StringUtils.isNotBlank(buyerEntity.getAddress())?buyerEntity.getAddress():"");
buyerEntityDetail.setPhone(StringUtils.isNotBlank(buyerEntity.getPhone())?buyerEntity.getPhone():"");
buyerEntityDetail.setBankName("");
buyerEntityDetail.setBankAccount("");
buyerEntityDetail.setCreateTime(new Date());
buyerEntityDetail.setUpdateTime(new Date());
buyerEntityDetails.add(buyerEntityDetail);
}
buyerEntity.setBuyerEntityDetail(buyerEntityDetails);
}
/**
* 集团物料同步接口

Loading…
Cancel
Save