Selaa lähdekoodia

【修改】学生成绩单打印;

黑龙江艺术高中职
dyy 1 kuukausi sitten
vanhempi
commit
8f8f70bf31
5 muutettua tiedostoa jossa 59 lisäystä ja 24 poistoa
  1. +5
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoGraduateController.cs
  2. +46
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs
  3. +2
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.cshtml
  4. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js
  5. +2
    -12
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs

+ 5
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoGraduateController.cs Näytä tiedosto

@@ -59,9 +59,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View(new StuInfoGraduateEntity());
}
var Score = stuScoreIBLL.GetScoreListStuNo(StuInfoGraduateEntity.StuNo);
var Score = stuScoreIBLL.GetScoreListStuNo(StuInfoGraduateEntity.StuNo).Where(x => x.AcademicYearNo != null && x.Semester != null);
//学习成绩
StuInfoGraduateEntity.StuScoreList = Score.Where(x => x.AcademicYearNo != null && x.Semester != null && x.Score != null)
StuInfoGraduateEntity.StuScoreList = Score
.GroupBy(x => new { x.AcademicYearNo, x.Semester })
.Select(x => new StuScores()
{
@@ -71,7 +71,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
LessonNo = y.LessonNo,
LessonName = y.LessonName,
Score = y.Score
Score = y.Score,
ScoreFormat = y.ScoreFormat
}).OrderBy(xx => xx.LessonNo).ToList()
}).OrderBy(xx => xx.AcademicYearNo).ThenBy(xx => xx.Semester).ToList();
var result = new
@@ -84,7 +85,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
ClassName = classInfoIBLL.GetClassInfoEntityByClassNo(StuInfoGraduateEntity.ClassNo).ClassName,
MajorName = cdMajorIBLL.GetCdMajorEntityByMajorNo(StuInfoGraduateEntity.MajorNo).MajorName,
StuInfoGraduateEntity = StuInfoGraduateEntity,
Counts = Score.Count().ToString(),
Counts = Score.GroupBy(x => x.LessonName).Select(x => x.Key).Count().ToString(),
};
return Success(result);
}


+ 46
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs Näytä tiedosto

@@ -10,6 +10,7 @@ using System.Configuration;
using System.Data;
using System.Linq;
using System.Web.Mvc;
using static Learun.Application.TwoDevelopment.EducationalAdministration.StuInfoBasicEntity;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
@@ -1274,7 +1275,51 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
stuScoreIBLL.DoSlow(keyValue, status);
return Success("操作成功");
}

/// <summary>
/// 全院学生成绩查看-打印(学生成绩单)
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult DataFilling(string stuNo)
{
//毕业表
var StuInfoGraduateEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(stuNo);
if (StuInfoGraduateEntity == null)
{
return View(new StuInfoBasicEntity());
}
var Score = stuScoreIBLL.GetScoreListStuNo(StuInfoGraduateEntity.StuNo).Where(x => x.AcademicYearNo != null && x.Semester != null);
//学习成绩
StuInfoGraduateEntity.StuScoreClassOneList = Score
.GroupBy(x => new { x.AcademicYearNo, x.Semester })
.Select(x => new StuScoreClassOne()
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
StuScoreList = x.Select(y => new StuScoreEntity()
{
LessonNo = y.LessonNo,
LessonName = y.LessonName,
Score = y.Score,
ScoreFormat = y.ScoreFormat
}).OrderBy(xx => xx.LessonNo).ToList()
}).OrderBy(xx => xx.AcademicYearNo).ThenBy(xx => xx.Semester).ToList();
var result = new
{
StuNo = StuInfoGraduateEntity.StuNo,
StuName = StuInfoGraduateEntity.StuName,
Crowning = StuInfoGraduateEntity.Crowning,
EduSystem = StuInfoGraduateEntity.EduSystem,
Grade = StuInfoGraduateEntity.Grade,
ClassName = classInfoIBLL.GetClassInfoEntityByClassNo(StuInfoGraduateEntity.ClassNo).ClassName,
MajorName = cdMajorIBLL.GetCdMajorEntityByMajorNo(StuInfoGraduateEntity.MajorNo).MajorName,
StuInfoGraduateEntity = StuInfoGraduateEntity,
Counts = Score.GroupBy(x => x.LessonName).Select(x => x.Key).Count().ToString(),
};
return Success(result);
}

