|
|
@@ -300,6 +300,87 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 排课数据 |
|
|
|
/// </summary> |
|
|
|
public void SyncArrangeLessonTerm() |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
//校区信息 |
|
|
|
var company = this.BaseRepository().FindList<CompanyEntity>(x => x.F_DeleteMark == 0 && x.F_EnabledMark == 1).FirstOrDefault(); |
|
|
|
|
|
|
|
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 |
|
|
|
from ArrangeLessonTerm b |
|
|
|
left join ClassroomInfo c on c.ClassroomNo=b.classroomNo |
|
|
|
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo |
|
|
|
where b.AcademicYearNo='{strAcademicYear}' and b.Semester='{strSemester}' |
|
|
|
and b.LessonDate>='{DateTime.Now.AddDays(-30)}' and b.LessonDate<='{DateTime.Now}' |
|
|
|
and b.CheckMark=1"; |
|
|
|
var result = BaseRepository("CollegeMIS").FindList<TimeTable>(sql); |
|
|
|
|
|
|
|
ParamModel paramModel = new ParamModel(); |
|
|
|
paramModel.dataObjName = "ods_jcxysj"; |
|
|
|
|
|
|
|
var list = new List<object>(); |
|
|
|
foreach (var data in result) |
|
|
|
{ |
|
|
|
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", |
|
|
|
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 |
|
|
|