拆分后将用车需求编号置空

This commit is contained in:
王帅 2025-06-13 14:40:45 +08:00
parent c690338c16
commit 668e248e84

View File

@ -328,9 +328,9 @@ public class VehicleDemandController extends JeecgController<VehicleDemand, IVeh
@PostMapping("/handleUnbind")
public Result<?> handleUnbind(@RequestBody List<String> ids) {
List<VehicleDemand> vehicleDemands = vehicleDemandService.listByIds(ids);
List<String> vdNoNews = vehicleDemands.stream()
/*List<String> vdNoNews = vehicleDemands.stream()
.map(VehicleDemand::getVdNo)
.collect(Collectors.toList());
.collect(Collectors.toList());*/
boolean hasEven = vehicleDemands.stream().anyMatch(item -> !TmsConstants.currentStatus_1.equals(item.getCurrentStatus()));
if (hasEven) {
return Result.error("数据中含有不是已合并需求的数据!");
@ -343,7 +343,8 @@ public class VehicleDemandController extends JeecgController<VehicleDemand, IVeh
List<DeliveryDemand> deliveryDemands = deliveryDemandService.listByIds(deliveryDemandIds);
List<VehicleDemand> vehicleDemandList = new ArrayList<>();
deliveryDemands.forEach(item -> {
item.setCurrentStatus(TmsConstants.currentStatus_0);
item.setCurrentStatus(TmsConstants.currentStatus_0)
.setVdNo(null);
VehicleDemand vehicleDemand = BeanUtil.toBean(item, VehicleDemand.class);
vehicleDemand.setTotalPallets(item.getPalletsNum())
.setPreTotalPallets(item.getPalletsNum())