|
@@ -100,28 +100,30 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, S
|
|
|
});
|
|
|
result.setContractDetailsList(salesContractDetailsVos);
|
|
|
//赋值客户信息
|
|
|
- customerService.attributeAssign(Arrays.asList(result), SalesContractVo::getCustomerId, (item, customer) -> {
|
|
|
- item.setCustomerName(customer.getName());
|
|
|
- item.setCustomerBank(customer.getBeneficiaryBank());
|
|
|
- item.setCustomerSwiftCode(customer.getSwiftCode());
|
|
|
- item.setCustomerAccountNumber(customer.getBeneficiaryAccountNumber());
|
|
|
- });
|
|
|
+ Customer customer = customerService.getById(result.getCustomerId());
|
|
|
+ if(ObjectUtil.isNotEmpty(customer)){
|
|
|
+ result.setCustomerName(customer.getName());
|
|
|
+ result.setCustomerBank(customer.getBeneficiaryBank());
|
|
|
+ result.setCustomerSwiftCode(customer.getSwiftCode());
|
|
|
+ result.setCustomerAccountNumber(customer.getBeneficiaryAccountNumber());
|
|
|
+
|
|
|
+ //赋值客户国省市名称
|
|
|
+ Map<Long, String> areaMapByIds = CustomizeAreaUtil.getAreaMapByIds(Arrays.asList(
|
|
|
+ customer.getCountryId(),
|
|
|
+ customer.getProvinceId(),
|
|
|
+ customer.getCityId())
|
|
|
+ );
|
|
|
+ result.setBuyCountryName(areaMapByIds.get(customer.getCountryId()));
|
|
|
+ result.setBuyProvinceName(areaMapByIds.get(customer.getProvinceId()));
|
|
|
+ result.setBuyCityName(areaMapByIds.get(customer.getCityId()));
|
|
|
+ }
|
|
|
//赋值客户更多联系人
|
|
|
List<CustomerUser> customerUserList = customerUserService.list(q -> q.eq(CustomerUser::getCustomerId, salesContract.getCustomerId()));
|
|
|
result.setCustomerUserList(customerUserList);
|
|
|
- //赋值客户国省市名称
|
|
|
- Map<Long, String> areaMapByIds = CustomizeAreaUtil.getAreaMapByIds(Arrays.asList(
|
|
|
- result.getBuyCountryId(),
|
|
|
- result.getBuyProvinceId(),
|
|
|
- result.getBuyCityId())
|
|
|
- );
|
|
|
- result.setBuyCountryName(areaMapByIds.get(result.getBuyCountryId()));
|
|
|
- result.setBuyProvinceName(areaMapByIds.get(result.getBuyProvinceId()));
|
|
|
- result.setBuyCityName(areaMapByIds.get(result.getBuyCityId()));
|
|
|
|
|
|
//赋值卖方信息多公司
|
|
|
AccountManagement accountManagement = accountManagementService.getById(result.getShroffAccountId());
|
|
|
- Corporation corporation = corporationService.getById(accountManagement.getCorporationId());
|
|
|
+ Corporation corporation = corporationService.getById(result.getSellCorporationId());
|
|
|
result.setSellCorporationName(corporation.getName());
|
|
|
result.setSellCorporationNumber(corporation.getCorporationNumber());
|
|
|
result.setSellTaxationCode(corporation.getTaxationCode());
|