Ver a proveniência

智慧大脑排课数据推送

临城职教中职
zhangli há 2 anos
ascendente
cometimento
23e77fe98f
7 ficheiros alterados com 179 adições e 38 eliminações
  1. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs
  2. +2
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml
  3. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
  5. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionIBLL.cs
  7. +130
    -24
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs

+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs Ver ficheiro

@@ -74,6 +74,17 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
dataCollectionIBLL.SyncArrangeLessonTerm();
return Success("操作成功");
}
/// <summary>
/// 教师进修培训数据
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SyncTeacherTrain()
{
dataCollectionIBLL.SyncTeacherTrain();
return Success("操作成功");
}
}
}

+ 2
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml Ver ficheiro

@@ -6,26 +6,14 @@
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
@*<div class="lr-layout-tool-left">
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>*@
</div>
<div class="lr-layout-body" id="gridtable">
<a id="lr_company" class="btn btn-primary">&nbsp;校区基础数据</a>
<a id="lr_lesson" class="btn btn-primary">&nbsp;课程信息数据</a>
<a id="lr_textBook" class="btn btn-primary">&nbsp;教材信息数据</a>
<a id="lr_arrangeLessonTerm" class="btn btn-primary">&nbsp;排课数据</a>
<a id="lr_teacherTrain" class="btn btn-primary">&nbsp;教师进修培训</a>
</div>
</div>
</div>


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js Ver ficheiro

@@ -62,6 +62,18 @@ var bootstrap = function ($, learun) {
}
});
});
//教师进修培训
$('#lr_teacherTrain').on('click', function () {
learun.layerConfirm('是否确认推送教师培训数据!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LR_Desktop/DataCollection/SyncTeacherTrain', function () {
refreshGirdData();
});
}
});
});

},
// 初始化列表
initGird: function () {


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs Ver ficheiro

@@ -2363,6 +2363,8 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les

public class TimeTable
{
public string Grade { get; set; }
public string StuNum { get; set; }
public string ALTId { get; set; }
public DateTime LessonDate { get; set; }
public string EnName { get; set; }


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs Ver ficheiro

@@ -122,5 +122,26 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}
}

public void SyncTeacherTrain()
{
try
{
dataCollectionService.SyncTeacherTrain();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

}
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionIBLL.cs Ver ficheiro

@@ -10,5 +10,6 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
void SyncLesson();
void SyncTextBook();
void SyncArrangeLessonTerm();
void SyncTeacherTrain();
}
}

+ 130
- 24
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs Ver ficheiro

@@ -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


Carregando…
Cancelar
Guardar