瀏覽代碼

排课

临城职教中职
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(); dataCollectionIBLL.SyncTextBook();
return Success("操作成功"); 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_company" class="btn btn-primary">&nbsp;校区基础数据</a>
<a id="lr_lesson" 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_textBook" class="btn btn-primary">&nbsp;教材信息数据</a>
<a id="lr_arrangeLessonTerm" class="btn btn-primary">&nbsp;排课数据</a>
</div> </div>
</div> </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 () { 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 SaveXqjbsj();
void SyncLesson(); void SyncLesson();
void SyncTextBook(); 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 #endregion


#region MyRegion #region MyRegion


Loading…
取消
儲存