|
@@ -322,17 +322,14 @@ class LessonService extends CrudService {
|
|
|
let lydata = await this.getLyTeacherMsg(classInfo);
|
|
|
// 整理信息
|
|
|
data = { ...data, ...defaults, termid, classid, planyearid, planid };
|
|
|
+ if (lydata) {
|
|
|
+ lydata = { ...lydata, ...defaults, termid, classid, planyearid, planid };
|
|
|
+ noticeList.push(lydata);
|
|
|
+ }
|
|
|
const dirIsBefore = moment(moment().format('YYYY-MM-DD')).isSameOrBefore(classInfo.startdate); // isSameOrBefore
|
|
|
- console.log(`${classInfo.headteacher}-${dirIsBefore}`);
|
|
|
if (dirIsBefore) {
|
|
|
noticeList.push(data);
|
|
|
- if (lydata) {
|
|
|
- lydata = { ...lydata, ...defaults, termid, classid, planyearid, planid };
|
|
|
- noticeList.push(lydata);
|
|
|
- }
|
|
|
}
|
|
|
- console.log(`礼仪教师=>${classInfo.lyteacher}:${JSON.stringify(lydata)}`);
|
|
|
-
|
|
|
const { lessons } = l;
|
|
|
let have_teacherLesson = lessons.filter(f => f.teaid);
|
|
|
have_teacherLesson = JSON.parse(JSON.stringify(have_teacherLesson));
|
|
@@ -375,10 +372,10 @@ class LessonService extends CrudService {
|
|
|
const { term, batch, headteacher, name, headteacherid, startdate, enddate } = classInfo;
|
|
|
if (!headteacherid) return;
|
|
|
let msg = `班主任-${headteacher},中心已经安排您为: ${term}期-${name.includes('班') ? name : `${name}班`} 班主任`;
|
|
|
- if (startdate && enddate) msg = `${msg} \n 本班时间为:${startdate}(星期${this.weekList[moment(startdate).day()]}) 至 ${enddate} (星期${this.weekList[moment(enddate).day()]})`;
|
|
|
- if (_.get(classInfo, 'kbyslocationid'))msg = `${msg} \n 开班仪式地点为:${_.get(classInfo, 'kbyslocation')}`;
|
|
|
+ if (startdate && enddate) msg = `${msg} \n 时间为:${startdate}(星期${this.weekList[moment(startdate).day()]}) 至 ${enddate} (星期${this.weekList[moment(enddate).day()]})`;
|
|
|
+ if (_.get(classInfo, 'kbyslocationid'))msg = `${msg} \n 开班地点为:${_.get(classInfo, 'kbyslocation')}`;
|
|
|
if (_.get(classInfo, 'kzjhlocationid'))msg = `${msg} \n 拓展训练地点为:${_.get(classInfo, 'kzjhlocation')}`;
|
|
|
- if (_.get(classInfo, 'jslocationid'))msg = `${msg} \n 上课教室地点为:${_.get(classInfo, 'jslocation')}`;
|
|
|
+ if (_.get(classInfo, 'jslocationid'))msg = `${msg} \n 上课地点为:${_.get(classInfo, 'jslocation')}`;
|
|
|
if (_.get(classInfo, 'yclocationid'))msg = `${msg} \n 用餐地点为:${_.get(classInfo, 'yclocation')}`;
|
|
|
// 礼仪教师需要查询,然后带上电话
|
|
|
if (_.get(classInfo, 'lyteacherid')) {
|