zhangli пре 2 година
родитељ
комит
676b7e0baa
6 измењених фајлова са 124 додато и 0 уклоњено
  1. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml
  3. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js
  4. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionIBLL.cs
  6. +81
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DataCollectionController.cs Прегледај датотеку

@@ -63,5 +63,17 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
dataCollectionIBLL.SyncTextBook();
return Success("操作成功");
}
/// <summary>
/// 排课数据
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SyncArrangeLessonTerm()
{
dataCollectionIBLL.SyncArrangeLessonTerm();
return Success("操作成功");
}
}
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.cshtml Прегледај датотеку

@@ -25,6 +25,7 @@
<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>
</div>
</div>
</div>


+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/DataCollection/Index.js Прегледај датотеку

@@ -52,6 +52,16 @@ var bootstrap = function ($, learun) {
}
});
});
//排课数据
$('#lr_arrangeLessonTerm').on('click', function () {
learun.layerConfirm('是否确认推送排课数据!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LR_Desktop/DataCollection/SyncArrangeLessonTerm', function () {
refreshGirdData();
});
}
});
});
},
// 初始化列表
initGird: function () {


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionBLL.cs Прегледај датотеку

@@ -103,5 +103,24 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

public void SyncArrangeLessonTerm()
{
try
{
dataCollectionService.SyncArrangeLessonTerm();
}
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 Прегледај датотеку

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

+ 81
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs Прегледај датотеку

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


Loading…
Откажи
Сачувај