瀏覽代碼

【修改】教务-教学调度:调度时间优化;

西昌缴费二期
dyy 2 年之前
父節點
當前提交
b5cb304b9c
共有 4 個文件被更改,包括 90 次插入44 次删除
  1. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
  2. +9
    -20
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js
  3. +18
    -19
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js
  4. +47
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs

+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs 查看文件

@@ -122,6 +122,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
var data = arrangeLessonTermIBLL.GetEntity(keyValue);
return Success(data);
}
/// <summary>
/// 获取调度时间数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetLessonDateList(string queryJson)
{
var data = arrangeLessonTermIBLL.GetList(queryJson).Where(x => x.LessonDate.HasValue).Select(x => x.LessonDate).Distinct().Select(x => new
{
text = x,
value = x
}).OrderBy(x => x.value);

return Success(data);
}
#endregion

#region 提交数据


+ 9
- 20
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js 查看文件

@@ -46,16 +46,16 @@ var bootstrap = function ($, learun) {
//调度开始时间
$('#AttemperStartTime').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p),
value: 'LessonDate',
text: 'LessonDate'
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p),
value: 'value',
text: 'text'
});
//调度结束时间
$('#AttemperEndTime').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p),
value: 'LessonDate',
text: 'LessonDate'
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p),
value: 'value',
text: 'text'
});
}
},
@@ -180,20 +180,9 @@ var bootstrap = function ($, learun) {
$('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' });
$('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' });
//调度开始时间
$('#AttemperStartTime').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}),
value: 'LessonDate',
text: 'LessonDate'
});
$('#AttemperStartTime').lrselect({ allowSearch: true });
//调度结束时间
$('#AttemperEndTime').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}),
value: 'LessonDate',
text: 'LessonDate'
});

$('#AttemperEndTime').lrselect({ allowSearch: true });
},
initData: function () {
if (!!keyValue) {
@@ -336,7 +325,7 @@ var bootstrap = function ($, learun) {
return false;
}
if (formData.AttemperEndTime < formData.AttemperStartTime) {
learun.alert.warning("调度结束时间应该大于调度开始时间!");
learun.alert.warning("调度结束时间不能小于调度开始时间!");
return false;
}
}


+ 18
- 19
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js 查看文件

@@ -46,16 +46,16 @@ var bootstrap = function ($, learun) {
//调度开始时间
$('#AttemperStartTime').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p),
value: 'LessonDate',
text: 'LessonDate'
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p),
value: 'value',
text: 'text'
});
//调度结束时间
$('#AttemperEndTime').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p),
value: 'LessonDate',
text: 'LessonDate'
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p),
value: 'value',
text: 'text'
});
}
},
@@ -180,19 +180,9 @@ var bootstrap = function ($, learun) {
$('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' });
$('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' });
//调度开始时间
$('#AttemperStartTime').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}),
value: 'LessonDate',
text: 'LessonDate'
});
$('#AttemperStartTime').lrselect({ allowSearch: true });
//调度结束时间
$('#AttemperEndTime').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}),
value: 'LessonDate',
text: 'LessonDate'
});
$('#AttemperEndTime').lrselect({ allowSearch: true });

},
initData: function () {
@@ -237,6 +227,10 @@ var bootstrap = function ($, learun) {
}
}
page.query();
if (!!data[id].length && data[id].length > 0) {
$('#AttemperStartTime').lrselectSet(data[id].AttemperStartTime);
$('#AttemperEndTime').lrselectSet(data[id].AttemperEndTime);
}
}
});
}
@@ -314,6 +308,11 @@ var bootstrap = function ($, learun) {
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>');
}
}
page.query();
if (!!data[id].length && data[id].length > 0) {
$('#AttemperStartTime').lrselectSet(data[id].AttemperStartTime);
$('#AttemperEndTime').lrselectSet(data[id].AttemperEndTime);
}
}
});
}
@@ -336,7 +335,7 @@ var bootstrap = function ($, learun) {
}
} else if (formData.AttemperType == "01") { //调课:调度时间比较
if (formData.AttemperEndTime < formData.AttemperStartTime) {
learun.alert.warning("调度结束时间应该大于调度开始时间!");
learun.alert.warning("调度结束时间不能小于调度开始时间!");
return false;
}
}


+ 47
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs 查看文件

@@ -74,15 +74,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
//参考写法
//var queryParam = queryJson.ToJObject();
var queryParam = queryJson.ToJObject();
// 虚拟参数
//var dp = new DynamicParameters(new { });
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM ArrangeLessonTerm t ");
return this.BaseRepository("CollegeMIS").FindList<ArrangeLessonTermEntity>(strSql.ToString());
strSql.Append(" FROM ArrangeLessonTerm t where 1=1 ");

if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
strSql.Append(" AND t.LessonNo = @LessonNo ");
}
if (!queryParam["TeachClassNo"].IsEmpty())
{
dp.Add("TeachClassNo", "%"+queryParam["TeachClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.TeachClassNo like @TeachClassNo ");
}
if (!queryParam["EmpNo"].IsEmpty())
{
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String);
strSql.Append(" AND t.EmpNo = @EmpNo ");
}
if (!queryParam["ClassroomNo"].IsEmpty())
{
dp.Add("ClassroomNo", queryParam["ClassroomNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassroomNo = @ClassroomNo ");
}

return this.BaseRepository("CollegeMIS").FindList<ArrangeLessonTermEntity>(strSql.ToString(),dp);
}
catch (Exception ex)
{


Loading…
取消
儲存