Browse Source

修改预约单出现打印删除的预约数据

single_db
pref_mail@163.com 1 year ago
parent
commit
1f407264bf
  1. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  2. 59
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  3. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -365,6 +365,7 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperation(value = "批量打印 配送单")
public R<List<PrintPreviewVO>> printBatch(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "打印类型", required = true) @RequestParam Integer type) {
try {
log.info(">>>>>>>>>>>>>>>>>> printBatch {}",ids);
List<PrintPreviewVO> printPreviewVOS = distributionDeliveryListService.printBatch(ids, type);
return R.data(printPreviewVOS);
} catch (Exception e) {

59
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -2657,14 +2657,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询满足条件的托盘码
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionAppReservationVO.getId());
int trayNum = 0;
if (Func.isNotEmpty(distributionParcelListEntities)){
if (Func.isNotEmpty(distributionParcelListEntities)) {
List<String> packageCodeList = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.toList());
List<WarehouseTrayGoodsEntity> collect = trayList.stream().distinct().collect(Collectors.toList());
for (WarehouseTrayGoodsEntity warehouseTrayGoodsEntity : collect) {
List<WarehouseTrayGoodsEntity> trayIdList = warehouseTrayGoodsClient.getTrayIdList(warehouseTrayGoodsEntity.getTrayId().toString(), warehouseTrayGoodsEntity.getTrayCode());
//判断该托盘上的货物都存在于计划之中
boolean isLoadingTrayFlag = trayIdList.stream().map(WarehouseTrayGoodsEntity::getAssociationValue).allMatch(t -> packageCodeList.contains(t));
if (isLoadingTrayFlag){
if (isLoadingTrayFlag) {
trayNum += 1;
}
}
@ -4599,8 +4599,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
throw new ServiceException("参数错误");
}
if (2 == type) {
log.info(">>>>> printBatch 市配 {}",ids);
return handleShiPeiData(template, idArray, html);
} else if (1 == type) {
log.info(">>>>> printBatch 商配 {}",ids);
return handleShangPeiData(template.getId(), idArray, html);
} else if (3 == type) {
// 自提
@ -5829,16 +5832,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
abnormalPackageVO.setIsAbnormalSinging(1);
aftersalesAbnormalPackageVOS.add(abnormalPackageVO);
}
}else {
} else {
//查看是否是异常装车包件
List<DistributionLoadscanEntity> list = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId)
.eq(DistributionLoadscanEntity::getIsAbnormalLoading, IsOrNoConstant.yes.getValue())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(list)){
if (Func.isNotEmpty(list)) {
List<DistributionLoadscanEntity> abnormalPackageList = list.stream().filter(f -> f.getOrderPackageCode().equals(scanBarCode)).collect(Collectors.toList());
if (Func.isNotEmpty(abnormalPackageList)){
if (Func.isNotEmpty(abnormalPackageList)) {
for (DistributionLoadscanEntity distributionLoadscanEntity : abnormalPackageList) {
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(distributionLoadscanEntity.getPackageId());
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(distributionLoadscanEntity, AftersalesAbnormalPackageVO.class);
@ -5893,7 +5896,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
List<DistributionRetentionScanVo> distributionRetentionScanVos = distributionDeliveryListMapper.selectRetentionZeroPackage(deliveryId, scanBarCode);
if (Func.isNotEmpty(distributionRetentionScanVos)){
if (Func.isNotEmpty(distributionRetentionScanVos)) {
for (DistributionRetentionScanVo distributionRetentionScanVo : distributionRetentionScanVos) {
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(distributionRetentionScanVo, AftersalesAbnormalPackageVO.class);
abnormalPackageVO.setConditions(3);
@ -5925,10 +5928,32 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if ("1".equals(kind)) {
QueryWrapper<DistributionDeliverySelfEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("delivery_id", deliveryListEntityId);
DistributionDeliverySelfEntity deliverySelfEntity = distributionDeliverySelfService.getOne(queryWrapper);
dirverName = deliverySelfEntity.getDriverName();
dirverPhone = deliverySelfEntity.getDriverPhone();
carNumber = deliverySelfEntity.getVehicleNub();
List<DistributionDeliverySelfEntity> deliverySelfEntity = distributionDeliverySelfService.list(queryWrapper);
StringBuilder sbName = new StringBuilder();
StringBuilder sbPhone = new StringBuilder();
StringBuilder sbCarNumber = new StringBuilder();
for (DistributionDeliverySelfEntity distributionDeliverySelfEntity : deliverySelfEntity) {
if (!sbName.toString().equals("")) {
sbName.append("/");
}
sbName.append(distributionDeliverySelfEntity.getDriverName());
if (!sbPhone.toString().equals("")) {
sbPhone.append("/");
}
sbPhone.append(distributionDeliverySelfEntity.getDriverPhone());
if (!sbCarNumber.toString().equals("")) {
sbCarNumber.append("/");
}
sbCarNumber.append(distributionDeliverySelfEntity.getVehicleNub());
}
dirverName = sbName.toString();
dirverPhone = sbPhone.toString();
carNumber = sbCarNumber.toString();
} else if ("2".equals(kind)) {
QueryWrapper<DistributionDeliveryTripartiteEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("delivery_id", deliveryListEntityId);
@ -6256,7 +6281,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
switch (i) {
case 1:
// 订单
distributionReservationStockarticleEntityList = distributionReservationStockarticleService.lambdaQuery().eq(DistributionReservationStockarticleEntity::getReservationId, distributionReservationEntity.getId()).list();
LambdaQueryWrapper<DistributionReservationStockarticleEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DistributionReservationStockarticleEntity::getReservationId, distributionReservationEntity.getId());
lambdaQueryWrapper.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, 2);
distributionReservationStockarticleEntityList = distributionReservationStockarticleService.list(lambdaQueryWrapper);
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 订单总数 {}",distributionReservationStockarticleEntityList.size());
// 取值
for (DistributionReservationStockarticleEntity distributionReservationStockarticleEntity : distributionReservationStockarticleEntityList) {
@ -6297,7 +6328,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
break;
case 2:
distributionReservationStocklistEntities = distributionReservationStocklistService.lambdaQuery().eq(DistributionReservationStocklistEntity::getReservationId, distributionReservationEntity.getId()).list();
distributionReservationStocklistEntities = distributionReservationStocklistService.lambdaQuery().eq(DistributionReservationStocklistEntity::getReservationId, distributionReservationEntity.getId()).ne(DistributionReservationStocklistEntity::getStockListStatus,2).list();
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 库存品总数 {}",distributionReservationStocklistEntities.size());
if (distributionReservationStocklistEntities.isEmpty()) {
return result;
}

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -248,7 +248,8 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
//添加入库明细
Iterator<WarehouseWarehousingDetailEntity> iterator = list.iterator();
while (iterator.hasNext()){
if(ObjectUtils.isNotNull(iterator.next().getConditions() ) && iterator.next().getConditions().equals("3")){
WarehouseWarehousingDetailEntity next = iterator.next();
if(ObjectUtils.isNotNull(next.getConditions() ) && next.getConditions().equals("3")){
iterator.remove();
}
}

Loading…
Cancel
Save