From bfc272df34268484055e0423de703cde547abc2f Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 1 Aug 2022 17:02:00 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E8=80=83=E5=8A=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=93=E4=B8=9A=EF=BC=8C=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=92=8C=E8=AF=BE=E7=A8=8B=E4=BF=A1=E6=81=AF=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Exam_ExamLesson/Index.js | 26 ++++++++ .../Exam_ExamLesson/Exam_ExamLessonEntity.cs | 10 ++- .../Exam_ExamLesson/Exam_ExamLessonService.cs | 11 ++-- .../Exam_ExamPlanLessonEntity.cs | 6 ++ .../Exam_ExamPlanLessonService.cs | 65 ++++++++++--------- 5 files changed, 81 insertions(+), 37 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js index 73cdded1b..7bf9f6303 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js @@ -228,6 +228,32 @@ var bootstrap = function ($, learun) { } } }, + { + label: "课程类型", name: "LessonTypeId", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', + key: value, + keyId: 'ltid', + callback: function (_data) { + callback(_data['lessontypename']); + } + }); + } + }, + { + label: "专业", name: "DeptNo", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, //{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, { label: "是否启用", name: "ELEnabled", width: 100, align: "left", diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs index 189a34140..4618e15e7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs @@ -35,16 +35,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("SEMESTER")] public int? Semester { get; set; } /// - /// 课程类型名称 + /// 课程名称 /// [Column("LESSONNAME")] public string LessonName { get; set; } + /// - /// 课程类型编号 + /// 课程编号 /// [Column("LESSONNO")] public string LessonNo { get; set; } /// + /// 课程类型 + /// + [Column("LESSONTYPEID")] + public string LessonTypeId { get; set; } + /// /// 年级 /// [Column("GRADE")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs index baf720dae..9c701d454 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs @@ -265,11 +265,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ,[LessonName] ,[LessonNo] ,[ELOrder] - ,[ELEnabled],ExamTime) -select NEWID(),AcademicYearNo,Semester,Grade,LessonName,[LessonNo],0,1,'{ExamTime}' from OpenLessonPlan where ExamType='1' and lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' - and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) - group by LessonNo,LessonName,AcademicYearNo,Semester,Grade + ,[ELEnabled],ExamTime,LessonTypeId,DeptNo,MajorNo) +select NEWID(),AcademicYearNo,t.Semester,Grade,t.LessonName,t.[LessonNo],0,1,'{ExamTime}',a.lessontypeid,t.DeptNo,t.MajorNo from OpenLessonPlan t +left join lessoninfo a on t.lessonno=a.lessonno + where t.ExamType='1' and t.lessonsortno=1 and t.AcademicYearNo='{AcademicYearNo}' and t.Semester='{Semester}' + and t.[LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) + group by t.LessonNo,t.LessonName,t.AcademicYearNo,t.Semester,Grade,a.lessontypeid,t.DeptNo,t.MajorNo "; + return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs index 347d527c6..c2e3971d9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs @@ -40,6 +40,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("LESSONNO")] public string LessonNo { get; set; } + /// + /// LessonNo + /// + [Column("LESSONTYPEID")] + public string LessonTypeId { get; set; } + /// /// 考试日期 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs index 043ebbcf5..86eb859b4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs @@ -230,17 +230,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var sql = $@"select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t - join (select l.lessonno,l.LessonTypeId,lt.ltorder from [dbo].[LessonInfo] l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.checkmark=1) a - on t.LessonNo=a.lessonno + join CdLessonType a + on t.LessonTypeId=a.ltid where EPId='{EPId}' order by a.ltorder, t.LessonNo"; - var examplan = this.BaseRepository("CollegeMIS").FindEntity(EPId); - if (examplan.PlanType == "1") - { - sql = $@"select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t - join (select l.lessonno,l.LessonTypeId,lt.ltorder from [dbo].[LessonInfo] l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.checkmark=1) a - on SUBSTRING(t.LessonNo,0,CHARINDEX('(',t.LessonNo))=a.lessonno - where EPId='{EPId}' order by a.ltorder, t.LessonNo"; - } + // var examplan = this.BaseRepository("CollegeMIS").FindEntity(EPId); + // if (examplan.PlanType == "1") + // { + // sql = $@"select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t + //join (select l.lessonno,l.LessonTypeId,lt.ltorder from [dbo].[Exam_ExamLesson] l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.ELEnabled=1) a + //on SUBSTRING(t.LessonNo,0,CHARINDEX('(',t.LessonNo))=a.lessonno + // where EPId='{EPId}' order by a.ltorder, t.LessonNo"; + // } return this.BaseRepository("CollegeMIS").FindTable(sql); } @@ -328,36 +328,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (exam_ExamPlan.PlanType == "1") { //必修 - string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) -select NEWID(),'{EPId}',LessonName+'('+grade+')',LessonNo+'('+grade+')' from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' + string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId) +select NEWID(),'{EPId}',LessonName+'('+grade+')',LessonNo+'('+grade+')',LessonTypeId from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' and LessonNo+'('+grade+')' not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') - group by LessonNo,grade,LessonName"; + group by LessonNo,grade,LessonName,LessonTypeId"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } else if (exam_ExamPlan.PlanType == "2") { //补考 - string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) - select NEWID(),'{EPId}',a.lessonname,a.LessonNo + string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId) + select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo +left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' - and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') - group by LessonNo,lessonname"; + and a.LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') + group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } else if (exam_ExamPlan.PlanType == "3") { //重修 - string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) - select NEWID(),'{EPId}',a.lessonname,a.LessonNo + string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId) + select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo +left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') - group by LessonNo,lessonname"; + group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId "; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } @@ -588,19 +590,20 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId return (false, "请先安排考试记录时间!"); } //考试课程数据 - var EPLessonList = db.FindList($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,info.TeachMajorNo,t.* from Exam_ExamPlanLesson t -join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo -left join LessonInfo info on t.LessonNo=info.LessonNo -left join CdLessonType ltype on info.LessonTypeId=ltype.LTId - where t.EPId='{EPId}' and info.CheckMark=1 "); + var EPLessonList = db.FindList($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t +join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' +--left join Exam_ExamLesson info on left(t.LessonNo,charindex('(',t.LessonNo)-1)=info.LessonNo +left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId + where t.EPId='{EPId}' and elesson.ELEnabled=1 "); if (examPlan.PlanType == "1") { //必修 - EPLessonList = db.FindList($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,info.TeachMajorNo,t.* from Exam_ExamPlanLesson t -join Exam_ExamLesson elesson on left(t.LessonNo,charindex('(',t.LessonNo)-1)=elesson.LessonNo -left join LessonInfo info on left(t.LessonNo,charindex('(',t.LessonNo)-1)=info.LessonNo -left join CdLessonType ltype on info.LessonTypeId=ltype.LTId - where t.EPId='{EPId}' and info.CheckMark=1 "); + EPLessonList = db.FindList($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t +join Exam_ExamLesson elesson on left(t.LessonNo,charindex('(',t.LessonNo)-1)=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' +--left join Exam_ExamLesson info on left(t.LessonNo,charindex('(',t.LessonNo)-1)=info.LessonNo +left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId + where t.EPId='{EPId}' and elesson.ELEnabled=1 + "); } if (EPLessonList.ToList().Exists(x => x.ExamLength == null || x.ExamLength <= 0)) @@ -615,7 +618,7 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId { EPLesson.ExamDate = null; EPLesson.ExamTime = null; - if (EPLesson.LessonTypeName.Contains("公共") || EPLesson.LessonTypeName.Contains("公开")) + if (!string.IsNullOrEmpty(EPLesson.LessonTypeName) && (EPLesson.LessonTypeName.Contains("公共") || EPLesson.LessonTypeName.Contains("公开"))) { var EPTimes = EPTimeList.Where(x => x.ExamType == "2" && x.ExamTimeLength == EPLesson.ExamLength).ToList(); foreach (var EPTime in EPTimes) From 9b73062f37e6bdf4a113a357150c7254fcff37ee Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 2 Aug 2022 11:15:11 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=80=83=E8=AF=95?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8=E4=B8=93=E4=B8=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=9C=89=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Exam_ExamLesson/Index.js | 8 ++++---- .../Learun.Application.Web/Learun.Application.Web.csproj | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js index 7bf9f6303..ea88e5f5e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js @@ -242,14 +242,14 @@ var bootstrap = function ($, learun) { } }, { - label: "专业", name: "DeptNo", width: 150, align: "left", + label: "专业", name: "MajorNo", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', key: value, - keyId: 'deptno', + keyId: 'majorno', callback: function (_data) { - callback(_data['deptname']); + callback(_data['majorname']); } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index c79ebbbd5..0f38c3780 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -8031,6 +8031,7 @@ + From efeff765138f03e210b3f0dbe22e5823c141763d Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 2 Aug 2022 17:13:07 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AccommodationController.cs | 65 +++- .../Views/Accommodation/Index.cshtml | 5 +- .../Views/Accommodation/Index.js | 16 + .../Views/Accommodation/IndexImport.cshtml | 26 ++ .../Views/Accommodation/IndexImport.js | 180 +++++++++++ .../Content/excel/AccommodationImport.xls | Bin 0 -> 31232 bytes .../Learun.Application.Web.csproj | 2 + .../Accommodation/AccommodationBLL.cs | 22 ++ .../Accommodation/AccommodationIBLL.cs | 1 + .../Accommodation/AccommodationService.cs | 292 ++++++++++++++++++ 10 files changed, 607 insertions(+), 2 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/AccommodationImport.xls diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs index 210baddb4..144b80a81 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs @@ -8,6 +8,8 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Linq; +using System.IO; +using Learun.Application.Base.SystemModule; namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { @@ -21,6 +23,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers public class AccommodationController : MvcControllerBase { private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); + private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); #region 视图功能 @@ -218,7 +221,16 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return View(); } - + /// + /// 导入宿舍 + /// + /// + [HttpGet] + public ActionResult IndexImport() + { + return View(); + } + #endregion #region 获取数据 @@ -541,6 +553,57 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return Success("清空成功"); } + /// + /// 宿舍信息导入模板 + /// + /// + public ActionResult DownTemplate() + { + FileStreamResult result = null; + try + { + var path = Server.MapPath("~/Content/excel/"); + var pathoffull = path + "AccommodationImport.xls"; + FileStream fsread = fsread = new FileStream(pathoffull, FileMode.OpenOrCreate, FileAccess.ReadWrite); + result = File(fsread, "application/ms-excel", "宿舍信息导入.xls"); + + return result; + } + catch (Exception ex) + { + return null; + } + } + + + /// + /// 宿舍信息excel文件导入 + /// + /// + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult ExecuteImportExcel(string fileGuid, int chunks) + { + string path = annexesFileIBLL.SaveAnnexes(fileGuid, fileGuid, chunks, LoginUserInfo.Get()); + if (!string.IsNullOrEmpty(path)) + { + DataTable dt = ExcelHelper.ExcelImport(path); + var res = accommodationIBLL.ExecuteImportExcel(dt, fileGuid); + var data = new + { + Success = res.snum, + Fail = res.failDt.Rows.Count + }; + return Success(data); + } + else + { + return Fail("导入数据失败!"); + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml index d4664f16f..49bced24d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml @@ -67,7 +67,7 @@  批量添加宿舍  床位管理 - @* 自动分配宿舍 + @* 自动分配宿舍  同步宿舍信息*@
@@ -79,6 +79,9 @@ +
+  导入 +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js index ff87bf30a..6df688c8f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js @@ -280,6 +280,22 @@ var bootstrap = function ($, learun) { } }); }); + + //导入 + $("#lr_importBed").on("click", function () { + learun.layerForm({ + id: 'indexImport', + title: "导入宿舍信息", + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexImport', + width: 600, + height: 400, + maxmin: true, + btn: null, + end: function () { + refreshGirdData(); + } + }); + }); }, //初始化左侧树 initTree: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.cshtml new file mode 100644 index 000000000..ea6c5f2f7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.cshtml @@ -0,0 +1,26 @@ +@{ + ViewBag.Title = "Form"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + + +@Html.AppendCssFile("/Areas/LR_SystemModule/Views/ExcelImport/ImportForm.css") + +
+
+
上传文件
+
下载模板
+
+
+
+
+ +
+
+

