From ec657cfd99de627a7eba80ea4ff2a2de5fb14864 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 30 Sep 2022 17:51:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=AD=A6?= =?UTF-8?q?=E4=B8=9A=E6=88=90=E7=BB=A9=E8=80=83=E6=A0=B8=E8=AE=B0=E8=BD=BD?= =?UTF-8?q?=E8=A1=A8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ScoreCheckInfoController.cs | 29 +- .../ScoreCheckInfo/RecordTablePrint.cshtml | 333 +++++++++--------- .../ScoreCheckInfo/ScoreCheckInfoEntity.cs | 2 + .../StuAttendanceLeaveBLL.cs | 26 ++ .../StuAttendanceLeaveIBLL.cs | 7 + .../StuAttendanceLeaveService.cs | 69 ++++ 6 files changed, 288 insertions(+), 178 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs index cf442fd8f..f314a4c01 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs @@ -24,6 +24,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers private StuPunishmentIBLL stuPunishmentIBLL = new StuPunishmentBLL(); private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); private StudentCertificateIBLL studentCertificateIBLL = new StudentCertificateBLL(); + private StuAttendanceLeaveIBLL stuAttendanceLeaveIBLL = new StuAttendanceLeaveBLL(); #region 视图功能 @@ -86,24 +87,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers entity = new ScoreCheckInfoEntity(); } //意见盖章 - var annexesFileEntity = annexesFileIBLL.GetEntityByFolderId(entity.FilePath); - if (annexesFileEntity != null) + if (!string.IsNullOrEmpty(entity.FilePath)) { - entity.FilePath = annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource")-1); - } - else - { - entity.FilePath = ""; + var annexesFileEntity = annexesFileIBLL.GetEntityByFolderId(entity.FilePath); + if (annexesFileEntity != null) + { + entity.FilePath = annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource") - 1); + } + else + { + entity.FilePath = ""; + } } - //职业资格证书(-表中无学年学期字段) - entity.StudentCertificateList = studentCertificateIBLL.GetList(entity.StuNo).OrderByDescending(x=>x.CreateTime).ToList(); + + //职业资格证书(-表中无学年学期字段???待增加 todo:) + entity.StudentCertificateList = studentCertificateIBLL.GetList(entity.StuNo).OrderByDescending(x => x.CreateTime).ToList(); //奖罚情况 - entity.StuEncourgementList = stuEncourgementIBLL.GetEncourgementListByStuNo(entity.AcademicYearNo,entity.Semester,entity.StuNo).ToList(); + entity.StuEncourgementList = stuEncourgementIBLL.GetEncourgementListByStuNo(entity.AcademicYearNo, entity.Semester, entity.StuNo).ToList(); entity.StuPunishmentList = stuPunishmentIBLL.GetPunishmentListByStuNo(entity.AcademicYearNo, entity.Semester, entity.StuNo).ToList(); //学习成绩 - entity.StuScoreList = stuScoreIBLL.GetAllScoreListByStuNo(entity.StuNo).Where(x => x.AcademicYearNo ==entity.AcademicYearNo && x.Semester == entity.Semester && x.CheckMark=="1").ToList(); + entity.StuScoreList = stuScoreIBLL.GetScoreListByStuInfo("{\"AcademicYearNo\":\"" + entity.AcademicYearNo + "\",\"Semester\":\"" + entity.Semester + "\",\"StuNo\":\"" + entity.StuNo + "\"}").ToList(); //考勤 - //todo: + entity.StuAttendanceLeaveList = stuAttendanceLeaveIBLL.GetListByJson("{\"AcademicYearNo\":\"" + entity.AcademicYearNo + "\",\"Semester\":\"" + entity.Semester + "\",\"StuNo\":\"" + entity.StuNo + "\"}").ToList(); return View(entity); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml index 97c4f6654..7e2598386 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml @@ -1,4 +1,5 @@ -@model Learun.Application.TwoDevelopment.EducationalAdministration.ScoreCheckInfoEntity +@using Learun.Application.TwoDevelopment.EducationalAdministration +@model Learun.Application.TwoDevelopment.EducationalAdministration.ScoreCheckInfoEntity @{ ViewBag.Title = "学业成绩考核记载表"; Layout = null; @@ -21,182 +22,180 @@

