Commit 38e03f56 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'release-fix' into dev

parents ba433499 ae6857ff
......@@ -476,8 +476,8 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
}
CustomerDO customer = customerService.getCustomer(info.getCustomerId());
//订单基本信息
orderInfoMap.put("consignee", info.getConsigneeVO().getName());
orderInfoMap.put("consigneePhone", "+" + info.getConsigneeVO().getCountryCode() + info.getConsigneeVO().getPhone());
orderInfoMap.put("consignee", Objects.nonNull(info.getConsigneeVO()) ? info.getConsigneeVO().getName():"");
orderInfoMap.put("consigneePhone", Objects.nonNull(info.getConsigneeVO()) ? "+" + info.getConsigneeVO().getCountryCode() + info.getConsigneeVO().getPhone() : "");
orderInfoMap.put("consignor", info.getConsignorVO().getName());
orderInfoMap.put("consignorPhone", "+" + info.getConsignorVO().getCountryCode() + info.getConsignorVO().getPhone());
if (info.getDrawee() == 1) {
......@@ -486,7 +486,7 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
orderInfoMap.put("consignor", shipperName);
} else if (info.getDrawee() == 2) {
//订单付款人为收货人
String consigneeName = getShipperNameAndConsignee(info, 2, orderInfoMap);
String consigneeName = Objects.nonNull(info.getConsigneeVO()) ? getShipperNameAndConsignee(info, 2, orderInfoMap) : "";
orderInfoMap.put("consignee", consigneeName);
}
orderInfoMap.put("orderNo", info.getOrderNo());
......@@ -670,26 +670,28 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
if (type == 1 && StringUtils.isNotBlank(info.getConsignorVO().getCompanyEn())) {
map.put("consignorCompany", info.getConsignorVO().getCompanyEn());
} else if (type == 2 && StringUtils.isNotBlank(info.getConsigneeVO().getCompanyEn())) {
map.put("consigneeCompany", info.getConsigneeVO().getCompanyEn());
map.put("consigneeCompany", Objects.nonNull(info.getConsigneeVO()) ? info.getConsigneeVO().getCompanyEn() : "");
}
// stringBuffer.append(companyEn).append("\r\n");
CustomerDO customerConsignor = null;
CustomerDO customer = null;
if (type == 1) {
//当发货人为订单付款人 订单页面发货人公司英文名称客户档案付款人名字+发货人英文名字
customerConsignor = customerService.getCustomer(info.getConsignorVO().getCustomerId());
customer = customerService.getCustomer(info.getConsignorVO().getCustomerId());
} else {
//当收货人为订单付款人 订单页面发货人公司英文名称客户档案付款人名字+发货人英文名字
customerConsignor = customerService.getCustomer(info.getConsigneeVO().getCustomerId());
if (Objects.nonNull(info.getConsigneeVO())) {
customer = customerService.getCustomer(info.getConsigneeVO().getCustomerId());
}
}
if (customerConsignor != null && StringUtils.isNotBlank(customerConsignor.getPayerName())) {
String name = customerConsignor.getPayerName();
if (customer != null && StringUtils.isNotBlank(customer.getPayerName())) {
String name = customer.getPayerName();
String nameEn = "";
if (type == 1) {
nameEn = info.getConsignorVO().getNameEn();
} else {
nameEn = info.getConsigneeVO().getNameEn();
nameEn = Objects.nonNull(info.getConsigneeVO()) ? info.getConsigneeVO().getNameEn() : "";
}
if (customerConsignor.getPayerName().equals(customerConsignor.getNameEn()) && !pattern.matcher(customerConsignor.getPayerName()).find()) {
if (customer.getPayerName().equals(customer.getNameEn()) && !pattern.matcher(customer.getPayerName()).find()) {
stringBuffer.append(StringUtils.isBlank(name) ? "" : name);
} else {
stringBuffer.append(StringUtils.isBlank(name) ? "" : name).append(" ").append(StringUtils.isBlank(nameEn) ? "" : nameEn);
......@@ -706,10 +708,10 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
stringBuffer.append(StringUtils.isBlank(name) ? "" : name).append(" ").append(StringUtils.isBlank(nameEn) ? "" : nameEn);
}
} else {
OrderConsigneeBackVO consignorVO = info.getConsigneeVO();
String name = consignorVO.getName();
String nameEn = consignorVO.getNameEn();
if (consignorVO.getName().equals(consignorVO.getNameEn()) && !pattern.matcher(consignorVO.getName()).find()) {
OrderConsigneeBackVO consigneeVO = info.getConsigneeVO();
String name = consigneeVO.getName();
String nameEn = consigneeVO.getNameEn();
if (consigneeVO.getName().equals(consigneeVO.getNameEn()) && !pattern.matcher(consigneeVO.getName()).find()) {
stringBuffer.append(StringUtils.isBlank(name) ? "" : name);
} else {
stringBuffer.append(StringUtils.isBlank(name) ? "" : name).append(" ").append(StringUtils.isBlank(nameEn) ? "" : nameEn);
......@@ -988,15 +990,15 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
}
CustomerDO customer = customerService.getCustomer(info.getCustomerId());
//订单基本信息
orderInfoMap.put("consignee", info.getConsigneeVO().getName());
orderInfoMap.put("consigneePhone", "+" + info.getConsigneeVO().getCountryCode() + info.getConsigneeVO().getPhone());
orderInfoMap.put("consignee", Objects.nonNull(info.getConsigneeVO()) ? info.getConsigneeVO().getName() : "");
orderInfoMap.put("consigneePhone", Objects.nonNull(info.getConsigneeVO()) ? "+" + info.getConsigneeVO().getCountryCode() + info.getConsigneeVO().getPhone() : "");
orderInfoMap.put("consignor", info.getConsignorVO().getName());
orderInfoMap.put("consignorPhone", "+" + info.getConsignorVO().getCountryCode() + info.getConsignorVO().getPhone());
if (info.getDrawee() == 1) { //订单付款人为发货人
String shipperName = getShipperNameAndConsignee(info, 1, orderInfoMap);
orderInfoMap.put("consignor", shipperName);
} else if (info.getDrawee() == 2) { //订单付款人为收货人
String consigneeName = getShipperNameAndConsignee(info, 2, orderInfoMap);
String consigneeName = Objects.nonNull(info.getConsigneeVO()) ? getShipperNameAndConsignee(info, 2, orderInfoMap) : "";
orderInfoMap.put("consignee", consigneeName);
}
orderInfoMap.put("orderNo", info.getOrderNo());
......
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