ISchoolYearServices.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Bowin.Common.Linq.Entity;
  6. using EMIS.ViewModel.CalendarManage;
  7. using EMIS.ViewModel;
  8. using EMIS.Entities;
  9. using System.IO;
  10. namespace EMIS.CommonLogic.CalendarManage
  11. {
  12. public interface ISchoolYearServices
  13. {
  14. /// <summary>
  15. /// 查询学年学期信息
  16. /// </summary>
  17. /// <param name="configuretView">查询条件实体</param>
  18. /// <param name="SchoolyearsType">活动类型</param>
  19. /// <param name="timesSegment">时间段</param>
  20. /// <param name="pageIndex">页码</param>
  21. /// <param name="pageSize">显示页数</param>
  22. /// <returns></returns>
  23. IGridResultSet<SchoolYearView> GetSchoolYearViewGrid(ConfiguretView configuretView, int? isCurrent, int pageIndex, int pageSize);
  24. /// <summary>
  25. /// 查询学年学期信息
  26. /// </summary>
  27. /// <param name="configuretView">查询条件实体</param>
  28. /// <returns></returns>
  29. List<SchoolYearView> GetSchoolYearViewList(ConfiguretView configuretView,int? isCurrent);
  30. /// <summary>
  31. /// 查询校历的当前学年学期的下一个学期
  32. /// </summary>
  33. /// <returns></returns>
  34. List<SchoolYearView> GetSchoolYearViewListAfterCurrent();
  35. /// <summary>
  36. /// 查询之前的学年学期信息
  37. /// </summary>
  38. /// <returns></returns>
  39. List<SchoolYearView> GetSchoolYearViewListBeforeCurrent();
  40. /// <summary>
  41. /// 查询前一个学年学期信息
  42. /// </summary>
  43. /// <returns></returns>
  44. SchoolYearView GetSchoolYearViewBeforeCurrent();
  45. /// <summary>
  46. /// 获取学年学期信息
  47. /// </summary>
  48. /// <param name="SchoolyearsID">主键ID</param>
  49. /// <returns></returns>
  50. EMIS.Entities.CF_Schoolyear GetSchoolYear(Guid? schoolyearID);
  51. EMIS.Entities.CF_Schoolyear GetSchoolYearByValue(int value);
  52. /// <summary>
  53. /// 获取学年学期信息
  54. /// </summary>
  55. /// <param name="Years">学年</param>
  56. /// <param name="Name">学期名称</param>
  57. /// <returns></returns>
  58. EMIS.Entities.CF_Schoolyear GetSchoolYear(int Years, int SchoolcodeID);
  59. /// <summary>
  60. /// 获取当前学年学期
  61. /// </summary>
  62. /// <param name="IsCurrent"></param>
  63. /// <returns></returns>
  64. EMIS.Entities.CF_Schoolyear GetSchoolYearIsCurrent(bool IsCurrent);
  65. /// <summary>
  66. /// 获取学年学期信息
  67. /// </summary>
  68. /// <param name="schoolyearID">主键ID</param>
  69. /// <param name="IsCurrent">是否当前学期</param>
  70. /// <returns></returns>
  71. List<EMIS.Entities.CF_Schoolyear> GetSchoolYearList(Guid? schoolyearID, bool IsCurrent);
  72. /// <summary>
  73. /// 获取学年学期信息
  74. /// </summary>
  75. /// <param name="schoolyearID">主键ID</param>
  76. /// <returns></returns>
  77. SchoolYearView GetSchoolYearView(Guid? schoolyearID);
  78. /// <summary>
  79. /// 添加
  80. /// </summary>
  81. /// <param name="schoolyear">实体</param>
  82. /// <returns></returns>
  83. bool SchoolYearAdd(SchoolYearView schoolyearView);
  84. /// <summary>
  85. /// 修改
  86. /// </summary>
  87. /// <param name="SchoolyearsSets">实体</param>
  88. /// <returns></returns>
  89. bool SchoolYearUpdate(SchoolYearView schoolyearView);
  90. /// <summary>
  91. /// 删除
  92. /// </summary>
  93. /// <param name="schoolyearIDs"></param>
  94. /// <returns></returns>
  95. bool SchoolYearDelete(List<Guid> schoolyearIDs);
  96. /// <summary>
  97. /// 只获取学年
  98. /// </summary>
  99. /// <param name="configuretView"></param>
  100. /// <param name="isCurrent"></param>
  101. /// <param name="pageIndex"></param>
  102. /// <param name="pageSize"></param>
  103. /// <returns></returns>
  104. IGridResultSet<SchoolYearView> GetYearsViewGrid(ConfiguretView configuretView, int? isCurrent, int pageIndex, int pageSize);
  105. /// <summary>
  106. /// 获取当前学期学年
  107. /// </summary>
  108. /// <returns></returns>
  109. SchoolYearView GetCurrentSchoolYear();
  110. /// <summary>
  111. /// 获取当前校历启用的下一个学年学期ID
  112. /// </summary>
  113. /// <returns></returns>
  114. SchoolYearView GetNextSchoolYear();
  115. /// <summary>
  116. /// 更新当前学期学年
  117. /// </summary>
  118. void UpdateCurrentSchoolYear();
  119. void AutoCreateSchoolyearAndYearsSS();
  120. void AutoCreateSchoolyearAndYears();
  121. List<int> GetCurrentSchoolyearWeekNumList();
  122. ///<summary>
  123. ///获取学年学期周次
  124. ///</summary>
  125. List<int> GetSchoolyearWeekNumList(Guid? SchoolYearID);
  126. List<WeekDayView> GetFutureWeekdayList(int weekNum);
  127. List<CoursesTimeView> GetFutureCourseTimeList(int weekNum, int weekday);
  128. bool IsTimePassed(SchoolYearView currentSchoolyear, int? weekNum, int? weekday, int? startHour, int? startMinute);
  129. /// <summary>
  130. /// 以指定的学期为参照,将时间转换成周次、星期和节次(仅保留能转换成功的记录)
  131. /// </summary>
  132. /// <param name="schoolyearID"></param>
  133. /// <param name="datetimeList"></param>
  134. /// <returns></returns>
  135. List<FullCoursesTimeView> GetCoursesTimeByDateTime(Guid schoolyearID, IList<StartEndTimeView> datetimeList);
  136. /// <summary>
  137. /// 以指定的学期为参照,将周次、星期和节次转换成时间(仅保留能转换成功的记录)
  138. /// </summary>
  139. /// <param name="schoolyearID"></param>
  140. /// <param name="datetimeList"></param>
  141. /// <returns></returns>
  142. List<StartEndTimeView> GetCoursesTimeByDateTime(Guid schoolyearID, IList<FullCoursesTimeView> coursesTimeList);
  143. List<DateTime> GetDateByCoursesTime(Guid schoolyearID, IList<FullCoursesTimeView> coursesTimeList);
  144. StartEndTimeView GetStartEndTimeByCourseTime(DateTime firstWeek, FullCoursesTimeView coursesTime);
  145. }
  146. }