Browse Source

自提签收BUG修复

pull/7/head
汤建军 1 year ago
parent
commit
633dd601c5
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  2. 126
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -519,7 +519,7 @@
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3'
LEFT JOIN logpm_warehouse_tray lwt on lwtg.tray_id = lwt.id
<where>
ldsi.stockup_id =#{id} and ldpl.order_package_code is not null
ldsi.stockup_id =#{id} and ldpl.order_package_code is not null and ldsi.stock_status != 4
</where>
</select>
<select id="getPageVOList" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">

126
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -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();

Loading…
Cancel
Save