课程重新发布覆盖之前关联的班级关系;
地图基础数据:绘图元素 Text Line OutFrame 都加个 stationCode 参数
This commit is contained in:
parent
252a9ec9ed
commit
5d94ef018a
@ -177,13 +177,15 @@ public class LessonService implements ILessonService {
|
||||
newLesson.setId(publishedLesson.getId());
|
||||
this.lessonDAO.updateByPrimaryKey(newLesson);
|
||||
//课程存在,预备检查与班级的关系
|
||||
if (!CollectionUtils.isEmpty(publishVO.getClassIdList())) {
|
||||
//目前GZB项目带班级发布
|
||||
StudentRelLessonClassExample relLessonClassExample = new StudentRelLessonClassExample();
|
||||
relLessonClassExample.createCriteria().andLessonIdEqualTo(publishedLesson.getId());
|
||||
List<StudentRelLessonClass> studentRelLessonClasses = this.studentRelLessonClassDAO.selectByExample(relLessonClassExample);
|
||||
if (!CollectionUtils.isEmpty(publishVO.getClassIdList())) {
|
||||
//目前GZB项目带班级发布
|
||||
if (!CollectionUtils.isEmpty(studentRelLessonClasses)) {
|
||||
List<Integer> 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())) {
|
||||
// // 自动创建商品
|
||||
|
@ -25,6 +25,9 @@ public class MapLineVO {
|
||||
@NotBlank(message="编码不能为空")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "车站编码")
|
||||
@NotBlank(message="车站编码不能为空")
|
||||
private String stationCode;
|
||||
/**
|
||||
* 类型(实线/虚线等)
|
||||
*/
|
||||
|
@ -23,6 +23,10 @@ public class MapTextVO {
|
||||
@NotBlank(message="编码不能为空")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "车站编码")
|
||||
@NotBlank(message="车站编码不能为空")
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 文字内容
|
||||
*/
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user