|
|
@ -422,9 +422,11 @@ public class BuyerServiceImpl implements BuyerService { |
|
|
|
buyerEntity.setId(existBuyer.getId()); |
|
|
|
buyerEntity.setId(existBuyer.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
// 处理MDM默认银行账户等信息
|
|
|
|
// 处理MDM默认银行账户等信息
|
|
|
|
|
|
|
|
//判断是否存在默认银行信息
|
|
|
|
|
|
|
|
Boolean isDefaultMark = true; |
|
|
|
String buyerId = baseService.getGenerateShotKey(); |
|
|
|
String buyerId = baseService.getGenerateShotKey(); |
|
|
|
if (CollectionUtil.isNotEmpty(buyerEntity.getBuyerEntityDetail())) { |
|
|
|
if (CollectionUtil.isNotEmpty(buyerEntity.getBuyerEntityDetail())) { |
|
|
|
buyerEntity.getBuyerEntityDetail().forEach(t -> { |
|
|
|
for (BuyerEntityDetail t : buyerEntity.getBuyerEntityDetail()) { |
|
|
|
if(ConfigureConstant.STRING_1.equals(buyerEntity.getIsEdit())){ |
|
|
|
if(ConfigureConstant.STRING_1.equals(buyerEntity.getIsEdit())){ |
|
|
|
t.setUpdateUser(""); |
|
|
|
t.setUpdateUser(""); |
|
|
|
t.setUpdateTime(new Date()); |
|
|
|
t.setUpdateTime(new Date()); |
|
|
@ -439,8 +441,9 @@ public class BuyerServiceImpl implements BuyerService { |
|
|
|
buyerEntity.setPhone(t.getPhone()); |
|
|
|
buyerEntity.setPhone(t.getPhone()); |
|
|
|
buyerEntity.setBankNumber(t.getBankAccount()); |
|
|
|
buyerEntity.setBankNumber(t.getBankAccount()); |
|
|
|
buyerEntity.setBankOfDeposit(t.getBankName()); |
|
|
|
buyerEntity.setBankOfDeposit(t.getBankName()); |
|
|
|
|
|
|
|
isDefaultMark = false; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
buyerMapper.deleteBuyerDetail(buyerEntity.getId()); |
|
|
|
buyerMapper.deleteBuyerDetail(buyerEntity.getId()); |
|
|
|
if(buyerEntity.getBuyerEntityDetail() != null && buyerEntity.getBuyerEntityDetail().size()>0){ |
|
|
|
if(buyerEntity.getBuyerEntityDetail() != null && buyerEntity.getBuyerEntityDetail().size()>0){ |
|
|
@ -449,9 +452,16 @@ public class BuyerServiceImpl implements BuyerService { |
|
|
|
if(isAdd && existBuyer != null){ |
|
|
|
if(isAdd && existBuyer != null){ |
|
|
|
return r.put("message", "客户编码已存在").put(OrderManagementConstant.CODE, ConfigureConstant.STRING_9999); |
|
|
|
return r.put("message", "客户编码已存在").put(OrderManagementConstant.CODE, ConfigureConstant.STRING_9999); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (existBuyer != null) {//StringUtils.isNotBlank(buyerEntity.getId())
|
|
|
|
if (existBuyer != null) {//StringUtils.isNotBlank(buyerEntity.getId())
|
|
|
|
|
|
|
|
|
|
|
|
buyerEntity.setModifyTime(new Date()); |
|
|
|
buyerEntity.setModifyTime(new Date()); |
|
|
|
|
|
|
|
if(isDefaultMark){ |
|
|
|
|
|
|
|
buyerEntity.setAddress(""); |
|
|
|
|
|
|
|
buyerEntity.setPhone(""); |
|
|
|
|
|
|
|
buyerEntity.setBankNumber(""); |
|
|
|
|
|
|
|
buyerEntity.setBankOfDeposit(""); |
|
|
|
|
|
|
|
} |
|
|
|
//更新明细表,最好的办法是先删除后新增
|
|
|
|
//更新明细表,最好的办法是先删除后新增
|
|
|
|
int i = buyerMapper.updateBuyer(buyerEntity, shList); |
|
|
|
int i = buyerMapper.updateBuyer(buyerEntity, shList); |
|
|
|
|
|
|
|
|
|
|
|