diff --git a/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx index 8d7eaece8..4fdef60c9 100644 --- a/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx +++ b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx @@ -461,4 +461,973 @@ FailMsg +调用方式: +标准http get请求 +返回数据类型: +标准json +返回数据结构 +主要关心code和data即可 + + 属性 + 返回值 + 备注 +code +200(int) +200成功 其余失败 +info +响应成功(string) +状态描述 +data +业务数据(object) +业务数据 + +查看数据接口 +学院接口 +地址:http://部署地址/arrangelesson/schoolNotRecord +数据库表:LR_Base_Company (基础库) +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +F_CompanyId +GUID (string) +GUID学院ID +否 +F_Category +分类ID(INT) + + +F_ParentId +父级ID(string) + +否 +F_EnCode +学院编号(string) + +否 +F_FullName +学院全称(string) + +否 +F_ShortName +学院简称(string) + + +F_Nature +学院性质(string) + + +F_OuterPhone +外线电话(string) + + +F_InnerPhone +内线电话(string) + + +F_Fax +传真(string) + + +F_Postalcode +邮编(string) + + +F_Email +电子信箱(string) + + +F_Manager +负责人(string) + + +F_Address +详细地址(string) + + +F_WebAddress +主页(string) + + +F_FoundedTime +成立时间(DateTime) + + +F_Description +备注(string) + + + +系部接口 +地址:http://部署地址/arrangelesson/ deptNotRecord +表:CDDEPT (业务库) +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +DeptId +GUID (string) +GUID部门ID +否 +F_SchoolId +学校ID(string) + +否 +DeptNo +部门编号(string) + +否 +DeptName +部门全称(string) + +否 +DeptShortName +部门简称(string) + + +DeptEnBrief +英文名称(string) + + +DeptEnShort +英文简称(string) + + +DeptOldName +曾用名(string) + + + +专业接口 +地址:http://部署地址/arrangelesson/ majorNotRecord +表:CDMAJOR (业务库) +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +ID +GUID (string) +GUID专业ID +否 +MajorNo +专业编号(string) + +否 +MajorName +专业名称(string) + +否 +DeptNo +系部编号(string) + + +SubjectSpeciesNo +学科门类代码(string) + + +GovMajorName +教委专业名称(string) + + + +教室接口 +地址:http://部署地址/arrangelesson/ classroomNotRecord +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +ClassroomId +GUID (string) + +否 +ClassroomNo +编号(string) + +否 +ClassroomName +名称(string) + +否 +ClassroomTypeNo +教室类型 (string) + + +ClassroomFloor +教室楼层(string) + + +ClassroomBuildingNo +教学楼(string) + + + +课程接口 +地址:http://部署地址/arrangelesson/ lessonNotRecord +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +LessonId +GUID (string) +GUI课程ID +否 +LessonNo +课程编号(string) + +否 +LessonName +课程名称(string) + +否 +LessonSortNo +课程类型(string) +1必修,2选修 + +F_SchoolId +校区Id(string) + + +StudyScore +学分(decimal) + + +WeekStudyHour +周理论学时(decimal) + + +TotalHours +总学时(decimal) + + +WhoStudy +修读对象(string) + + +BriefIntro +简介(string) + + + + + + + + +教师接口 +地址:http://部署地址/arrangelesson/ teacherNotRecord +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +EmpId +GUID (string) +GUID教师ID +否 +EmpNo +教职工编号(string) + +否 +EmpName +职工姓名(string) + +否 +GenderNo +性别(bool) +true男false女 + +Birthday +生日(datetime) + + +F_DepartmentId +部门ID(string) + + +mobile +电话(string) + + +EmpFullTimeNo +专兼职(string) + + +IsInActiveStatus +在职状态(string) +1在职0离职 + +CultureDegreeNo +文化程序(string) + + +HighestRecord +最高学历(string) + + +resume +简介(string) + + + +班级接口 +地址:http://部署地址/arrangelesson/ classNotRecord +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +ClassId +GUID (string) +GUI班级ID +否 +ClassNo +班级编号(string) + +否 +ClassName +班级名称(string) + +否 +DeptNo +系部编号(string) + + +MajorNo +专业编号(string) + + +Grade +级别(18代表2018级,19表示2019级)(string) + + + + +学生接口 +地址:http://部署地址/arrangelesson/ stuNotRecord +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +StuId +GUID (string) +GUID学生ID +否 +StuNo +学生编号(string) + +否 +StuName +姓名(string) + +否 +StuCode +学籍号(string) + + +ksh +考生号(string) + + +GenderNo +性别(bool) +true男false女 + +Birthday +生日(datetime) + + +mobile +电话(string) + + +IdentityCardNo +身份证号(string) + + +DeptNo +系部编号(string) + + +MajorNo +专业编号(string) + + +Grade +级别(18代表2018级,19表示2019级)(string) + + +ClassNo +班级编号(string) + + + +对接数据接口 +学院接口 +地址:http://部署地址/arrangelesson/ school +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +F_CompanyId +GUID (string) +GUID学院ID +否 +F_Category +分类ID(INT) + + +F_ParentId +父级ID(string) + +否 +F_EnCode +学院编号(string) + +否 +F_FullName +学院全称(string) + +否 +F_ShortName +学院简称(string) + + +F_Nature +学院性质(string) + + +F_OuterPhone +外线电话(string) + + +F_InnerPhone +内线电话(string) + + +F_Fax +传真(string) + + +F_Postalcode +邮编(string) + + +F_Email +电子信箱(string) + + +F_Manager +负责人(string) + + +F_Address +详细地址(string) + + +F_WebAddress +主页(string) + + +F_FoundedTime +成立时间(DateTime) + + +F_Description +备注(string) + + + + + +系部接口 +地址:http://部署地址/arrangelesson/ dept + +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +DeptId +GUID (string) +GUID部门ID +否 +F_SchoolId +学校ID(string) + +否 +DeptNo +部门编号(string) + +否 +DeptName +部门全称(string) + +否 +DeptShortName +部门简称(string) + + +DeptEnBrief +英文名称(string) + + +DeptEnShort +英文简称(string) + + +DeptOldName +曾用名(string) + + + +专业接口 +地址:http://部署地址/arrangelesson/ major +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +ID +GUID (string) +GUID专业ID +否 +MajorNo +专业编号(string) + +否 +MajorName +专业名称(string) + +否 +DeptNo +系部编号(string) + + +SubjectSpeciesNo +学科门类代码(string) + + +GovMajorName +教委专业名称(string) + + + +班级接口 +地址:http://部署地址/arrangelesson/ class +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +ClassId +GUID (string) +GUI班级ID +否 +ClassNo +班级编号(string) + +否 +ClassName +班级名称(string) + +否 +DeptNo +系部编号(string) + + +MajorNo +专业编号(string) + + +Grade +级别(18代表2018级,19表示2019级)(string) + + +教师接口 +地址:http://部署地址/arrangelesson/ teacher +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +EmpId +GUID (string) +GUID教师ID +否 +EmpNo +教职工编号(string) + +否 +EmpName +职工姓名(string) + +否 +GenderNo +性别(bool) +true男false女 + +Birthday +生日(datetime) + + +F_DepartmentId +部门ID(string) + + +mobile +电话(string) + + +EmpFullTimeNo +专兼职(string) + + +IsInActiveStatus +在职状态(string) +1在职0离职 + +CultureDegreeNo +文化程序(string) + + +HighestRecord +最高学历(string) + + +resume +简介(string) + + +教室接口 +地址:http://部署地址/arrangelesson/ classroom +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +ClassroomId +GUID (string) + +否 +ClassroomNo +编号(string) + +否 +ClassroomName +名称(string) + +否 +ClassroomTypeNo +教室类型 (string) + + +ClassroomFloor +教室楼层(string) + + +ClassroomBuildingNo +教学楼(string) + + +教室类型接口 +地址:http://部署地址/arrangelesson/ classroomtype +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +ClassroomTypeId +GUID (string) + +否 +ClassroomTypeNo +类型名称(string) + +否 +ClassroomType +类型编号(string) + +否 + + +课程接口 +地址:http://部署地址/arrangelesson/ lesson +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +LessonId +GUID (string) +GUI课程ID +否 +LessonNo +课程编号(string) + +否 +LessonName +课程名称(string) + +否 +LessonSortNo +课程类型(string) +1必修,2选修 + +F_SchoolId +校区Id(string) + + +StudyScore +学分(decimal) + + +WeekStudyHour +周理论学时(decimal) + + +TotalHours +总学时(decimal) + + +WhoStudy +修读对象(string) + + +BriefIntro +简介(string) + + + + + + + +课程类型接口 +地址:http://部署地址/arrangelesson/ lessontype +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +LTId +GUID (string) + +否 +LessonTypeName +类型名称(string) + +否 +LessonTypeCode +类型编号(string) + +否 + +学生接口 +地址:http://部署地址/arrangelesson/ stu +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +StuId +GUID (string) +GUID学生ID +否 +StuNo +学生编号(string) + +否 +StuName +姓名(string) + +否 +StuCode +学籍号(string) + + +ksh +考生号(string) + + +GenderNo +性别(bool) +true男false女 + +Birthday +生日(datetime) + + +mobile +电话(string) + + +IdentityCardNo +身份证号(string) + + +DeptNo +系部编号(string) + + +MajorNo +专业编号(string) + + +Grade +级别(18代表2018级,19表示2019级)(string) + + +ClassNo +班级编号(string) + + + +部门接口 +地址:http://部署地址/arrangelesson/ departments +主要业务数据 其余字段可忽略 + 属性 + 返回值 + 备注 + 可否为空 +F_DepartmentId +GUID (string) +GUID部门ID +否 +F_ParentId +上级部门ID(string) +-1和0均代表根 +否 +F_EnCode +部门编号(string) +部门编号 +否 +F_FullName +部门全称(string) + +否 +F_ShortName +部门简称(string) + + +F_Manager +负责人(string) + + +F_OuterPhone +电话(string) + + +数校清空基础数据 +地址:http://部署地址/arrangelesson/ initbasicdata +所需参数:AcademicYearNo=19-20&Semester=1 +参数名称 +值 +备注 +AcademicYearNo +19-20 +代表学年19-20、18-19等 +Semester +1、2 +学期1、2 +BaseTable + +基础表 + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js index b9c35e54d..9230fd83d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js @@ -33,15 +33,16 @@ var bootstrap = function ($, learun) { }, query: function () { var p = {}; + var datas = $('#gridtable2').jfGridGet('rowdatas'); //p.F_SchoolId = $('#F_SchoolId').lrselectGet(); - p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); - p.Semester = $('#Semester').lrselectGet(); - p.DeptNo = $('#DeptNo').lrselectGet(); - p.MajorNo = $('#MajorNo').lrselectGet(); - p.LessonNo = $('#LessonNo').lrselectGet(); - p.TeachClassNo = $('#TeachClassNo').lrselectGet(); - p.EmpNo = $('#EmpNo').lrselectGet(); - p.ClassroomNo = $('#ClassroomNo').lrselectGet(); + p.AcademicYearNo = datas[0].Academicyear;// $('#AcademicYearNo').lrselectGet(); + p.Semester = datas[0].Semester;//$('#Semester').lrselectGet(); + p.DeptNo = datas[0].DeptNo;//$('#DeptNo').lrselectGet(); + p.MajorNo = datas[0].MajorNo;//$('#MajorNo').lrselectGet(); + p.LessonNo = datas[0].LessonNo;//$('#LessonNo').lrselectGet(); + p.TeachClassNo = datas[0].TeachClassNo;//$('#TeachClassNo').lrselectGet(); + p.EmpNo = datas[0].Empno;// $('#EmpNo').lrselectGet(); + p.ClassroomNo = datas[0].ClassRoomNo;//$('#ClassroomNo').lrselectGet(); //if (!!p.F_SchoolId && !!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { if (!!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { //调度开始时间 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js index f98885a43..38f7c4d0a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js @@ -570,9 +570,9 @@ var bootstrap = function ($, learun) { processId: processId, level: '1', }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { - learun.loading(false); - }); + //learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + // learun.loading(false); + //}); } page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs index fecee5d5c..0e72a1209 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs @@ -21,6 +21,7 @@ namespace Learun.Application.WebApi.Modules Get["/classlesson"] = GetClassLessons; Get["/bukaolist"] = GetBuKaoList; //以下接口需要传值学年学期 + //2024/6/27取消学年学期参数 Get["/school"] = GetSchools; Get["/dept"] = GetDepts; Get["/major"] = GetMajors; @@ -29,6 +30,9 @@ namespace Learun.Application.WebApi.Modules Get["/teacher"] = GetTeachers; Get["/class"] = GetClasses; Get["/stu"] = GetStus; + Get["/classroomtype"] = GetClassroomType; + Get["/departments"] = GetDepartments; + //以下返回全部 Get["/department"] = GetDepartment; Get["/allteacher"] = GetAllTeachers; @@ -105,20 +109,20 @@ namespace Learun.Application.WebApi.Modules } private Response InitBasicData(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; + //string AcademicYearNo = Request.Query["AcademicYearNo"]; + //string Semester = Request.Query["Semester"]; string BaseTable = Request.Query["BaseTable"]; - if (string.IsNullOrEmpty(AcademicYearNo) || string.IsNullOrEmpty(Semester)) - { - return Fail("学年学期参数不能为空"); - } - if (string.IsNullOrEmpty(BaseTable)) - { - return Fail("基础表参数不能为空"); - } + //if (string.IsNullOrEmpty(AcademicYearNo) || string.IsNullOrEmpty(Semester)) + //{ + // return Fail("学年学期参数不能为空"); + //} + //if (string.IsNullOrEmpty(BaseTable)) + //{ + // return Fail("基础表参数不能为空"); + //} ArrangeLessonTermEntity arrangeLessonTermEntity = new ArrangeLessonTermEntity(); - arrangeLessonTermEntity.AcademicYearNo = AcademicYearNo; - arrangeLessonTermEntity.Semester = Semester; + //arrangeLessonTermEntity.AcademicYearNo = AcademicYearNo; + //arrangeLessonTermEntity.Semester = Semester; arrangeLessonTermEntity.SyncBasicTable = BaseTable; arrangeLessonTermIBLL.InitAsyncDataByCondition(arrangeLessonTermEntity); return Success("操作成功"); @@ -173,9 +177,10 @@ namespace Learun.Application.WebApi.Modules } private Response GetDepts(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetDepts(AcademicYearNo, Semester); + //string AcademicYearNo = Request.Query["AcademicYearNo"]; + //string Semester = Request.Query["Semester"]; + //var result = arrangeLessonTermIBLL.GetDepts(AcademicYearNo, Semester); + var result = arrangeLessonTermIBLL.GetDepts(); return Success(result); } private Response GetDeptsNotRecord(dynamic _) @@ -188,9 +193,10 @@ namespace Learun.Application.WebApi.Modules private Response GetSchools(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetSchools(AcademicYearNo, Semester); + //string AcademicYearNo = Request.Query["AcademicYearNo"]; + //string Semester = Request.Query["Semester"]; + //var result = arrangeLessonTermIBLL.GetSchools(AcademicYearNo, Semester); + var result = arrangeLessonTermIBLL.GetSchools(); return Success(result); } private Response GetSchoolsNotRecord(dynamic _) @@ -223,9 +229,9 @@ namespace Learun.Application.WebApi.Modules } public Response GetMajors(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetMajors(AcademicYearNo, Semester); + //string AcademicYearNo = Request.Query["AcademicYearNo"]; + //string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetMajors(); return Success(result); } public Response GetMajorsNotRecord(dynamic _) @@ -238,9 +244,7 @@ namespace Learun.Application.WebApi.Modules public Response GetClassrooms(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetClassrooms(AcademicYearNo, Semester); + var result = arrangeLessonTermIBLL.GetClassrooms(); return Success(result); } public Response GetClassroomsNotRecord(dynamic _) @@ -258,9 +262,17 @@ namespace Learun.Application.WebApi.Modules } public Response GetLessons(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetLessons(AcademicYearNo, Semester); + var result = arrangeLessonTermIBLL.GetLessons(); + return Success(result); + } + public Response GetClassroomType(dynamic _) + { + var result = arrangeLessonTermIBLL.GetClassroomType(); + return Success(result); + } + public Response GetDepartments(dynamic _) + { + var result = arrangeLessonTermIBLL.GetDepartments(); return Success(result); } public Response GetLessonsNotRecord(dynamic _) @@ -283,9 +295,7 @@ namespace Learun.Application.WebApi.Modules public Response GetTeachers(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetTeachers(AcademicYearNo, Semester); + var result = arrangeLessonTermIBLL.GetTeachers(); return Success(result); } public Response GetTeachersNotRecord(dynamic _) @@ -298,9 +308,7 @@ namespace Learun.Application.WebApi.Modules public Response GetClasses(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetClasses(AcademicYearNo, Semester); + var result = arrangeLessonTermIBLL.GetClasses(); return Success(result); } public Response GetClassesNotRecord(dynamic _) @@ -313,9 +321,9 @@ namespace Learun.Application.WebApi.Modules public Response GetStus(dynamic _) { - string AcademicYearNo = Request.Query["AcademicYearNo"]; - string Semester = Request.Query["Semester"]; - var result = arrangeLessonTermIBLL.GetStus(AcademicYearNo, Semester); + //string AcademicYearNo = Request.Query["AcademicYearNo"]; + //string Semester = Request.Query["Semester"]; + var result = arrangeLessonTermIBLL.GetStus(); return Success(result); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs index 01ee73108..28394c30b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs @@ -30,7 +30,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("SEMESTER")] public string Semester { get; set; } /// - /// 基础数据类型(1校区,2系部,3专业,4班级,5课程,6教室,7老师,8学生) + /// 基础数据类型(1校区,2系部,3专业,4班级,5课程,6教室,7老师,8学生,9教室类型, 10部门) /// [Column("STYPEID")] public string STypeId { get; set; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs index 61c0d36ff..0ba103888 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs @@ -242,9 +242,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return data; } - public IEnumerable GetMajors(string academicYearNo, string semester) + public IEnumerable GetMajors() { - var data = arrangeLessonTermService.GetMajors(academicYearNo, semester); + var data = arrangeLessonTermService.GetMajors(); return data; } public IEnumerable GetMajorsNotRecord(string academicYearNo, string semester) @@ -253,9 +253,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return data; } - public IEnumerable GetClassrooms(string academicYearNo, string semester) + public IEnumerable GetClassrooms() { - var data = arrangeLessonTermService.GetClassrooms(academicYearNo, semester); + var data = arrangeLessonTermService.GetClassrooms(); return data; } public IEnumerable GetClassroomsNotRecord(string academicYearNo, string semester) @@ -270,11 +270,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return data; } - public IEnumerable GetLessons(string academicYearNo, string semester) + public IEnumerable GetLessons() { - var data = arrangeLessonTermService.GetLessons(academicYearNo, semester); + var data = arrangeLessonTermService.GetLessons(); return data; } + public IEnumerable GetClassroomType() + { + var data = arrangeLessonTermService.GetClassroomType(); + return data; + } + public IEnumerable GetDepartments() + { + var data = arrangeLessonTermService.GetDepartments(); + return data; + } public IEnumerable GetLessonsNotRecord(string academicYearNo, string semester) { var data = arrangeLessonTermService.GetLessonsNotRecord(academicYearNo, semester); @@ -310,9 +320,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } - public IEnumerable GetDepts(string academicYearNo, string semester) + public IEnumerable GetDepts() { - var data = arrangeLessonTermService.GetDepts(academicYearNo, semester); + var data = arrangeLessonTermService.GetDepts(); return data; } public IEnumerable GetDeptsNotRecord(string academicYearNo, string semester) @@ -321,9 +331,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return data; } - public IEnumerable GetSchools(string academicYearNo, string semester) + public IEnumerable GetSchools() { - var data = arrangeLessonTermService.GetSchools(academicYearNo, semester); + var data = arrangeLessonTermService.GetSchools(); return data; } public IEnumerable GetSchoolsNotRecord(string academicYearNo, string semester) @@ -386,9 +396,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return data; } - public IEnumerable GetTeachers(string academicYearNo, string semester) + public IEnumerable GetTeachers() { - var data = arrangeLessonTermService.GetTeachers(academicYearNo, semester); + var data = arrangeLessonTermService.GetTeachers(); return data; } public IEnumerable GetTeachersNotRecord(string academicYearNo, string semester) @@ -397,9 +407,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return data; } - public IEnumerable GetClasses(string academicYearNo, string semester) + public IEnumerable GetClasses() { - var data = arrangeLessonTermService.GetClasses(academicYearNo, semester); + var data = arrangeLessonTermService.GetClasses(); return data; } public IEnumerable GetClassesNotRecord(string academicYearNo, string semester) @@ -408,9 +418,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return data; } - public IEnumerable GetStus(string academicYearNo, string semester) + public IEnumerable GetStus() { - var data = arrangeLessonTermService.GetStus(academicYearNo, semester); + var data = arrangeLessonTermService.GetStus(); return data; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs index 9e3b330e2..65031b834 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs @@ -20,18 +20,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration IEnumerable AttendanceStudents(Pagination pagination, string queryJson); - IEnumerable GetMajors(string academicYearNo, string semester); + IEnumerable GetMajors(); IEnumerable GetMajorsNotRecord(string academicYearNo, string semester); - IEnumerable GetClassrooms(string academicYearNo, string semester); + IEnumerable GetClassrooms(); IEnumerable GetClassroomsNotRecord(string academicYearNo, string semester); IEnumerable GetClassType(); - IEnumerable GetLessons(string academicYearNo, string semester); + IEnumerable GetLessons(); + IEnumerable GetClassroomType(); + IEnumerable GetDepartments(); + IEnumerable GetLessonsNotRecord(string academicYearNo, string semester); - IEnumerable GetTeachers(string academicYearNo, string semester); + IEnumerable GetTeachers(); IEnumerable GetTeachersNotRecord(string academicYearNo, string semester); - IEnumerable GetClasses(string academicYearNo, string semester); + IEnumerable GetClasses(); IEnumerable GetClassesNotRecord(string academicYearNo, string semester); - IEnumerable GetStus(string academicYearNo, string semester); + IEnumerable GetStus(); IEnumerable GetStusNotRecord(string academicYearNo, string semester); /// @@ -138,9 +141,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetClassroomData(string schoolId); bool GetAny(); - IEnumerable GetDepts(string academicYearNo, string semester); + IEnumerable GetDepts(); IEnumerable GetDeptsNotRecord(string academicYearNo, string semester); - IEnumerable GetSchools(string academicYearNo, string semester); + IEnumerable GetSchools(); IEnumerable GetSchoolsNotRecord(string academicYearNo, string semester); IEnumerable GetLessonTypes(); IEnumerable GetPageListForTeacherWorkload(Pagination paginationobj, string queryJson); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs index 6400be4e8..ce8511d5b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs @@ -1303,14 +1303,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest } } } - public IEnumerable GetMajors(string academicYearNo, string semester) + public IEnumerable GetMajors() { try { //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "3"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "3"); if (aa == null) { this.BaseRepository("CollegeMIS").ExecuteBySql("update CdMajor set SyncFlag='false' "); @@ -1319,14 +1319,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest //数据 var db = BaseRepository("CollegeMIS"); db.BeginTrans(); - var data = db.FindList("select * from CdMajor where CheckMark=1 and ID not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = db.FindList("select * from CdMajor where CheckMark=1 and ID not in (select STableId from ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.ID)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "3"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -1361,14 +1359,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest } } - public IEnumerable GetClassrooms(string academicYearNo, string semester) + public IEnumerable GetClassrooms() { try { //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "6"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "6"); if (aa == null) { this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassroomInfo set SyncFlag='false' "); @@ -1377,14 +1375,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest //数据 var db = BaseRepository("CollegeMIS"); db.BeginTrans(); - var data = db.FindList("select * from ClassroomInfo where CheckMark=1 and ClassroomId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = db.FindList("select * from ClassroomInfo where CheckMark=1 and ClassroomId not in (select STableId from ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.ClassroomId)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "6"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -1432,15 +1428,89 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest throw; } } + + public IEnumerable GetClassroomType() + { + try + { + //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true); + + //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "9"); + if (aa == null) + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update CdClassType set SyncFlag='false' "); + } + + //数据 + var db = BaseRepository("CollegeMIS"); + db.BeginTrans(); + var data = db.FindList("select * from CdClassType where 1=1 and ClassroomTypeId not in (select STableId from ArrangeLessonSync )"); + DateTime syncdate = DateTime.Now; + foreach (var item in data.Select(m => m.ClassroomTypeId)) + { + ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); + alsEntity.Create(); + alsEntity.STypeId = "9"; + alsEntity.SDate = syncdate; + alsEntity.STableId = item; + db.Insert(alsEntity); + } + db.Commit(); + return data; + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } - public IEnumerable GetLessons(string academicYearNo, string semester) + public IEnumerable GetDepartments() { try { //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "5"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "10"); + if (aa == null) + { + this.BaseRepository().ExecuteBySql("update LR_Base_Department set SyncFlag='false' "); + } + + //数据 + var db = BaseRepository("CollegeMIS"); + var dbbase = BaseRepository(); + db.BeginTrans(); + var data = db.FindList("select * from " + dbbase.getDbConnection().Database + ".dbo.LR_Base_Department where F_EnabledMark = 1 AND F_DeleteMark = 0 and F_DepartmentId not in (select STableId from ArrangeLessonSync )"); + DateTime syncdate = DateTime.Now; + foreach (var item in data.Select(m => m.F_DepartmentId)) + { + ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); + alsEntity.Create(); + alsEntity.STypeId = "10"; + alsEntity.SDate = syncdate; + alsEntity.STableId = item; + db.Insert(alsEntity); + } + db.Commit(); + return data; + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + public IEnumerable GetLessons() + { + try + { + //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true); + + //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "5"); if (aa == null) { this.BaseRepository("CollegeMIS").ExecuteBySql("update LessonInfo set SyncFlag='false' "); @@ -1449,14 +1519,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest //数据 var db = BaseRepository("CollegeMIS"); db.BeginTrans(); - var data = db.FindList("select * from LessonInfo where CheckMark=1 and LessonId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = db.FindList("select * from LessonInfo where CheckMark=1 and LessonId not in (select STableId from ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.LessonId)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "5"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -1519,14 +1587,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest } } - public IEnumerable GetTeachers(string academicYearNo, string semester) + public IEnumerable GetTeachers() { try { //var data = BaseRepository("CollegeMIS").FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.EmpInfo a left join adms7ultimate2.dbo.LR_Base_User b on a.EmpNo=b.F_EnCode where a.CheckMark=1"); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "7"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "7"); if (aa == null) { this.BaseRepository("CollegeMIS").ExecuteBySql("update EmpInfo set SyncFlag='false' "); @@ -1536,14 +1604,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest var db = BaseRepository("CollegeMIS"); var dbbase = BaseRepository(); db.BeginTrans(); - var data = db.FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.EmpInfo a left join " + dbbase.getDbConnection().Database + ".dbo.LR_Base_User b on a.EmpNo=b.F_EnCode where a.CheckMark=1 and a.ishaslesson=1 and b.F_DeleteMark=0 and a.EmpId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = db.FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.EmpInfo a left join " + dbbase.getDbConnection().Database + ".dbo.LR_Base_User b on a.EmpNo=b.F_EnCode where a.CheckMark=1 and a.ishaslesson=1 and b.F_DeleteMark=0 and a.EmpId not in (select STableId from ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.EmpId)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "7"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -1579,14 +1645,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest } } - public IEnumerable GetClasses(string academicYearNo, string semester) + public IEnumerable GetClasses() { try { //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "4"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "4"); if (aa == null) { this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set SyncFlag='false' "); @@ -1595,14 +1661,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest //数据 var db = BaseRepository("CollegeMIS"); db.BeginTrans(); - var data = db.FindList("select * from ClassInfo where CheckMark=1 and ClassId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = db.FindList("select * from ClassInfo where CheckMark=1 and ClassId not in (select STableId from ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.ClassId)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "4"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -1637,14 +1701,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest } } - public IEnumerable GetStus(string academicYearNo, string semester) + public IEnumerable GetStus() { try { //var data = BaseRepository("CollegeMIS").FindList(@"select a.StuId,a.StuNo,a.DeptNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'"); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "8"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "8"); if (aa == null) { this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoBasic set SyncFlag='false' "); @@ -1654,14 +1718,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest var db = BaseRepository("CollegeMIS"); var dbbase = BaseRepository(); db.BeginTrans(); - var data = db.FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join " + dbbase.getDbConnection().Database + ".dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark=1 and a.StuId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = db.FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join " + dbbase.getDbConnection().Database + ".dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark=1 and a.StuId not in (select STableId from ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.StuId)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "8"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -1948,14 +2010,14 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les } } - public IEnumerable GetDepts(string academicYearNo, string semester) + public IEnumerable GetDepts() { try { //var data = BaseRepository("CollegeMIS").FindList(); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "2"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "2"); if (aa == null) { this.BaseRepository("CollegeMIS").ExecuteBySql("update CdDept set SyncFlag='false' "); @@ -1964,14 +2026,12 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les //数据 var db = BaseRepository("CollegeMIS"); db.BeginTrans(); - var data = db.FindList("select * from CdDept where DeptId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = db.FindList("select * from CdDept where DeptId not in (select STableId from ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.DeptId)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "2"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -2006,14 +2066,14 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les } } - public IEnumerable GetSchools(string academicYearNo, string semester) + public IEnumerable GetSchools() { try { //var data = BaseRepository().FindList(); //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; - var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "1"); + var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "1"); if (aa == null) { this.BaseRepository().ExecuteBySql("update LR_Base_Company set SyncFlag='false' "); @@ -2022,14 +2082,12 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les //数据 var dbCollegeMIS = BaseRepository("CollegeMIS"); dbCollegeMIS.BeginTrans(); - var data = BaseRepository().FindList("select * from LR_Base_Company where F_CompanyId not in (select STableId from " + dbCollegeMIS.getDbConnection().Database + ".dbo.ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); + var data = BaseRepository().FindList("select * from LR_Base_Company where F_CompanyId not in (select STableId from " + dbCollegeMIS.getDbConnection().Database + ".dbo.ArrangeLessonSync )"); DateTime syncdate = DateTime.Now; foreach (var item in data.Select(m => m.F_CompanyId)) { ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity(); alsEntity.Create(); - alsEntity.AcademicYearNo = academicYearNo; - alsEntity.Semester = semester; alsEntity.STypeId = "1"; alsEntity.SDate = syncdate; alsEntity.STableId = item; @@ -2207,44 +2265,42 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les if (tablename == "CdDept") { //清空同步记录表 - db.ExecuteBySql("delete from ArrangeLessonSync where AcademicYearNo='" + - entity.AcademicYearNo + "' and Semester='" + entity.Semester + - "' and STypeId='2'"); + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='2'"); } if (tablename == "CdMajor") { //清空同步记录表 - db.ExecuteBySql("delete from ArrangeLessonSync where AcademicYearNo='" + - entity.AcademicYearNo + "' and Semester='" + entity.Semester + - "' and STypeId='3'"); + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='3'"); } if (tablename == "ClassInfo") { //清空同步记录表 - db.ExecuteBySql("delete from ArrangeLessonSync where AcademicYearNo='" + - entity.AcademicYearNo + "' and Semester='" + entity.Semester + - "' and STypeId='4'"); + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='4'"); } if (tablename == "ClassroomInfo") { //清空同步记录表 - db.ExecuteBySql("delete from ArrangeLessonSync where AcademicYearNo='" + - entity.AcademicYearNo + "' and Semester='" + entity.Semester + - "' and STypeId='6'"); + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='6'"); } if (tablename == "LessonInfo") { //清空同步记录表 - db.ExecuteBySql("delete from ArrangeLessonSync where AcademicYearNo='" + - entity.AcademicYearNo + "' and Semester='" + entity.Semester + - "' and STypeId='5'"); + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='5'"); } if (tablename == "EmpInfo") { //清空同步记录表 - db.ExecuteBySql("delete from ArrangeLessonSync where AcademicYearNo='" + - entity.AcademicYearNo + "' and Semester='" + entity.Semester + - "' and STypeId='7'"); + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='7'"); + } + if (tablename == "CdClassType") + { + //清空同步记录表 + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='9'"); + } + if (tablename == "LR_Base_Department") + { + //清空同步记录表 + db.ExecuteBySql("delete from ArrangeLessonSync where STypeId='10'"); } //重置基础数据表 db.ExecuteBySql("update " + tablename + " set SyncFlag=0");