fix 排课Bug

beetlsql3-dev
Mlxa0324 2 years ago
parent aa7ce7c547
commit 2d4212570f

@ -29080,7 +29080,7 @@ DROP TABLE IF EXISTS `teacher_open_course_schedule_session`;
CREATE TABLE `teacher_open_course_schedule_session` (
`teacher_open_course_schedule_session_id` bigint(20) NOT NULL COMMENT '课程开课-排课位置ID',
`teacher_open_course_schedule_session_add_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`teacher_open_course_schedule_session_status` int(11) NULL DEFAULT NULL COMMENT '状态1正常 2删除',
`teacher_open_course_schedule_session_status` int(11) NULL DEFAULT NULL COMMENT '状态1启用 2禁用',
`teacher_open_course_id` bigint(20) NULL DEFAULT NULL COMMENT '课程开课ID',
`teacher_id` bigint(20) NULL DEFAULT NULL COMMENT '教师ID',
`school_class_Ids` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '班级ID集合',

@ -36,7 +36,6 @@ public interface TeacherOpenCourseScheduleSessionSnapDao extends BaseMapper<Teac
Collection<Object> ts = Arrays.asList(sessionIds.split(","));
createLambdaQuery()
.andIn(TeacherOpenCourseScheduleSessionSnap::getTeacherOpenCourseScheduleSessionId, ts)
.andEq(TeacherOpenCourseScheduleSessionSnap::getTeacherOpenCourseScheduleSessionSnapStatus, 1)
.delete();
}
@Update

@ -44,7 +44,7 @@ public class TeacherOpenCourseScheduleSession extends BaseEntity{
private Date teacherOpenCourseScheduleSessionAddTime ;
//状态1正常 2删除
//状态1启用 2禁用
@Dict(type="global_open_status")
private Integer teacherOpenCourseScheduleSessionStatus ;

@ -130,6 +130,7 @@ public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<Tea
public void deleteTeacherOpenCourseScheduleSession(String ids){
try {
teacherOpenCourseScheduleSessionDao.deleteTeacherOpenCourseScheduleSessionByIds(ids);
teacherOpenCourseScheduleSessionSnapDao.deleteTeacherOpenCourseScheduleSessionBySessionIds(ids);
} catch (Exception e) {
throw new PlatformException("批量删除新增排课失败", e);
}
@ -395,8 +396,7 @@ public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<Tea
String teacherOpenCourseScheduleSessionId = teacherOpenCourseScheduleSessionOptions.getTeacherOpenCourseScheduleSessionId().toString();
// 这里两张表 真删除
teacherOpenCourseScheduleSessionDao.deleteByIds(teacherOpenCourseScheduleSessionId);
teacherOpenCourseScheduleSessionSnapDao.deleteTeacherOpenCourseScheduleSessionBySessionIds(teacherOpenCourseScheduleSessionId);
deleteTeacherOpenCourseScheduleSession(teacherOpenCourseScheduleSessionId);
// 排课记录表
addSessionByOption(teacherOpenCourseScheduleSessionOptions);

@ -21,7 +21,7 @@ public class TeacherOpenCourseScheduleSessionQuery extends PageParam {
private Long teacherOpenCourseId;
@Query(name = "教师名称", display = true,type=Query.TYPE_DICT,dict="teacher.teacher_name.teacher_status=1")
private Long teacherId;
@Query(name = "启用状态", display = true,type=Query.TYPE_DICT,dict="global_status")/*状态1正常 2删除*/
@Query(name = "启用状态", display = true,type=Query.TYPE_DICT,dict="global_open_status")/*状态1启用 2禁用*/
private Integer teacherOpenCourseScheduleSessionStatus;
@Query(name = "班级ID集合", display = false)
private String schoolClassIds;

@ -95,7 +95,7 @@ queryByConditionGroup
@}
from (
select
any_value(t.teacher_open_course_schedule_session_id) as teacher_open_course_schedule_session_id,
t.teacher_open_course_schedule_session_id,
t.teacher_open_course_schedule_session_status,
t.teacher_open_course_id,
@// 共多少天
@ -175,6 +175,7 @@ queryByConditionGroup
and t.teacher_open_course_schedule_session_week_num =#teacherOpenCourseScheduleSessionWeekNum#
@}
group by
t.teacher_open_course_schedule_session_id,
t.teacher_open_course_schedule_session_status,
t.teacher_open_course_id,
t.teacher_id,

@ -24,7 +24,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
cellMinWidth: 100,
method : 'post',
// url : Common.ctxPath + '/jlw/teacherOpenCourseScheduleSession/list.json' // 数据接口
url : Common.ctxPath + '/jlw/teacherOpenCourseScheduleSession/listGroup.json?teacherOpenCourseScheduleSessionStatus=1' // 数据接口
url : Common.ctxPath + '/jlw/teacherOpenCourseScheduleSession/listGroup.json' // 数据接口
,page : Lib.tablePage // 开启分页
/*,toolbar: '#toolbar_teacherOpenCourseScheduleSession' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
@ -94,7 +94,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
hideField: false,
hide: $.isEmpty(sx_['teacherOpenCourseScheduleSessionStatusText']) ? false : sx_['teacherOpenCourseScheduleSessionStatusText'],
templet:function (d) {
var css = d.teacherOpenCourseScheduleSessionStatus == 2 ? "textType2" : 'textType';
var css = d.teacherOpenCourseScheduleSessionStatusText == 2 ? "textType2" : 'textType';
return '<span class="' + css + '">' +d.teacherOpenCourseScheduleSessionStatusText + '</span>'
}
},
@ -184,7 +184,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
} else if (obj.event == "enable") {
layer.confirm('是否确定启用该信息?', function (index) {
var ret = Common.postAjax("/jlw/teacherOpenCourseScheduleSession/editSession.json",
var ret = Common.postAjax("/jlw/teacherOpenCourseScheduleSession/edit.json",
{teacherOpenCourseScheduleSessionId: data.teacherOpenCourseScheduleSessionId,teacherOpenCourseScheduleSessionStatus:1});
layer.msg(ret.code == 0 ? "启用成功!" : ret.msg, {
offset: ['50%'],
@ -198,7 +198,7 @@ layui.define([ 'form', 'laydate', 'table' ,'laytpl'], function(exports) {
});
} else if (obj.event == "disable") {
layer.confirm('是否确定禁用该信息?', function (index) {
var ret = Common.postAjax("/jlw/teacherOpenCourseScheduleSession/editSession.json",
var ret = Common.postAjax("/jlw/teacherOpenCourseScheduleSession/edit.json",
{teacherOpenCourseScheduleSessionId: data.teacherOpenCourseScheduleSessionId,teacherOpenCourseScheduleSessionStatus:2});
layer.msg(ret.code == 0 ? "禁用成功!" : ret.msg, {
offset: ['50%'],

Loading…
Cancel
Save