refactor: 拍照巡检暂时不用地点 id

11111
winter 10 months ago
parent 29f1fed4f1
commit 9ff280a94e

@ -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)

@ -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);

Loading…
Cancel
Save