试试将电脑里的文件拖拽到此上传

+
+
+
+
+ +@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/IndexImport.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.js new file mode 100644 index 000000000..8795c6ee4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexImport.js @@ -0,0 +1,180 @@ +/* + * 描 述:附件上传管理 + */ +var CLId = request('CLId'); + +var bootstrap = function ($, learun) { + "use strict"; + var fileInfo = {}; + + // 触发合并文件碎片 + var mergeFileChunks = function (file) { + var param = {}; + param['__RequestVerificationToken'] = $.lrToken; + //param['CLId'] = CLId; + param['fileGuid'] = fileInfo[file.id].fileGuid; + param['fileName'] = fileInfo[file.id].name; + param['chunks'] = fileInfo[file.id].chunks; + learun.httpAsyncPost(top.$.rootUrl + "/LogisticsManagement/Accommodation/ExecuteImportExcel", param, function (res) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress').remove(); + + if (res.code == learun.httpCode.success) { + if (res.data.Success != '0') { + learun.alert.success('导入成功' + res.data.Success + '条'); + } + // 文件保存成功后 + $fileItem.append('
' + res.data.Success + '/' + res.data.Fail + '
'); + // 如果有失败 + if (res.data.Fail != '0') + { + learun.download({ url: top.$.rootUrl + '/LR_SystemModule/ExcelImport/DownImportErrorFile', param: { fileId: fileInfo[file.id].fileGuid, fileName: fileInfo[file.id].name, __RequestVerificationToken: $.lrToken }, method: 'POST' }); + } + + // 文件保存成功后 + //$fileItem.append('
'); + //$fileItem.append('
'); + + // $fileItem.find('.lr-tool-bar .fa-minus-circle').on('click', function () { + // var fileId = $(this).attr('data-value'); + // DeleteFile(fileId); + // }); + // learun.alert.success(res.data.info); + } + else { + learun.alert.error(res.info); + $fileItem.append('
'); + } + }); + } + // 触发清楚文件碎片 + var reomveFileChunks = function (file) { + var param = {}; + param['__RequestVerificationToken'] = $.lrToken; + param['fileGuid'] = fileInfo[file.id].fileGuid; + param['chunks'] = fileInfo[file.id].chunks; + learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/MergeAnnexesFile", param, function (res) { }); + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress').remove(); + $fileItem.append('
'); + } + // 删除文件 + var DeleteFile = function (fileId) { + var param = {}; + param['__RequestVerificationToken'] = $.lrToken; + param['fileId'] = fileInfo[fileId].fileGuid; + learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/DeleteAnnexesFile", param, function (res) { }); + var file = page.uploader.getFile(fileId); + if (!!file) { + page.uploader.removeFile(file); + } + delete fileInfo[fileId]; + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + fileId); + $fileItem.remove(); + if ($('#lr_form_file_queue_list>div').length == 0) { + $('#lr_form_file_queue .lr-form-file-queue-bg').show(); + } + } + + var page = { + uploader: null, + init: function () { + if (!WebUploader.Uploader.support()) { + alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器'); + throw new Error('WebUploader does not support the browser you are using.'); + } + /*模板下载*/ + $('#lr_down_file_btn').on('click', function () { + location.href = top.$.rootUrl + "/LogisticsManagement/Accommodation/DownTemplate"; + }); + + page.uploader = WebUploader.create({ + auto: true, + swf: top.$.rootUrl + '/Content/webuploader/Uploader.swf', + // 文件接收服务端。 + server: top.$.rootUrl + "/LR_SystemModule/Annexes/UploadAnnexesFileChunk", + // 选择文件的按钮。可选。 + // 内部根据当前运行是创建,可能是input元素,也可能是flash. + pick: '#lr_add_file_btn', + dnd: '#lr_form_file_queue', + paste: 'document.body', + disableGlobalDnd: true, + accept: { + extensions: "xls,xlsx" + }, + multiple: false, + // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传! + resize: false, + // 文件分片上传 + chunked: true, + chunkRetry: 3, + prepareNextFile: true, + chunkSize: '1048576', + // 上传参数 + formData: { + __RequestVerificationToken: $.lrToken + } + }); + page.uploader.on('fileQueued', page.fileQueued); + page.uploader.on('uploadStart', page.uploadStart); + page.uploader.on('uploadBeforeSend', page.uploadBeforeSend); + page.uploader.on('uploadProgress', page.uploadProgress); + page.uploader.on('uploadSuccess', page.uploadSuccess); + page.uploader.on('uploadError', page.uploadError); + page.uploader.on('uploadComplete', page.uploadComplete); + page.uploader.on('error', page.error); + + + $('#lr_form_file_queue').mCustomScrollbar({ // 优化滚动条 + theme: "minimal-dark" + }); + + }, + fileQueued: function (file) {// 文件加载到队列 + fileInfo[file.id] = { name: file.name }; + $('#lr_form_file_queue .lr-form-file-queue-bg').hide(); + // 添加一条文件记录 + var $item = $('
'); + $item.append('
'); + $item.append('' + file.name + '(' + learun.countFileSize(file.size) + ')'); + + $('#lr_form_file_queue_list').append($item); + }, + uploadStart: function (file) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.append('
'); + }, + uploadBeforeSend: function (object, data, headers) { + data.chunk = data.chunk || 0; + data.chunks = data.chunks || 1; + fileInfo[data.id].fileGuid = fileInfo[data.id].fileGuid || WebUploader.Base.guid(); + data.fileGuid = fileInfo[data.id].fileGuid; + fileInfo[data.id].chunks = data.chunks; + }, + uploadProgress: function (file, percentage) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress-bar').css('width', (percentage * 100 + '%')); + }, + uploadSuccess: function (file, res) { + if (res.code == 200) {// 上传成功 + mergeFileChunks(file); + } + else {// 上传失败 + reomveFileChunks(file); + } + }, + uploadError: function (file, code) { + reomveFileChunks(file); + }, + uploadComplete: function (file) { + }, + error: function (type) { + switch (type) { + case 'Q_TYPE_DENIED': + learun.alert.error('当前文件类型不允许上传'); + break; + }; + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/AccommodationImport.xls b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/AccommodationImport.xls new file mode 100644 index 0000000000000000000000000000000000000000..ab60347cf767e9cf3d807a457187d395bd0e5345 GIT binary patch literal 31232 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 R;y))(;J?s*Ut}!h|6fPji2(or literal 0 HcmV?d00001 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 0f38c3780..49d9b1c08 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1341,6 +1341,7 @@ + @@ -7935,6 +7936,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs index cfa96ee63..1b18261e9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs @@ -909,6 +909,28 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } } + + + public (DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string fileGuid) + { + try + { + return accommodationService.ExecuteImportExcel(dt, fileGuid); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs index 03621abf6..9d68bf9cc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs @@ -108,6 +108,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement object GetBedList(string parentID); void ClearEntity(string Grade); + (DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string fileGuid); #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs index 05b5b1f0e..3bdefa34c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs @@ -1,5 +1,7 @@ using Dapper; using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Cache.Base; +using Learun.Cache.Factory; using Learun.DataBase.Repository; using Learun.Util; using System; @@ -19,6 +21,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// public class AccommodationService : RepositoryFactory { + #region 缓存定义 + private ICache cache = CacheFactory.CaChe(); + private string cacheKey = "Learun_adms_excelError_"; // +公司主键 + #endregion #region 获取数据 /// @@ -1927,6 +1933,292 @@ where ID='{ParentID}' } } + /// + /// 导入宿舍信息 + /// + /// + /// + public (DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string fileGuid) + { + int snum = 0; + int fnum = 0; + var db = this.BaseRepository("CollegeMIS"); + var msg = ""; + try + { + db.BeginTrans(); + var dormitoryBuildList = db.FindList().ToList(); + + //系 专业 班级 + var deptList = db.FindList(); + var majorList = db.FindList(x => x.CheckMark == true); + var classList = db.FindList(x => x.CheckMark == true); + //学生 + var stuinfobasic = db.FindList(); + // 创建一个datatable容器用于保存导入失败的数据 + DataTable failDt = new DataTable(); + foreach (DataColumn dc in dt.Columns) + { + failDt.Columns.Add(dc.ColumnName, dc.DataType); + } + failDt.Columns.Add("导入错误", typeof(string)); + dt.Columns.Add("导入错误", typeof(string)); + //寝室Id + var dormitoryIds = new List(); + + var user = LoginUserInfo.Get(); + foreach (DataRow dr in dt.Rows) + { + try + { + if (!string.IsNullOrEmpty(dr["宿舍楼"].ToString().Trim())) + { + + //系 专业 班级 + var DeptNo = deptList.Where(x => x.DeptName == dr["系部"].ToString().Trim()).FirstOrDefault()?.DeptNo; + var MajorNo = majorList.Where(x => x.MajorName == dr["专业"].ToString().Trim() && x.DeptNo == DeptNo) + .FirstOrDefault()?.MajorNo; + var ClassNo = classList.Where(x => x.ClassName == dr["班级"].ToString()).FirstOrDefault()?.ClassNo; + if (string.IsNullOrEmpty(DeptNo)) + { + fnum++; + dr["导入错误"] = "系部导入错误"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + if (string.IsNullOrEmpty(MajorNo)) + { + fnum++; + dr["导入错误"] = "专业导入错误"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + if (string.IsNullOrEmpty(ClassNo)) + { + fnum++; + dr["导入错误"] = "班级导入错误"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + + var leaderno = ""; + if (!string.IsNullOrEmpty(dr["舍长学号"].ToString())) + { + leaderno = stuinfobasic.Where(x => x.StuNo == dr["舍长学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo; + if (string.IsNullOrEmpty(leaderno)) + { + fnum++; + dr["导入错误"] = dr["舍长学号"] + "导入错误"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + } + + var stuno = ""; + if (!string.IsNullOrEmpty(dr["学生学号"].ToString())) + { + stuno = stuinfobasic.Where(x => x.StuNo == dr["学生学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo; + if (string.IsNullOrEmpty(stuno)) + { + fnum++; + dr["导入错误"] = dr["学生学号"] + "导入错误"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + } + + var parent = dormitoryBuildList.Where(x => x.Name == "数字化智慧校园").FirstOrDefault(); + if (parent == null) + { + parent = new Acc_DormitoryBuildEntity(); + parent.Create(); + parent.DNo = ""; + parent.Name = "数字化智慧校园"; + //parent.BuildType = "1"; + parent.CreateBy = user.realName; + parent.CreateTime = DateTime.Now; + parent.Campus = user.companyId; + db.Insert(parent); + + dormitoryBuildList.Add(parent); + } + + //宿舍楼 + var apartmentName = dr["宿舍楼"].ToString().Trim(); + var apartmentCode = dr["宿舍楼编号"].ToString(); + var apartment = dormitoryBuildList.Where(x => x.Name == apartmentName && x.BuildType == "1") + .FirstOrDefault(); + if (apartment == null) + { + //添加宿舍楼 + apartment = new Acc_DormitoryBuildEntity(); + apartment.Create(); + apartment.ParentID = parent.ID; + apartment.DNo = apartmentCode; + apartment.Name = apartmentName; + apartment.BuildType = "1"; + apartment.CreateBy = user.realName; + apartment.CreateTime = DateTime.Now; + apartment.Campus = user.companyId; + db.Insert(apartment); + + dormitoryBuildList.Add(apartment); + } + //单元 + var unitName = dr["单元"].ToString().Trim(); + var unitCode = dr["单元编号"].ToString(); + var unit = dormitoryBuildList.Where(x => x.Name == unitName && x.BuildType == "2" && x.ParentID == apartment.ID) + .FirstOrDefault(); + if (unit == null) + { + //添加单元 + unit = new Acc_DormitoryBuildEntity(); + unit.Create(); + unit.ParentID = apartment.ID; + unit.ApartmentId = apartment.ID; + unit.DNo = unitCode; + unit.Name = unitName; + unit.BuildType = "2"; + unit.CreateBy = user.realName; + unit.CreateTime = DateTime.Now; + unit.Campus = user.companyId; + db.Insert(unit); + + dormitoryBuildList.Add(unit); + } + //楼层 + var floorName = dr["楼层"].ToString().Trim(); + var floorCode = dr["楼层编号"].ToString(); + var floor = dormitoryBuildList.Where(x => x.Name == floorName && x.DNo == floorCode && x.BuildType == "3" && x.ParentID == unit.ID) + .FirstOrDefault(); + if (floor == null) + { + //添加楼层 + floor = new Acc_DormitoryBuildEntity(); + floor.Create(); + floor.ParentID = unit.ID; + floor.ApartmentId = apartment.ID; + floor.UnitId = unit.ID; + floor.DNo = floorCode; + floor.Name = floorName; + floor.BuildType = "3"; + floor.CreateBy = user.realName; + floor.CreateTime = DateTime.Now; + floor.Campus = user.companyId; + db.Insert(floor); + + dormitoryBuildList.Add(floor); + } + //寝室 + var dormitoryName = dr["寝室名称"].ToString().Trim(); + var dormitoryCode = dr["寝室编号"].ToString().Trim(); + var dormitory = dormitoryBuildList.Where(x => x.Name == dormitoryName && x.DNo == dormitoryCode && x.BuildType == "4" && x.ParentID == floor.ID) + .FirstOrDefault(); + if (dormitory == null) + { + //添加 + dormitory = new Acc_DormitoryBuildEntity(); + dormitory.Create(); + dormitory.Dept = DeptNo; + dormitory.Major = MajorNo; + dormitory.Class = ClassNo; + dormitory.ParentID = floor.ID; + dormitory.ApartmentId = apartment.ID; + dormitory.UnitId = unit.ID; + dormitory.FloorId = floor.ID; + dormitory.DNo = dormitoryCode; + dormitory.Name = dormitoryName; + dormitory.Sex = dr["性别"].ToString() == "女" ? "0" : "1"; + dormitory.BuildType = "4"; + dormitory.RoomType = Convert.ToInt32(dr["几人寝"].ToString()); + dormitory.Leader = leaderno; + dormitory.Starred = "3"; + dormitory.CreateBy = user.realName; + dormitory.CreateTime = DateTime.Now; + dormitory.Campus = user.companyId; + db.Insert(dormitory); + + dormitoryBuildList.Add(dormitory); + } + dormitoryIds.Add(dormitory.ID); + + //床位 + var bedName = dr["床位"].ToString().Trim(); + var bedCode = bedName.Replace("床", "").Replace("号", ""); + var bed = dormitoryBuildList.Where(x => x.Name == bedName && x.DNo == bedCode && x.BuildType == "5" && x.ParentID == dormitory.ID) + .FirstOrDefault(); + if (bed == null) + { + bed = new Acc_DormitoryBuildEntity(); + bed.Create(); + bed.ParentID = dormitory.ID; + bed.ApartmentId = apartment.ID; + bed.UnitId = unit.ID; + bed.FloorId = floor.ID; + bed.DNo = bedCode; + bed.Name = bedName; + bed.Dept = DeptNo; + bed.Major = MajorNo; + bed.Class = ClassNo; + bed.StudentID = stuno; + bed.Leader = leaderno; + bed.BuildType = "5"; + bed.CreateBy = user.realName; + bed.CreateTime = DateTime.Now; + bed.Campus = user.companyId; + db.Insert(bed); + + dormitoryBuildList.Add(bed); + snum++; + } + + } + else + { + break; + } + } + catch (Exception e) + { + fnum++; + dr["导入错误"] = "出现异常:" + e.Message; + failDt.Rows.Add(dr.ItemArray); + continue; + } + } + + + db.Commit(); + + //更新寝室入住人数字段 + var ids = string.Join("','", dormitoryIds); + var sql = $@" update a set a.CheckInStu=b.num +from Acc_DormitoryBuild a join (select parentid,count(1) as num from Acc_DormitoryBuild where buildtype='5' and studentid is not null and len(studentid)>0 and parentid in ('{ids}') group by parentid) b + on a.id=b.parentid + where a.id in ('{ids}') and a.buildtype='4'"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + // 写入缓存如果有未导入的数据 + if (failDt.Rows.Count > 0) + { + string errordt = failDt.ToJson(); + + cache.Write(cacheKey + fileGuid, errordt, CacheId.excel); + } + return (failDt, snum, fnum); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion 提交数据 } } \ No newline at end of file From 59817cd785a7b6175c5d5ca15f6cef4f8d6a6bc8 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Wed, 3 Aug 2022 15:20:52 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E8=80=83=E8=AF=95=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0=E5=B9=B4=E7=BA=A7=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E8=80=83=E8=AF=95=E8=AF=BE=E7=A8=8B=E5=AE=89?= =?UTF-8?q?=E6=8E=92=E7=8F=AD=E7=BA=A7=E6=97=B6=E6=A0=B9=E6=8D=AE=E5=B9=B4?= =?UTF-8?q?=E7=BA=A7=E5=AE=89=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Exam_ExamStudent/Index.js | 1 + .../Exam_ExamPlanClassService.cs | 5 +- .../Exam_ExamPlanLessonBLL.cs | 4 +- .../Exam_ExamPlanLessonEntity.cs | 11 ++-- .../Exam_ExamPlanLessonService.cs | 50 +++++++++---------- .../Exam_ExamStudentEntity.cs | 5 ++ .../Exam_ExamStudentService.cs | 12 ++--- 7 files changed, 50 insertions(+), 38 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js index 83ec5e56b..1ddf2952e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js @@ -178,6 +178,7 @@ var bootstrap = function ($, learun) { }, { label: "学生编号", name: "StuNo", width: 100, align: "left" }, { label: "学生姓名", name: "StuName", width: 100, align: "left" }, + { label: "年级", name: "Grade", width: 100, align: "left" }, { label: "考试类型", name: "ESType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs index 7c2e4c8dd..55e623e53 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs @@ -346,7 +346,8 @@ where l.EPLId='{EPLId}' //专业课添加此专业的所有班级 var addSql = $@"insert into Exam_ExamPlanClass SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t - left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and c.majorno='{lessoninfo.TeachMajorNo}' + left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.Grade='{lesson.Grade}' +and t.ESType='{examPlan.PlanType}' and c.majorno='{lessoninfo.TeachMajorNo}' and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; db.ExecuteBySql(addSql); @@ -356,7 +357,7 @@ where l.EPLId='{EPLId}' //公共课添加所有班级 var addSql = $@"insert into Exam_ExamPlanClass SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t - left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' + left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and t.Grade='{lesson.Grade}' and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; db.ExecuteBySql(addSql); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs index b69de675b..2e12aef31 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs @@ -139,7 +139,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration TreeModel node = new TreeModel { id = item["eplid"].ToString(), - text = item["lessonname"].ToString(), + text = item["lessonname"].ToString() + "(" + item["grade"].ToString() + ")", value = item["lessonno"].ToString(), showcheck = false, checkstate = 0, @@ -340,7 +340,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } - + public (bool flag, string str) CheckAllPlanLesson(string EPId) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs index c2e3971d9..4baa5d04c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2022-04-15 15:03 /// 描 述:排考安排课程 /// - public class Exam_ExamPlanLessonEntity + public class Exam_ExamPlanLessonEntity { #region 实体成员 /// @@ -29,7 +29,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("ELID")] public string ELId { get; set; } - + + /// + /// 年级 + /// + [Column("GRADE")] + public int? Grade { get; set; } /// /// LessonName /// @@ -45,7 +50,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("LESSONTYPEID")] public string LessonTypeId { get; set; } - + /// /// 考试日期 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs index 86eb859b4..75cab56f9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs @@ -229,7 +229,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - var sql = $@"select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t + var sql = $@"select distinct t.EPLId,t.LessonName,t.Grade,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t join CdLessonType a on t.LessonTypeId=a.ltid where EPId='{EPId}' order by a.ltorder, t.LessonNo"; @@ -327,39 +327,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var exam_ExamPlan = this.BaseRepository("CollegeMIS").FindEntity(x => x.EPId == EPId); if (exam_ExamPlan.PlanType == "1") { - //必修 - string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId) -select NEWID(),'{EPId}',LessonName+'('+grade+')',LessonNo+'('+grade+')',LessonTypeId from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' - and LessonNo+'('+grade+')' not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') - group by LessonNo,grade,LessonName,LessonTypeId"; + //必修+'('+grade+')' + string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade) +select NEWID(),'{EPId}',LessonName,LessonNo,LessonTypeId,grade from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' + and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') + group by LessonNo,grade,LessonName,LessonTypeId,grade"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } else if (exam_ExamPlan.PlanType == "2") { //补考 - string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId) - select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId + string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade) + select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId,b.Grade from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo -left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno + join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno +--left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' and a.LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') - group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId"; + group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId,b.Grade"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } else if (exam_ExamPlan.PlanType == "3") { //重修 - string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId) - select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId + string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade) + select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId,b.Grade from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo -left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno + join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno +--left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') - group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId "; + group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId,b.Grade "; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } @@ -592,19 +594,17 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId //考试课程数据 var EPLessonList = db.FindList($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' ---left join Exam_ExamLesson info on left(t.LessonNo,charindex('(',t.LessonNo)-1)=info.LessonNo left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId where t.EPId='{EPId}' and elesson.ELEnabled=1 "); - if (examPlan.PlanType == "1") - { - //必修 - EPLessonList = db.FindList($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t -join Exam_ExamLesson elesson on left(t.LessonNo,charindex('(',t.LessonNo)-1)=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' ---left join Exam_ExamLesson info on left(t.LessonNo,charindex('(',t.LessonNo)-1)=info.LessonNo -left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId - where t.EPId='{EPId}' and elesson.ELEnabled=1 - "); - } +// if (examPlan.PlanType == "1") +// { +// //必修 +// EPLessonList = db.FindList($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t +//join Exam_ExamLesson elesson on left(t.LessonNo,charindex('(',t.LessonNo)-1)=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' +//left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId +// where t.EPId='{EPId}' and elesson.ELEnabled=1 +// "); +// } if (EPLessonList.ToList().Exists(x => x.ExamLength == null || x.ExamLength <= 0)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs index 2bc99622f..c0239280f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs @@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("SEMESTER")] public int? Semester { get; set; } /// + /// 年级 + /// + [Column("GRADE")] + public int? Grade { get; set; } + /// /// 学生编码 /// [Column("STUNO")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs index 88cd8d87b..bad441961 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs @@ -33,7 +33,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" * "); + strSql.Append(@" t.* "); strSql.Append(" FROM Exam_ExamStudent t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); @@ -360,14 +360,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (ESType == "1") { strSql.Append( - $@"insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled) - select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1 from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' union + $@"insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade) + select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1,a.Grade from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' union select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1')"); } else { - strSql.Append(@" insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled) "); - strSql.Append($"select newid(),a.classno,'{AcademicYearNo}','{Semester}',a.stuno,a.stuname,'{ESType}',1 from "); + strSql.Append(@" insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade) "); + strSql.Append($"select newid(),a.classno,'{AcademicYearNo}','{Semester}',a.stuno,a.stuname,'{ESType}',1,b.Grade from "); if (ESType == "2") { strSql.Append(" StuScore "); @@ -382,7 +382,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); strSql.Append($@" and a.stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' union select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1' ) "); - strSql.Append(" group by a.stuno,a.stuname,a.classno"); + strSql.Append(" group by a.stuno,a.stuname,a.classno,b.Grade"); } return this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString()); } From 34fbc950167469cab25f54b2298e2c7b11b21282 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 11:03:31 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=AD=A6=E7=B1=8D?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E7=9B=91=E5=90=AC=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E5=8F=B7=EF=BC=8C=E7=BB=91=E5=AE=9A=E5=87=BA=E7=94=9F?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Form.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js index d763b8f2c..adfeb5b0c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js @@ -55,7 +55,7 @@ var bootstrap = function ($, learun) { } }, bind: function () { - $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); + $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); $('#F_ProvinceId').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', select: function (item) { @@ -169,7 +169,15 @@ var bootstrap = function ($, learun) { learun.alert.error('请先选择系和专业'); } }); - $('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); + //监听身份证号,绑定出生日期 + $("#IdentityCardNo").blur(function () { + var cardNo = $(this).val().trim(); + if (cardNo) { + var date = cardNo.slice(6, 10) + "-" + cardNo.slice(10, 12) + "-" + cardNo.slice(12, 14); + $("#Birthday").val(date); + } + }); }, initData: function () { if (!!keyValue) { From 09939d390b6ec978c7a5d5f87b0f7e51a478e342 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 11:24:15 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E4=B8=93=E4=B8=9A=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86--=E6=93=8D=E4=BD=9C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=9C=89=E8=AF=AFand=E5=90=AF=E7=94=A8=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CdMajorController.cs | 4 ++-- .../Areas/EducationalAdministration/Views/CdMajor/Index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs index a02d01306..550e32d4d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs @@ -120,14 +120,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult Lock(string keyValue) { cdMajorIBLL.Lock(keyValue); - return Success("审核成功!"); + return Success("操作成功!"); } [HttpPost] [AjaxOnly] public ActionResult UnLock(string keyValue) { cdMajorIBLL.UnLock(keyValue); - return Success("去审成功!"); + return Success("操作成功!"); } /// /// 删除实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js index 7ba79830e..0f1128d7d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js @@ -97,7 +97,7 @@ var bootstrap = function ($, learun) { // learun.alert.warning("当前项目已审核无需再审!"); // return; //} - learun.layerConfirm('是否确认审核该项!', function (res) { + learun.layerConfirm('是否确认启用该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/Lock', { keyValue: keyValue }, function () { refreshGirdData(); @@ -119,7 +119,7 @@ var bootstrap = function ($, learun) { // learun.alert.warning("当前项目还未审核不需要去审核!"); // return; //} - learun.layerConfirm('是否确认去审核该项!', function (res) { + learun.layerConfirm('是否确认停用该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/UnLock', { keyValue: keyValue }, function () { refreshGirdData(); From 17b4483e58abca2ba2d095f4288c681634ac1aa1 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Thu, 4 Aug 2022 11:40:08 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E6=95=99=E5=B8=88=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=AE=BE=E7=BD=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=EF=BC=8C=E6=89=AB=E7=BB=93=E6=9D=9F=E6=8A=A5=E5=90=8D=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=9A=84=E8=80=81=E5=B8=88=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E7=A4=BA=E6=8A=A5=E5=90=8D=E7=BB=93=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/EmpInfoController.cs | 11 ++ .../Controllers/StuEnrollPhoneController.cs | 9 ++ .../Views/EmpInfo/Index.cshtml | 2 + .../Views/EmpInfo/Index.js | 45 +++++++- .../Views/StuEnrollPhone/Link.cshtml | 109 ++++++++++++------ .../EmpInfo/EmpInfoBLL.cs | 18 +++ .../EmpInfo/EmpInfoEntity.cs | 6 + .../EmpInfo/EmpInfoIBLL.cs | 1 + .../EmpInfo/EmpInfoService.cs | 29 ++++- 9 files changed, 192 insertions(+), 38 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs index 6f8f37dc2..682f081cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs @@ -396,6 +396,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers empInfoIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// + /// 修改二维码状态 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult UpdateQRCodeStatus(string keyValue,int QRCodeStatus) + { + empInfoIBLL.UpdateQRCodeStatus(keyValue, QRCodeStatus); + return Success("操作成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollPhoneController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollPhoneController.cs index 78b3935d2..3f9627153 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollPhoneController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEnrollPhoneController.cs @@ -13,6 +13,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { public class StuEnrollPhoneController : Controller { + private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); #region 视图 @@ -57,6 +58,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers #endregion + [HttpGet] + [AjaxOnly] + public ActionResult GetEmpInfoEntityByEmpNo(string empNo) + { + var EmpInfoData = empInfoIBLL.GetEmpInfoEntityByEmpNo(empNo); + EmpInfoData.resume = WebHelper.HtmlDecode(EmpInfoData.resume); + return Success(EmpInfoData); + } /// /// 报名 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml index 5ec842f25..bc03b0741 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml @@ -83,6 +83,8 @@  去审核  审核全部  生成二维码 +  报名正常 +  报名结束 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js index 23ba5cb53..fe8815f2e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js @@ -291,7 +291,7 @@ var bootstrap = function ($, learun) { }); //生成二维码 $("#lr_qrcode").on('click', - function() { + function () { var keyValue = $('#gridtable').jfGridValue('EmpNo'); var EmpName = $('#gridtable').jfGridValue('EmpName'); //console.log(keyValue, EmpName); @@ -311,7 +311,7 @@ var bootstrap = function ($, learun) { width: 700, height: 300, btn: null, - end: function() { refreshGirdData(); } + end: function () { refreshGirdData(); } }); } @@ -363,6 +363,35 @@ var bootstrap = function ($, learun) { }) }); + //报名正常 + $("#lr_qrcode_normal").on("click", function () { + var keyValue = $('#gridtable').jfGridValue('EmpId'); + learun.layerConfirm('是否确认更新二维码状态为正常!', + function(res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/EmpInfo/UpdateQRCodeStatus', + { keyValue: keyValue, QRCodeStatus: 0 }, + function() { + refreshGirdData(); + }); + }; + });; + }); + //报名结束 + $("#lr_qrcode_end").on("click", function () { + var keyValue = $('#gridtable').jfGridValue('EmpId'); + learun.layerConfirm('是否确认更新二维码状态为结束!', + function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/EmpInfo/UpdateQRCodeStatus', + { keyValue: keyValue, QRCodeStatus: 1 }, + function () { + refreshGirdData(); + }); + }; + });; + }); + $("#lr_switch").on("click", function () { $.get("/EducationalAdministration/TeachSwitch/GetFirstEntity", function (data) { if (data.code == "200") { @@ -406,7 +435,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetPageList', headData: [ { @@ -417,6 +446,14 @@ var bootstrap = function ($, learun) { } }, + { + label: "二维码状态", name: "QRCodeStatus", width: 80, align: "center", + formatter: function (cellvalue) { + //return cellvalue == true ? "" : ""; + return cellvalue == '1' ? "结束" : "正常"; + + } + }, { label: "职工编号", name: "EmpNo", width: 100, align: "left" }, { label: "姓名", name: "EmpName", width: 100, align: "left" }, @@ -478,7 +515,7 @@ var bootstrap = function ($, learun) { }); } }, - { label: "员工状态时间", name: "IsInActiveTime", width: 100, align: "left"}, + { label: "员工状态时间", name: "IsInActiveTime", width: 100, align: "left" }, { label: "人员身份", name: "CompilationCategory", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml index 1a412c3f3..eb9930db2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml @@ -10,7 +10,7 @@ 数字化校园-查询报名 -
- - - - + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs index f3ba14d90..cddc19fe1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoBLL.cs @@ -436,7 +436,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } + public void UpdateQRCodeStatus(string keyValue, int QRCodeStatus) + { + try + { + empInfoService.UpdateQRCodeStatus(keyValue, QRCodeStatus); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 保存部门、系部 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs index 4aaae7b41..9ef22d4ad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs @@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("EMPID")] public string EmpId { get; set; } + /// + /// 二维码状态 + /// + [Column("QRCODESTATUS")] + public int? QRCodeStatus { get; set; } + /// /// 职工号 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs index ae1ce460e..65e151597 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoIBLL.cs @@ -71,6 +71,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void SaveEntity(UserInfo userInfo, string keyValue, EmpInfoEntity entity); void UpdatePhoto(string id, string photo); + void UpdateQRCodeStatus(string keyValue, int QRCodeStatus); #endregion void CheckAll(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs index 8154e36cd..26b26984b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs @@ -38,7 +38,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT t.*,b.F_Order as DeptOrder "); - strSql.Append(" FROM EmpInfo t left join "+BaseRepository().getDbConnection().Database+".dbo.LR_Base_Department b on t.F_DepartmentId=b.F_DepartmentId "); + strSql.Append(" FROM EmpInfo t left join " + BaseRepository().getDbConnection().Database + ".dbo.LR_Base_Department b on t.F_DepartmentId=b.F_DepartmentId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -859,6 +859,33 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi } } + /// + /// 修改二维码状态 + /// + /// + /// + public void UpdateQRCodeStatus(string keyValue, int QRCodeStatus) + { + try + { + if (keyValue.Contains(",")) + { + keyValue = string.Join("','", keyValue.Split(',')); + } + this.BaseRepository("CollegeMIS").ExecuteBySql($"update EmpInfo set QRCodeStatus='{QRCodeStatus}' where EmpId in ('{keyValue}')"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion } From c97359eba9e157c2e4f40cae4f275356fbc38d67 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 11:40:38 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20-=E6=93=8D=E4=BD=9C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LessonInfoController.cs | 4 ++-- .../Areas/EducationalAdministration/Views/LessonInfo/Index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs index d99e78b0a..ffe2dd6c8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs @@ -124,14 +124,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult Lock(string keyValue) { lessonInfoIBLL.Lock(keyValue); - return Success("审核成功!"); + return Success("操作成功!"); } [HttpPost] [AjaxOnly] public ActionResult UnLock(string keyValue) { lessonInfoIBLL.UnLock(keyValue); - return Success("去审成功!"); + return Success("操作成功!"); } /// /// 删除实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js index 9cc59a33a..fa811388b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js @@ -99,7 +99,7 @@ var bootstrap = function ($, learun) { // learun.alert.warning("当前项目已审核无需再审!"); // return; //} - learun.layerConfirm('是否确认审核该项!', function (res) { + learun.layerConfirm('是否确认启用该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfo/Lock', { keyValue: keyValue }, function () { refreshGirdData(); @@ -121,7 +121,7 @@ var bootstrap = function ($, learun) { // learun.alert.warning("当前项目还未审核不需要去审核!"); // return; //} - learun.layerConfirm('是否确认去审核该项!', function (res) { + learun.layerConfirm('是否确认停用该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfo/UnLock', { keyValue: keyValue }, function () { refreshGirdData(); From 56cea2230d6bb6646831e96504fcc71ea049153e Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 14:41:25 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E5=A4=B1=E8=AF=AF=E6=8B=9B=E9=A2=86-?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E5=88=A0=E9=99=A4=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LostArticleInfo/LostArticleInfoService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs index 8c0047cfb..82a922556 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs @@ -98,7 +98,12 @@ namespace Learun.Application.OA { try { - this.BaseRepository().Delete(t => t.F_LId == keyValue); + //多个删除 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + this.BaseRepository().Delete(t => t.F_LId == item); + } } catch (Exception ex) { From c9e876babb5ae9c5c0afbb5d458ed9332c0d256a Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 14:49:48 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E5=A4=B1=E7=89=A9=E6=8B=9B=E9=A2=86?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20-=E5=8F=91=E5=B8=83=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Areas/LR_OAModule/Views/LostArticleInfo/Index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/LostArticleInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/LostArticleInfo/Index.js index a9277eb47..d763aa36d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/LostArticleInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/LostArticleInfo/Index.js @@ -109,13 +109,16 @@ var bootstrap = function ($, learun) { //  发布 $('#lr-publish').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_LId'); + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行发布!"); + return; + } var F_State = $('#gridtable').jfGridValue('F_State'); if (F_State != "0") { learun.alert.warning("当前项目已提交不能发布!"); return; } - - var keyValue = $('#gridtable').jfGridValue('F_LId'); if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认发布!', function (res) { if (res) { From 4a93e7f59fb279a0b5bf791fffb5b925b3bcf8d4 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 15:09:55 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E5=A4=B1=E8=AF=AF=E6=8B=9B=E9=A2=86-?= =?UTF-8?q?=E6=92=A4=E9=94=80=E6=B8=85=E7=A9=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LostArticleInfo/LostArticleInfoService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs index 82a922556..4dda49caf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/LostArticleInfo/LostArticleInfoService.cs @@ -213,7 +213,7 @@ namespace Learun.Application.OA try { //草稿0、待认领1、已认领2 - string sql = $"update LostArticleInfo set F_State=0 where F_LId='{keyValue}'"; + string sql = $"update LostArticleInfo set F_State=0,F_User='',F_UserTime=null,F_ClaimImage='' where F_LId='{keyValue}'"; this.BaseRepository().ExecuteBySql(sql); } catch (Exception ex) From 8a1fe9cf14aaa55ee31c57c48d69a676c6335409 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 15:14:29 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E6=95=99=E5=AE=A4=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E6=A0=A1=E9=AA=8C=E9=9D=9E=E8=B4=9F?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/Views/ClassroomInfo/Form.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Form.cshtml index 2b6b66503..2c92e8724 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Form.cshtml @@ -29,11 +29,11 @@
容纳人数*
- +
考试人数*
- +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassroomInfo/Form.js") From 5145f44163eda0da9bdd67ab1a7e915524224fcf Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Thu, 4 Aug 2022 15:24:30 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E6=96=B0=E7=94=9F=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/Views/StuEnrollPhone/Link.cshtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml index eb9930db2..59981cc0a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml @@ -59,7 +59,8 @@ success: function (data) { if (data.code == 200) { var data = data.data.QRCodeStatus; - if (data != 0) { + if (data === 1 || data === '' || data === 'undefined') { + //if (data != 0) { btnEnabled(); alert('招生报名录取工作已结束!'); } else { From ef631c944f385fa5fdc6a41aedce0c9148fc3f5a Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 15:26:55 +0800 Subject: [PATCH 14/17] =?UTF-8?q?=E6=95=99=E5=AE=A4=E4=BF=A1=E6=81=AF--?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=8F=90=E7=A4=BA=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ClassroomInfoController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs index 3ee6c35f8..d877fa88b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs @@ -86,14 +86,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult Lock(string keyValue) { classroomInfoIBLL.Lock(keyValue); - return Success("审核成功!"); + return Success("操作成功!"); } [HttpPost] [AjaxOnly] public ActionResult UnLock(string keyValue) { classroomInfoIBLL.UnLock(keyValue); - return Success("去审成功!"); + return Success("操作成功!"); } /// /// 删除实体数据 From e787dd66af16e0c874b953c4ba0ae0d2171cab71 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 4 Aug 2022 15:43:01 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E6=95=99=E5=AD=A6=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20-=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Areas/EducationalAdministration/Views/TeachPlan/Index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachPlan/Index.js index f96f5760d..296d06df4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachPlan/Index.js @@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 220, 400); + }, 250, 400); $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); // 刷新 From 5a6eb563fd28597f69975063a6aa39d310bc9db1 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 5 Aug 2022 09:50:39 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=BD=95=E5=8F=96=E7=BB=93=E6=9E=9C=E4=B8=93=E4=B8=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=9C=89=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuEnrollPhone/SearchResult.cshtml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/SearchResult.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/SearchResult.cshtml index 2eeb225b2..6f0a0e20a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/SearchResult.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/SearchResult.cshtml @@ -126,13 +126,13 @@ url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo" + '&where=' + "id='" + data.StuEnroll.MajorNo + "'", async: false, success: function (msg) { - var majorData = $.parseJSON(msg).data.data; - majorName = majorData[0].MajorName; - }, + var majorData = $.parseJSON(msg).data.data[0]; + majorName = majorData.majorname; + } }); - if (!majorName) { - majorName = data.StuEnroll.MajorName; - } + //if (!majorName) { + // majorName = data.StuEnroll.MajorName; + //} if (IsAdmission == 1 || IsAdmission == true) { var major = data.StuEnroll.MajorName; $('#IsAdmission').val('恭喜您,已被我校录取' + majorName + '专业'); From c5624480820a080cb7643b688fdb2ff77a9646df Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 5 Aug 2022 17:02:22 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E6=96=B0=E7=94=9F=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E6=97=B6=E5=88=A4=E6=96=AD=E8=80=81=E5=B8=88=E4=BA=8C=E7=BB=B4?= =?UTF-8?q?=E7=A0=81=E7=8A=B6=E6=80=81=E6=98=AF=E5=90=A6=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuEnrollPhone/Link.cshtml | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml index 59981cc0a..e8c7695f8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnrollPhone/Link.cshtml @@ -34,7 +34,7 @@
@@ -48,39 +48,39 @@ $(function () { var EmpNo = request('EmpNo'); if (!!EmpNo) { - //查询 - $.ajax({ - url: '/EducationalAdministration/StuEnrollPhone/GetEmpInfoEntityByEmpNo?empNo=' + EmpNo, - //data: { StuName: decodeURI(StuName), IDCard: IDCard, StuMobile: "" }, - type: "GET", - dataType: "json", - async: true, - cache: false, - success: function (data) { - if (data.code == 200) { - var data = data.data.QRCodeStatus; - if (data === 1 || data === '' || data === 'undefined') { - //if (data != 0) { - btnEnabled(); - alert('招生报名录取工作已结束!'); - } else { - - } - } else { - alert(data.info); - btnEnabled(); - //location.href = '/EducationalAdministration/StuEnrollPhone/Search?type=' + type; - } - }, - error: function (XMLHttpRequest, textStatus, errorThrown) { - }, - beforeSend: function () { - }, - complete: function () { - } - }); //报名 - $('#stuenroll').attr('href', '/EducationalAdministration/StuEnrollPhone/Form?EmpNo=' + EmpNo); + $('#stuenroll').on('click', + function () { + //查询 + $.ajax({ + url: '/EducationalAdministration/StuEnrollPhone/GetEmpInfoEntityByEmpNo?empNo=' + EmpNo, + type: "GET", + dataType: "json", + async: true, + cache: false, + success: function (data) { + if (data.code == 200) { + var data = data.data.QRCodeStatus; + if (data === 1 || data === '' || data === 'undefined') { + alert('招生报名录取工作已结束!'); + return; + } else { + location.href = '/EducationalAdministration/StuEnrollPhone/Form?EmpNo=' + EmpNo; + } + } else { + alert(data.info); + //location.href = '/EducationalAdministration/StuEnrollPhone/Search?type=' + type; + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + }, + beforeSend: function () { + }, + complete: function () { + } + }); + }); + //$('#stuenroll').attr('href', '/EducationalAdministration/StuEnrollPhone/Form?EmpNo=' + EmpNo); //查询考试地点及时间 $('#loc').attr('href', '/EducationalAdministration/StuEnrollPhone/Search?type=1'); //查询录取结果 @@ -94,9 +94,9 @@ }); } //禁用按钮 - function btnEnabled() { - $('.box').addClass('notclick'); - } + //function btnEnabled() { + // $('.box').addClass('notclick'); + //} });