@@ -235,24 +235,24 @@ namespace Learun.Application.Web.Controllers | |||||
return View(); | 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(); | private UserService userService = new UserService(); | ||||
@@ -863,7 +863,7 @@ namespace Learun.Application.Web.Controllers | |||||
/// 网上办事大厅拖拽版-未登录页面 | /// 网上办事大厅拖拽版-未登录页面 | ||||
/// </summary> | /// </summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public ActionResult DragNoLogin() | |||||
public ActionResult NoLogin() | |||||
{ | { | ||||
//获取错误次数 | //获取错误次数 | ||||
ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum(); | ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum(); | ||||
@@ -884,7 +884,7 @@ namespace Learun.Application.Web.Controllers | |||||
ViewBag.WeixinLoginSwitch = result4; | ViewBag.WeixinLoginSwitch = result4; | ||||
return View(); | |||||
return View("DragNoLogin"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -28,6 +28,9 @@ namespace Learun.Application.WebApi.Modules | |||||
Get["/teacher"] = GetTeachers; | Get["/teacher"] = GetTeachers; | ||||
Get["/class"] = GetClasses; | Get["/class"] = GetClasses; | ||||
Get["/stu"] = GetStus; | Get["/stu"] = GetStus; | ||||
//获取教学计划 | |||||
Get["/teachingplan"] = GetTeachingPlan; | |||||
//以下返回全部 | //以下返回全部 | ||||
Get["/department"] = GetDepartment; | Get["/department"] = GetDepartment; | ||||
Get["/allteacher"] = GetAllTeachers; | Get["/allteacher"] = GetAllTeachers; | ||||
@@ -39,6 +42,7 @@ namespace Learun.Application.WebApi.Modules | |||||
Get["/allschool"] = GetAllSchools; | Get["/allschool"] = GetAllSchools; | ||||
Get["/allclasslesson"] = GetAllClassLesson; | Get["/allclasslesson"] = GetAllClassLesson; | ||||
Get["/allelelectivelesson"] = GetAllElectiveLesson; | Get["/allelelectivelesson"] = GetAllElectiveLesson; | ||||
Get["/allteachingplan"] = GetAllTeachingPlan; | |||||
//以下接口不往ArrangeLessonSync里记录已传数据 | //以下接口不往ArrangeLessonSync里记录已传数据 | ||||
Get["/schoolNotRecord"] = GetSchoolsNotRecord; | Get["/schoolNotRecord"] = GetSchoolsNotRecord; | ||||
@@ -62,6 +66,7 @@ namespace Learun.Application.WebApi.Modules | |||||
ClassInfoIBLL classInfoIbll = new ClassInfoBLL(); | ClassInfoIBLL classInfoIbll = new ClassInfoBLL(); | ||||
UserIBLL userIbll = new UserBLL(); | UserIBLL userIbll = new UserBLL(); | ||||
private CompanyIBLL companyIbll = new CompanyBLL(); | private CompanyIBLL companyIbll = new CompanyBLL(); | ||||
private TeachingPlanIBLL teachingPlanIbll = new TeachingPlanBLL(); | |||||
private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll = | private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll = | ||||
new StuSelectLessonListOfElectiveBLL(); | new StuSelectLessonListOfElectiveBLL(); | ||||
@@ -155,6 +160,17 @@ namespace Learun.Application.WebApi.Modules | |||||
var result = arrangeLessonTermIBLL.GetLessonTypes(); | var result = arrangeLessonTermIBLL.GetLessonTypes(); | ||||
return Success(result); | return Success(result); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取教学计划 | |||||
/// </summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
private Response GetAllTeachingPlan(dynamic _) | |||||
{ | |||||
var result = teachingPlanIbll.GetTeachingPlan("", ""); | |||||
return Success(result); | |||||
} | |||||
private Response GetSchools(dynamic _) | private Response GetSchools(dynamic _) | ||||
{ | { | ||||
@@ -288,6 +304,19 @@ namespace Learun.Application.WebApi.Modules | |||||
return Success(result); | return Success(result); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取教学计划 | |||||
/// </summary> | |||||
/// <param name="_"></param> | |||||
/// <returns></returns> | |||||
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 _) | public Response GetStusNotRecord(dynamic _) | ||||
{ | { | ||||
string AcademicYearNo = Request.Query["AcademicYearNo"]; | string AcademicYearNo = Request.Query["AcademicYearNo"]; | ||||
@@ -85,6 +85,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 根据学年获取教学计划 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
public List<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 | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -1,5 +1,6 @@ | |||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | |||||
using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel.DataAnnotations.Schema; | ||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | namespace Learun.Application.TwoDevelopment.EducationalAdministration | ||||
@@ -109,5 +110,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[NotMapped] | [NotMapped] | ||||
public int? num { get; set; } | public int? num { get; set; } | ||||
} | } | ||||
public class TeachingPlanRes | |||||
{ | |||||
public TeachingPlanEntity TeachingPlan { get; set; } | |||||
public IEnumerable<TeachingPlanItemEntity> TeachingPlanItem { get; set; } | |||||
} | |||||
} | } | ||||
@@ -28,6 +28,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
TeachingPlanEntity GetTeachingPlanEntity(string keyValue); | TeachingPlanEntity GetTeachingPlanEntity(string keyValue); | ||||
List<TeachingPlanRes> GetTeachingPlan(string AcademicYearNo,string Semester); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -137,6 +137,52 @@ join CdLessonType c on t.LessonTypeId=c.ltid "; | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 根据学年获取教学计划 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
public List<TeachingPlanRes> GetTeachingPlan(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
var res = new List<TeachingPlanRes>(); | |||||
var list = new List<TeachingPlanEntity>(); | |||||
if (!string.IsNullOrEmpty(AcademicYearNo)) | |||||
{ | |||||
list = this.BaseRepository("CollegeMIS") | |||||
.FindList<TeachingPlanEntity>(x => x.Grade == AcademicYearNo).ToList(); | |||||
} | |||||
else | |||||
{ | |||||
list = this.BaseRepository("CollegeMIS") | |||||
.FindList<TeachingPlanEntity>().ToList(); | |||||
} | |||||
foreach (var entity in list) | |||||
{ | |||||
var data = new TeachingPlanRes(); | |||||
data.TeachingPlan = entity; | |||||
data.TeachingPlanItem = this.BaseRepository("CollegeMIS") | |||||
.FindList<TeachingPlanItemEntity>(x => x.TeachingPlanId == entity.Id); | |||||
res.Add(data); | |||||
} | |||||
return res; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||