diff --git a/DigitalSchoolApi/Controllers/TLMSchoolController.cs b/DigitalSchoolApi/Controllers/TLMSchoolController.cs index d74167b..ca52f8c 100644 --- a/DigitalSchoolApi/Controllers/TLMSchoolController.cs +++ b/DigitalSchoolApi/Controllers/TLMSchoolController.cs @@ -21,6 +21,8 @@ using Learun.Util; using Microsoft.AspNet.SignalR.Client; using Newtonsoft.Json; using Convert = System.Convert; +using DESEncrypt = Learun.Util.DESEncrypt; +using Md5Helper = Learun.Util.Md5Helper; namespace DigitalSchoolApi.Controllers { @@ -33,6 +35,8 @@ namespace DigitalSchoolApi.Controllers private readonly static string _misConnection = ConfigurationManager.ConnectionStrings["ConnectionPfcMisDBString"].ConnectionString; private static string _tlmzyMiddleConnection = ConfigurationManager.ConnectionStrings["TLMZYMiddleDBString"].ConnectionString; + private readonly static string _tlmMiddleConnection =ConfigurationManager.ConnectionStrings["TLMMiddleDBString"].ConnectionString; + /// /// 超过设置的晚归时间后,推送到负责人 @@ -427,6 +431,9 @@ where DateDiff(dd,t.CheckDate,getdate())=0 and t.OutTime<'{lateReturnTime}' and } } + + + #region 数校同步到oracle中间库 /// /// 系部 /// @@ -481,7 +488,6 @@ where DateDiff(dd,t.CheckDate,getdate())=0 and t.OutTime<'{lateReturnTime}' and } } } - /// /// 专业 /// @@ -669,7 +675,6 @@ where DateDiff(dd,t.CheckDate,getdate())=0 and t.OutTime<'{lateReturnTime}' and var aa = _admsConnection.Split(';').First(x => x.Contains("Initial Catalog=")); basedbname = aa.Substring(aa.IndexOf("=") + 1); } - var sqlstring = new StringBuilder(); sqlstring.Append("select t.StuId,t.StuNo,t.DeptNo,t.MajorNo,t.Grade,t.ClassNo,t.StuName,t.GenderNo,t.Birthday,t.IdentityCardNo,t.mobile,u.F_UserId from StuInfoBasic t "); sqlstring.Append(" left join " + basedbname + ".dbo.LR_Base_User u on t.StuNo=u.F_Account and t.StuName=u.F_RealName and t.IdentityCardNo=u.F_IdentityCardNo "); @@ -844,6 +849,379 @@ where DateDiff(dd,t.CheckDate,getdate())=0 and t.OutTime<'{lateReturnTime}' and } } + #endregion + + #region oracle同步到数校 + + /// + /// 从oracle中间库同步系部数据 + /// + public static void SyncDeptOracle() + { + try + { + IEnumerable entityList = null; + using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection)) + { + entityList = conn.Query("SELECT * FROM \"CX_JW_YX\" WHERE YXBH in (SELECT YXBH FROM \"CX_JW_ZY\" GROUP BY YXBH)"); + } + using (IDbConnection conn = new SqlConnection(_misConnection)) + { + try + { + var maxSort = -1; + try + { + maxSort = conn.QueryFirstOrDefault("select MAX(DeptSort) FROM CdDept"); + } + catch (Exception e) + { + maxSort = -1; + } + + //插入sql + foreach (var item in entityList) + { + CdDeptEntity model = null; + using (IDbConnection xbconn = new SqlConnection(_misConnection)) + { + model = xbconn.QueryFirstOrDefault($"select * from CdDept where DeptNo='{item.YXBH}'"); + } + if (model == null) + { + maxSort++; + var id = item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N") : Guid.NewGuid(); + //没有就新增 + var sql = + "INSERT INTO CdDept(DeptId, DeptNo, DeptName, DeptShortName, DeptEnBrief, DeptSort, DeptEnShort, DeptDirector, " + + "DeptpSychology, TeachSecretary, DeptOldName, F_SchoolId, SyncFlag, DeptSubsidizer) " + + $"VALUES ('{id}', '{item.YXBH}', '{item.YXMC}', '', '', {maxSort}, NULL,NULL," + + " NULL, NULL, NULL, '207fa1a9-160c-4943-a89b-8fa4db0547ce', '0',NULL);"; + conn.Execute(sql); + } + else + { + //存在就修改 + var sql = $"UPDATE CdDept SET DeptName='{item.YXMC}' where DeptNo='{model.DeptNo}';"; + conn.Execute(sql); + } + + } + //插入数据同步结果 + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步系部信息完成','系部同步数量:" + + entityList.Count() + "条',getdate())"); + } + } + catch (Exception e) + { + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步系部信息异常','" + + e.Message + "',getdate())"); + } + } + } + } + catch (Exception e) + { + using (IDbConnection conn = new SqlConnection(_admsConnection)) + { + conn.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步系部信息异常','错误信息:" + + e.Message + "',getdate())"); + } + } + } + /// + /// 从oracle中间库同步专业数据 Photo数据 + /// + public static void SyncMajorOracle() + { + try + { + IEnumerable entityList = null; + using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection)) + { + entityList = conn.Query("SELECT * FROM \"CX_JW_ZY\""); + } + using (IDbConnection conn = new SqlConnection(_misConnection)) + { + try + { + //插入sql + foreach (var item in entityList) + { + CdMajorEntity model = null; + using (IDbConnection xbconn = new SqlConnection(_misConnection)) + { + model = xbconn.QueryFirstOrDefault($"select * from CdMajor where MajorNo='{item.ZYBH}'"); + } + + if (model == null) + { + var id = item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N") : Guid.NewGuid(); + var sql = + $"INSERT INTO CdMajor([ID], [MajorNo], [MajorName], [LengthOfSchooling], [SubjectSpeciesNo], [DeptNo], [GovMajorNo], [GovMajorName], " + + $"[MajorNameEn], [SubjectSpeciesNo1], [GraduateNo], [CheckMark], [MajorNameBrief], [MajorDirector], [FreshStuMark], [F_SchoolId], [SyncFlag], " + + $"[RecruitObject], [DevelopLevel], [Certificate], [DevelopTarget], [Introduce], [Photo], [Year], [Province], [City], [Area]) " + + $"VALUES ('{id}', '{item.ZYBH}', '{item.ZYMC}', {Convert.ToInt32(item.XZ.Replace("年", ""))}, ''," + + $" '{item.YXBH}', '{item.ZYBH}', '{item.ZYMC}', '', NULL, '2', '1', '', '', NULL, '207fa1a9-160c-4943-a89b-8fa4db0547ce', '0', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL);"; + conn.Execute(sql); + } + else + { + var sql = $"UPDATE CdMajor SET MajorName='{item.ZYMC}',LengthOfSchooling={Convert.ToInt32(item.XZ.Replace("年", ""))},DeptNo='{item.YXBH}',GovMajorName='{item.ZYMC}' where MajorNo='{model.MajorNo}';"; + conn.Execute(sql); + } + } + //插入数据同步结果 + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步专业信息完成','专业同步数量:" + + entityList.Count() + "条',getdate())"); + } + } + catch (Exception e) + { + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步专业信息异常','" + + e.Message + "',getdate())"); + } + } + } + } + catch (Exception e) + { + using (IDbConnection conn = new SqlConnection(_admsConnection)) + { + conn.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步专业信息异常','错误信息:" + + e.Message + "',getdate())"); + } + } + } + /// + /// 从oracle中间库同步班级数据 + /// + public static void SyncClassInfoOracle() + { + try + { + IEnumerable entityList = null; + using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection)) + { + entityList = conn.Query("SELECT * FROM \"CX_JW_BJ\""); + } + using (IDbConnection conn = new SqlConnection(_misConnection)) + { + try + { + //插入sql + foreach (var item in entityList) + { + ClassInfoEntity model = null; + using (IDbConnection xbconn = new SqlConnection(_misConnection)) + { + model = xbconn.QueryFirstOrDefault($"select * from ClassInfo where ClassNo='{item.BJBH}'"); + } + + if (model == null) + { + var id = item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N") : Guid.NewGuid(); + var sql = + "INSERT INTO ClassInfo([ClassId], [ClassNo], [ClassName], [DeptNo], [MajorNo], [MajorDetailNo], [MajorDetailName], [Grade], " + + "[StuNum], [SerialNum], [ClassDiredctorNo], [ClassTutorNo], [ClassNameFull], [CheckMark], [SyncFlag], [ClassType], [IsSeparate])" + + $" VALUES ('{id}', '{item.BJBH}', '{item.BJMC}', '{item.YXBH}', '{item.ZYBH}', NULL, NULL," + + $" '{item.SZNJ.Substring(item.SZNJ.Length - 2)}', 1, '', '', '', NULL, '1', '0', '', '0');"; + conn.Execute(sql); + } + else + { + var sql = + $"UPDATE ClassInfo SET ClassName='{item.BJMC}',DeptNo='{item.YXBH}',MajorNo='{item.ZYBH}',Grade='{item.SZNJ.Substring(item.SZNJ.Length - 2)}' where ClassNo='{model.ClassNo}';"; + conn.Execute(sql); + } + } + //插入数据同步结果 + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步班级信息完成','班级同步数量:" + + entityList.Count() + "条',getdate())"); + } + } + catch (Exception e) + { + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步班级信息异常','" + + e.Message + "',getdate())"); + } + } + } + } + catch (Exception e) + { + using (IDbConnection conn = new SqlConnection(_admsConnection)) + { + conn.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步班级信息异常','错误信息:" + + e.Message + "',getdate())"); + } + } + } + /// + /// 从oracle中间库同步学生数据 + /// + public static void SyncStuInfoOracle(string date) + { + try + { + //增加列sql + //ALTER TABLE StuInfoBasic ADD XJZT nvarchar(50); --增加XJZT 学籍状态 + //EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'学籍状态', @level0type = N'Schema', @level0name = dbo, @level1type = N'Table', @level1name = StuInfoBasic, @level2type = N'Column', @level2name = XJZT; + //ALTER TABLE StuInfoBasic ADD XSDQZT nvarchar(50); --增加XSDQZT 学生当前状态 + //EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'学生当前状态', @level0type = N'Schema', @level0name = dbo, @level1type = N'Table', @level1name = StuInfoBasic, @level2type = N'Column', @level2name = XSDQZT; + if (string.IsNullOrEmpty(date)) + { + date = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); + } + IEnumerable entityList = null; + using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection)) + { + entityList = conn.Query($"SELECT ID,XH,KSH,YXBH,ZYBH,BJBH,SZNJ,XM,XMPY,XB,CSRQ,LXDH,SFZX,XJZT,XSDQZT,ZZMM,MZ,SFZJH FROM \"CX_JW_XSXX\" WHERE UPDATE_DATE> TO_DATE('{date}', 'YYYY-MM-DD')"); + } + using (IDbConnection conn = new SqlConnection(_misConnection)) + { + try + { + //插入sql + foreach (var item in entityList) + { + StuInfoBasicEntity model = null; + using (IDbConnection xbconn = new SqlConnection(_misConnection)) + { + model = xbconn.QueryFirstOrDefault($"select * from StuInfoBasic where StuNo='{item.XH}'"); + } + var mzSql = + $"SELECT t.F_ItemValue FROM LR_Base_DataItemDetail t INNER JOIN LR_Base_DataItem t2 ON t.F_ItemId = t2.F_ItemId WHERE t2.F_ItemCode = 'National' AND t.F_ItemName='{item.MZ}'"; + var xb = item.XB == "男" ? 1 : 0; + var MZ = ""; + if (model == null) + { + var basedbname = string.Empty; + if (_admsConnection.IndexOf("database=") > 0) + { + var aa = _admsConnection.Split(';').First(x => x.Contains("database=")); + basedbname = aa.Substring(aa.IndexOf("=") + 1); + } + else if (_admsConnection.IndexOf("Initial Catalog=") > 0) + { + var aa = _admsConnection.Split(';').First(x => x.Contains("Initial Catalog=")); + basedbname = aa.Substring(aa.IndexOf("=") + 1); + } + var key = Md5Helper.Encrypt(CreateNo(), 16).ToLower(); + var pwd = Md5Helper.Encrypt(DESEncrypt.Encrypt(Md5Helper.Encrypt("tlmzy123456", 32).ToLower(), key).ToLower(), 32).ToLower(); + var id= item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N"):Guid.NewGuid(); + var sql = + "INSERT INTO StuInfoBasic(StuId,StuNo,StuCode,NoticeNo,GraduateYear,ksh,DeptNo,MajorNo,Grade,ClassNo,StuName,SpellFull,GenderNo,Birthday,PartyFaceNo," + + "FamilyOriginNo,NationalityNo,ResidenceNo,HealthStatusNo,GraduateNo,OverseasChineseNo,GoodAt,IdentityCardNo,InSchoolAddress," + + "InSchoolTelephone,Remark,mobile,CheckMark,InSchoolStatus,F_SchoolId,EduSystem,StudyModality,XJZT,XSDQZT) " + + $"VALUES('{id}','{item.XH}','{item.XH}','{item.XH}','','{item.KSH}', '{item.YXBH}', '{item.ZYBH}'," + + $"'{item.SZNJ.Substring(item.SZNJ.Length - 2)}','{item.BJBH}','{item.XM}', '{item.XMPY}','{xb}','{item.CSRQ}','{GetZZMM(item.ZZMM)}',''," + + $"'{MZ}','','1','2','0','','{item.SFZJH}','','',''," + + $"'{item.LXDH}','1','{item.SFZX}','207fa1a9-160c-4943-a89b-8fa4db0547ce', '2', '1','{item.XJZT}','{item.XSDQZT}');"; + //conn.Execute(sql); + var userSql = + $"INSERT INTO {basedbname}.dbo.LR_Base_User(F_UserId,F_EnCode,F_Account,F_Password,F_Secretkey,F_RealName,F_Gender,F_CompanyId," + + $"F_DepartmentId,F_DeleteMark,F_EnabledMark,F_Description,F_CreateDate,F_CreateUserId,F_CreateUserName,F_IdentityCardNo) VALUES('{Guid.NewGuid():D}'," + + $"'{item.XH}','{item.XH}','{pwd}','{key}','{item.XM}','{xb}','207fa1a9-160c-4943-a89b-8fa4db0547ce','{item.YXBH}',0,1,'学生'," + + $"'{DateTime.Now:yyyy-MM-dd hh:mm:ss}','System','数据同步','{item.SFZJH}');"; + conn.Execute(sql+userSql); + } + else + { + var sql = + $"UPDATE StuInfoBasic SET StuName='{item.XM}',SpellFull='{item.XMPY}',GenderNo={xb},Birthday='{item.CSRQ}',IdentityCardNo='{item.SFZJH}'," + + $"Grade='{item.SZNJ.Substring(item.SZNJ.Length - 2)}',DeptNo='{item.YXBH}'," + + $"MajorNo='{item.ZYBH}',ClassNo='{item.BJBH}',ksh='{item.KSH}',mobile='{item.LXDH}'," + + $"InSchoolStatus='{item.SFZX}', XJZT='{item.XJZT}',XSDQZT='{item.XSDQZT}' where StuNo='{model.StuNo}';"; + conn.Execute(sql); + } + } + //插入数据同步结果 + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步学生信息完成','学生同步数量:" + + entityList.Count() + "条',getdate())"); + } + } + catch (Exception e) + { + using (IDbConnection conncore = new SqlConnection(_admsConnection)) + { + conncore.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步学生信息异常','" + + e.Message + "',getdate())"); + } + } + } + } + catch (Exception e) + { + using (IDbConnection conn = new SqlConnection(_admsConnection)) + { + conn.Execute( + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'往塔里木中间库同步学生信息异常','错误信息:" + + e.Message + "',getdate())"); + } + } + } + + /// + /// 获取政治面貌代码 + /// + /// + private static string GetZZMM(string zzmmstr) + { + if (string.IsNullOrEmpty(zzmmstr)) + { + return "13"; + } + if (zzmmstr.Contains("共青") || zzmmstr.Contains("青年")) + { + return "03"; + } + else if (zzmmstr.Contains("群众")) + { + return "13"; + } + + return "13"; + } + /// + /// 自动生成编号 201008251145409865 + /// + /// + private static string CreateNo() + { + Random random = new Random(); + string strRandom = random.Next(1000, 10000).ToString(); //生成编号 + string code = DateTime.Now.ToString("yyyyMMddHHmmss") + strRandom;//形如 + return code; + } + + #endregion + /// /// 发送邮件提醒 /// diff --git a/DigitalSchoolApi/Controllers/YKTController.cs b/DigitalSchoolApi/Controllers/YKTController.cs index 027ea9b..7ef5251 100644 --- a/DigitalSchoolApi/Controllers/YKTController.cs +++ b/DigitalSchoolApi/Controllers/YKTController.cs @@ -14,12 +14,50 @@ using Learun.Application.Organization; namespace DigitalSchoolApi.Controllers { - public class YKTController : BaseController + public class YKTController : BaseController { private readonly static string _admsConnection = ConfigurationManager.ConnectionStrings["CoreDBString"].ConnectionString; private readonly static string _misConnection = ConfigurationManager.ConnectionStrings["ConnectionPfcMisDBString"].ConnectionString; - - + /// + /// 从oracle中间库中同步学生 + /// + /// + [HttpGet] + public IHttpActionResult SyncStuInfoOracle(string date) + { + TLMSchoolController.SyncStuInfoOracle(date); + return Ok("同步成功"); + } + /// + /// 从oracle中间库中同步院系 + /// + /// + [HttpGet] + public IHttpActionResult SyncDeptOracle() + { + TLMSchoolController.SyncDeptOracle(); + return Ok("同步成功"); + } + /// + /// 从oracle中间库中同步专业 + /// + /// + [HttpGet] + public IHttpActionResult SyncMajorOracle() + { + TLMSchoolController.SyncMajorOracle(); + return Ok("同步成功"); + } + /// + /// 从oracle中间库中同步班级 + /// + /// + [HttpGet] + public IHttpActionResult SyncClassInfoOracle() + { + TLMSchoolController.SyncClassInfoOracle(); + return Ok("同步成功"); + } /// /// 西昌一卡通推送 /// @@ -451,7 +489,29 @@ namespace DigitalSchoolApi.Controllers //TLMSchoolController.CloseAccount(); return Ok(); } - + /// + /// 塔里木从超星oracle中间库同步学生基础数据到数校 + /// + public IHttpActionResult SyncTLMZYMiddleToBaseInfo() + { + //院系 + RecurringJob.AddOrUpdate("SyncTLMZYMiddleToDepartment", + () => TLMSchoolController.SyncDeptOracle(), + Cron.Daily(1), TimeZoneInfo.Local); + //专业 + RecurringJob.AddOrUpdate("SyncTLMZYMiddleToMajor", + () => TLMSchoolController.SyncMajorOracle(), + Cron.Daily(1), TimeZoneInfo.Local); + //班级 + RecurringJob.AddOrUpdate("SyncTLMZYMiddleToClassInfo", + () => TLMSchoolController.SyncClassInfoOracle(), + Cron.Daily(1), TimeZoneInfo.Local); + //学生 + RecurringJob.AddOrUpdate("SyncTLMZYMiddleToStuInfo", + () => TLMSchoolController.SyncStuInfoOracle(null), + Cron.Daily(1), TimeZoneInfo.Local); + return Ok(); + } /// /// 往塔里木oracle中间库中同步数校基础信息 /// diff --git a/DigitalSchoolApi/DigitalSchoolApi.csproj b/DigitalSchoolApi/DigitalSchoolApi.csproj index b8b867e..c1c4720 100644 --- a/DigitalSchoolApi/DigitalSchoolApi.csproj +++ b/DigitalSchoolApi/DigitalSchoolApi.csproj @@ -14,7 +14,8 @@ DigitalSchoolApi v4.6.1 true - + + @@ -424,6 +425,7 @@ + diff --git a/DigitalSchoolApi/Models/OracleEducationalSystemInfoSync.cs b/DigitalSchoolApi/Models/OracleEducationalSystemInfoSync.cs new file mode 100644 index 0000000..216a591 --- /dev/null +++ b/DigitalSchoolApi/Models/OracleEducationalSystemInfoSync.cs @@ -0,0 +1,181 @@ +using System; + +namespace DigitalSchoolApi.Models +{ + /// + /// 塔里木同步oracle中间库数据实体 + /// + public class OracleEducationalSystemInfoSync + { + + } + /// + /// 院系 + /// + public class CX_JW_YX + { + public string ID { get; set; } + /// + /// 院系编号 + /// + public string YXBH { get; set; } + /// + /// 院系名称 + /// + public string YXMC { get; set; } + } + /// + /// 专业 + /// + public class CX_JW_ZY + { + public string ID { get; set; } + /// + /// 专业编号 + /// + public string ZYBH { get; set; } + /// + /// 专业名称 + /// + public string ZYMC { get; set; } + /// + /// 专业简称 + /// + public string ZYJC { get; set; } + /// + /// 专业英文名称 + /// + public string ZYYWMC { get; set; } + /// + /// 所属院系(CX_JW_YX中的ID字段) + /// + public string YXID { get; set; } + /// + /// 院系编号 + /// + public string YXBH { get; set; } + /// + /// 学制 + /// + public string XZ { get; set; } + /// + ///培养层次 + /// + public string PYCC { get; set; } + } + /// + /// 班级 + /// + public class CX_JW_BJ + { + public string ID { get; set; } + /// + /// 班级编号 + /// + public string BJBH { get; set; } + /// + /// 班级名称 + /// + public string BJMC { get; set; } + /// + /// 院系(CX_JW_YX中的ID字段) + /// + public string YXID { get; set; } + /// + /// 院系编号 + /// + public string YXBH { get; set; } + /// + /// 专业(CX_JW_ZY中的ID字段) + /// + public string ZYID { get; set; } + /// + /// 专业编号 + /// + public string ZYBH { get; set; } + /// + /// 年级 + /// + public string SZNJ { get; set; } + /// + /// 校区(CX_JW_XQ中的ID字段) + /// + public string XQID { get; set; } + /// + /// 校区(CX_JW_XQ中的ID字段) + /// + public string KYZT { get; set; } + } + /// + /// 学生信息 + /// + public class CX_JW_XSXX + { + public string ID { get; set; } + /// + /// 学号 + /// + public string XH { get; set; } + /// + /// 姓名 + /// + public string XM { get; set; } + /// + /// 姓名拼音 + /// + public string XMPY { get; set; } + /// + /// 性别 + /// + public string XB { get; set; } + /// + /// 出生日期 + /// + public string CSRQ { get; set; } + /// + /// 身份证件号 + /// + public string SFZJH { get; set; } + /// + /// 所在年级 + /// + public string SZNJ { get; set; } + public string YXBH { get; set; } + /// + /// 专业编号 + /// + public string ZYBH { get; set; } + /// + /// 班级编号 + /// + public string BJBH { get; set; } + /// + /// 学籍状态 + /// + public string XJZT { get; set; } + /// + /// 是否在校 + /// + public string SFZX { get; set; } + /// + /// 学生当前状态 + /// + public string XSDQZT { get; set; } + /// + /// 考生号 + /// + public string KSH { get; set; } + /// + /// 民族 + /// + public string MZ { get; set; } + /// + /// 联系电话 + /// + public string LXDH { get; set; } + /// + /// 政治面貌 + /// + public string ZZMM { get; set; } + } +} \ No newline at end of file diff --git a/DigitalSchoolApi/Web.config b/DigitalSchoolApi/Web.config index 0ca5377..3a518d1 100644 --- a/DigitalSchoolApi/Web.config +++ b/DigitalSchoolApi/Web.config @@ -53,9 +53,11 @@ - + + - + + @@ -67,6 +69,7 @@ +