Commit 8e7bcdb1 authored by zhengyi's avatar zhengyi

新增、编辑订单时,收货人冗余数据bug修复

parent e8f308d0
......@@ -676,7 +676,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCustomerContactsId(consignee.getId());
CustomerDO consigneeDO = customerService.getCustomer(consignee.getCustomerId());
if (Objects.nonNull(consigneeDO)) {
orderConsignorDO.setCustomerNumber(consigneeDO.getNumber());
orderConsigneeDO.setCustomerNumber(consigneeDO.getNumber());
}
} else {
// 客户不存在,新增客户联系人信息 orderConsigneeDO中有值
......@@ -863,13 +863,13 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCustomerNumber(consigneeDO.getNumber());
CountryDO consigneeCountryDO = countryService.getById(consigneeDO.getCountry());
if (consigneeCountryDO != null) {
orderConsignorDO.setCountryAbbreviation(consigneeCountryDO.getNameShort());
orderConsigneeDO.setCountryAbbreviation(consigneeCountryDO.getNameShort());
}
} else {
orderConsigneeDO.setCompany(createReqVO.getConsigneeCompany());
orderConsigneeDO.setCompanyEn(createReqVO.getConsigneeCompanyEn());
orderConsigneeDO.setAddress(createReqVO.getConsigneeAddress());
orderConsignorDO.setCountryAbbreviation(createReqVO.getCountryAbbreviation());
orderConsigneeDO.setCountryAbbreviation(createReqVO.getCountryAbbreviation());
}
//客户联系人
CustomerContactsDO consigneeContactsDO =
......@@ -3328,7 +3328,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCustomerContactsId(consignee.getId());
CustomerDO consigneeDO = customerService.getCustomer(consignee.getCustomerId());
if (Objects.nonNull(consigneeDO)) {
orderConsignorDO.setCustomerNumber(consigneeDO.getNumber());
orderConsigneeDO.setCustomerNumber(consigneeDO.getNumber());
}
} else {
// 客户不存在,新增客户联系人信息 orderConsigneeDO中有值
......@@ -3341,7 +3341,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCustomerContactsId(consigeeCustomer.getId());
CustomerDO consigneeDO = customerService.getCustomer(consigeeCustomer.getCustomerId());
if (Objects.nonNull(consigneeDO)) {
orderConsignorDO.setCustomerNumber(consigneeDO.getNumber());
orderConsigneeDO.setCustomerNumber(consigneeDO.getNumber());
}
}
}
......@@ -3522,13 +3522,13 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCustomerNumber(consigneeDO.getNumber());
CountryDO consigneeCountryDO = countryService.getById(consigneeDO.getCountry());
if (consigneeCountryDO != null) {
orderConsignorDO.setCountryAbbreviation(consigneeCountryDO.getNameShort());
orderConsigneeDO.setCountryAbbreviation(consigneeCountryDO.getNameShort());
}
} else {
orderConsigneeDO.setCompany(updateReqVO.getConsigneeCompany());
orderConsigneeDO.setCompanyEn(updateReqVO.getConsigneeCompanyEn());
orderConsigneeDO.setAddress(updateReqVO.getConsigneeAddress());
orderConsignorDO.setCountryAbbreviation(updateReqVO.getCountryAbbreviation());
orderConsigneeDO.setCountryAbbreviation(updateReqVO.getCountryAbbreviation());
}
CustomerContactsDO consigneeContactsDO = customerContactsService.getCustomerContacts(updateReqVO.getConsigneeContactsId());
if (null != consigneeContactsDO) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment