Преглед изворни кода

修复无法修改课程表的问题

临城职教中职
zhangli пре 2 година
родитељ
комит
20b1ea5a89
2 измењених фајлова са 10 додато и 7 уклоњено
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js
  2. +9
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js Прегледај датотеку

@@ -218,7 +218,7 @@ var bootstrap = function ($, learun) {
if (!classNo || classNo.length === 0 || classNo === 'undefined') {
return learun.alert.warning('请选择班级!');
}
learun.layerConfirm('是否确认修改该项!', function (res) {
learun.layerConfirm('是否确认保存该项!', function (res) {
if (res) {
var keyValue = $('#ALTId').val();
var postdata = {


+ 9
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs Прегледај датотеку

@@ -277,9 +277,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var weekTimeAry = model.WeekTimeSelect.Split(',');
foreach (var weekTime in weekTimeAry)
{
//第几周
var weektime = Convert.ToInt32(weekTime);
//原先星期几
var LessonTimeOld_week = Convert.ToInt32(LessonTimeOld?.Split('-')[0]);
//需要修改周次的开课时间
var lessonDate = GetLessonDate(weektime, Convert.ToInt32(LessonTimeOld?.Split('-')[0]));
var lessonDate = GetLessonDate(weektime, LessonTimeOld_week);

//最后调整到
var lessonDateNew = GetLessonDate(weektime, model.WeekSelect);
@@ -361,9 +364,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
x.LessonDate == lessonDate && x.LessonTime == LessonTimeOld);
//当前星期-节次
var lessiontimeNow = model.WeekSelect + "-" + model.NodeSelect;
if (entity == null)
if (LessonTimeOld_week == 0)
//if (entity == null)
{
//不存在 新增
//不存在新增
var startdate = DateTime.Today;
var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd");

@@ -375,7 +379,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
entity.LessonDate = lessonDateNew;
entity.AcademicYearNo = semesterAndYear.AcademicYearShort;
entity.Semester = semesterAndYear.Semester;
entity.LessonDate = lessonDate;

entity.DeptNo = classInfo?.DeptNo;
entity.MajorNo = classInfo?.MajorNo;
@@ -465,8 +468,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// 获取开课时间
/// </summary>
/// <param name="weektime"></param>
/// <param name="WeekSelect"></param>
/// <param name="weektime">周次</param>
/// <param name="WeekSelect">星期几</param>
/// <returns></returns>
private DateTime GetLessonDate(int weektime, int WeekSelect)
{


Loading…
Откажи
Сачувај