|
|
|
@ -1389,76 +1389,76 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
String[] split = stockArticleId.split(","); |
|
|
|
|
|
|
|
|
|
List<DistrilbutionAppBillLadingOrderVO> l = new ArrayList<>(); |
|
|
|
|
// for (String s : split) {
|
|
|
|
|
// if (StringUtil.isBlank(s)) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// DistrilbutionAppBillLadingOrderVO vo = new DistrilbutionAppBillLadingOrderVO();
|
|
|
|
|
// vo.setStockArticleId(Long.parseLong(s));
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
for (String s : split) { |
|
|
|
|
if (StringUtil.isBlank(s)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
DistrilbutionAppBillLadingOrderVO vo = new DistrilbutionAppBillLadingOrderVO(); |
|
|
|
|
vo.setStockArticleId(Long.parseLong(s)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// orderNum++;
|
|
|
|
|
// QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
// queryWrapper.eq("stock_article_id", Long.parseLong(s))
|
|
|
|
|
// .eq("is_deleted", 0)
|
|
|
|
|
// .isNotNull("order_package_code");
|
|
|
|
|
// if (!StringUtil.isBlank(orderSelfNumbering)) {
|
|
|
|
|
// queryWrapper.ne("order_self_numbering", orderSelfNumbering);
|
|
|
|
|
// }
|
|
|
|
|
// List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
|
|
|
|
|
// int pn = 0;
|
|
|
|
|
// if (!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))) {
|
|
|
|
|
// vo.setOrderSelfNumbering(list.get(0).getOrderCode());
|
|
|
|
|
// pn = list.size();
|
|
|
|
|
// vo.setPlanNum(pn);
|
|
|
|
|
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("stock_article_id", Long.parseLong(s)) |
|
|
|
|
.eq("is_deleted", 0) |
|
|
|
|
.isNotNull("order_package_code"); |
|
|
|
|
if (!StringUtil.isBlank(orderSelfNumbering)) { |
|
|
|
|
queryWrapper.ne("order_self_numbering", orderSelfNumbering); |
|
|
|
|
} |
|
|
|
|
List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper); |
|
|
|
|
int pn = 0; |
|
|
|
|
if (!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))) { |
|
|
|
|
vo.setOrderSelfNumbering(list.get(0).getOrderCode()); |
|
|
|
|
pn = list.size(); |
|
|
|
|
vo.setPlanNum(pn); |
|
|
|
|
// planNum = planNum + pn;
|
|
|
|
|
// }
|
|
|
|
|
// //通过订单id查询扫描表中有多少数据
|
|
|
|
|
// QueryWrapper<DistributionBillLadingScanEntity> qw = new QueryWrapper<>();
|
|
|
|
|
// qw.eq("stock_article_id", Long.parseLong(s))
|
|
|
|
|
// .eq("is_deleted", 0);
|
|
|
|
|
// qw.eq("bill_lading_id", main.getBillLadingId());
|
|
|
|
|
// List<DistributionBillLadingScanEntity> ls = distributionBillLadingScanService.list(qw);
|
|
|
|
|
// int sn = ls.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
|
|
|
|
|
// vo.setSignedNum(sn);
|
|
|
|
|
} |
|
|
|
|
//通过订单id查询扫描表中有多少数据
|
|
|
|
|
QueryWrapper<DistributionBillLadingScanEntity> qw = new QueryWrapper<>(); |
|
|
|
|
qw.eq("stock_article_id", Long.parseLong(s)) |
|
|
|
|
.eq("is_deleted", 0); |
|
|
|
|
qw.eq("bill_lading_id", main.getBillLadingId()); |
|
|
|
|
List<DistributionBillLadingScanEntity> ls = distributionBillLadingScanService.list(qw); |
|
|
|
|
int sn = ls.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum(); |
|
|
|
|
vo.setSignedNum(sn); |
|
|
|
|
// signedNum = signedNum + sn;
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
// if (pn == sn) {
|
|
|
|
|
// conpleteNum++;
|
|
|
|
|
// }
|
|
|
|
|
// if (pn == sn) {
|
|
|
|
|
// vo.setOrderStatusStr("齐套");
|
|
|
|
|
// } else if (sn < pn && sn > 0) {
|
|
|
|
|
// vo.setOrderStatusStr("部分扫");
|
|
|
|
|
// } else if (sn == 0) {
|
|
|
|
|
// vo.setOrderStatusStr("未扫");
|
|
|
|
|
// }
|
|
|
|
|
// //不添加订单数
|
|
|
|
|
// if (list.isEmpty() || !list.isEmpty() && ObjectUtils.isNull(list.get(0))) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// //0 全部 1 齐套 2部分扫 3未扫
|
|
|
|
|
// if (orderStatus == 0) {
|
|
|
|
|
// l.add(vo);
|
|
|
|
|
// } else if (orderStatus == 1) {
|
|
|
|
|
// if (pn == sn) {
|
|
|
|
|
// l.add(vo);
|
|
|
|
|
// }
|
|
|
|
|
// } else if (orderStatus == 2) {
|
|
|
|
|
// if (sn < pn && sn > 0) {
|
|
|
|
|
// l.add(vo);
|
|
|
|
|
// }
|
|
|
|
|
// } else if (orderStatus == 3) {
|
|
|
|
|
// if (sn == 0) {
|
|
|
|
|
// l.add(vo);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//查询库存品
|
|
|
|
|
if (pn == sn) { |
|
|
|
|
vo.setOrderStatusStr("齐套"); |
|
|
|
|
} else if (sn < pn && sn > 0) { |
|
|
|
|
vo.setOrderStatusStr("部分扫"); |
|
|
|
|
} else if (sn == 0) { |
|
|
|
|
vo.setOrderStatusStr("未扫"); |
|
|
|
|
} |
|
|
|
|
//不添加订单数
|
|
|
|
|
if (list.isEmpty() || !list.isEmpty() && ObjectUtils.isNull(list.get(0))) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
//0 全部 1 齐套 2部分扫 3未扫
|
|
|
|
|
if (orderStatus == 0) { |
|
|
|
|
l.add(vo); |
|
|
|
|
} else if (orderStatus == 1) { |
|
|
|
|
if (pn == sn) { |
|
|
|
|
l.add(vo); |
|
|
|
|
} |
|
|
|
|
} else if (orderStatus == 2) { |
|
|
|
|
if (sn < pn && sn > 0) { |
|
|
|
|
l.add(vo); |
|
|
|
|
} |
|
|
|
|
} else if (orderStatus == 3) { |
|
|
|
|
if (sn == 0) { |
|
|
|
|
l.add(vo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 查询库存品
|
|
|
|
|
// List<DistributionDeliveryDetailsEntity> list = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
|
|
|
|
|
// .eq(DistributionDeliveryDetailsEntity::getBillLadingId, billLadingId)
|
|
|
|
|
// );
|
|
|
|
|
//查询是否签收完成
|
|
|
|
|
// 查询是否签收完成
|
|
|
|
|
// List<DistributionDeliveryDetailsEntity> list1 = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
|
|
|
|
|
// .eq(DistributionDeliveryDetailsEntity::getBillLadingId, billLadingId)
|
|
|
|
|
// );
|
|
|
|
@ -1466,7 +1466,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
// long count = list1.stream().filter(i -> i.getConditions().equals("2")).count();
|
|
|
|
|
// signedNum += (int) count;
|
|
|
|
|
// }
|
|
|
|
|
//查询签收件数
|
|
|
|
|
// 查询签收件数
|
|
|
|
|
// List<DistributionBillLadingScanEntity> list2 = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
|
|
|
|
|
// .eq(DistributionBillLadingScanEntity::getBillLadingId, billLadingId)
|
|
|
|
|
// .eq(DistributionBillLadingScanEntity::getMaterialType, "1")
|
|
|
|
@ -1826,7 +1826,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
return Resp.scanFail("3000", "参数不完整!!"); |
|
|
|
|
} else { |
|
|
|
|
DistrilbutionBillLadingEntity billLadingEntity1 = baseMapper.selectById((Serializable) billLadingId); |
|
|
|
|
if (ObjectUtils.isNotNull(billLadingEntity1) && "20".equals(billLadingEntity1.getConditions())) { |
|
|
|
|
if (ObjectUtils.isNotNull(billLadingEntity1) && "30".equals(billLadingEntity1.getConditions())) { |
|
|
|
|
return Resp.scanFail("提货任务已完成!", "提货任务已完成!"); |
|
|
|
|
} |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
|