|
@@ -18,6 +18,7 @@ import com.xhkjedu.slive.service.gradeclass.ClassService;
|
18
|
18
|
import com.xhkjedu.slive.utils.LiveUtil;
|
19
|
19
|
import com.xhkjedu.slive.vo.gradeclass.ClassVo;
|
20
|
20
|
import com.xhkjedu.slive.vo.liveplay.CourseVo;
|
|
21
|
+import com.xhkjedu.slive.vo.xz.XzClassVo;
|
21
|
22
|
import com.xhkjedu.slive.vo.xz.XzDateVo;
|
22
|
23
|
import com.xhkjedu.slive.vo.xz.XzDateKjTeaVo;
|
23
|
24
|
import com.xhkjedu.slive.vo.xz.XzDateKjVo;
|
|
@@ -32,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
32
|
33
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
33
|
34
|
|
34
|
35
|
import javax.annotation.Resource;
|
|
36
|
+import javax.annotation.security.DenyAll;
|
35
|
37
|
import java.util.ArrayList;
|
36
|
38
|
import java.util.HashMap;
|
37
|
39
|
import java.util.List;
|
|
@@ -68,6 +70,10 @@ public class XzService {
|
68
|
70
|
private ClassStudentMapper classStudentMapper;
|
69
|
71
|
@Resource
|
70
|
72
|
private GroupMapper groupMapper;
|
|
73
|
+
|
|
74
|
+ @Autowired
|
|
75
|
+ ApplicationContext applicationContext;
|
|
76
|
+
|
71
|
77
|
/**
|
72
|
78
|
* @Description 行政直播列表
|
73
|
79
|
* @Param [schoolid]
|
|
@@ -109,9 +115,9 @@ public class XzService {
|
109
|
115
|
}
|
110
|
116
|
//批量保存行政直播对应的课节
|
111
|
117
|
xzKjMapper.insertList(kjlst);
|
112
|
|
- return new ResultVo(0, "保存行政直播成功",xzid);
|
113
|
|
- }catch (Exception e){
|
114
|
|
- log.error("保存行政直播出错:"+e.getMessage());
|
|
118
|
+ return new ResultVo(0, "保存行政直播成功", xzid);
|
|
119
|
+ } catch (Exception e) {
|
|
120
|
+ log.error("保存行政直播出错:" + e.getMessage());
|
115
|
121
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
116
|
122
|
return new ResultVo(1, "保存行政直播成功失败");
|
117
|
123
|
}
|
|
@@ -231,12 +237,12 @@ public class XzService {
|
231
|
237
|
course.setEndtime(dateKjVo.getEndtime());
|
232
|
238
|
course.setKjid(dateKjVo.getKjid());
|
233
|
239
|
//保存行政直播课程表,该方式解决事务不生效问题
|
234
|
|
- ((XzService) AopContext.currentProxy()).saveCourseAll(xjTeas, course);
|
|
240
|
+ ((XzService)applicationContext.getBean("xzService")).saveCourseAll(xjTeas, course);
|
235
|
241
|
}
|
236
|
242
|
}
|
237
|
243
|
}
|
238
|
|
- }catch (Exception e){
|
239
|
|
- log.error("保存行政直播课程表出错:"+e.getMessage());
|
|
244
|
+ } catch (Exception e) {
|
|
245
|
+ log.error("保存行政直播课程表出错:" + e.getMessage());
|
240
|
246
|
}
|
241
|
247
|
|
242
|
248
|
return new ResultVo(0, "保存行政直播课程表成功");
|
|
@@ -316,9 +322,6 @@ public class XzService {
|
316
|
322
|
cc.setCreateid(course.getCreateid());
|
317
|
323
|
cc.setCreatetime(course.getCreatetime());
|
318
|
324
|
cclist.add(cc);
|
319
|
|
- //通知班级
|
320
|
|
- ClassVo classVo = new ClassVo();
|
321
|
|
- classVo.setClassid(cid);
|
322
|
325
|
}
|
323
|
326
|
courseClassMapper.insertList(cclist);//保存原班级和直播的关联关系
|
324
|
327
|
|
|
@@ -336,7 +339,6 @@ public class XzService {
|
336
|
339
|
cs.setCreateid(course.getCreateid());
|
337
|
340
|
cs.setCreatetime(course.getCreatetime());
|
338
|
341
|
courseSectionMapper.insertUseGeneratedKeys(cs);//保存课程课节信息
|
339
|
|
-
|
340
|
342
|
} catch (Exception e) {
|
341
|
343
|
log.info("保存行政直播课程表出错:" + e.getMessage());
|
342
|
344
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
@@ -357,19 +359,29 @@ public class XzService {
|
357
|
359
|
|
358
|
360
|
Map map = new HashMap();
|
359
|
361
|
List<XzDateKjVo> kjs = xzKjMapper.listXzKjsByXzid(xz.getXzid());
|
360
|
|
- map.put("kjs",kjs);//保存所有课节信息
|
|
362
|
+ map.put("kjs", kjs);//保存所有课节信息
|
|
363
|
+
|
|
364
|
+ List<XzDateVo> classdatelst = new ArrayList<>();//班级日期课节
|
361
|
365
|
|
362
|
|
- List<XzDateVo> datelst = new ArrayList<>();//保存指定日期
|
|
366
|
+ //根据行政直播id获取该学校当前年份指定年级下的行政班和提高班
|
|
367
|
+ List<XzClassVo> classlst = classMapper.listClassByXzid(xz.getXzid());
|
363
|
368
|
//先获取选择要看的有效日期,不能超出行政直播结束的日期
|
364
|
|
- List<String> seldates = LiveUtil.listDateAfterDates(xz.getBegindate(),xz.getEnddate(),7);
|
365
|
|
- for(int i=0;i<seldates.size();i++){
|
366
|
|
- List<XzDateKjVo> kjlst = xzMapper.listXzDateKjDetail(seldates.get(i),xz.getXzid());//获取课节详情
|
367
|
|
- XzDateVo dateVo = new XzDateVo();
|
368
|
|
- dateVo.setSelectdate(seldates.get(i));
|
369
|
|
- dateVo.setKjs(kjlst);
|
370
|
|
- datelst.add(dateVo);
|
|
369
|
+ List<String> seldates = LiveUtil.listDateAfterDates(xz.getBegindate(), xz.getEnddate(), 7);
|
|
370
|
+
|
|
371
|
+ for (int i = 0; i < classlst.size(); i++) {
|
|
372
|
+ XzClassVo classVo = classlst.get(i);
|
|
373
|
+ List<XzDateVo> datelst = new ArrayList<>();//保存指定日期
|
|
374
|
+ for (int j = 0; j < seldates.size(); j++) {
|
|
375
|
+ List<Map> kjlst = xzMapper.listXzDateKjDetail(seldates.get(j), xz.getXzid(),classVo.getClassid());//获取课节详情
|
|
376
|
+ XzDateVo dateVo = new XzDateVo();
|
|
377
|
+ dateVo.setSelectdate(seldates.get(j));
|
|
378
|
+ dateVo.setKjsmap(kjlst);
|
|
379
|
+ datelst.add(dateVo);
|
|
380
|
+ }
|
|
381
|
+ classVo.setDates(datelst);
|
371
|
382
|
}
|
372
|
|
- map.put("xzdates", datelst);
|
|
383
|
+
|
|
384
|
+ map.put("xzdates", classlst);
|
373
|
385
|
return map;
|
374
|
386
|
}
|
375
|
387
|
|
|
@@ -385,44 +397,45 @@ public class XzService {
|
385
|
397
|
//判断课程的状态,如果已经开始上课则不能删除
|
386
|
398
|
LCourse course = courseMapper.selectByPrimaryKey(kjTeaVo.getCourseid());
|
387
|
399
|
Integer kjid = course.getKjid();
|
388
|
|
- Integer classid= kjTeaVo.getClassid();//行政班id
|
389
|
|
- if(course.getCoursestate() > 0){
|
390
|
|
- throw new Exception("选择的课程已经开始上课,不允许删除");
|
391
|
|
- }else{
|
|
400
|
+ Integer classid = kjTeaVo.getClassid();//行政班id
|
|
401
|
+ if (course.getCoursestate() > 0) {
|
|
402
|
+ return new ResultVo(1,"选择的课程已经开始上课,不允许删除");
|
|
403
|
+ } else {
|
392
|
404
|
//先判断是删除当前课程还是后续日期的课
|
393
|
|
- if(N_Utils.isEmptyInteger(kjTeaVo.getKfollow())){
|
|
405
|
+ if (N_Utils.isEmptyInteger(kjTeaVo.getKfollow())) {
|
394
|
406
|
//kfollow为0或者空,则只需要删除当前选中的课程
|
395
|
|
- ((XzService) AopContext.currentProxy()).delXzkjDygForDetail(kjTeaVo,course.getClassid());
|
396
|
|
- }else{
|
|
407
|
+ ((XzService)applicationContext.getBean("xzService")).delXzkjDygForDetail(kjTeaVo, course.getClassid());
|
|
408
|
+ } else {
|
397
|
409
|
//需要删除后续和当前日期相同的星期相同课节的课程
|
398
|
|
- //获取已生成课程的最后日期
|
399
|
|
- List<String> alldates = xzMapper.getAllDatesForKj(kjid,classid,course.getBegindate());
|
400
|
|
- if(alldates!=null && alldates.size()>0){
|
|
410
|
+ //获取已生成课程从所选删除课程开始日期到结束日期内所有日期
|
|
411
|
+ List<String> alldates = xzMapper.getAllDatesForKj(kjid, classid, course.getBegindate());
|
|
412
|
+ if (alldates != null && alldates.size() > 0) {
|
401
|
413
|
//已经成课程中符合周的需要删除的日期
|
402
|
|
- List<String> deldates = LiveUtil.getMeetDayOfDates(alldates,course.getBegindate());
|
403
|
|
- if(deldates!=null && deldates.size()>0){
|
404
|
|
- for(int i=0;i<deldates.size();i++){
|
|
414
|
+ List<String> deldates = LiveUtil.getMeetDayOfDates(alldates, course.getBegindate());
|
|
415
|
+ if (deldates != null && deldates.size() > 0) {
|
|
416
|
+ for (int i = 0; i < deldates.size(); i++) {
|
405
|
417
|
//先获取指定日期对应的课程
|
406
|
|
- CourseVo courseVo = courseMapper.getCourseByKjidAndClassid(kjid,classid,deldates.get(i));
|
407
|
|
- ((XzService) AopContext.currentProxy()).delXzkjDygForDetail(kjTeaVo,courseVo.getClassid());
|
|
418
|
+ CourseVo courseVo = courseMapper.getCourseByKjidAndClassid(kjid, classid, deldates.get(i));
|
|
419
|
+ kjTeaVo.setCourseid(courseVo.getCourseid());
|
|
420
|
+ ((XzService)applicationContext.getBean("xzService")).delXzkjDygForDetail(kjTeaVo,courseVo.getClassid());
|
408
|
421
|
}
|
409
|
422
|
}
|
410
|
423
|
}
|
411
|
424
|
}
|
412
|
|
- return new ResultVo(0,"成功删除课程表单个课程");
|
|
425
|
+ return new ResultVo(0, "成功删除课程表单个课程");
|
413
|
426
|
}
|
414
|
|
- }catch (Exception e){
|
415
|
|
- log.error("删除课程表单个课程出错:"+e.getMessage());
|
416
|
|
- return new ResultVo(1,"删除课程表单个课程失败");
|
|
427
|
+ } catch (Exception e) {
|
|
428
|
+ log.error("删除课程表单个课程出错:" + e.getMessage());
|
|
429
|
+ return new ResultVo(1, "删除课程表单个课程失败");
|
417
|
430
|
}
|
418
|
431
|
}
|
419
|
432
|
|
420
|
433
|
//删除单个课程表
|
421
|
434
|
@Transactional(rollbackFor = Exception.class)
|
422
|
|
- public void delXzkjDygForDetail(XzDateKjTeaVo kjTeaVo,Integer zbclassid) {
|
|
435
|
+ public void delXzkjDygForDetail(XzDateKjTeaVo kjTeaVo, Integer zbclassid) {
|
423
|
436
|
try {
|
424
|
437
|
//删除单个单元格中设置的教师信息,先判断该单元格对应的课程是否有其他班级
|
425
|
|
- Integer coursenum = courseClassMapper.getOtherClassnumByCourseid(kjTeaVo.getCourseid(), kjTeaVo.getClassid());
|
|
438
|
+ Integer coursenum = courseClassMapper.getOtherClassnumByCourseid(kjTeaVo.getCourseid(),kjTeaVo.getClassid());
|
426
|
439
|
if (coursenum == 0) {
|
427
|
440
|
//说明该课程仅关联一个班级,直接删除该课程以及该课程对应的直播班
|
428
|
441
|
courseMapper.deleteCourseClassByCourseid(kjTeaVo.getCourseid());
|
|
@@ -434,95 +447,109 @@ public class XzService {
|
434
|
447
|
classMapper.updateNum2(zbclassid);//更改班级以及班级分组人数
|
435
|
448
|
courseMapper.updateStuNum(kjTeaVo.getCourseid());//更新直播课学生数量
|
436
|
449
|
}
|
437
|
|
- }catch (Exception e){
|
438
|
|
- log.error("删除单个课程出错:"+e.getMessage());
|
439
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
450
|
+ } catch (Exception e) {
|
|
451
|
+ log.error("删除单个课程出错:" + e.getMessage());
|
|
452
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
440
|
453
|
}
|
441
|
454
|
}
|
442
|
455
|
|
443
|
456
|
/**
|
444
|
|
- * @Description 修改单个单元格
|
|
457
|
+ * @Description 保存单个单元格(单元格)
|
445
|
458
|
* @Param [kjTeaVo]
|
446
|
459
|
* @Return com.xhkjedu.vo.ResultVo
|
447
|
460
|
* @Author wn
|
448
|
461
|
* @Date 2022/4/2 15:19
|
449
|
462
|
**/
|
450
|
|
- public ResultVo updateXzKjDyg(XzDateKjTeaVo kjTeaVo){
|
|
463
|
+ public ResultVo saveOneXzKjDyg(XzDateKjTeaVo kjTeaVo) {
|
451
|
464
|
try {
|
452
|
|
- //判断课程的状态,如果已经开始上课则不能修改
|
453
|
|
- LCourse course = courseMapper.selectByPrimaryKey(kjTeaVo.getCourseid());
|
454
|
|
- Integer kjid = course.getKjid();
|
455
|
|
- Integer classid= kjTeaVo.getClassid();//行政班id
|
456
|
|
- if(course.getCoursestate() > 0){
|
457
|
|
- throw new Exception("选择的课程已经开始上课,不允许修改");
|
458
|
|
- }else{
|
459
|
|
- //先判断是修改当前课程还是后续日期的课
|
460
|
|
- if(N_Utils.isEmptyInteger(kjTeaVo.getKfollow())){
|
461
|
|
- //kfollow为0或者空,则只需要修改当前选中的课程
|
462
|
|
- ((XzService) AopContext.currentProxy()).updateXzkjDygForDetail(kjTeaVo,course);
|
463
|
|
- }else{
|
464
|
|
- //需要修改后续和当前日期相同的星期相同课节的课程
|
465
|
|
- //获取已生成课程的最后日期
|
466
|
|
- List<String> alldates = xzMapper.getAllDatesForKj(kjid,classid,course.getBegindate());
|
467
|
|
- if(alldates!=null && alldates.size()>0){
|
468
|
|
- //已经成课程中符合周的需要修改的日期
|
469
|
|
- List<String> deldates = LiveUtil.getMeetDayOfDates(alldates,course.getBegindate());
|
470
|
|
- if(deldates!=null && deldates.size()>0){
|
471
|
|
- for(int i=0;i<deldates.size();i++){
|
472
|
|
- //先获取指定日期对应的课程
|
473
|
|
- course.setBegintime(deldates.get(i));
|
474
|
|
- ((XzService) AopContext.currentProxy()).updateXzkjDygForDetail(kjTeaVo,course);
|
475
|
|
- }
|
|
465
|
+ LXz xz = xzMapper.getXzByXzkjid(kjTeaVo.getKjid());
|
|
466
|
+ kjTeaVo.setGradeid(xz.getGradeid());
|
|
467
|
+ kjTeaVo.setSchoolid(xz.getSchoolid());
|
|
468
|
+
|
|
469
|
+ //先判断是保存当前课程还是后续日期的课
|
|
470
|
+ if (N_Utils.isEmptyInteger(kjTeaVo.getKfollow())) {
|
|
471
|
+ //kfollow为0或者空,则只需要保存当前选中的课程
|
|
472
|
+ ((XzService)applicationContext.getBean("xzService")).saveOneXzkjDygForDetail(kjTeaVo);
|
|
473
|
+ } else {
|
|
474
|
+ //需要保存后续和当前日期相同的星期相同课节的课程,判断后续日期是否有课程,如果有则提示先删除后再添加
|
|
475
|
+ //获取已生成课程的往后日期
|
|
476
|
+ List<String> alldates = xzMapper.getAllDatesForKj(kjTeaVo.getKjid(), kjTeaVo.getClassid(), kjTeaVo.getSeldate());
|
|
477
|
+ if(alldates != null && alldates.size() > 0){
|
|
478
|
+ //去匹配是否包含在当前选中日期后续周对应的日期
|
|
479
|
+ List<String> afterlst = LiveUtil.getMeetDayOfDates(alldates,kjTeaVo.getSeldate());
|
|
480
|
+ if(afterlst != null && afterlst.size() > 0){
|
|
481
|
+ return new ResultVo(1,"同日期同班级同课节有数据,不能保存");
|
|
482
|
+ }else{
|
|
483
|
+
|
|
484
|
+ //获取seldate至结束日期时端内符合条件的日期
|
|
485
|
+ List<String> savedates = LiveUtil.getDaysForMeetDates(kjTeaVo.getSeldate(),xz.getEnddate());
|
|
486
|
+ for (int i = 0; i < savedates.size(); i++) {
|
|
487
|
+ kjTeaVo.setSeldate(savedates.get(i));
|
|
488
|
+// ((XzService)applicationContext.getBean("xzService")).saveOneXzkjDygForDetail(kjTeaVo);
|
476
|
489
|
}
|
477
|
490
|
}
|
478
|
491
|
}
|
479
|
|
- return new ResultVo(0,"成功修改课程表单个课程");
|
480
|
492
|
}
|
481
|
|
- }catch (Exception e){
|
482
|
|
- log.error("修改课程表单个课程出错:"+e.getMessage());
|
483
|
|
- return new ResultVo(1,"修改课程表单个课程失败");
|
|
493
|
+ return new ResultVo(0, "成功保存课程表单个课程");
|
|
494
|
+ } catch (Exception e) {
|
|
495
|
+ log.error("保存课程表单个课程出错:" + e.getMessage());
|
|
496
|
+ return new ResultVo(1, "保存课程表单个课程失败");
|
484
|
497
|
}
|
485
|
498
|
}
|
486
|
499
|
|
487
|
|
- //修改单个课程
|
|
500
|
+ //保存单个课程
|
488
|
501
|
@Transactional(rollbackFor = Exception.class)
|
489
|
|
- public void updateXzkjDygForDetail(XzDateKjTeaVo kjTeaVo,LCourse course) {
|
|
502
|
+ public void saveOneXzkjDygForDetail(XzDateKjTeaVo kjTeaVo) {
|
490
|
503
|
try {
|
491
|
504
|
//先看新选择的教师情况,先判断选中的同一日期课节教师是否还有其他直播课
|
492
|
|
- CourseVo courseVo = courseMapper.getCourseByDateKjTeacher(course.getKjid(),kjTeaVo.getTeacherid(),course.getBegindate());
|
493
|
|
- if(courseVo==null){
|
494
|
|
- //说明该老师之前没有直播课,则直接修改课程任课教师,直播班关联教师以及科目
|
495
|
|
- courseMapper.updateCourseSectionClassTeacher(course.getCourseid(),kjTeaVo.getTeacherid(),kjTeaVo.getSubjectid());
|
496
|
|
- }else{
|
|
505
|
+ CourseVo courseVo = courseMapper.getCourseByDateKjTeacher(kjTeaVo);
|
|
506
|
+ if (courseVo == null) {
|
|
507
|
+ //说明该老师之前没有直播课,则直接保存为新的课程
|
|
508
|
+ LCourse course = new LCourse();
|
|
509
|
+ course.setGradeid(kjTeaVo.getGradeid());
|
|
510
|
+ course.setBegindate(kjTeaVo.getSeldate());
|
|
511
|
+ course.setEnddate(kjTeaVo.getSeldate());
|
|
512
|
+ course.setCoursenum(1);
|
|
513
|
+ course.setCoursetype(1);
|
|
514
|
+ course.setCourseclass(1);
|
|
515
|
+ course.setCoursestate(0);
|
|
516
|
+ course.setDeleted(1);
|
|
517
|
+ course.setCourseselected(0);
|
|
518
|
+ course.setCreateid(kjTeaVo.getCreateid());
|
|
519
|
+ course.setCreatetime(N_Utils.getSecondTimestamp());
|
|
520
|
+ course.setSchoolid(kjTeaVo.getSchoolid());
|
|
521
|
+
|
|
522
|
+ String datezhou = LiveUtil.getDateZhou(kjTeaVo.getSeldate());
|
|
523
|
+ LXzKj kj = xzKjMapper.selectByPrimaryKey(kjTeaVo.getKjid());//课节详情
|
|
524
|
+
|
|
525
|
+ //单个教师课程信息
|
|
526
|
+ String coursename = datezhou + kj.getKjname() + kjTeaVo.getSubjectname() + "(" + kjTeaVo.getTeachername() + ")";
|
|
527
|
+
|
|
528
|
+ course.setCoursename(coursename);
|
|
529
|
+ course.setSubjectid(kjTeaVo.getSubjectid());
|
|
530
|
+ course.setTeacherid(kjTeaVo.getTeacherid());
|
|
531
|
+ course.setBegintime(kj.getBegintime());
|
|
532
|
+ course.setEndtime(kj.getEndtime());
|
|
533
|
+ course.setKjid(kjTeaVo.getKjid());
|
|
534
|
+ //保存行政直播课程表,调用保存整个课表时的方法
|
|
535
|
+ List<XzDateKjTeaVo> lst = new ArrayList<>();
|
|
536
|
+ lst.add(kjTeaVo);
|
|
537
|
+ ((XzService)applicationContext.getBean("xzService")).saveCourseAll(lst, course);
|
|
538
|
+ } else {
|
497
|
539
|
//说明该教师当前有其他直播课,则把班级加入课程,完成直播课学生数量
|
498
|
540
|
TClassStudent cs = new TClassStudent();
|
499
|
|
- cs.setSchoolid(course.getSchoolid());
|
|
541
|
+ cs.setSchoolid(kjTeaVo.getSchoolid());
|
500
|
542
|
cs.setClassid(kjTeaVo.getClassid());
|
501
|
543
|
cs.setCreateid(kjTeaVo.getCreateid());
|
502
|
|
- classStudentMapper.saveAllClassStu(cs,courseVo.getClassid());
|
|
544
|
+ classStudentMapper.saveAllClassStu(cs, courseVo.getClassid());
|
503
|
545
|
//获取直播班对应全班学生分组id
|
504
|
546
|
Integer groupid = groupMapper.getGroupIdByClassid(courseVo.getClassid());
|
505
|
|
- groupMapper.saveAllClassGroupStu(cs,courseVo.getClassid(),groupid);
|
|
547
|
+ groupMapper.saveAllClassGroupStu(cs, courseVo.getClassid(), groupid);
|
506
|
548
|
classMapper.updateNum2(courseVo.getClassid());//更改直播班级以及班级分组人数
|
507
|
549
|
courseMapper.updateStuNum(courseVo.getCourseid());//更新直播课学生数量
|
508
|
|
-
|
509
|
|
- //把指定的班级从原直播班中移除
|
510
|
|
- //修改原单元格中设置的教师信息,先判断该单元格对应的课程是否有其他班级
|
511
|
|
- Integer coursenum = courseClassMapper.getOtherClassnumByCourseid(kjTeaVo.getCourseid(), kjTeaVo.getClassid());
|
512
|
|
- if (coursenum == 0) {
|
513
|
|
- //说明该课程仅关联一个班级,直接修改该课程以及该课程对应的直播班
|
514
|
|
- courseMapper.deleteCourseClassByCourseid(kjTeaVo.getCourseid());
|
515
|
|
- } else {
|
516
|
|
- //说明关联的还有其他班级,修改该班级在直播班级中的学生,
|
517
|
|
- courseClassMapper.deleteByCourseidAndClassid(kjTeaVo.getCourseid(), kjTeaVo.getClassid());
|
518
|
|
- //处理对应直播班级中学生
|
519
|
|
- classMapper.deleteClassstu(course.getClassid(), kjTeaVo.getClassid());
|
520
|
|
- classMapper.updateNum2(course.getClassid());//更改班级以及班级分组人数
|
521
|
|
- courseMapper.updateStuNum(kjTeaVo.getCourseid());//更新直播课学生数量
|
522
|
|
- }
|
523
|
550
|
}
|
524
|
|
- }catch (Exception e){
|
525
|
|
- log.error("修改单个课程出错:"+e.getMessage());
|
|
551
|
+ } catch (Exception e) {
|
|
552
|
+ log.error("保存单个课程出错:" + e.getMessage());
|
526
|
553
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
527
|
554
|
}
|
528
|
555
|
}
|