|
|
@ -71,6 +71,7 @@ import org.springblade.common.constant.order.OrderStatusConstant; |
|
|
|
import org.springblade.common.constant.orderpackage.*; |
|
|
|
import org.springblade.common.constant.orderpackage.*; |
|
|
|
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant; |
|
|
|
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant; |
|
|
|
import org.springblade.common.constant.reservation.*; |
|
|
|
import org.springblade.common.constant.reservation.*; |
|
|
|
|
|
|
|
import org.springblade.common.constant.signing.SignforDriverSigningStatusConstant; |
|
|
|
import org.springblade.common.constant.signing.SignforStatusConstant; |
|
|
|
import org.springblade.common.constant.signing.SignforStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockAssignStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockAssignStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockupStatusConstant; |
|
|
|
import org.springblade.common.constant.stockup.StockupStatusConstant; |
|
|
@ -1702,8 +1703,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
BigDecimal outboundQuantity = new BigDecimal(parcelNumberVO.getOutboundQuantity()); |
|
|
|
BigDecimal outboundQuantity = new BigDecimal(parcelNumberVO.getOutboundQuantity()); |
|
|
|
BigDecimal deliveryQuantity = new BigDecimal(parcelNumberVO.getDeliveryQuantity()); |
|
|
|
BigDecimal deliveryQuantity = new BigDecimal(parcelNumberVO.getDeliveryQuantity()); |
|
|
|
int handNum = handQuantity.subtract(reservationNum).intValue(); |
|
|
|
int handNum = handQuantity.subtract(reservationNum).intValue(); |
|
|
|
assert parcelNumberEntity != null; |
|
|
|
parcelNumberEntity.setHandQuantity(handNum); |
|
|
|
parcelNumberEntity.setHandQuantity(handNum); |
|
|
|
|
|
|
|
int outboundNum = outboundQuantity.add(reservationNum).intValue(); |
|
|
|
int outboundNum = outboundQuantity.add(reservationNum).intValue(); |
|
|
|
parcelNumberEntity.setOutboundQuantity(outboundNum); |
|
|
|
parcelNumberEntity.setOutboundQuantity(outboundNum); |
|
|
|
parcelNumberEntity.setDeliveryQuantity(deliveryQuantity.subtract(reservationNum).intValue()); |
|
|
|
parcelNumberEntity.setDeliveryQuantity(deliveryQuantity.subtract(reservationNum).intValue()); |
|
|
@ -2398,8 +2398,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
distributionStockArticleVOS.add(distributionStockArticleVO); |
|
|
|
distributionStockArticleVOS.add(distributionStockArticleVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
assert deliveryListVO != null; |
|
|
|
deliveryListVO.setStockArticleList(distributionStockArticleVOS); |
|
|
|
deliveryListVO.setStockArticleList(distributionStockArticleVOS); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log.error("##############配送任务查询异常,查询ID为:{}", id); |
|
|
|
log.error("##############配送任务查询异常,查询ID为:{}", id); |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -4131,6 +4130,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
if (Func.isNotEmpty(loadscanEntities)) { |
|
|
|
if (Func.isNotEmpty(loadscanEntities)) { |
|
|
|
loadingDataMap = loadscanEntities.stream().collect(Collectors.toMap(DistributionLoadscanEntity::getPackageId, Function.identity(), (k1, k2) -> k2)); |
|
|
|
loadingDataMap = loadscanEntities.stream().collect(Collectors.toMap(DistributionLoadscanEntity::getPackageId, Function.identity(), (k1, k2) -> k2)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>(); |
|
|
|
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>(); |
|
|
|
if (Func.isNotEmpty(reservationStockarticleEntityList)) { |
|
|
|
if (Func.isNotEmpty(reservationStockarticleEntityList)) { |
|
|
|
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); |
|
|
|
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); |
|
|
@ -4356,6 +4356,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<DistributionStockArticleVO> selectDiscussStockArticleInfoList(Map<String, Object> params, Query query, Long deliveryListId) { |
|
|
|
public IPage<DistributionStockArticleVO> selectDiscussStockArticleInfoList(Map<String, Object> params, Query query, Long deliveryListId) { |
|
|
|
|
|
|
|
IPage<DistributionStockArticleVO> page = Condition.getPage(query); |
|
|
|
//这里还需要查询出该配送任务下的订单信息,在进行编辑的时候进行回显
|
|
|
|
//这里还需要查询出该配送任务下的订单信息,在进行编辑的时候进行回显
|
|
|
|
// String deliveryId = (String) params.get("deliveryId");
|
|
|
|
// String deliveryId = (String) params.get("deliveryId");
|
|
|
|
//查询出配送任务下的订单
|
|
|
|
//查询出配送任务下的订单
|
|
|
@ -5858,11 +5859,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
if (Func.isNotEmpty(zeroLoadscanEntity)) { |
|
|
|
if (Func.isNotEmpty(zeroLoadscanEntity)) { |
|
|
|
//存在装车数据
|
|
|
|
//存在装车数据
|
|
|
|
int num = zeroLoadscanEntity.getLoadedNub() - retentionQuantity; |
|
|
|
int num = zeroLoadscanEntity.getLoadedNub() - retentionQuantity; |
|
|
|
zeroLoadscanEntity.setLoadedNub(0); |
|
|
|
if (num > 0) { |
|
|
|
zeroLoadscanEntity.setPackageNub(0); |
|
|
|
zeroLoadscanEntity.setLoadedNub(0); |
|
|
|
if (num <= 0) { |
|
|
|
zeroLoadscanEntity.setPackageNub(0); |
|
|
|
zeroLoadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue()); |
|
|
|
} else { |
|
|
|
} |
|
|
|
zeroLoadscanEntity.setLoadedNub(0); |
|
|
|
|
|
|
|
zeroLoadscanEntity.setPackageNub(0); |
|
|
|
|
|
|
|
zeroLoadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
distributionLoadscanService.updateById(zeroLoadscanEntity); |
|
|
|
distributionLoadscanService.updateById(zeroLoadscanEntity); |
|
|
|
//扣减装车数量
|
|
|
|
//扣减装车数量
|
|
|
|
int a = distributionSignforMapper.deductionLoadingPacjageNum(zeroLoadscanEntity.getReservationId(), zeroLoadscanEntity.getDeliveryId(), retentionQuantity); |
|
|
|
int a = distributionSignforMapper.deductionLoadingPacjageNum(zeroLoadscanEntity.getReservationId(), zeroLoadscanEntity.getDeliveryId(), retentionQuantity); |
|
|
@ -6297,7 +6301,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
|
|
|
|
|
|
|
|
// 通过预约单查询预约下面的订单 --1 或者 库存品 --2
|
|
|
|
// 通过预约单查询预约下面的订单 --1 或者 库存品 --2
|
|
|
|
List<Map<String, Object>> spaclStockList = buildSpaclOrders(distributionReservationEntity, 2); |
|
|
|
List<Map<String, Object>> spaclStockList = buildSpaclOrders(distributionReservationEntity, 2); |
|
|
|
if (!spaclStockList.isEmpty() ) { |
|
|
|
if (spaclStockList.size() > 0 && !spaclStockList.isEmpty()) { |
|
|
|
map.put("库存品集合", spaclStockList); |
|
|
|
map.put("库存品集合", spaclStockList); |
|
|
|
Integer spaclStockNum = 0; |
|
|
|
Integer spaclStockNum = 0; |
|
|
|
for (Map<String, Object> m : spaclStockList) { |
|
|
|
for (Map<String, Object> m : spaclStockList) { |
|
|
@ -6633,10 +6637,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
n = String.valueOf(anInt + 1); |
|
|
|
n = String.valueOf(anInt + 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
bladeRedis.set(s, n); |
|
|
|
|
|
|
|
return n; |
|
|
|
return n; |
|
|
|
} else { |
|
|
|
} |
|
|
|
bladeRedis.set(s, n); |
|
|
|
|
|
|
|
return n; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 工单查询配送数据 |
|
|
|
* 工单查询配送数据 |
|
|
@ -6745,11 +6752,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
if (loadingNum == 0) { |
|
|
|
if (loadingNum == 0) { |
|
|
|
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue()); |
|
|
|
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log.error(method + "查询配送无计划数量,deliveryId:{}", deliveryId); |
|
|
|
log.error(method + "查询配送无计划数量,deliveryId:{}", deliveryId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//维护状态
|
|
|
|
|
|
|
|
List<DistributionSignforEntity> list = distributionSignforService.list(Wrappers.<DistributionSignforEntity>query().lambda() |
|
|
|
|
|
|
|
.eq(DistributionSignforEntity::getDeliveryId, deliveryId) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!list.isEmpty()){ |
|
|
|
|
|
|
|
//查看所有的签收信息是否均已完成
|
|
|
|
|
|
|
|
boolean anyMatch = list.stream().allMatch(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())); |
|
|
|
|
|
|
|
if (anyMatch){ |
|
|
|
|
|
|
|
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.updateById(deliveryListEntity); |
|
|
|
this.updateById(deliveryListEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|