|
|
@@ -315,7 +315,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop |
|
|
|
var semesterAndYear = Common.GetSemesterAndYear(); |
|
|
|
var strAcademicYear = semesterAndYear.AcademicYearShort; |
|
|
|
var strSemester = semesterAndYear.Semester; |
|
|
|
string sql = $@"select b.ALTId,b.F_SchoolId,b.DeptNo,b.MajorNo,b.AcademicYearNo as AcademicYear,b.LessonNo,b.LessonName,b.LessonTime,b.LessonDate,b.EmpNo,b.Empname EmpName,replace (b.TeachClassNo,b.LessonName,'') TeachClassNo, c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName |
|
|
|
string sql = $@"select d.Grade,d.StuNum,b.ALTId,b.F_SchoolId,b.DeptNo,b.MajorNo,b.AcademicYearNo as AcademicYear,b.LessonNo,b.LessonName,b.LessonTime,b.LessonDate,b.EmpNo,b.Empname EmpName,replace (b.TeachClassNo,b.LessonName,'') TeachClassNo, c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName |
|
|
|
from ArrangeLessonTerm b |
|
|
|
left join ClassroomInfo c on c.ClassroomNo=b.classroomNo |
|
|
|
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo |
|
|
@@ -325,39 +325,35 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop |
|
|
|
var result = BaseRepository("CollegeMIS").FindList<TimeTable>(sql); |
|
|
|
|
|
|
|
ParamModel paramModel = new ParamModel(); |
|
|
|
paramModel.dataObjName = "ods_jcxysj"; |
|
|
|
paramModel.dataObjName = "ods_zzxkpksj"; |
|
|
|
|
|
|
|
var list = new List<object>(); |
|
|
|
foreach (var data in result) |
|
|
|
{ |
|
|
|
var lessonTime = data.LessonTime.Split('-'); |
|
|
|
var param = new |
|
|
|
{ |
|
|
|
gzzyqksjid = data.ALTId, |
|
|
|
xxjgdm = company.F_USCreditCode, |
|
|
|
xxjgmc = company.F_FullName, |
|
|
|
ssxqbh = company.F_EnCode, |
|
|
|
//jcbh = data.TextBookNo, |
|
|
|
////教材性质 |
|
|
|
//jcxz = "1", |
|
|
|
////ISBN号,必填 |
|
|
|
//isbn = "9787040195194", |
|
|
|
//zzxm = data.FirstAuthor, |
|
|
|
//cbrq = data.Pubdate, |
|
|
|
//cbs = data.Publisher, |
|
|
|
////适用层次 |
|
|
|
//sycc = "1", |
|
|
|
////价格 |
|
|
|
//jg = data.Price > 0 ? data.Price : 0, |
|
|
|
////版次 |
|
|
|
//bc = string.IsNullOrEmpty(data.Edition) ? "1" : data.Edition, |
|
|
|
////印次 |
|
|
|
//yc = string.IsNullOrEmpty(data.Impression) ? "1" : data.Impression, |
|
|
|
////是否有练习册 |
|
|
|
//sfylxc = data.IsWorkBook == true ? 1 : 0, |
|
|
|
////是否有教参教辅 |
|
|
|
//sfyjcjf = data.IsTeachConsult == true ? 1 : 0, |
|
|
|
//获奖情况 |
|
|
|
hjqk = "0", |
|
|
|
nj = data.Grade, |
|
|
|
bj = data.TeachClassNo, |
|
|
|
xn = data.AcademicYear, |
|
|
|
xq = data.Semester == "1" ? "第一学期" : "第二学期", |
|
|
|
zc = "", |
|
|
|
xqj = GetStr(lessonTime[0]), |
|
|
|
skjc = lessonTime[1], |
|
|
|
skrq = data.LessonDate, |
|
|
|
kcmc = data.LessonName, |
|
|
|
kcdm = data.LessonNo, |
|
|
|
jgh = data.EmpNo, |
|
|
|
jxbrs = data.StuNum, |
|
|
|
skkssj = GetTime(lessonTime[1])[0], |
|
|
|
skjssj = GetTime(lessonTime[1])[1], |
|
|
|
sdxsrs = data.StuNum, |
|
|
|
jsdkqk = "1", |
|
|
|
xkr = "", |
|
|
|
sjcjsj = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") |
|
|
|
}; |
|
|
|
list.Add(param); |
|
|
@@ -381,6 +377,116 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private string GetStr(string num) |
|
|
|
{ |
|
|
|
var str = ""; |
|
|
|
switch (num) |
|
|
|
{ |
|
|
|
case "1": |
|
|
|
str = "星期一"; break; |
|
|
|
case "2": |
|
|
|
str = "星期二"; break; |
|
|
|
case "3": |
|
|
|
str = "星期三"; break; |
|
|
|
case "4": |
|
|
|
str = "星期四"; break; |
|
|
|
case "5": |
|
|
|
str = "星期五"; break; |
|
|
|
case "6": |
|
|
|
str = "星期六"; break; |
|
|
|
case "7": |
|
|
|
str = "星期日"; break; |
|
|
|
case "8": |
|
|
|
str = "星期八"; break; |
|
|
|
case "9": |
|
|
|
str = "星期九"; break; |
|
|
|
case "10": |
|
|
|
str = "星期十"; break; |
|
|
|
} |
|
|
|
return str; |
|
|
|
} |
|
|
|
|
|
|
|
private string GetTime(string jc) |
|
|
|
{ |
|
|
|
var str = ""; |
|
|
|
//06:55-07:30,08:10-08:55,09:05-09:50,10:20-11:05,11:15-12:00,14:30-15:15,15:25-16:10,16:20-17:05,18:20-19:05,19:15-20:00,20:10-20:55 |
|
|
|
switch (jc) |
|
|
|
{ |
|
|
|
case "1": |
|
|
|
str = "06:55-07:30"; break; |
|
|
|
case "2": |
|
|
|
str = "08:10-08:55"; break; |
|
|
|
case "3": |
|
|
|
str = "09:05-09:50"; break; |
|
|
|
case "4": |
|
|
|
str = "10:20-11:05"; break; |
|
|
|
case "5": |
|
|
|
str = "11:15-12:00"; break; |
|
|
|
case "6": |
|
|
|
str = "14:30-15:15"; break; |
|
|
|
case "7": |
|
|
|
str = "15:25-16:10"; break; |
|
|
|
case "8": |
|
|
|
str = "16:20-17:05"; break; |
|
|
|
case "9": |
|
|
|
str = "18:20-19:05"; break; |
|
|
|
case "10": |
|
|
|
str = "19:15-20:00"; break; |
|
|
|
case "11": |
|
|
|
str = "20:10-20:55"; break; |
|
|
|
} |
|
|
|
|
|
|
|
return str; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 教师进修培训 |
|
|
|
/// </summary> |
|
|
|
public void SyncTeacherTrain() |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
//校区信息 |
|
|
|
var company = this.BaseRepository().FindList<CompanyEntity>(x => x.F_DeleteMark == 0 && x.F_EnabledMark == 1).FirstOrDefault(); |
|
|
|
//教材数据 |
|
|
|
var textBookInfo = this.BaseRepository("CollegeMIS").FindList<TextBookInfoEntity>(x => x.IsValid == true && x.IsDel == 0); |
|
|
|
|
|
|
|
ParamModel paramModel = new ParamModel(); |
|
|
|
paramModel.dataObjName = "ods_jxpxsj"; |
|
|
|
|
|
|
|
var list = new List<object>(); |
|
|
|
foreach (var book in textBookInfo) |
|
|
|
{ |
|
|
|
var param = new |
|
|
|
{ |
|
|
|
//gzzyqksjid = book.ID, |
|
|
|
//xxjgdm = company.F_USCreditCode, |
|
|
|
//xxjgmc = company.F_FullName, |
|
|
|
|
|
|
|
//sjcjsj = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") |
|
|
|
}; |
|
|
|
list.Add(param); |
|
|
|
} |
|
|
|
|
|
|
|
paramModel.fileds = list; |
|
|
|
var json = JsonConvert.SerializeObject(paramModel); |
|
|
|
var connect = _redis.Read<string>("access_token"); |
|
|
|
connect = (connect).Replace("\"", ""); |
|
|
|
var res = HttpMethods.HttpPostConnect(saveIncrUrl, json, connect); |
|
|
|
} |
|
|
|
catch (ExceptionEx ex) |
|
|
|
{ |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw ExceptionEx.ThrowServiceException(ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
#region MyRegion |
|
|
|