Commit 8d659955 authored by zhengyi's avatar zhengyi

订单有收货人时,收货人必须是国外号码

parent 0781adb6
...@@ -216,8 +216,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -216,8 +216,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst(). dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().
orElse(null); orElse(null);
if (createReqVO.getHasConsignee() && Objects.nonNull(createReqVO.getIsCargoControl()) && if (createReqVO.getHasConsignee() &&
createReqVO.getIsCargoControl() &&
Objects.nonNull(dictDataRespDTO) && Objects.nonNull(dictDataRespDTO) &&
StringUtils.equals(dictDataRespDTO.getValue(), "11") StringUtils.equals(dictDataRespDTO.getValue(), "11")
&& StringUtils.isNotBlank(createReqVO.getCountryCode()) && StringUtils.isNotBlank(createReqVO.getCountryCode())
...@@ -656,8 +655,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -656,8 +655,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (StringUtils.isBlank(orderConsigneeDO.getName())) { if (StringUtils.isBlank(orderConsigneeDO.getName())) {
throw exception(ORDER_CONSIGNEE_NAME_NOT_COMPLETE); throw exception(ORDER_CONSIGNEE_NAME_NOT_COMPLETE);
} }
if (createReqVO.getHasConsignee() && Objects.nonNull(createReqVO.getIsCargoControl()) && createReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) && if (createReqVO.getHasConsignee() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) { Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") &&
StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL); throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
} }
try { try {
...@@ -940,8 +940,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -940,8 +940,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw exception(ORDER_CONSIGNEE_PHONE_INCORRECT_FORMAT); throw exception(ORDER_CONSIGNEE_PHONE_INCORRECT_FORMAT);
} }
} }
if (createReqVO.getHasConsignee() && Objects.nonNull(createReqVO.getIsCargoControl()) && createReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) && if (createReqVO.getHasConsignee() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) { Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") &&
StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL); throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
} }
if (StringUtils.isNotBlank(createReqVO.getConsigneeName())) { if (StringUtils.isNotBlank(createReqVO.getConsigneeName())) {
...@@ -1516,9 +1517,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -1516,9 +1517,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch"); List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch");
// 智慧预装功能开关 // 智慧预装功能开关
DictDataRespDTO dictDataRespDTO = dictList.stream().filter(dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().orElse(null); DictDataRespDTO dictDataRespDTO = dictList.stream().filter(dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().orElse(null);
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) && if (updateReqVO.getHasConsignee() &&
updateReqVO.getIsCargoControl() && Objects.nonNull(dictDataRespDTO) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.isNotBlank(updateReqVO.getCountryCode()) && StringUtils.equals("86", updateReqVO.getCountryCode())) { StringUtils.equals(dictDataRespDTO.getValue(), "11") &&
StringUtils.isNotBlank(updateReqVO.getCountryCode()) &&
StringUtils.equals("86", updateReqVO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL); throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
} }
OrderDO updateObj = OrderConvert.INSTANCE.convert(updateReqVO); OrderDO updateObj = OrderConvert.INSTANCE.convert(updateReqVO);
...@@ -2729,8 +2732,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2729,8 +2732,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (!Objects.equals(orderConsigneeBackVO.getCustomerContactsId(), consigneeContactsDO.getId())) { if (!Objects.equals(orderConsigneeBackVO.getCustomerContactsId(), consigneeContactsDO.getId())) {
// 收货人电话 // 收货人电话
if (!StringUtils.equals(orderConsigneeBackVO.getPhone(), consigneeContactsDO.getPhoneNew()) || !StringUtils.equals(orderConsigneeBackVO.getCountryCode(), consigneeContactsDO.getAreaCode())) { if (!StringUtils.equals(orderConsigneeBackVO.getPhone(), consigneeContactsDO.getPhoneNew()) || !StringUtils.equals(orderConsigneeBackVO.getCountryCode(), consigneeContactsDO.getAreaCode())) {
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) && if (updateReqVO.getHasConsignee() && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.equals("86", consigneeContactsDO.getAreaCode())) { Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") &&
StringUtils.equals("86", consigneeContactsDO.getAreaCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL); throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
} }
infoVO = new ApplyInfoVO(); infoVO = new ApplyInfoVO();
...@@ -3311,8 +3315,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -3311,8 +3315,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (StringUtils.isBlank(orderConsigneeDO.getName())) { if (StringUtils.isBlank(orderConsigneeDO.getName())) {
throw exception(ORDER_CONSIGNEE_NAME_NOT_COMPLETE); throw exception(ORDER_CONSIGNEE_NAME_NOT_COMPLETE);
} }
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) && if (updateReqVO.getHasConsignee() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals("11", dictDataRespDTO.getValue()) && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) { Objects.nonNull(dictDataRespDTO) && StringUtils.equals("11", dictDataRespDTO.getValue()) &&
StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL); throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
} }
try { try {
...@@ -3562,8 +3567,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -3562,8 +3567,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setEmail(updateReqVO.getConsigneeEmail()); orderConsigneeDO.setEmail(updateReqVO.getConsigneeEmail());
orderConsigneeDO.setPhone(updateReqVO.getConsigneePhone()); orderConsigneeDO.setPhone(updateReqVO.getConsigneePhone());
} }
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) && if (updateReqVO.getHasConsignee() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals("11", dictDataRespDTO.getValue()) && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) { Objects.nonNull(dictDataRespDTO) && StringUtils.equals("11", dictDataRespDTO.getValue()) &&
StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL); throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
} }
orderConsigneeDO.setHarvestMethod(updateReqVO.getHarvestMethod()); // 收货方式 orderConsigneeDO.setHarvestMethod(updateReqVO.getHarvestMethod()); // 收货方式
......
...@@ -188,16 +188,14 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -188,16 +188,14 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
} }
} }
if (Objects.nonNull(createReqVO.getConsigneeId()) && createReqVO.getConsigneeId() > 0) { if (Objects.nonNull(createReqVO.getConsigneeId()) && createReqVO.getConsigneeId() > 0) {
if (Objects.nonNull(createReqVO.getControl()) && createReqVO.getControl()) { // 获取功能开关
// 获取功能开关 List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch");
List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch"); // 智慧预装功能开关
// 智慧预装功能开关 DictDataRespDTO dictDataRespDTO = dictList.stream().filter(dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().orElse(null);
DictDataRespDTO dictDataRespDTO = dictList.stream().filter(dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().orElse(null); CustomerContactsDO consigneeContactsDO = customerContactsService.getCustomerContacts(createReqVO.getConsigneeId());
CustomerContactsDO consigneeContactsDO = customerContactsService.getCustomerContacts(createReqVO.getConsigneeId()); if (Objects.nonNull(consigneeContactsDO)) {
if (Objects.nonNull(consigneeContactsDO)) { if (Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) && StringUtils.equals("86", consigneeContactsDO.getAreaCode())) {
if (Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) && StringUtils.equals("86", consigneeContactsDO.getAreaCode())) { throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
} }
} }
} }
...@@ -516,7 +514,6 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -516,7 +514,6 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
} }
} }
if (Objects.nonNull(updateReqVO.getConsigneeId()) && updateReqVO.getConsigneeId() > 0) { if (Objects.nonNull(updateReqVO.getConsigneeId()) && updateReqVO.getConsigneeId() > 0) {
if (Objects.nonNull(updateReqVO.getControl()) && updateReqVO.getControl()) {
// 获取功能开关 // 获取功能开关
List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch"); List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch");
// 智慧预装功能开关 // 智慧预装功能开关
...@@ -527,7 +524,6 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -527,7 +524,6 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL); throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
} }
} }
}
} }
String updater = String.valueOf(SecurityFrameworkUtils.getLoginUserId()); String updater = String.valueOf(SecurityFrameworkUtils.getLoginUserId());
// 校验存在 // 校验存在
......
...@@ -664,7 +664,7 @@ param.customer.service.not=The customer or account manager is empty ...@@ -664,7 +664,7 @@ param.customer.service.not=The customer or account manager is empty
order.warehouse.adjustment.status.not.allowed.warehouse.in=Non warehouse adjustment operations are not allowed during order warehouse adjustment order.warehouse.adjustment.status.not.allowed.warehouse.in=Non warehouse adjustment operations are not allowed during order warehouse adjustment
modify.approval.not.add.prod=Cannot add a new product after modification approval modify.approval.not.add.prod=Cannot add a new product after modification approval
modify.approval.not.update.warehouse.in=Cannot update or delete warehouse in after modification approval modify.approval.not.update.warehouse.in=Cannot update or delete warehouse in after modification approval
consignee.phone.is.external=For control orders, the recipient's mobile phone number must be from overseas consignee.phone.is.external=The recipient's mobile phone number must be from abroad
already.picked.up=The order has picked up already.picked.up=The order has picked up
lading.not.make=bill of lading have not make yet lading.not.make=bill of lading have not make yet
file.not.upload=The file has not uploaded file.not.upload=The file has not uploaded
......
...@@ -672,7 +672,7 @@ already.picked.up=\u8BE5\u8BA2\u5355\u5DF2\u63D0\u8D27 ...@@ -672,7 +672,7 @@ already.picked.up=\u8BE5\u8BA2\u5355\u5DF2\u63D0\u8D27
lading.not.make=\u63D0\u5355\u672A\u5236\u4F5C lading.not.make=\u63D0\u5355\u672A\u5236\u4F5C
modify.approval.not.add.prod=\u4FEE\u6539\u5BA1\u6279\u4E0D\u80FD\u6DFB\u52A0\u65B0\u7684\u5546\u54C1 modify.approval.not.add.prod=\u4FEE\u6539\u5BA1\u6279\u4E0D\u80FD\u6DFB\u52A0\u65B0\u7684\u5546\u54C1
modify.approval.not.update.warehouse.in=\u5165\u4ED3\u4FEE\u6539\u5BA1\u6279\u4E2D\u4E0D\u80FD\u4FEE\u6539\u6216\u5220\u9664\u5165\u4ED3\u7EAA\u5F55 modify.approval.not.update.warehouse.in=\u5165\u4ED3\u4FEE\u6539\u5BA1\u6279\u4E2D\u4E0D\u80FD\u4FEE\u6539\u6216\u5220\u9664\u5165\u4ED3\u7EAA\u5F55
consignee.phone.is.external=\u63a7\u8d27\u8ba2\u5355\uff0c\u6536\u8d27\u4eba\u624b\u673a\u53f7\u7801\u5fc5\u987b\u662f\u56fd\u5916\u7684 consignee.phone.is.external=\u6536\u8d27\u4eba\u624b\u673a\u53f7\u7801\u5fc5\u987b\u662f\u56fd\u5916\u7684
file.not.upload=\u8BE5\u6587\u4EF6\u672A\u4E0A\u4F20 file.not.upload=\u8BE5\u6587\u4EF6\u672A\u4E0A\u4F20
your.customer.information.is.incomplete=\u60A8\u7684\u5BA2\u6237\u4FE1\u606F\u672A\u5B8C\u5584\uFF01\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01 your.customer.information.is.incomplete=\u60A8\u7684\u5BA2\u6237\u4FE1\u606F\u672A\u5B8C\u5584\uFF01\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01
open.sea.customer.cannot.set.air=\u5BA2\u6237\u3010{}\u3011\u5728\u516C\u6D77\u4E2D\u4E0D\u53EF\u8BBE\u7F6E\u662F\u5426\u7A7A\u8FD0\u5BA2\u6237 open.sea.customer.cannot.set.air=\u5BA2\u6237\u3010{}\u3011\u5728\u516C\u6D77\u4E2D\u4E0D\u53EF\u8BBE\u7F6E\u662F\u5426\u7A7A\u8FD0\u5BA2\u6237
......
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