Bladeren bron

在线排课十天改为七天

新疆警官学校中职
ndbs 1 jaar geleden
bovenliggende
commit
dc7593e199
7 gewijzigde bestanden met toevoegingen van 30 en 16 verwijderingen
  1. +6
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
  2. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js
  4. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.cshtml
  5. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js
  6. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.cshtml
  7. +7
    -7
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs

+ 6
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs Bestand weergeven

@@ -232,7 +232,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
var startDate = DateTime.Parse(Common.CalculateFirstDateOfWeek(startTime).ToString("yyyy-MM-dd"));
//int k = Convert.ToInt32(startTime.DayOfWeek);//得到开始时间的第一天是周几
int countDay = endTime.Subtract(startDate).Days;
int countWeek = countDay / 14 + 1;
int countWeek = countDay / 7 + 1;
return countWeek;

}
@@ -248,7 +248,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
int k = Convert.ToInt32(startTime.DayOfWeek);//得到开始时间的第一天是周几
int days = curDay.Subtract(startTime).Days;
//int days = curDay.DayOfYear;
int daysOutOneWeek = days - (14 - firstdayofweek);
int daysOutOneWeek = days - (7 - firstdayofweek);

if (daysOutOneWeek <= 0)
{
@@ -256,8 +256,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
else
{
int weeks = daysOutOneWeek / 14;
if (daysOutOneWeek % 14 != 0)
int weeks = daysOutOneWeek / 7;
if (daysOutOneWeek % 7 != 0)
weeks++;

return weeks + 1;
@@ -300,14 +300,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(semesterAndYear.AcademicYearShort, semesterAndYear.Semester);
var StartTime = entity.StartTime.Value;
//根据第几周,计算查询的开始和结束日期
startDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 14))).ToString("yyyy-MM-dd");//StartTime.AddDays(((curWeek - 1) * 14)).ToString("yyyy-MM-dd");
startDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays((curWeek - 1) * 7)).ToString("yyyy-MM-dd");//StartTime.AddDays(((curWeek - 1) * 14)).ToString("yyyy-MM-dd");
if (curWeek == 1 && Convert.ToDateTime(startDate) < StartTime)
{
startDate = StartTime.ToString("yyyy-MM-dd");
}

endDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 14))).AddDays(10)
.ToString("yyyy-MM-dd");// StartTime.AddDays(((curWeek - 1) * 14)).AddDays(10).ToString("yyyy-MM-dd");
endDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays((curWeek - 1) * 7)).AddDays(6).ToString("yyyy-MM-dd");// StartTime.AddDays(((curWeek - 1) * 14)).AddDays(10).ToString("yyyy-MM-dd");

var timeTableList = new List<TimeTable>();



+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml Bestand weergeven

@@ -161,6 +161,11 @@
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" style="overflow: auto;">
<div class="warpper">


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js Bestand weergeven

@@ -13,7 +13,7 @@ var bootstrap = function ($, learun) {
function (data) {
//console.log('res', data);
// 数据处理
var html = '<tr style="height: 30px;"><td>节次/星期</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td><td>星期日</td><td>星期八</td><td>星期九</td><td>星期十</td></tr>';
var html = '<tr style="height: 30px;"><td>节次/星期</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td><td>星期日</td></tr>';
var weekLists = data.weekList;
//十节课 2022.6.14 修改为一天十一节课
for (var i = 1; i < 12; i++) {


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.cshtml Bestand weergeven

@@ -146,6 +146,11 @@
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" style="overflow: auto;">
<div class="warpper">


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js Bestand weergeven

@@ -13,7 +13,7 @@ var bootstrap = function ($, learun) {
function (data) {
//console.log('res', data);
// 数据处理
var html = '<tr style="height: 30px;"><td>节次/星期</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td><td>星期日</td><td>星期八</td><td>星期九</td><td>星期十</td></tr>';
var html = '<tr style="height: 30px;"><td>节次/星期</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td><td>星期日</td></tr>';
var weekLists = data.weekList;
//十节课
for (var i = 1; i < 12; i++) {


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.cshtml Bestand weergeven

@@ -146,6 +146,11 @@
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" style="overflow: auto;">
<div class="warpper">


+ 7
- 7
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs Bestand weergeven

@@ -124,12 +124,12 @@ namespace Learun.Application.WebApi.Modules
//获取第几周
var curWeek = WeekOfYear(startdate, entity.StartTime.Value, entity.EndTime.Value);
///获取当前周次开始时间
startDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 14))).ToString("yyyy-MM-dd");
startDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 7))).ToString("yyyy-MM-dd");
if (curWeek == 1 && Convert.ToDateTime(startDate) < StartTime)//判断第几周
{
startDate = StartTime.ToString("yyyy-MM-dd");
}
endDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 14))).AddDays(13).ToString("yyyy-MM-dd");
endDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 7))).AddDays(6).ToString("yyyy-MM-dd");
param.StartDate = startDate;
param.EndDate = endDate;
}
@@ -269,12 +269,12 @@ namespace Learun.Application.WebApi.Modules
//获取第几周
var curWeek = WeekOfYear(startdate, entity.StartTime.Value, entity.EndTime.Value);
///获取当前周次开始时间
startDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 14))).ToString("yyyy-MM-dd");
startDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 7))).ToString("yyyy-MM-dd");
if (curWeek == 1 && Convert.ToDateTime(startDate) < StartTime)//判断第几周
{
startDate = StartTime.ToString("yyyy-MM-dd");
}
endDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 14))).AddDays(13).ToString("yyyy-MM-dd");
endDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(((curWeek - 1) * 7))).AddDays(6).ToString("yyyy-MM-dd");
param.StartDate = startDate;
param.EndDate = endDate;
}
@@ -396,7 +396,7 @@ namespace Learun.Application.WebApi.Modules
int k = Convert.ToInt32(startTime.DayOfWeek);//得到开始时间的第一天是周几
int days = curDay.Subtract(startTime).Days;
//int days = curDay.DayOfYear;
int daysOutOneWeek = days - (14 - firstdayofweek);
int daysOutOneWeek = days - (7 - firstdayofweek);

if (daysOutOneWeek <= 0)
{
@@ -404,8 +404,8 @@ namespace Learun.Application.WebApi.Modules
}
else
{
int weeks = daysOutOneWeek / 14;
if (daysOutOneWeek % 14 != 0)
int weeks = daysOutOneWeek / 7;
if (daysOutOneWeek % 7 != 0)
weeks++;

return weeks + 1;


Laden…
Annuleren
Opslaan