From 3fc22710898089ed08656d5bf99adc46466cd369 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Thu, 21 Oct 2021 10:14:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=95=99=E5=AD=A6=E8=AE=A1=E5=88=92api?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Arrangelesson.cs | 29 ++++++++++++ .../TeachingPlan/TeachingPlanBLL.cs | 24 ++++++++++ .../TeachingPlan/TeachingPlanEntity.cs | 8 ++++ .../TeachingPlan/TeachingPlanIBLL.cs | 2 + .../TeachingPlan/TeachingPlanService.cs | 46 +++++++++++++++++++ 5 files changed, 109 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs index dcdfc3c94..9f6b88b07 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs @@ -28,6 +28,9 @@ namespace Learun.Application.WebApi.Modules Get["/teacher"] = GetTeachers; Get["/class"] = GetClasses; Get["/stu"] = GetStus; + //获取教学计划 + Get["/teachingplan"] = GetTeachingPlan; + //以下返回全部 Get["/department"] = GetDepartment; Get["/allteacher"] = GetAllTeachers; @@ -39,6 +42,7 @@ namespace Learun.Application.WebApi.Modules Get["/allschool"] = GetAllSchools; Get["/allclasslesson"] = GetAllClassLesson; Get["/allelelectivelesson"] = GetAllElectiveLesson; + Get["/allteachingplan"] = GetAllTeachingPlan; //以下接口不往ArrangeLessonSync里记录已传数据 Get["/schoolNotRecord"] = GetSchoolsNotRecord; @@ -62,6 +66,7 @@ namespace Learun.Application.WebApi.Modules ClassInfoIBLL classInfoIbll = new ClassInfoBLL(); UserIBLL userIbll = new UserBLL(); private CompanyIBLL companyIbll = new CompanyBLL(); + private TeachingPlanIBLL teachingPlanIbll = new TeachingPlanBLL(); private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll = new StuSelectLessonListOfElectiveBLL(); @@ -155,6 +160,17 @@ namespace Learun.Application.WebApi.Modules var result = arrangeLessonTermIBLL.GetLessonTypes(); return Success(result); } + /// + /// 获取教学计划 + /// + /// + /// + private Response GetAllTeachingPlan(dynamic _) + { + var result = teachingPlanIbll.GetTeachingPlan("", ""); + return Success(result); + } + private Response GetSchools(dynamic _) { @@ -288,6 +304,19 @@ namespace Learun.Application.WebApi.Modules return Success(result); } + /// + /// 获取教学计划 + /// + /// + /// + public Response GetTeachingPlan(dynamic _) + { + string AcademicYearNo = Request.Query["AcademicYearNo"]; + string Semester = Request.Query["Semester"]; + var result = teachingPlanIbll.GetTeachingPlan(AcademicYearNo, Semester); + return Success(result); + } + public Response GetStusNotRecord(dynamic _) { string AcademicYearNo = Request.Query["AcademicYearNo"]; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs index 9ba8bf2ae..22a64e97e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs @@ -85,6 +85,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 根据学年获取教学计划 + /// + /// + /// + /// + public TeachingPlanRes GetTeachingPlan(string AcademicYearNo, string Semester) + { + try + { + return teachingPlanService.GetTeachingPlan(AcademicYearNo, Semester); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs index b3a191941..bf826840a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs @@ -1,5 +1,6 @@ using Learun.Util; using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -109,5 +110,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [NotMapped] public int? num { get; set; } } + + public class TeachingPlanRes + { + public TeachingPlanEntity TeachingPlan { get; set; } + public IEnumerable TeachingPlanItem { get; set; } + } + } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs index fbc340c4c..cab1195ad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs @@ -28,6 +28,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// TeachingPlanEntity GetTeachingPlanEntity(string keyValue); + + TeachingPlanRes GetTeachingPlan(string AcademicYearNo,string Semester); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs index dcdcd343c..7641566ea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs @@ -137,6 +137,52 @@ join CdLessonType c on t.LessonTypeId=c.ltid "; } } + /// + /// 根据学年获取教学计划 + /// + /// + /// + /// + public List GetTeachingPlan(string AcademicYearNo, string Semester) + { + try + { + var res = new List(); + var list = new List(); + if (!string.IsNullOrEmpty(AcademicYearNo)) + { + list = this.BaseRepository("CollegeMIS") + .FindList(x => x.Grade == AcademicYearNo).ToList(); + } + else + { + list = this.BaseRepository("CollegeMIS") + .FindList().ToList(); + } + + foreach (var entity in list) + { + var data = new TeachingPlanRes(); + data.TeachingPlan = entity; + data.TeachingPlanItem = this.BaseRepository("CollegeMIS") + .FindList(x => x.TeachingPlanId == entity.Id); + res.Add(data); + } + + return res; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 From 8f0022b255b42efbf7db708d6858e6cbcef2264b Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 16 Nov 2021 10:29:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs | 2 +- .../EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs index 22a64e97e..0a42a8b50 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs @@ -91,7 +91,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// /// - public TeachingPlanRes GetTeachingPlan(string AcademicYearNo, string Semester) + public List GetTeachingPlan(string AcademicYearNo, string Semester) { try { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs index cab1195ad..079742fdc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs @@ -29,7 +29,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// TeachingPlanEntity GetTeachingPlanEntity(string keyValue); - TeachingPlanRes GetTeachingPlan(string AcademicYearNo,string Semester); + List GetTeachingPlan(string AcademicYearNo,string Semester); #endregion #region 提交数据 From d01b2e7575a9989b2d58e6e25545b85fa7f993d5 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 30 Nov 2021 14:27:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E7=89=88=E7=9A=84=E5=9C=B0=E5=9D=80/SSOSystem/NoLogin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SSOSystemController.cs | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs index e6dd2a1b3..5b4857ca7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs @@ -235,24 +235,24 @@ namespace Learun.Application.Web.Controllers return View(); } - public ActionResult NoLogin() - { - var flowType = dataItemIBLL.GetDetailList("FlowSort", ""); - var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList(); - var allCount = 0; - foreach (var flow in flowType) - { - var count = flowList.Count(a => a.F_Category == flow.F_ItemName); - flow.FlowCount = count; - allCount += count; - - } - - ViewBag.AllCount = allCount; - ViewBag.FlowType = flowType; - ViewBag.FlowList = JsonConvert.SerializeObject(flowList); - return View(); - } + //public ActionResult NoLogin() + //{ + // var flowType = dataItemIBLL.GetDetailList("FlowSort", ""); + // var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList(); + // var allCount = 0; + // foreach (var flow in flowType) + // { + // var count = flowList.Count(a => a.F_Category == flow.F_ItemName); + // flow.FlowCount = count; + // allCount += count; + + // } + + // ViewBag.AllCount = allCount; + // ViewBag.FlowType = flowType; + // ViewBag.FlowList = JsonConvert.SerializeObject(flowList); + // return View(); + //} private UserService userService = new UserService(); @@ -863,7 +863,7 @@ namespace Learun.Application.Web.Controllers /// 网上办事大厅拖拽版-未登录页面 /// /// - public ActionResult DragNoLogin() + public ActionResult NoLogin() { //获取错误次数 ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum(); @@ -884,7 +884,7 @@ namespace Learun.Application.Web.Controllers ViewBag.WeixinLoginSwitch = result4; - return View(); + return View("DragNoLogin"); } ///