Commit e0042f37 authored by liuzeheng's avatar liuzeheng

截取单号

parent 2784ddb9
......@@ -105,7 +105,7 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
String orderNumber = orderNumCode.substring(0, position);
if(orderNumCode.contains("A") && orderNumCode.startsWith("A")){
this.scanCodeByOrderNo(orderNumber,vo,createReqVO);
this.scanCodeByOrderNo(orderNumCode,vo,createReqVO);
}
BoxMergePkgDO boxMergePkgDO = boxMergePkgService.selectOne(new LambdaQueryWrapper<BoxMergePkgDO>()
......@@ -229,7 +229,9 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
return "success";
}
private String scanCodeByOrderNo(String orderNumber ,BoxPkgOrderCreateReqVO vo, BoxPkgOrderScanCodeVO createReqVO){
private String scanCodeByOrderNo(String orderNumCode ,BoxPkgOrderCreateReqVO vo, BoxPkgOrderScanCodeVO createReqVO){
int position = orderNumCode.lastIndexOf("-");
String orderNumber = orderNumCode.substring(0, position);
Long orderId = orderService.getOrderIdByOrderNo(orderNumber);
if(Objects.isNull(orderId)){
throw exception(ORDER_NOT_IN_BOX);
......@@ -256,8 +258,8 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
//找到这个订单所有需要装柜的编号
List<String> tagList = boxOrderCheckInfoService.getOrderTagList(order);
List<BoxOrderCheckInfoDO> boxOrderCheckInfoDOS = new ArrayList<>();
for (int i = 0; i < tagList.size(); i++) {
String tag = tagList.get(i);
if(tagList.contains(orderNumCode) ){
String tag = orderNumCode ;
BoxOrderCheckInfoDO boxOrderCheckInfoDO = new BoxOrderCheckInfoDO();
boxOrderCheckInfoDO.setOrderId(orderId);
boxOrderCheckInfoDO.setPkgId(boxMergePkgDO.getId());
......@@ -267,6 +269,18 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
boxOrderCheckInfoDO.setDeleted(false);
boxOrderCheckInfoDOS.add(boxOrderCheckInfoDO);
}
// for (int i = 0; i < tagList.size(); i++) {
// String tag = tagList.get(i);
// BoxOrderCheckInfoDO boxOrderCheckInfoDO = new BoxOrderCheckInfoDO();
// boxOrderCheckInfoDO.setOrderId(orderId);
// boxOrderCheckInfoDO.setPkgId(boxMergePkgDO.getId());
// boxOrderCheckInfoDO.setOrderNumCode(tag);
// boxOrderCheckInfoDO.setShipmentId(createReqVO.getShipmentId());
// boxOrderCheckInfoDO.setType(1);
// boxOrderCheckInfoDO.setDeleted(false);
// boxOrderCheckInfoDOS.add(boxOrderCheckInfoDO);
// }
boxOrderCheckInfoService.saveBatch(boxOrderCheckInfoDOS);
}
return "success" ;
......
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