Browse Source

修复成绩录入老师能看到不是自己带的班的信息

新疆影视学院高职
zhangli 2 years ago
parent
commit
6760d9deaf
5 changed files with 82 additions and 2 deletions
  1. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js
  3. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs
  5. +46
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs

+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs View File

@@ -532,6 +532,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers

return Success(data);
}

/// <summary>
/// 班级下拉框信息【成绩录入】
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetClassNoDataForInput(string lessonNo)
{
var loginInfo = LoginUserInfo.Get();
var semesterAndYear = Common.GetSemesterAndYear();
var data = stuScoreIBLL.GetClassNoDataForInput(loginInfo.account, loginInfo.Description, lessonNo, semesterAndYear.AcademicYearShort, semesterAndYear.Semester);
return Success(data);
}
/// <summary>
/// 班级下拉框信息【全院班级成绩查看】
/// </summary>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js View File

@@ -562,7 +562,7 @@ var bootstrap = function ($, learun) {
select: function (item) {
if (!!item) {
$("#ClassNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoData?lessonNo=' + item.value,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetClassNoDataForInput?lessonNo=' + item.value,
value: 'value',
text: 'text',
});


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs View File

@@ -540,6 +540,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public IEnumerable<WebHelper.YearGrade> GetClassNoDataForInput(string userAccount, string userType, string lessonNo, string academicYearShort, string semester)
{
try
{
return stuScoreService.GetClassNoDataForInput(userAccount, userType, lessonNo, academicYearShort, semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 教师下拉框信息【学生成绩录入可去审核】
/// </summary>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs View File

@@ -135,6 +135,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetClassNoData(string userAccount, string userType, string lessonNo);
IEnumerable<WebHelper.YearGrade> GetClassNoDataForInput(string userAccount, string userType, string lessonNo,string academicYearShort,string semester);

/// <summary>
/// 教师下拉框信息【学生成绩录入可去审核】


+ 46
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs View File

@@ -1151,6 +1151,51 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad
}
}

/// <summary>
/// 班级下拉框【成绩录入】
/// </summary>
/// <param name="userAccount"></param>
/// <param name="userType"></param>
/// <param name="lessonNo"></param>
/// <param name="academicYearShort"></param>
/// <param name="semester"></param>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetClassNoDataForInput(string userAccount, string userType, string lessonNo, string academicYearShort, string semester)
{
try
{
var strSql = new StringBuilder();
strSql.Append("select distinct s.ClassNo as value,c.ClassName as text from stuscore s inner join ClassInfo c on s.ClassNo=c.ClassNo where s.LessonSortNo='1' ");
if (userType == "教师")
{
strSql.Append(" and s.EmpNo='" + userAccount + "' ");
}

if (!string.IsNullOrEmpty(academicYearShort))
{
strSql.Append(" and s.AcademicYearNo='" + academicYearShort + "' and s.Semester='" + semester + "' ");
}
if (!string.IsNullOrEmpty(lessonNo))
{
strSql.Append(" and s.LessonNo='" + lessonNo + "' ");
}
var data = this.BaseRepository("CollegeMIS").FindList<WebHelper.YearGrade>(strSql.ToString());
data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value);
return data;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 教师下拉框信息【学生成绩录入可去审核】
/// </summary>
@@ -2223,7 +2268,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad
var classInfoList = db.FindList<ClassInfoEntity>();
var lessonInfoList = db.FindList<LessonInfoEntity>();
var classInfoEntity = classInfoList.FirstOrDefault(x => x.ClassNo == ClassNo);
var lessonInfoEntity = lessonInfoList.FirstOrDefault(x => x.LessonNo == LessonNo);
var lessonInfoEntity = lessonInfoList.FirstOrDefault(x => x.LessonNo == LessonNo && x.CheckMark == true);

if (classInfoEntity != null)
{


Loading…
Cancel
Save