学生成绩考核记载表( @Model.AcademicYearNo 学年,第 @Model.Semester 学期)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + for (int i = 0; i < rowNum - 2; i++) + { + + @if (i < scoreListTemp.Count()) + { + for (int j = 0; j < 2; j++) { - @Model.CheckTime.Value.Year 年 @Model.CheckTime.Value.Month 月 @Model.CheckTime.Value.Day 日 + if (j < scoreListTemp[i].Count()) + { + + + + } + else + { + + + + } + } - else + } + else + { + + + + + + + } + + } + + + - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + @{ + var leaveList = Model.StuAttendanceLeaveList as IEnumerable; + + + + } + + + + + + + + + + + + + + + + + + - + + + + }
-
学业成绩
-
学科名称成 绩学科名称成 绩
正考补考正考补考
111222
 
 
 
 
 
 
学校教务部门审核意见 -
@Model.CheckOpinion
-
(盖  章) - -
-
- @{ - if (Model.CheckTime.HasValue) + @{ + var scoreList = Model.StuScoreList as IEnumerable; + //两个为一组 + var scoreListTemp = scoreList.Select((x, i) => new { Index = i, Value = x }).GroupBy(x => x.Index / 2).Select(x => x.Select(y => y.Value).ToList()).ToList(); + //第一列占多少行 + int rowNum = 9; + if (scoreList.Count() > 14) + { + rowNum = Convert.ToInt32(Math.Ceiling(Convert.ToDecimal(scoreList.Count() / 2))) + 2; + } + +
+
学业成绩
+
学科名称成 绩学科名称成 绩
正考补考正考补考
@scoreListTemp[i][j].LessonName@(scoreListTemp[i][j].Score == null ? 0 : scoreListTemp[i][j].Score)@(Convert.ToInt32(scoreListTemp[i][j].ScoreOfNotPassTwo) > 0 ? scoreListTemp[i][j].ScoreOfNotPassTwo : scoreListTemp[i][j].ScoreOfNotPass)
学校教务部门审核意见 +
@Model.CheckOpinion
+
+ (盖  章) + @if (!string.IsNullOrEmpty(Model.FilePath)) { - 年       月       日 + + } +
+
+ @{ + if (Model.CheckTime.HasValue) + { + @Model.CheckTime.Value.Year 年 @Model.CheckTime.Value.Month 月 @Model.CheckTime.Value.Day 日 + } + else + { + 年       月       日 + } } - } -
-
考勤事假(节) - - - - - - - -
病假(节)旷课(节)迟到(次)早退(次)
-
考勤事假(节) + + + + + + + +
病假(节)旷课(节)迟到(次)早退(次)
+
- - - - - - - -
    
-
职业资格证书获得情况 -
- @foreach (var item in Model.StudentCertificateList) - { - @(Model.StudentCertificateList.IndexOf(item)+1)、@item.SCName @item.CreateTime.Value.ToShortDateString().Replace("/", "-")
- } -
-
奖 惩 记 载 -
- @foreach (var item in Model.StuEncourgementList) - { -
@(Model.StuEncourgementList.IndexOf(item) + 1)、@item.EncourgeDate.Value.ToShortDateString().Replace("/", "-") @item.EncourgeName @item.Fee
- } - @foreach (var item in Model.StuPunishmentList) - { -
@(Model.StuPunishmentList.IndexOf(item) + 1 + Model.StuEncourgementList.Count())、@item.PunishDate.Value.ToShortDateString().Replace("/", "-") @item.PunishName
- } -
-
-
操行鉴定
-
操行等级@Model.OperatingLevel
班主任评估
-
@Model.TeacherDemo
-
班主任签名:@Model.Signed
-
- @{ - if (Model.TDate.HasValue) +
@leaveList.Where(x=>x.LeaveType=="事假").Count() + + + + + + + +
@leaveList.Where(x => x.LeaveType == "病假").Count()@leaveList.Where(x => x.LeaveType == "旷课").Count()@leaveList.Where(x => x.LeaveType == "迟到").Count()@leaveList.Where(x => x.LeaveType == "早退").Count()
+
职业资格证书获得情况 +
+ @foreach (var item in Model.StudentCertificateList) { - @Model.TDate.Value.Year 年 @Model.TDate.Value.Month 月 @Model.TDate.Value.Day 日 + @(Model.StudentCertificateList.IndexOf(item) + 1)、@item.CreateTime.Value.ToShortDateString().Replace("/", "-") @item.SCName
} - else +
+
奖 惩 记 载 +
+ @foreach (var item in Model.StuEncourgementList) { - 年       月       日 +
奖励 @(Model.StuEncourgementList.IndexOf(item) + 1)、@item.EncourgeDate.Value.ToShortDateString().Replace("/", "-") @item.EncourgeName @item.Fee
+ } + @foreach (var item in Model.StuPunishmentList) + { +
处分 @(Model.StuPunishmentList.IndexOf(item) + 1)、@item.PunishDate.Value.ToShortDateString().Replace("/", "-") @item.PunishName
+ } +
+
+
操行鉴定
+
操行等级@Model.OperatingLevel
班主任评估
+
@Model.TeacherDemo
+
班主任签名:@Model.Signed
+
+ @{ + if (Model.TDate.HasValue) + { + @Model.TDate.Value.Year 年 @Model.TDate.Value.Month 月 @Model.TDate.Value.Day 日 + } + else + { + 年       月       日 + } } - } -
-
注:操行等级分优、良、中、差四等