fix: 出窑校验组盘信息

This commit is contained in:
2024-09-20 16:40:12 +08:00
parent f3b2a3fe0b
commit adf883c633

View File

@@ -141,9 +141,18 @@ public class CYZCTask extends AbstractTask {
}
SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getGroupInfo(vehicleCode,
vehicleType, GroupBindMaterialStatusEnum.BOUND.getValue());
if (ObjectUtil.isNotEmpty(one.getOut_kiln_time())) {
throw new BadRequestException("托盘[" + vehicleCode + "]已经出窑");
}
if (ObjectUtil.isEmpty(one)) {
throw new BadRequestException("载具号[" + vehicleCode + "]的组盘信息不存在");
}
List<SchBaseTask> list = taskService.list(new LambdaQueryWrapper<SchBaseTask>()
.eq(SchBaseTask::getVehicle_code, vehicleCode)
.lt(SchBaseTask::getTask_status, TaskStatus.FINISHED.getCode()));
if (list.size() > 0) {
throw new BadRequestException("已经存在相同托盘号[" + vehicleCode + "]的任务!");
}
return one.getGroup_id();
}