|
|
@ -235,10 +235,10 @@ public class DutyServiceImpl implements DutyService {
|
|
|
|
dutyNode.setCreatorId(null);
|
|
|
|
dutyNode.setCreatorId(null);
|
|
|
|
dutyNode.setCreateTime(null);
|
|
|
|
dutyNode.setCreateTime(null);
|
|
|
|
|
|
|
|
|
|
|
|
WeekDuty.DutySpot spot = duty.getSpots().stream()
|
|
|
|
// WeekDuty.DutySpot spot = duty.getSpots().stream()
|
|
|
|
.filter(x -> spotId.equals(x.getId()))
|
|
|
|
// .filter(x -> spotId.equals(x.getId()))
|
|
|
|
.findFirst()
|
|
|
|
// .findFirst()
|
|
|
|
.orElseThrow(() -> new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "值周评价地点不存在"));
|
|
|
|
// .orElseThrow(() -> new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "值周评价地点不存在"));
|
|
|
|
WeekDutyRecord weekDutyRecord = dutyRecordRepository.findByClassIdAndAcademicYearIdAndCode(
|
|
|
|
WeekDutyRecord weekDutyRecord = dutyRecordRepository.findByClassIdAndAcademicYearIdAndCode(
|
|
|
|
classId,
|
|
|
|
classId,
|
|
|
|
academicYearId,
|
|
|
|
academicYearId,
|
|
|
@ -248,8 +248,8 @@ public class DutyServiceImpl implements DutyService {
|
|
|
|
WeekDutyRecord.WeekDutyItem newItem = new WeekDutyRecord.WeekDutyItem();
|
|
|
|
WeekDutyRecord.WeekDutyItem newItem = new WeekDutyRecord.WeekDutyItem();
|
|
|
|
newItem.setId(UUID.randomUUID().toString());
|
|
|
|
newItem.setId(UUID.randomUUID().toString());
|
|
|
|
newItem.setDutyTreeNode(dutyNode);
|
|
|
|
newItem.setDutyTreeNode(dutyNode);
|
|
|
|
newItem.setSpotId(spot.getId());
|
|
|
|
// newItem.setSpotId(spot.getId());
|
|
|
|
newItem.setSpotName(spot.getName());
|
|
|
|
// newItem.setSpotName(spot.getName());
|
|
|
|
newItem.setSpread(spread);
|
|
|
|
newItem.setSpread(spread);
|
|
|
|
newItem.setAttachments(attachments);
|
|
|
|
newItem.setAttachments(attachments);
|
|
|
|
newItem.setNote(note);
|
|
|
|
newItem.setNote(note);
|
|
|
|