From 20b1ea5a8954aaf4e5b6ebb8c8482364a51fd0b2 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Tue, 29 Mar 2022 11:39:48 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E8=AF=BE=E7=A8=8B=E8=A1=A8=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/ArrangeLessonTerm/IndexLessonTerm.js | 2 +-
.../ArrangeLessonTerm/ArrangeLessonTermService.cs | 15 +++++++++------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js
index fb4a68aef..45c2576c4 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js
+++ b/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 = {
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
index 99f7fdcb4..90524bf2b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
+++ b/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
///
/// 获取开课时间
///
- ///
- ///
+ /// 周次
+ /// 星期几
///
private DateTime GetLessonDate(int weektime, int WeekSelect)
{