@@ -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 | |||
基础表 | |||
@@ -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) { | |||
//调度开始时间 | |||
@@ -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(); | |||
@@ -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); | |||
} | |||
@@ -30,7 +30,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("SEMESTER")] | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// 基础数据类型(1校区,2系部,3专业,4班级,5课程,6教室,7老师,8学生) | |||
/// 基础数据类型(1校区,2系部,3专业,4班级,5课程,6教室,7老师,8学生,9教室类型, 10部门) | |||
/// </summary> | |||
[Column("STYPEID")] | |||
public string STypeId { get; set; } | |||
@@ -242,9 +242,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
return data; | |||
} | |||
public IEnumerable<CdMajorEntity> GetMajors(string academicYearNo, string semester) | |||
public IEnumerable<CdMajorEntity> GetMajors() | |||
{ | |||
var data = arrangeLessonTermService.GetMajors(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetMajors(); | |||
return data; | |||
} | |||
public IEnumerable<CdMajorEntity> GetMajorsNotRecord(string academicYearNo, string semester) | |||
@@ -253,9 +253,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
return data; | |||
} | |||
public IEnumerable<ClassroomInfoEntity> GetClassrooms(string academicYearNo, string semester) | |||
public IEnumerable<ClassroomInfoEntity> GetClassrooms() | |||
{ | |||
var data = arrangeLessonTermService.GetClassrooms(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetClassrooms(); | |||
return data; | |||
} | |||
public IEnumerable<ClassroomInfoEntity> GetClassroomsNotRecord(string academicYearNo, string semester) | |||
@@ -270,11 +270,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
return data; | |||
} | |||
public IEnumerable<LessonInfoEntity> GetLessons(string academicYearNo, string semester) | |||
public IEnumerable<LessonInfoEntity> GetLessons() | |||
{ | |||
var data = arrangeLessonTermService.GetLessons(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetLessons(); | |||
return data; | |||
} | |||
public IEnumerable<CdClassTypeEntity> GetClassroomType() | |||
{ | |||
var data = arrangeLessonTermService.GetClassroomType(); | |||
return data; | |||
} | |||
public IEnumerable<DepartmentEntity> GetDepartments() | |||
{ | |||
var data = arrangeLessonTermService.GetDepartments(); | |||
return data; | |||
} | |||
public IEnumerable<LessonInfoEntity> GetLessonsNotRecord(string academicYearNo, string semester) | |||
{ | |||
var data = arrangeLessonTermService.GetLessonsNotRecord(academicYearNo, semester); | |||
@@ -310,9 +320,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public IEnumerable<CdDeptEntity> GetDepts(string academicYearNo, string semester) | |||
public IEnumerable<CdDeptEntity> GetDepts() | |||
{ | |||
var data = arrangeLessonTermService.GetDepts(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetDepts(); | |||
return data; | |||
} | |||
public IEnumerable<CdDeptEntity> GetDeptsNotRecord(string academicYearNo, string semester) | |||
@@ -321,9 +331,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
return data; | |||
} | |||
public IEnumerable<CompanyEntity> GetSchools(string academicYearNo, string semester) | |||
public IEnumerable<CompanyEntity> GetSchools() | |||
{ | |||
var data = arrangeLessonTermService.GetSchools(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetSchools(); | |||
return data; | |||
} | |||
public IEnumerable<CompanyEntity> GetSchoolsNotRecord(string academicYearNo, string semester) | |||
@@ -386,9 +396,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
return data; | |||
} | |||
public IEnumerable<EmpInfoEntity> GetTeachers(string academicYearNo, string semester) | |||
public IEnumerable<EmpInfoEntity> GetTeachers() | |||
{ | |||
var data = arrangeLessonTermService.GetTeachers(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetTeachers(); | |||
return data; | |||
} | |||
public IEnumerable<EmpInfoEntity> GetTeachersNotRecord(string academicYearNo, string semester) | |||
@@ -397,9 +407,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
return data; | |||
} | |||
public IEnumerable<ClassInfoEntity> GetClasses(string academicYearNo, string semester) | |||
public IEnumerable<ClassInfoEntity> GetClasses() | |||
{ | |||
var data = arrangeLessonTermService.GetClasses(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetClasses(); | |||
return data; | |||
} | |||
public IEnumerable<ClassInfoEntity> GetClassesNotRecord(string academicYearNo, string semester) | |||
@@ -408,9 +418,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
return data; | |||
} | |||
public IEnumerable<StuInfoBasicEntity> GetStus(string academicYearNo, string semester) | |||
public IEnumerable<StuInfoBasicEntity> GetStus() | |||
{ | |||
var data = arrangeLessonTermService.GetStus(academicYearNo, semester); | |||
var data = arrangeLessonTermService.GetStus(); | |||
return data; | |||
} | |||
@@ -20,18 +20,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
IEnumerable<StuSelectLessonListEntity> AttendanceStudents(Pagination pagination, string queryJson); | |||
IEnumerable<CdMajorEntity> GetMajors(string academicYearNo, string semester); | |||
IEnumerable<CdMajorEntity> GetMajors(); | |||
IEnumerable<CdMajorEntity> GetMajorsNotRecord(string academicYearNo, string semester); | |||
IEnumerable<ClassroomInfoEntity> GetClassrooms(string academicYearNo, string semester); | |||
IEnumerable<ClassroomInfoEntity> GetClassrooms(); | |||
IEnumerable<ClassroomInfoEntity> GetClassroomsNotRecord(string academicYearNo, string semester); | |||
IEnumerable<CdClassTypeEntity> GetClassType(); | |||
IEnumerable<LessonInfoEntity> GetLessons(string academicYearNo, string semester); | |||
IEnumerable<LessonInfoEntity> GetLessons(); | |||
IEnumerable<CdClassTypeEntity> GetClassroomType(); | |||
IEnumerable<DepartmentEntity> GetDepartments(); | |||
IEnumerable<LessonInfoEntity> GetLessonsNotRecord(string academicYearNo, string semester); | |||
IEnumerable<EmpInfoEntity> GetTeachers(string academicYearNo, string semester); | |||
IEnumerable<EmpInfoEntity> GetTeachers(); | |||
IEnumerable<EmpInfoEntity> GetTeachersNotRecord(string academicYearNo, string semester); | |||
IEnumerable<ClassInfoEntity> GetClasses(string academicYearNo, string semester); | |||
IEnumerable<ClassInfoEntity> GetClasses(); | |||
IEnumerable<ClassInfoEntity> GetClassesNotRecord(string academicYearNo, string semester); | |||
IEnumerable<StuInfoBasicEntity> GetStus(string academicYearNo, string semester); | |||
IEnumerable<StuInfoBasicEntity> GetStus(); | |||
IEnumerable<StuInfoBasicEntity> GetStusNotRecord(string academicYearNo, string semester); | |||
/// <summary> | |||
@@ -138,9 +141,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <returns></returns> | |||
IEnumerable<SelectModel> GetClassroomData(string schoolId); | |||
bool GetAny(); | |||
IEnumerable<CdDeptEntity> GetDepts(string academicYearNo, string semester); | |||
IEnumerable<CdDeptEntity> GetDepts(); | |||
IEnumerable<CdDeptEntity> GetDeptsNotRecord(string academicYearNo, string semester); | |||
IEnumerable<CompanyEntity> GetSchools(string academicYearNo, string semester); | |||
IEnumerable<CompanyEntity> GetSchools(); | |||
IEnumerable<CompanyEntity> GetSchoolsNotRecord(string academicYearNo, string semester); | |||
IEnumerable<CdLessonTypeEntity> GetLessonTypes(); | |||
IEnumerable<ArrangeLessonTermEntity> GetPageListForTeacherWorkload(Pagination paginationobj, string queryJson); | |||
@@ -1303,14 +1303,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest | |||
} | |||
} | |||
} | |||
public IEnumerable<CdMajorEntity> GetMajors(string academicYearNo, string semester) | |||
public IEnumerable<CdMajorEntity> GetMajors() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<CdMajorEntity>(m => m.CheckMark == true); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "3"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<CdMajorEntity>("select * from CdMajor where CheckMark=1 and ID not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); | |||
var data = db.FindList<CdMajorEntity>("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<ClassroomInfoEntity> GetClassrooms(string academicYearNo, string semester) | |||
public IEnumerable<ClassroomInfoEntity> GetClassrooms() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>(m => m.CheckMark == true); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "6"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<ClassroomInfoEntity>("select * from ClassroomInfo where CheckMark=1 and ClassroomId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); | |||
var data = db.FindList<ClassroomInfoEntity>("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<CdClassTypeEntity> GetClassroomType() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<LessonInfoEntity>(m => m.CheckMark == true); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<CdClassTypeEntity>("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<LessonInfoEntity> GetLessons(string academicYearNo, string semester) | |||
public IEnumerable<DepartmentEntity> GetDepartments() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<LessonInfoEntity>(m => m.CheckMark == true); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "5"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<DepartmentEntity>("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<LessonInfoEntity> GetLessons() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<LessonInfoEntity>(m => m.CheckMark == true); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<LessonInfoEntity>("select * from LessonInfo where CheckMark=1 and LessonId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); | |||
var data = db.FindList<LessonInfoEntity>("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<EmpInfoEntity> GetTeachers(string academicYearNo, string semester) | |||
public IEnumerable<EmpInfoEntity> GetTeachers() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<EmpInfoEntity>("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<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "7"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<EmpInfoEntity>("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<EmpInfoEntity>("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<ClassInfoEntity> GetClasses(string academicYearNo, string semester) | |||
public IEnumerable<ClassInfoEntity> GetClasses() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(m => m.CheckMark == true); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "4"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<ClassInfoEntity>("select * from ClassInfo where CheckMark=1 and ClassId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); | |||
var data = db.FindList<ClassInfoEntity>("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<StuInfoBasicEntity> GetStus(string academicYearNo, string semester) | |||
public IEnumerable<StuInfoBasicEntity> GetStus() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"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<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "8"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<StuInfoBasicEntity>("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<StuInfoBasicEntity>("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<CdDeptEntity> GetDepts(string academicYearNo, string semester) | |||
public IEnumerable<CdDeptEntity> GetDepts() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository("CollegeMIS").FindList<CdDeptEntity>(); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "2"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<CdDeptEntity>("select * from CdDept where DeptId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )"); | |||
var data = db.FindList<CdDeptEntity>("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<CompanyEntity> GetSchools(string academicYearNo, string semester) | |||
public IEnumerable<CompanyEntity> GetSchools() | |||
{ | |||
try | |||
{ | |||
//var data = BaseRepository().FindList<CompanyEntity>(); | |||
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false; | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "1"); | |||
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<CompanyEntity>("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<CompanyEntity>("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"); | |||