From 5d94ef018a8c114cf08b4c93e685fce92d7306e3 Mon Sep 17 00:00:00 2001 From: DU Date: Thu, 17 Dec 2020 15:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=87=8D=E6=96=B0=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E8=A6=86=E7=9B=96=E4=B9=8B=E5=89=8D=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=9A=84=E7=8F=AD=E7=BA=A7=E5=85=B3=E7=B3=BB=EF=BC=9B=20?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE=EF=BC=9A?= =?UTF-8?q?=E7=BB=98=E5=9B=BE=E5=85=83=E7=B4=A0=20Text=20=20Line=20OutFram?= =?UTF-8?q?e=20=E9=83=BD=E5=8A=A0=E4=B8=AA=20stationCode=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/joylink/rtss/services/LessonService.java | 12 +++++++++--- .../club/joylink/rtss/vo/client/map/MapLineVO.java | 3 +++ .../club/joylink/rtss/vo/client/map/MapTextVO.java | 4 ++++ .../rtss/vo/client/map/newmap/MapOuterFrameVO.java | 4 ++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/club/joylink/rtss/services/LessonService.java b/src/main/java/club/joylink/rtss/services/LessonService.java index c76386818..1a5220eb7 100644 --- a/src/main/java/club/joylink/rtss/services/LessonService.java +++ b/src/main/java/club/joylink/rtss/services/LessonService.java @@ -177,13 +177,15 @@ public class LessonService implements ILessonService { newLesson.setId(publishedLesson.getId()); this.lessonDAO.updateByPrimaryKey(newLesson); //课程存在,预备检查与班级的关系 + StudentRelLessonClassExample relLessonClassExample = new StudentRelLessonClassExample(); + relLessonClassExample.createCriteria().andLessonIdEqualTo(publishedLesson.getId()); + List studentRelLessonClasses = this.studentRelLessonClassDAO.selectByExample(relLessonClassExample); if (!CollectionUtils.isEmpty(publishVO.getClassIdList())) { //目前GZB项目带班级发布 - StudentRelLessonClassExample relLessonClassExample = new StudentRelLessonClassExample(); - relLessonClassExample.createCriteria().andLessonIdEqualTo(publishedLesson.getId()); - List studentRelLessonClasses = this.studentRelLessonClassDAO.selectByExample(relLessonClassExample); if (!CollectionUtils.isEmpty(studentRelLessonClasses)) { List existedClassIds = studentRelLessonClasses.stream().map(StudentRelLessonClass::getClassId).collect(Collectors.toList()); + Collections.sort(existedClassIds); + Collections.sort(publishVO.getClassIdList()); if (!existedClassIds.equals(publishVO.getClassIdList())) { //清除现有课程班级关系 this.studentRelLessonClassDAO.deleteByExample(relLessonClassExample); @@ -192,6 +194,10 @@ public class LessonService implements ILessonService { } else { addRelLessonClass(publishVO, publishedLesson.getId()); } + }else{ + if (!CollectionUtils.isEmpty(studentRelLessonClasses)) { + this.studentRelLessonClassDAO.deleteByExample(relLessonClassExample); + } } // if(!lessonVo.getName().equals(publishedLesson.getName())) { // // 自动创建商品 diff --git a/src/main/java/club/joylink/rtss/vo/client/map/MapLineVO.java b/src/main/java/club/joylink/rtss/vo/client/map/MapLineVO.java index 00f4bafe4..57a3a0e58 100644 --- a/src/main/java/club/joylink/rtss/vo/client/map/MapLineVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/map/MapLineVO.java @@ -25,6 +25,9 @@ public class MapLineVO { @NotBlank(message="编码不能为空") private String code; + @ApiModelProperty(value = "车站编码") + @NotBlank(message="车站编码不能为空") + private String stationCode; /** * 类型(实线/虚线等) */ diff --git a/src/main/java/club/joylink/rtss/vo/client/map/MapTextVO.java b/src/main/java/club/joylink/rtss/vo/client/map/MapTextVO.java index 3368d04e5..07912f8af 100644 --- a/src/main/java/club/joylink/rtss/vo/client/map/MapTextVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/map/MapTextVO.java @@ -23,6 +23,10 @@ public class MapTextVO { @NotBlank(message="编码不能为空") private String code; + @ApiModelProperty(value = "车站编码") + @NotBlank(message="车站编码不能为空") + private String stationCode; + /** * 文字内容 */ diff --git a/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapOuterFrameVO.java b/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapOuterFrameVO.java index d0dad322a..e73c29723 100644 --- a/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapOuterFrameVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapOuterFrameVO.java @@ -21,6 +21,10 @@ public class MapOuterFrameVO { @NotBlank(message="编码不能为空") private String code; + @ApiModelProperty(value = "车站编码") + @NotBlank(message="车站编码不能为空") + private String stationCode; + @ApiModelProperty(value = "宽度") @NotBlank(message="宽度不能为空") private Integer width;