|
|
|
@ -69,6 +69,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
private final DistributionReservationMapper distributionReservationMapper; |
|
|
|
|
private final DistributionParcelListMapper distributionParcelListMapper; |
|
|
|
|
private final DistributionLoadscanMapper distributionLoadscanMapper; |
|
|
|
|
private final DistributionLoadscanServiceImpl distributionLoadscanService; |
|
|
|
|
private final DistributionDeliveryListMapper distributionDeliveryListMapper; |
|
|
|
|
private final DistributionSignforServiceImpl distributionSignforService; |
|
|
|
|
private final DistributionSignforMapper distributionSignforMapper; |
|
|
|
@ -77,6 +78,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
private final DistributionPackadeliServiceImpl distributionPackadeliService; |
|
|
|
|
private final DistributionLoadscanordMapper distributionLoadscanordMapper; |
|
|
|
|
private final DistributionLoadscanresMapper distributionLoadscanresMapper; |
|
|
|
|
private final DistributionDeliverySelfMapper distributionDeliverySelfMapper; |
|
|
|
|
private final BladeRedis bladeRedis; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -238,32 +240,55 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
@Override |
|
|
|
|
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class) |
|
|
|
|
public R loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { |
|
|
|
|
//获取当前用户司机
|
|
|
|
|
DistributionDeliverySelfEntity distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
if (distrilbutionloadingscanDTO.getType() == 1) { |
|
|
|
|
//查询该包条是否属于该配送任务
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
); |
|
|
|
|
if (distrilbutionloadingscanDTO.getStockType() ==1) { |
|
|
|
|
//查询该包条是否属于该配送任务
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverywork(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
// List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
|
|
|
|
|
// .eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
|
|
|
|
|
// .eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode())
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
// List<DistributionDeliveryListEntity> distributionDeliveryListEntities = distributionDeliveryListMapper.selectList(new QueryWrapper<DistributionDeliveryListEntity>()
|
|
|
|
|
// .lambda().eq(DistributionDeliveryListEntity::getState, 1).like(DistributionDeliveryListEntity::getDriverId, user.getUserId())
|
|
|
|
|
// );
|
|
|
|
|
if (distributionLoadscanEntities.size() <= 0) { |
|
|
|
|
return R.fail(3001, "窜货"); |
|
|
|
|
} |
|
|
|
|
//获取当前用户司机
|
|
|
|
|
if (distributionLoadscanEntities.size() <= 0) { |
|
|
|
|
return R.fail(3001, "窜货"); |
|
|
|
|
} |
|
|
|
|
// BladeUser user = AuthUtil.getUser();
|
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { |
|
|
|
|
if (distributionLoadscanEntity.getScanStatus() != 1) {return R.fail(3002, "重复扫码");} |
|
|
|
|
//依次更新该装车记录,设置车辆
|
|
|
|
|
distributionLoadscanMapper.updateSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO); |
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { |
|
|
|
|
//查询是否重复扫码
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode()) |
|
|
|
|
); |
|
|
|
|
if (distributionLoadscanEntitiesflag.size() > 0) { |
|
|
|
|
return R.fail(3002, "重复扫码"); |
|
|
|
|
} |
|
|
|
|
//依次插入该装车记录,设置车辆
|
|
|
|
|
distributionLoadscanEntity.setDriverId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
distributionLoadscanEntity.setScanStatus(2); |
|
|
|
|
distributionLoadscanEntity.setType(2); |
|
|
|
|
distributionLoadscanEntity.setScanTime(new Date()); |
|
|
|
|
if (null != distributionDeliverySelfEntity.getDriverPhone()) { |
|
|
|
|
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
//distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.);
|
|
|
|
|
//依次更新该装车记录,设置车辆
|
|
|
|
|
// distributionLoadscanMapper.updateSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO);
|
|
|
|
|
// distributionLoadscanordMapper.updateSumById(distributionLoadscanEntity.getOrderId(),distrilbutionloadingscanDTO);
|
|
|
|
|
// distributionLoadscanresMapper.updateSumById(distributionLoadscanEntity.getReservationId(),distrilbutionloadingscanDTO);
|
|
|
|
|
//查询本车次是否第一次扫码,没有则更新上车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//更新签收表的装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId()); |
|
|
|
|
//判断是商配还是市配
|
|
|
|
|
//查询本车次是否第一次扫码,没有则更新上车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//更新签收表的装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
//判断是商配还是市配
|
|
|
|
|
// DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
|
|
|
|
|
// if (distributionDeliveryListEntity.getType().equals("1")) {
|
|
|
|
|
// //判断签收表有无客户信息,没有就加入信息
|
|
|
|
@ -287,10 +312,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
// distributionSignforEntity.setDriverSigning("1");
|
|
|
|
|
// distributionSignforMapper.insert(distributionSignforEntity);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
distributionLoadscanService.saveBatch(distributionLoadscanEntities); |
|
|
|
|
// //找出该包条码
|
|
|
|
|
// List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListMapper.selectList(new QueryWrapper<DistributionParcelListEntity>().lambda()
|
|
|
|
|
// .eq(DistributionParcelListEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode()));
|
|
|
|
@ -316,37 +340,120 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
// distributionLoadscanMapper.updateByPackageId(e.getId());
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
}else if (distrilbutionloadingscanDTO.getStockType() ==2){ |
|
|
|
|
//查询该包条是否属于该配送任务
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverywork(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
if (distributionLoadscanEntities.size() <= 0) { |
|
|
|
|
return R.fail(3001, "窜货"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// BladeUser user = AuthUtil.getUser();
|
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { |
|
|
|
|
//查询是否重复扫码
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode()) |
|
|
|
|
); |
|
|
|
|
if (distributionLoadscanEntitiesflag.size() > 0) { |
|
|
|
|
return R.fail(3002, "重复扫码"); |
|
|
|
|
} |
|
|
|
|
//依次插入该装车记录,设置车辆
|
|
|
|
|
distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
distributionLoadscanEntity.setScanStatus(2); |
|
|
|
|
distributionLoadscanEntity.setType(2); |
|
|
|
|
distributionLoadscanEntity.setScanTime(new Date()); |
|
|
|
|
distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
if (null != distributionDeliverySelfEntity.getDriverPhone()) { |
|
|
|
|
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
//distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.);
|
|
|
|
|
//依次更新该装车记录,设置车辆
|
|
|
|
|
// distributionLoadscanMapper.updateSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO);
|
|
|
|
|
// distributionLoadscanordMapper.updateSumById(distributionLoadscanEntity.getOrderId(),distrilbutionloadingscanDTO);
|
|
|
|
|
// distributionLoadscanresMapper.updateSumById(distributionLoadscanEntity.getReservationId(),distrilbutionloadingscanDTO);
|
|
|
|
|
//查询本车次是否第一次扫码,没有则更新上车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//更新签收表的装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
//判断是商配还是市配
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
distributionLoadscanService.saveBatch(distributionLoadscanEntities); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} else if (distrilbutionloadingscanDTO.getType() == 2) { |
|
|
|
|
//TODO 托盘扫描
|
|
|
|
|
//查询该包条是否属于该配送任务
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getTrayId, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
); |
|
|
|
|
if (distributionLoadscanEntities.size() < 0) { |
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverypallet(distrilbutionloadingscanDTO.getBarcode(),distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
if (distributionLoadscanEntities.size() <= 0) { |
|
|
|
|
return R.fail(3001, "窜货"); |
|
|
|
|
} |
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { |
|
|
|
|
if (distributionLoadscanEntity.getScanState() != 1) { |
|
|
|
|
return R.fail(3003, "有扫描过的货物"); |
|
|
|
|
//查询是否重复扫码
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode()) |
|
|
|
|
); |
|
|
|
|
if (distributionLoadscanEntitiesflag.size() > 0) { |
|
|
|
|
return R.fail(3002, "有扫描过的货物"); |
|
|
|
|
} |
|
|
|
|
if (distributionLoadscanEntity.getDeliveryId() != distrilbutionloadingscanDTO.getDeliveryId()) { |
|
|
|
|
return R.fail(3004, "有其他车次货物"); |
|
|
|
|
} |
|
|
|
|
//依次更新该装车记录,设置车辆
|
|
|
|
|
distributionLoadscanMapper.updateSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO); |
|
|
|
|
// distributionLoadscanordMapper.updateSumById(distributionLoadscanEntity.getOrderId(),distrilbutionloadingscanDTO);
|
|
|
|
|
// distributionLoadscanresMapper.updateSumById(distributionLoadscanEntity.getReservationId(),distrilbutionloadingscanDTO);
|
|
|
|
|
//依次插入该装车记录,设置车辆
|
|
|
|
|
distributionLoadscanEntity.setDriverId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
distributionLoadscanEntity.setScanStatus(2); |
|
|
|
|
distributionLoadscanEntity.setType(2); |
|
|
|
|
distributionLoadscanEntity.setScanTime(new Date()); |
|
|
|
|
distributionLoadscanEntity.setTrayNo(distributionLoadscanEntity.getPacketBarCode()); |
|
|
|
|
distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
if (null != distributionDeliverySelfEntity.getDriverPhone()) { |
|
|
|
|
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
//查询本车次是否第一次扫码,没有则更新上车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//更新签收表的装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId()); |
|
|
|
|
// Integer c = distributionSignforMapper.selectCount(new QueryWrapper<DistributionSignforEntity>().lambda().eq(DistributionSignforEntity::get));
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} |
|
|
|
|
distributionLoadscanService.saveBatch(distributionLoadscanEntities); |
|
|
|
|
} else if (distrilbutionloadingscanDTO.getType() == 3) { |
|
|
|
|
|
|
|
|
|
//订单扫描
|
|
|
|
|
//查询订单是否属于该配送任务
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectOrderpallet(distrilbutionloadingscanDTO.getBarcode(),distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { |
|
|
|
|
//查询是否重复扫码
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode()) |
|
|
|
|
); |
|
|
|
|
if (distributionLoadscanEntitiesflag.size() > 0) { |
|
|
|
|
return R.fail(3002, "重复扫描"); |
|
|
|
|
} |
|
|
|
|
//依次插入该装车记录,设置车辆
|
|
|
|
|
distributionLoadscanEntity.setDriverId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
distributionLoadscanEntity.setScanStatus(2); |
|
|
|
|
distributionLoadscanEntity.setType(2); |
|
|
|
|
distributionLoadscanEntity.setScanTime(new Date()); |
|
|
|
|
distributionLoadscanEntity.setScanState(1); |
|
|
|
|
distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
if (null != distributionDeliverySelfEntity.getDriverPhone()) { |
|
|
|
|
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
//查询本车次是否第一次扫码,没有则更新上车时间
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//更新签收表的装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} |
|
|
|
|
distributionLoadscanService.saveBatch(distributionLoadscanEntities); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return R.success("成功"); |
|
|
|
@ -362,6 +469,33 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
//TODO 用个配送司机车辆中间表字段存储状态
|
|
|
|
|
//查询是否属于该配送任务
|
|
|
|
|
Long deliveryId = distrilbutionloadingscanDTO.getDeliveryId(); |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
1. 通过查询这个所有的预约单 |
|
|
|
|
2.通过预约单ID 得到所有的订单 |
|
|
|
|
2.1 得到预约单下面包件 |
|
|
|
|
3.通过预约单Id 得到搜友的库存品及其预约数量 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4. 插入 |
|
|
|
|
|
|
|
|
|
// todo 展示不插入
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5. 更新 |
|
|
|
|
5.1 更新预约单的状态 |
|
|
|
|
5.2 更新预约单关联的订单状态 |
|
|
|
|
5.3 更新预约单关联订单下面的包间状态 |
|
|
|
|
5.4 更新配送表状态 |
|
|
|
|
#5.3 更新预约单关联库存品的数量 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//将该客户所有的物品上该车辆
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
@ -374,19 +508,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
@Override |
|
|
|
|
public R loadingscanoff(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { |
|
|
|
|
if (distrilbutionloadingscanDTO.getType() == 1) { |
|
|
|
|
//查询该包条是否属于该配送任务
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
); |
|
|
|
|
if (distributionLoadscanEntities.size() < 0) { |
|
|
|
|
return R.fail(3001, "窜货"); |
|
|
|
|
} |
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { |
|
|
|
|
//更新该装车记录
|
|
|
|
|
distributionLoadscanMapper.updatecutSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO); |
|
|
|
|
if (distrilbutionloadingscanDTO.getStockType()==1) { |
|
|
|
|
//查询该包条是否属于该配送任务
|
|
|
|
|
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverywork(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
if (distributionLoadscanEntities.size() >0) { |
|
|
|
|
return R.fail(3001, "窜货"); |
|
|
|
|
} |
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { |
|
|
|
|
//取消装车,更新该装车记录
|
|
|
|
|
distributionLoadscanMapper.updatecutSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO); |
|
|
|
|
// distributionLoadscanordMapper.updatecutSumById(distributionLoadscanEntity.getOrderId(),distrilbutionloadingscanDTO);
|
|
|
|
|
// distributionLoadscanresMapper.updatecutSumById(distributionLoadscanEntity.getReservationId(),distrilbutionloadingscanDTO);
|
|
|
|
|
//更新签收表的装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if (distrilbutionloadingscanDTO.getType() == 2) { |
|
|
|
|
//TODO 托盘扫描
|
|
|
|
@ -407,6 +542,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}else if (distrilbutionloadingscanDTO.getType() == 3){ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return R.success("成功"); |
|
|
|
|
} |
|
|
|
|