#endregion



+ 2
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.cshtml Näytä tiedosto

@@ -49,7 +49,6 @@
cache: false,
success: function (res) {
if (res.code == 200) {
console.log(res.data)
$.ajax({
url: "/OnlineRegistrate/GetDataItemMap?code=" + 'EduSystem',
async: false,
@@ -90,10 +89,10 @@
if (scoreIndex == -1) {
scoreData.push({
0: e1.LessonName,
[i + 1]: e1.Score
[i + 1]: e1.ScoreFormat
})
} else {
scoreData[scoreIndex][i + 1] = e1.Score
scoreData[scoreIndex][i + 1] = e1.ScoreFormat
}
})
})


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js Näytä tiedosto

@@ -39,10 +39,10 @@ var bootstrap = function ($, learun) {
var AcademicYearNo = $('#AcademicYearNo').lrselectGet();
var Semester = $('#Semester').lrselectGet();
var StuNo = $.trim($('#StuNo').val());
//if (StuNo == null || StuNo == "") {
// learun.alert.warning("请输入学号!");
// return;
//}
if (StuNo == null || StuNo == "") {
learun.alert.warning("请输入学号!");
return;
}
var LessonNo = $('#LessonNo').lrselectGet();
var Grade = $('#Grade').lrselectGet();
learun.layerForm({


+ 2
- 12
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs Näytä tiedosto

@@ -2916,8 +2916,9 @@ group by c.StuNo) cc where cc.StuNo = bb.StuNo) as RankIndept ");
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,lt.LessonTypeName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName ");
strSql.Append(" ,case when bb.Score<60 then (case when sp.Score>0 then '补('+convert(nvarchar(50),sp.Score)+')' else convert(nvarchar(50),bb.Score) end) else convert(nvarchar(50),bb.Score) end as ScoreFormat ");
strSql.Append(" from ( ");
strSql.Append($"select sb.Grade,s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,Max(s.Score) as Score from StuScore s left join StuInfoBasic sb on s.StuNo=sb.StuNo ");
strSql.Append($"select sb.Grade,s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,ISNULL(Max(s.Score),0) as Score from StuScore s left join StuInfoBasic sb on s.StuNo=sb.StuNo ");
strSql.Append(" where 1=1 and s.CheckMark='1' and s.StuNo= '" + StuNo + "'");
strSql.Append(" group by sb.Grade,s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo ) as bb ");
strSql.Append(" left join StuScoreNotPass sp on bb.AcademicYearNo=sp.AcademicYearNo and bb.Semester=sp.Semester and bb.LessonSortNo=sp.LessonSortNo and bb.LessonNo=sp.LessonNo and bb.LessonName=sp.LessonName and bb.StuNo=sp.StuNo and sp.CheckMark = '1' ");
@@ -2928,17 +2929,6 @@ group by c.StuNo) cc where cc.StuNo = bb.StuNo) as RankIndept ");
strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' ");
strSql.Append(" left join CdLessonType lt on li.LessonTypeId=lt.ltid and lt.LTEnabled='1' ");
var data = this.BaseRepository("CollegeMIS").FindList<StuScoreEntity>(strSql.ToString(), dp);
foreach (var item in data)
{
if (item.Score <= 0)
{
item.Score = item.ScoreOfNotPass.ToDecimal();
}
else if (item.Score <= 0 && item.ScoreOfNotPass.ToDecimal() <= 0)
{
item.Score = item.ScoreOfNotPassTwo.ToDecimal();
}
}
return data;
}
catch (Exception ex)


Ladataan…
Peruuta
Tallenna