diff --git a/.gitignore b/.gitignore index 710a92373..996b47404 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,4 @@ Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js /Learun.Framework.Ultimate V7/Learun.Application.WebApi/bin.7z /Learun.Framework.Ultimate V7/LearunApp-2.2.0/.hbuilderx/launch.json /Learun.Framework.Ultimate V7/Learun.Application.Web/Properties/PublishProfiles +/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/QRCode diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs new file mode 100644 index 000000000..8479f9349 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs @@ -0,0 +1,121 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using static Learun.Application.WebApi.Modules.StuInfoFreshApi; +using System; +using System.IO; +using System.Linq; +using Learun.Application.Base.SystemModule; +using Learun.Application.OA; +using Learun.Application.OA.File.FileInfo; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using Learun.Application.TwoDevelopment.LR_Desktop; +using Learun.Application.WorkFlow; +using Microsoft.Ajax.Utilities; + +namespace Learun.Application.WebApi +{ + ///2022.11.14 + /// + /// 学生请假 + /// + + public class StuLeaveManagementApi : BaseApi + { + + private StuLeaveManagementIBLL stuLeaveManagementIBLL = new StuLeaveManagementBLL(); + + /// + /// 注册接口 + /// + public StuLeaveManagementApi() + : base("/Learun/adms/EducationalAdministration/StuLeaveManagement") + { + Get["/pagelist"] = GetPageList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = stuLeaveManagementIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var StuLeaveManagementData = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(keyValue); + var jsonData = new + { + StuLeaveManagement = StuLeaveManagementData, + }; + return Success(jsonData); + } + + + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + stuLeaveManagementIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + StuLeaveManagementEntity entity = parameter.strEntity.ToObject(); + stuLeaveManagementIBLL.SaveEntity(parameter.keyValue, entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } + #endregion + + } + +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs index 06cf05a57..3359f0d1c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs @@ -193,14 +193,29 @@ namespace Learun.Application.WebApi.Modules var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd"); // 获取学年,学期 - var semesterAndYear = Common.GetSemesterAndYear(startDate); - var strAcademicYear = semesterAndYear.AcademicYearLong; - var strSemester = semesterAndYear.Semester; + var strAcademicYear = ""; + var strSemester = ""; + var AcademicYearShort = ""; + if (!string.IsNullOrEmpty(param.StartDate)) + { + var NewsemesterAndYear = Common.GetSemesterAndYear(param.StartDate); + strAcademicYear = NewsemesterAndYear.AcademicYearLong; + strSemester = NewsemesterAndYear.Semester; + AcademicYearShort = NewsemesterAndYear.AcademicYearShort; + } + else + { + var semesterAndYear = Common.GetSemesterAndYear(startDate); + strAcademicYear = semesterAndYear.AcademicYearLong; + strSemester = semesterAndYear.Semester; + AcademicYearShort = semesterAndYear.AcademicYearShort; + } + if (param.StartDate.IsEmpty() && param.EndDate.IsEmpty()) { // 校历 - var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(semesterAndYear.AcademicYearShort, semesterAndYear.Semester); + var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(AcademicYearShort, strSemester); var StartTime = entity.StartTime.Value; //获取第几周 var curWeek = WeekOfYear(startdate, entity.StartTime.Value, entity.EndTime.Value); diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue index eb20952fb..064c92c49 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/single.vue @@ -1,65 +1,58 @@ - - {{ pageInfo.lessonDate }} 第{{ pageInfo.jc }}节 - + + {{ pageInfo.lessonDate }} 第{{ pageInfo.jc }}节 + - + - - + + {{ pageInfo.curriculum }} - - + + {{ pageInfo.teacher }} - {{ pageInfo.classRoomNo }} - 应到 {{ weekData.records }} - - - + + {{ pageInfo.classRoomNo }} + 应到 {{ weekData.records }} + + + - + - - 准时 - 早退 - 旷课 - 病假 - 迟到 - 事假 - + + 准时 + 早退 + 旷课 + 病假 + 迟到 + 事假 + - + 暂时没有信息 - + {{ k.StuName }} - + - - {{ weekData.rows[ind].StuName }} - 学号: {{ weekData.rows[ind].StuNo }} - - - {{ n.txt }} - + + {{ weekData.rows[ind].StuName }} + 学号: {{ weekData.rows[ind].StuNo }} + + + {{ n.txt }} + 确定 @@ -67,442 +60,443 @@