|
|
|
@ -2661,6 +2661,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.yiwancheng.getValue())) { |
|
|
|
|
return R.fail("配送已完成..."); |
|
|
|
|
} |
|
|
|
|
//检测是否进行发车
|
|
|
|
|
Boolean isStrat = baseMapper.checkDeliveryStart(deliveryListEntityId); |
|
|
|
|
//TODO 发车校验
|
|
|
|
|
// if (isStrat){
|
|
|
|
|
// return R.fail("配送已发车,请取消发车后进行任务编辑...");
|
|
|
|
|
// }
|
|
|
|
|
if (IsOrNoConstant.yes.getValue().equals(deliveryListDTO.getIsDeliveryDriverUpdate())) { |
|
|
|
|
//查看是否满足进行司机修改
|
|
|
|
|
//查询是否存在有装车数据,存在装车则不满足司机切换
|
|
|
|
@ -4509,7 +4515,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
String loadingId = distrilbutionloadingscanDTO.getLoadingId(); |
|
|
|
|
Boolean b = false; |
|
|
|
|
if ("1".equals(distributionDeliveryListEntity.getKind())) { |
|
|
|
|
b = distributionDeliverySelfService.update(new UpdateWrapper<DistributionDeliverySelfEntity>().lambda().eq(DistributionDeliverySelfEntity::getId, loadingId).set(DistributionDeliverySelfEntity::getDepartureTime, format)); |
|
|
|
|
b = distributionDeliverySelfService.update(new UpdateWrapper<DistributionDeliverySelfEntity>().lambda() |
|
|
|
|
.eq(DistributionDeliverySelfEntity::getId, loadingId) |
|
|
|
|
.set(DistributionDeliverySelfEntity::getDepartureTime, format) |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
b = distributionDeliveryTripartiteService.update(new UpdateWrapper<DistributionDeliveryTripartiteEntity>().lambda().eq(DistributionDeliveryTripartiteEntity::getId, loadingId).set(DistributionDeliveryTripartiteEntity::getDepartureTime, format)); |
|
|
|
|
|
|
|
|
@ -7189,7 +7198,29 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R cancelStart(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { |
|
|
|
|
return null; |
|
|
|
|
//获取当前用户司机
|
|
|
|
|
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
if ("3".equals(distributionDeliveryListEntity.getDeliveryStatus())) { |
|
|
|
|
return Resp.scanFail("该任务已完结!", "该任务已完结!"); |
|
|
|
|
} |
|
|
|
|
String loadingId = distrilbutionloadingscanDTO.getLoadingId(); |
|
|
|
|
Boolean b = false; |
|
|
|
|
if ("1".equals(distributionDeliveryListEntity.getKind())) { |
|
|
|
|
b = distributionDeliverySelfService.update(new UpdateWrapper<DistributionDeliverySelfEntity>().lambda() |
|
|
|
|
.eq(DistributionDeliverySelfEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionDeliverySelfEntity::getIsMaster, "2") |
|
|
|
|
.set(DistributionDeliverySelfEntity::getDepartureTime, null) |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
b = distributionDeliveryTripartiteService.update(new UpdateWrapper<DistributionDeliveryTripartiteEntity>().lambda() |
|
|
|
|
.eq(DistributionDeliveryTripartiteEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.set(DistributionDeliveryTripartiteEntity::getDepartureTime, null) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
//修改主表状态
|
|
|
|
|
distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.daipeisong.getValue()); |
|
|
|
|
baseMapper.updateById(distributionDeliveryListEntity); |
|
|
|
|
return R.success("取消发车成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|