Commit ffd169b3 authored by liuzeheng's avatar liuzeheng

装箱提示

parent 185b1bc5
......@@ -42,9 +42,11 @@ import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.*;
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.shipment.enums.ErrorCodeConstants.*;
/**
......@@ -102,6 +104,7 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
if(position >= 0) {
if(orderNumCode.contains("A") && orderNumCode.startsWith("A")){
return this.scanCodeByOrderNo(orderNumCode,vo,createReqVO);
}
......@@ -165,6 +168,16 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
}
OrderDO order = orderService.getById(orderId);
vo.setOrderId(orderId);
List<BoxOrderCheckInfoDO> tags = boxOrderCheckInfoService.getOrderTagNumList(order);
if(CollectionUtil.isNotEmpty(tags)){
List<BoxOrderCheckInfoDO> orderNum = tags.stream().filter(t-> t.getOrderNumCode().equals(orderNumCode) || t.getOrderNumCode()==orderNumCode).collect(Collectors.toList());
if(CollectionUtil.isEmpty(orderNum)){
throw exception(ORDER_NOT_EXISTS);
}
}
BoxMergePkgDO boxMergePkgDO = boxMergePkgService.selectOne(new LambdaQueryWrapperX<BoxMergePkgDO>().eq(BoxMergePkgDO::getPkgNum,createReqVO.getPkgNum()));
vo.setPkgId(boxMergePkgDO.getId()) ;
List<BoxPkgOrderDO> pkgOrderDO = boxPkgOrderMapper.selectList(new LambdaQueryWrapperX<BoxPkgOrderDO>().eq(BoxPkgOrderDO::getOrderId,orderId).eq(BoxPkgOrderDO::getPkgId,boxMergePkgDO.getId()));
......
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