|
|
@@ -86,7 +86,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop |
|
|
|
/// </summary> |
|
|
|
private void refresh() |
|
|
|
{ |
|
|
|
var client_secret = (_redis.Read<string>("client_secret"))?.Replace("\"",""); |
|
|
|
var client_secret = (_redis.Read<string>("client_secret"))?.Replace("\"", ""); |
|
|
|
var refresh_token = (_redis.Read<string>("refresh_token"))?.Replace("\"", ""); |
|
|
|
var refresh_url = |
|
|
|
InsUrl + "/prod-api/api/web/collect/oauth2/refresh?grant_type=refresh_token&client_id=" + |
|
|
@@ -192,25 +192,76 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop |
|
|
|
{ |
|
|
|
var param = new |
|
|
|
{ |
|
|
|
gzzyqksjid= lesson.LessonId, |
|
|
|
xxjgdm=company.F_USCreditCode, |
|
|
|
gzzyqksjid = lesson.LessonId, |
|
|
|
xxjgdm = company.F_USCreditCode, |
|
|
|
xxjgmc = company.F_FullName, |
|
|
|
ssxqbh = company.F_EnCode, |
|
|
|
kcmc= lesson.LessonName, |
|
|
|
kcmc = lesson.LessonName, |
|
|
|
kcdm = lesson.LessonNo, |
|
|
|
kclb =string.IsNullOrEmpty(lesson.LessonSortDetailNo)?"1": lesson.LessonSortDetailNo, |
|
|
|
kcxz= lesson.LessonTypeName.Contains("公共")|| lesson.LessonTypeName.Contains("公开")?"1":"2", |
|
|
|
kcsx=lesson.LessonSortNo, |
|
|
|
kcfl="1", |
|
|
|
xklb="14", |
|
|
|
sfzyhxkc="0", |
|
|
|
lvjxss=lesson.WeekStudyHour>0? lesson.WeekStudyHour :0, |
|
|
|
sjjxsy = lesson.WeekPracticeHour > 0? lesson.WeekStudyHour :0, |
|
|
|
kclb = string.IsNullOrEmpty(lesson.LessonSortDetailNo) ? "1" : lesson.LessonSortDetailNo, |
|
|
|
kcxz = lesson.LessonTypeName.Contains("公共") || lesson.LessonTypeName.Contains("公开") ? "1" : "2", |
|
|
|
kcsx = lesson.LessonSortNo, |
|
|
|
kcfl = "1", |
|
|
|
xklb = "14", |
|
|
|
sfzyhxkc = "0", |
|
|
|
lvjxss = lesson.WeekStudyHour > 0 ? lesson.WeekStudyHour : 0, |
|
|
|
sjjxsy = lesson.WeekPracticeHour > 0 ? lesson.WeekStudyHour : 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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 教材信息数据 |
|
|
|
/// </summary> |
|
|
|
public void SyncTextBook() |
|
|
|
{ |
|
|
|
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_jcxysj"; |
|
|
|
|
|
|
|
var list = new List<object>(); |
|
|
|
foreach (var book in textBookInfo) |
|
|
|
{ |
|
|
|
var param = new |
|
|
|
{ |
|
|
|
gzzyqksjid = book.ID, |
|
|
|
xxjgdm = company.F_USCreditCode, |
|
|
|
xxjgmc = company.F_FullName, |
|
|
|
jcmc = book.TextBookName, |
|
|
|
jcbh=book.TextBookNo, |
|
|
|
|
|
|
|
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"); |
|
|
|