From 9ff280a94e1ad4a4d586fc66bfd46e9084fde27d Mon Sep 17 00:00:00 2001 From: winter <2436197699@qq.com> Date: Wed, 28 Feb 2024 10:51:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=8B=8D=E7=85=A7=E5=B7=A1?= =?UTF-8?q?=E6=A3=80=E6=9A=82=E6=97=B6=E4=B8=8D=E7=94=A8=E5=9C=B0=E7=82=B9?= =?UTF-8?q?=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/teammodel/model/dto/weekDuty/DutyVoteDto.java | 3 ++- .../cn/teammodel/service/impl/DutyServiceImpl.java | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/cn/teammodel/model/dto/weekDuty/DutyVoteDto.java b/src/main/java/cn/teammodel/model/dto/weekDuty/DutyVoteDto.java index 27a0323..81a7cb5 100644 --- a/src/main/java/cn/teammodel/model/dto/weekDuty/DutyVoteDto.java +++ b/src/main/java/cn/teammodel/model/dto/weekDuty/DutyVoteDto.java @@ -15,8 +15,9 @@ public class DutyVoteDto { @NotNull @ApiModelProperty(value = "班级id", required = true) private String classId; + // 拍照巡检暂时不用地点 id @NotNull - @ApiModelProperty(value = "评价地点 id", required = true) + @ApiModelProperty(value = "评价地点 id") private String spotId; @NotNull @ApiModelProperty(value = "评价节点id", required = true) diff --git a/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java b/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java index 384e14d..f8c69d2 100644 --- a/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java +++ b/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java @@ -235,10 +235,10 @@ public class DutyServiceImpl implements DutyService { dutyNode.setCreatorId(null); dutyNode.setCreateTime(null); - WeekDuty.DutySpot spot = duty.getSpots().stream() - .filter(x -> spotId.equals(x.getId())) - .findFirst() - .orElseThrow(() -> new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "值周评价地点不存在")); +// WeekDuty.DutySpot spot = duty.getSpots().stream() +// .filter(x -> spotId.equals(x.getId())) +// .findFirst() +// .orElseThrow(() -> new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "值周评价地点不存在")); WeekDutyRecord weekDutyRecord = dutyRecordRepository.findByClassIdAndAcademicYearIdAndCode( classId, academicYearId, @@ -248,8 +248,8 @@ public class DutyServiceImpl implements DutyService { WeekDutyRecord.WeekDutyItem newItem = new WeekDutyRecord.WeekDutyItem(); newItem.setId(UUID.randomUUID().toString()); newItem.setDutyTreeNode(dutyNode); - newItem.setSpotId(spot.getId()); - newItem.setSpotName(spot.getName()); +// newItem.setSpotId(spot.getId()); +// newItem.setSpotName(spot.getName()); newItem.setSpread(spread); newItem.setAttachments(attachments); newItem.setNote(note);