Browse Source

补考成绩录入 课程、班级下拉框跟学年学期联动

新疆体育高职分支
zhangli 1 year ago
parent
commit
531408ce4b
5 changed files with 51 additions and 24 deletions
  1. +12
    -11
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs
  2. +23
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js
  3. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs
  4. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs
  5. +10
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs

+ 12
- 11
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs View File

@@ -123,7 +123,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetCanInputFlag(string name,string AcademicYearNo,string Semester)
public ActionResult GetCanInputFlag(string name, string AcademicYearNo, string Semester)
{
bool CanInputFlag = true;
var entity = eADateArrangeIBLL.GetEntityByNameSemester(name, AcademicYearNo, Semester);
@@ -264,7 +264,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
stuScoreNotPassIBLL.InitScore();
return Success("操作成功!");
}
#endregion

#region 扩展数据
@@ -290,7 +290,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult GetLessonNoDataOfAllWithNo()
{
var data = stuScoreNotPassIBLL.GetLessonNoDataOfAll("", "");
var data = stuScoreNotPassIBLL.GetLessonNoDataOfAll("", "", "", "");
foreach (var item in data)
{
item.text = string.Format("{0}({1})", item.text, item.value);
@@ -304,10 +304,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetLessonNoDataWithNo()
public ActionResult GetLessonNoDataWithNo(string AcademicYearNo, string Semester)
{
var loginInfo = LoginUserInfo.Get();
var data = stuScoreNotPassIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description);
var data = stuScoreNotPassIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description, AcademicYearNo, Semester);
foreach (var item in data)
{
item.text = string.Format("{0}({1})", item.text, item.value);
@@ -324,7 +324,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult GetClassNoDataOfAll(string lessonNo)
{
var data = stuScoreNotPassIBLL.GetClassNoData("", "", lessonNo);
var data = stuScoreNotPassIBLL.GetClassNoData("", "", lessonNo, "", "");

return Success(data);
}
@@ -334,10 +334,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetClassNoData(string lessonNo)
public ActionResult GetClassNoData(string lessonNo, string AcademicYearNo, string Semester)
{
var loginInfo = LoginUserInfo.Get();
var data = stuScoreNotPassIBLL.GetClassNoData(loginInfo.account, loginInfo.Description, lessonNo);
var data = stuScoreNotPassIBLL.GetClassNoData(loginInfo.account, loginInfo.Description, lessonNo, AcademicYearNo, Semester);

return Success(data);
}
@@ -466,11 +466,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// </summary>
/// <returns></returns>
[HttpPost, ValidateInput(false)]
public ActionResult ExportInputScoreList(string headdata,string rowdata)
public ActionResult ExportInputScoreList(string headdata, string rowdata)
{
var headData = JsonConvert.DeserializeObject<List<colModel>>(headdata);
var rowData = JsonConvert.DeserializeObject<List<List<colModel>>>(rowdata);
var result = new List<Dictionary<string, string>>();
foreach (var item in rowData)
{
@@ -508,7 +508,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <summary>
/// 列
/// </summary>
public class colModel {
public class colModel
{
public string label { get; set; }
public string name { get; set; }
}


+ 23
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js View File

@@ -444,7 +444,16 @@ var bootstrap = function ($, learun) {
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetAcademicYearNoData',
value: 'value',
text: 'text'
text: 'text',
select: function (item) {
if (!!item) {
$("#LessonNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetLessonNoDataWithNo?AcademicYearNo=' + item.value + '&Semester=' + $('#Semester').lrselectGet(),
value: 'value',
text: 'text',
});
}
}
});
//学期
$('#Semester').lrselect({
@@ -452,19 +461,28 @@ var bootstrap = function ($, learun) {
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
text: 'text',
select: function (item) {
if (!!item) {
$("#LessonNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetLessonNoDataWithNo?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + item.value,
value: 'value',
text: 'text',
});
}
}
});
//课程
$('#LessonNo').lrselect({
placeholder: "请选择课程",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetLessonNoDataWithNo',
//url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetLessonNoDataWithNo',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$("#ClassNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetClassNoData?lessonNo=' + item.value,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetClassNoData?lessonNo=' + item.value + '&AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(),
value: 'value',
text: 'text',
});
@@ -475,7 +493,7 @@ var bootstrap = function ($, learun) {
$('#ClassNo').lrselect({
placeholder: "请选择班级",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetClassNoData',
//url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetClassNoData',
value: 'value',
text: 'text'
});


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs View File

@@ -258,11 +258,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 课程下拉框信息
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType)
public IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo, string Semester)
{
try
{
return stuScoreNotPassService.GetLessonNoDataOfAll(userAccount, userType);
return stuScoreNotPassService.GetLessonNoDataOfAll(userAccount, userType, AcademicYearNo, Semester);
}
catch (Exception ex)
{
@@ -281,11 +281,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 班级下拉框信息
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo)
public IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo, string AcademicYearNo, string Semester)
{
try
{
return stuScoreNotPassService.GetClassNoData(userAccount, userType, lessonNo);
return stuScoreNotPassService.GetClassNoData(userAccount, userType, lessonNo, AcademicYearNo, Semester);
}
catch (Exception ex)
{


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs View File

@@ -77,13 +77,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 课程下拉框信息
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType);
IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo, string Semester);

/// <summary>
/// 班级下拉框信息
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo);
IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo, string AcademicYearNo, string Semester);

/// <summary>
/// 开始录入:占用成绩


+ 10
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs View File

@@ -517,7 +517,7 @@ order by bb.ScoreId";
/// 课程下拉框信息
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType)
public IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo, string Semester)
{
try
{
@@ -529,6 +529,10 @@ order by bb.ScoreId";
{
strSql.Append(" and s.EmpNo='" + userAccount + "' ");
}
if (!string.IsNullOrEmpty(AcademicYearNo) && !string.IsNullOrEmpty(Semester))
{
strSql.Append($" and s.AcademicYearNo='{AcademicYearNo}' and s.Semester='{Semester}' ");
}
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>(strSql.ToString());
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value);
return data;
@@ -550,7 +554,7 @@ order by bb.ScoreId";
/// 班级下拉框信息
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo)
public IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo, string AcademicYearNo, string Semester)
{
try
{
@@ -564,6 +568,10 @@ order by bb.ScoreId";
{
strSql.Append(" and s.LessonNo='" + lessonNo + "' ");
}
if (!string.IsNullOrEmpty(AcademicYearNo) && !string.IsNullOrEmpty(Semester))
{
strSql.Append($" and s.AcademicYearNo='{AcademicYearNo}' and s.Semester='{Semester}' ");
}
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>(strSql.ToString());
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value);
return data;


Loading…
Cancel
Save