diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs index 4b0155d42..998a321c6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs @@ -163,59 +163,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(new StuInfoBasicEntity()); } + //头像 stuInfoBasicEntity.Photo = annexesFileIbll.GetEntityByFolderId(stuInfoBasicEntity.Photo)?.F_FilePath; if (!string.IsNullOrEmpty(stuInfoBasicEntity.Photo)) { stuInfoBasicEntity.Photo = stuInfoBasicEntity.Photo.Substring(stuInfoBasicEntity.Photo.IndexOf("Resource") - 1); } - - //#region 获取附件名称 - //if (dispatchEntity.AttachmentName != null) - //{ - // string str = ""; - // string[] array = annexesFileIBLL.GetFileNames(dispatchEntity.AttachmentName).Split(','); - // if (array.Length > 0) - // { - // for (int i = 0; i < array.Length; i++) - // { - // if (array[i].Trim() != "") - // { - // str += array[i].Substring(0, array[i].IndexOf(".")) + ","; - // } - // } - // str.TrimEnd(','); - // } - // dispatchEntity.Reasons = str; - //} - //#endregion - - //#region 获取校长的签名盖章+ 批示+时间+阅 - ////var listTaskLog = nWFTaskIBLL.GetLogList(dispatchEntity.processId); - //var firstList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).OrderBy(o => o.F_CreateDate).ToList(); - //for (int i = 1; i < firstList.Count; i++) - //{ - // if (i == 1) - // { - // dispatchEntity.Render = firstList[i].F_Des; - // ViewBag.pSList += firstList[i].F_CreateUserName + firstList[i].F_CreateDate + "阅" + "&"; - // } - //} - //var PrintList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).GroupBy(o => o.F_CreateUserName).Select(o => new - //{ - // F_CreateDate = o.FirstOrDefault().F_CreateDate, - // F_CreateUserName = o.FirstOrDefault().F_CreateUserName, - //}); - //var newList = PrintList.Where(s => PrintList.Select(mo => mo.F_CreateDate).Contains(s.F_CreateDate)).OrderBy(s => s.F_CreateDate).ToList(); - //for (int i = 1; i < newList.Count; i++) - //{ - // if (!ViewBag.pSList.Contains(newList[i].F_CreateUserName)) - // { - // ViewBag.pSList += newList[i].F_CreateUserName + newList[i].F_CreateDate + "阅" + "&"; - // } - //} - //ViewBag.pSList = ViewBag.pSList.TrimEnd('&'); - //ViewBag.pSList = new List(ViewBag.pSList.Split('&')); - //#endregion + //学习成绩 + stuInfoBasicEntity.StuScoreClassOneList = stuScoreIBLL.GetAllScoreListByStuNo(stuInfoBasicEntity.StuNo) + .Where(x => x.AcademicYearNo != null && x.Semester != null && x.Score != null) + .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 + }).OrderBy(xx => xx.LessonNo).ToList() + }).OrderBy(xx => xx.AcademicYearNo).ThenBy(xx => xx.Semester).ToList(); + return View(stuInfoBasicEntity); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml index fbfe1be98..784a444d0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml @@ -61,14 +61,25 @@ word-break: normal; */ page-break-after: always; } - media print { + .pageBreak { page-break-after: always; } - .noPrint { - display: none; + .btn { + width: 100px; + height: 34px; + line-height: 34px; + text-align: center; + margin: 30px auto; + border: 1px solid #ccc; + cursor: pointer; + border-radius: 4px; } + + .tableBox { + width: 90%; + margin: 30px auto; } @@ -90,13 +101,13 @@ @Model.GenderNo 出生日期 @(Model.Birthday.HasValue ? Model.Birthday.Value.ToShortDateString().Replace("/", "-") : "") - + 民族 @Model.NationalityNo 政治面貌 - @Model.PartyFaceNo + @Model.PartyFaceNo 班级 @Model.ClassNo @@ -120,19 +131,19 @@ 入学年月 @(Model.EntranceDate.HasValue ? Model.EntranceDate.Value.ToShortDateString().Replace("/", "-") : "") 入学方式 - @Model.EntranceWay + @Model.EntranceWay 学习形式 - @Model.StudyModality + @Model.StudyModality 家庭住址 @Model.MailAddress 毕业时间 - @Model.GraduateYear + 异动情况 - + 学业成绩 @@ -147,60 +158,48 @@ 成绩 + @if (Model.StuScoreClassOneList.Count > 0) + { + for (int i = 0; i < Model.StuScoreClassOneList.Count; i++) + { + if (i == 0) + { + + @for (int j = 0; j < Model.StuScoreClassOneList[i].StuScoreList.Count; j++) + { -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
第一学期
+ if (j == 0) + { + + 第一学期 + @Model.StuScoreClassOneList[i].StuScoreList[j].LessonName + @Model.StuScoreClassOneList[i].StuScoreList[j].Score + @*@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName + @Model.StuScoreClassOneList[i].StuScoreList[j].Score + @Model.StuScoreClassOneList[i].StuScoreList[j].LessonName + @Model.StuScoreClassOneList[i].StuScoreList[j].Score*@ + + } + else + { + + @Model.StuScoreClassOneList[i].StuScoreList[j].LessonName + @Model.StuScoreClassOneList[i].StuScoreList[j].Score + @*@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName + @Model.StuScoreClassOneList[i].StuScoreList[j].Score + @Model.StuScoreClassOneList[i].StuScoreList[j].LessonName + @Model.StuScoreClassOneList[i].StuScoreList[j].Score*@ + + } + } + + } + + } + } - - - - - - - - - + @@ -405,89 +404,15 @@
第二学期
第一学期
- - - - - + + + + \ No newline at end of file + if (sanH > 300) { + erDom.classList.remove("pageBreak") + sanDom.classList.add("pageBreak") + siDom.classList.remove("pageBreak") + wuDom.classList.remove("pageBreak") + } + if (siH > 400) { + siDom.classList.add("pageBreak") + liuDom.classList.remove("pageBreak") + wuDom.classList.remove("pageBreak") + } + if (wuH > 400) { + wuDom.classList.add("pageBreak") + liuDom.classList.remove("pageBreak") + + } + if (liuH > 400) { + wuDom.classList.add("pageBreak") + + } + + if ((erH + sanH) > 600) { + sanDom.classList.add("pageBreak") + siDom.classList.remove("pageBreak") + wuDom.classList.remove("pageBreak") + liuDom.classList.remove("pageBreak") + } else + if ((sanH + siH) > 700) { + // siDom.classList.add("pageBreak") + wuDom.classList.remove("pageBreak") + liuDom.classList.remove("pageBreak") + } + + if ((siH + wuH) > 700) { + wuDom.classList.add("pageBreak") + liuDom.classList.remove("pageBreak") + } + console.log("erH", erH) + console.log("sanH", sanH) + console.log("siH", siH) + console.log("wuH", wuH) + console.log("liuH", liuH) + + if ((erH + sanH + siH) > 700) { + sanDom.classList.add("pageBreak") + siDom.classList.remove("pageBreak") + wuDom.classList.add("pageBreak") + } + + + + + +