Commit 170b613e authored by zhaobiyan's avatar zhaobiyan

Merge remote-tracking branch 'origin/dev' into dev

parents ee0bc308 1ce1e64b
......@@ -2898,7 +2898,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO,
null,
OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION,
String.format("订单【%s】中的商品【%s】未报价6",
String.format("订单【%s】中的商品【%s】未报价",
orderDO.getOrderNo(),
orderItemDO.getProdTitleZh()),
String.format("The goods 【%s】 in the order 【%s】 are not quoted",
......
......@@ -45,8 +45,7 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.ORDER_IS_PRE_INSTALLED;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.ORDER_NOT_EXISTS;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.*;
import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.*;
/**
......@@ -226,7 +225,15 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
private void create(BoxPkgOrderCreateReqVO createReqVO) {
checkMergePkgStatus(createReqVO.getPkgId());
BoxDO boxDO = checkMergePkgStatus(createReqVO.getPkgId());
// 这里添加合包装箱时,需要检查订单是否为该出货单下的预装订单
long count = boxPreloadGoodsMapper.selectCount(new LambdaQueryWrapper<BoxPreloadGoodsDO>()
.eq(BoxPreloadGoodsDO::getOrderId, createReqVO.getOrderId())
.eq(BoxPreloadGoodsDO::getShipmentId, boxDO.getId()));
if (count == 0){
// 订单未预装,不能合包
throw exception(ORDER_IS_NOT_PRE_INSTALLED);
}
List<OrderItemDO> orderItemDOS = orderItemService.selectList(OrderItemDO::getOrderId, createReqVO.getOrderId());
orderItemDOS.stream().forEach(item -> {
// 插入
......@@ -359,11 +366,12 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
return map;
}
private void checkMergePkgStatus(Long pkgId) {
private BoxDO checkMergePkgStatus(Long pkgId) {
BoxMergePkgDO boxMergePkgDO = boxMergePkgService.selectOne(BoxMergePkgDO::getId, pkgId);
BoxDO box = boxService.getBox(boxMergePkgDO.getShipmentId());
if (box.getAirShipmentStatus() != AirShipmentStatusEnum.UNSHIPMENT.getStatus()) {
throw exception(MERGE_PKG_IS_FINISH);
}
return box;
}
}
......@@ -998,6 +998,8 @@ order.already.in.merge.pkg=The order has been placed under the packaging box
customer.is.new.or.old.no.change=customer current business type is {}, it's no change
order.is.pre.installed=Order pre installed
customer.delay.approval.times.more.then.one=delay approval times more then one
order.is.not.pre.installed =Order not pre installed, unable to package together
member.id.is.null=no member ids
score.count.error= score count must > 0
member.score.not.enough = member score not enough
......
......@@ -1001,7 +1001,7 @@ case.num.in.merge.pkg=\u6B64\u7BB1\u5DF2\u88AB\u5408\u5305\uFF0C\u8BF7\u626B\u63
order.already.in.merge.pkg=\u8BA2\u5355\u5DF2\u5728\u5408\u5305\u7BB1\u4E0B
customer.is.new.or.old.no.change=\u5BA2\u6237\u5F53\u524D\u4E1A\u7EE9\u7C7B\u578B\u662F{}\u5BA2\u6237\uFF0C\u4E0D\u9700\u8981\u66F4\u65B0
order.is.pre.installed=\u8BA2\u5355\u5DF2\u9884\u88C5
order.is.not.pre.installed =\u8BA2\u5355\u672A\u88C5\u7BB1\uFF0C\u4E0D\u80FD\u5408\u5305
order.is.not.pre.installed =\u8ba2\u5355\u672a\u9884\u88c5\uff0c\u4e0d\u80fd\u5408\u5305
member.id.is.null=\u7F3A\u5C11\u4F1A\u5458id
score.count.error=\u79EF\u5206\u5FC5\u987B > 0
member.score.not.enough = \u4F1A\u5458\u79EF\u5206\u4E0D\u8DB3
......
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