dyy 2 mesi fa
parent
commit
43d4ba4ceb
5 ha cambiato i file con 633 aggiunte e 9 eliminazioni
  1. +380
    -2
      DigitalSchoolApi/Controllers/TLMSchoolController.cs
  2. +64
    -4
      DigitalSchoolApi/Controllers/YKTController.cs
  3. +3
    -1
      DigitalSchoolApi/DigitalSchoolApi.csproj
  4. +181
    -0
      DigitalSchoolApi/Models/OracleEducationalSystemInfoSync.cs
  5. +5
    -2
      DigitalSchoolApi/Web.config

+ 380
- 2
DigitalSchoolApi/Controllers/TLMSchoolController.cs Vedi File

@@ -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;


/// <summary>
/// 超过设置的晚归时间后,推送到负责人
@@ -427,6 +431,9 @@ where DateDiff(dd,t.CheckDate,getdate())=0 and t.OutTime<'{lateReturnTime}' and
}
}



#region 数校同步到oracle中间库
/// <summary>
/// 系部
/// </summary>
@@ -481,7 +488,6 @@ where DateDiff(dd,t.CheckDate,getdate())=0 and t.OutTime<'{lateReturnTime}' and
}
}
}

/// <summary>
/// 专业
/// </summary>
@@ -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同步到数校

/// <summary>
/// 从oracle中间库同步系部数据
/// </summary>
public static void SyncDeptOracle()
{
try
{
IEnumerable<CX_JW_YX> entityList = null;
using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection))
{
entityList = conn.Query<CX_JW_YX>("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<int>("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<CdDeptEntity>($"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,'从超星oracle中间库同步系部信息到数校完成','系部同步数量:" +
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,'从超星oracle中间库同步系部信息到数校异常','" +
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,'从超星oracle中间库同步系部信息到数校异常','错误信息:" +
e.Message + "',getdate())");
}
}
}
/// <summary>
/// 从oracle中间库同步专业数据 Photo数据
/// </summary>
public static void SyncMajorOracle()
{
try
{
IEnumerable<CX_JW_ZY> entityList = null;
using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection))
{
entityList = conn.Query<CX_JW_ZY>("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<CdMajorEntity>($"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,'从超星oracle中间库同步专业信息到数校完成','专业同步数量:" +
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,'从超星oracle中间库同步专业信息到数校异常','" +
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,'从超星oracle中间库同步专业信息到数校异常','错误信息:" +
e.Message + "',getdate())");
}
}
}
/// <summary>
/// 从oracle中间库同步班级数据
/// </summary>
public static void SyncClassInfoOracle()
{
try
{
IEnumerable<CX_JW_BJ> entityList = null;
using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection))
{
entityList = conn.Query<CX_JW_BJ>("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<ClassInfoEntity>($"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,'从超星oracle中间库同步班级信息到数校完成','班级同步数量:" +
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,'从超星oracle中间库同步班级信息到数校异常','" +
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,'从超星oracle中间库同步班级信息到数校异常','错误信息:" +
e.Message + "',getdate())");
}
}
}
/// <summary>
/// 从oracle中间库同步学生数据
/// </summary>
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<CX_JW_XSXX> entityList = null;
using (IDbConnection conn = new OracleConnection(_tlmMiddleConnection))
{
entityList = conn.Query<CX_JW_XSXX>($"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<StuInfoBasicEntity>($"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,'从超星oracle中间库同步学生信息到数校完成','学生同步数量:" +
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,'从超星oracle中间库同步学生信息到数校异常','" +
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,'从超星oracle中间库同步学生信息到数校异常','错误信息:" +
e.Message + "',getdate())");
}
}
}

/// <summary>
/// 获取政治面貌代码
/// </summary>
/// <returns></returns>
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";
}
/// <summary>
/// 自动生成编号 201008251145409865
/// </summary>
/// <returns></returns>
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

/// <summary>
/// 发送邮件提醒
/// </summary>


+ 64
- 4
DigitalSchoolApi/Controllers/YKTController.cs Vedi File

@@ -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;


/// <summary>
/// 从oracle中间库中同步学生
/// </summary>
/// <returns></returns>
[HttpGet]
public IHttpActionResult SyncStuInfoOracle(string date)
{
TLMSchoolController.SyncStuInfoOracle(date);
return Ok("同步成功");
}
/// <summary>
/// 从oracle中间库中同步院系
/// </summary>
/// <returns></returns>
[HttpGet]
public IHttpActionResult SyncDeptOracle()
{
TLMSchoolController.SyncDeptOracle();
return Ok("同步成功");
}
/// <summary>
/// 从oracle中间库中同步专业
/// </summary>
/// <returns></returns>
[HttpGet]
public IHttpActionResult SyncMajorOracle()
{
TLMSchoolController.SyncMajorOracle();
return Ok("同步成功");
}
/// <summary>
/// 从oracle中间库中同步班级
/// </summary>
/// <returns></returns>
[HttpGet]
public IHttpActionResult SyncClassInfoOracle()
{
TLMSchoolController.SyncClassInfoOracle();
return Ok("同步成功");
}
/// <summary>
/// 西昌一卡通推送
/// </summary>
@@ -451,7 +489,29 @@ namespace DigitalSchoolApi.Controllers
//TLMSchoolController.CloseAccount();
return Ok();
}

/// <summary>
/// 塔里木从超星oracle中间库同步学生基础数据到数校
/// </summary>
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();
}
/// <summary>
/// 往塔里木oracle中间库中同步数校基础信息
/// </summary>


+ 3
- 1
DigitalSchoolApi/DigitalSchoolApi.csproj Vedi File

@@ -14,7 +14,8 @@
<AssemblyName>DigitalSchoolApi</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<Use64BitIISExpress>
</Use64BitIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
@@ -424,6 +425,7 @@
<Compile Include="Models\NewsEntity.cs" />
<Compile Include="Models\EmailManagementEntity.cs" />
<Compile Include="Models\Acc_DormitoryBuildEntity.cs" />
<Compile Include="Models\OracleEducationalSystemInfoSync.cs" />
<Compile Include="Models\XCStudentEntity.cs" />
<Compile Include="Models\EmpInfoEntity.cs" />
<Compile Include="Models\ShowAuthorizeEntity.cs" />


+ 181
- 0
DigitalSchoolApi/Models/OracleEducationalSystemInfoSync.cs Vedi File

@@ -0,0 +1,181 @@
using System;

namespace DigitalSchoolApi.Models
{
/// <summary>
/// 塔里木同步oracle中间库数据实体
/// </summary>
public class OracleEducationalSystemInfoSync
{

}
/// <summary>
/// 院系
/// </summary>
public class CX_JW_YX
{
public string ID { get; set; }
/// <summary>
/// 院系编号
/// </summary>
public string YXBH { get; set; }
/// <summary>
/// 院系名称
/// </summary>
public string YXMC { get; set; }
}
/// <summary>
/// 专业
/// </summary>
public class CX_JW_ZY
{
public string ID { get; set; }
/// <summary>
/// 专业编号
/// </summary>
public string ZYBH { get; set; }
/// <summary>
/// 专业名称
/// </summary>
public string ZYMC { get; set; }
/// <summary>
/// 专业简称
/// </summary>
public string ZYJC { get; set; }
/// <summary>
/// 专业英文名称
/// </summary>
public string ZYYWMC { get; set; }
/// <summary>
/// 所属院系(CX_JW_YX中的ID字段)
/// </summary>
public string YXID { get; set; }
/// <summary>
/// 院系编号
/// </summary>
public string YXBH { get; set; }
/// <summary>
/// 学制
/// </summary>
public string XZ { get; set; }
/// <summary>
///培养层次
/// </summary>
public string PYCC { get; set; }
}
/// <summary>
/// 班级
/// </summary>
public class CX_JW_BJ
{
public string ID { get; set; }
/// <summary>
/// 班级编号
/// </summary>
public string BJBH { get; set; }
/// <summary>
/// 班级名称
/// </summary>
public string BJMC { get; set; }
/// <summary>
/// 院系(CX_JW_YX中的ID字段)
/// </summary>
public string YXID { get; set; }
/// <summary>
/// 院系编号
/// </summary>
public string YXBH { get; set; }
/// <summary>
/// 专业(CX_JW_ZY中的ID字段)
/// </summary>
public string ZYID { get; set; }
/// <summary>
/// 专业编号
/// </summary>
public string ZYBH { get; set; }
/// <summary>
/// 年级
/// </summary>
public string SZNJ { get; set; }
/// <summary>
/// 校区(CX_JW_XQ中的ID字段)
/// </summary>
public string XQID { get; set; }
/// <summary>
/// 校区(CX_JW_XQ中的ID字段)
/// </summary>
public string KYZT { get; set; }
}
/// <summary>
/// 学生信息
/// </summary>
public class CX_JW_XSXX
{
public string ID { get; set; }
/// <summary>
/// 学号
/// </summary>
public string XH { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string XM { get; set; }
/// <summary>
/// 姓名拼音
/// </summary>
public string XMPY { get; set; }
/// <summary>
/// 性别
/// </summary>
public string XB { get; set; }
/// <summary>
/// 出生日期
/// </summary>
public string CSRQ { get; set; }
/// <summary>
/// 身份证件号
/// </summary>
public string SFZJH { get; set; }
/// <summary>
/// 所在年级
/// </summary>
public string SZNJ { get; set; }
public string YXBH { get; set; }
/// <summary>
/// 专业编号
/// </summary>
public string ZYBH { get; set; }
/// <summary>
/// 班级编号
/// </summary>
public string BJBH { get; set; }
/// <summary>
/// 学籍状态
/// </summary>
public string XJZT { get; set; }
/// <summary>
/// 是否在校
/// </summary>
public string SFZX { get; set; }
/// <summary>
/// 学生当前状态
/// </summary>
public string XSDQZT { get; set; }
/// <summary>
/// 考生号
/// </summary>
public string KSH { get; set; }
/// <summary>
/// 民族
/// </summary>
public string MZ { get; set; }
/// <summary>
/// 联系电话
/// </summary>
public string LXDH { get; set; }
/// <summary>
/// 政治面貌
/// </summary>
public string ZZMM { get; set; }
}
}

+ 5
- 2
DigitalSchoolApi/Web.config Vedi File

@@ -53,9 +53,11 @@
</appSettings>
<connectionStrings>
<!--<add name="ConnectionPfcMisDBString" connectionString="server=112.45.152.8;database=CollegeMIS;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=qj@2018;" providerName="System.Data.SqlClient" />-->
<add name="ConnectionPfcMisDBString" connectionString="server=8.141.155.183,53314;database=CollegeMIS_西昌;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=bjqjkj@2014~2015!;" providerName="System.Data.SqlClient" />
<!--<add name="ConnectionPfcMisDBString" connectionString="server=8.141.155.183,53314;database=CollegeMIS_长阳;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=bjqjkj@2014~2015!;" providerName="System.Data.SqlClient" />-->
<add name="ConnectionPfcMisDBString" connectionString="server=8.141.155.183,53314;database=CollegeMIS_塔里木;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=bjqjkj@2014~2015!;" providerName="System.Data.SqlClient" />
<add name="ConnectionPfcMisDBString2" connectionString="server=192.168.100.225;database=CollegeMIS;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=Jykj@2019;" providerName="System.Data.SqlClient" />
<add name="CoreDBString" connectionString="server=8.141.155.183,53314;database=adms7ultimate2_西昌;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=bjqjkj@2014~2015!;" providerName="System.Data.SqlClient" />
<!--<add name="CoreDBString" connectionString="server=8.141.155.183,53314;database=adms7ultimate2_长阳;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=bjqjkj@2014~2015!;" providerName="System.Data.SqlClient" />-->
<add name="CoreDBString" connectionString="server=8.141.155.183,53314;database=adms7ultimate2_塔里木;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=bjqjkj@2014~2015!;" providerName="System.Data.SqlClient" />
<add name="CoreDBString2" connectionString="server=192.168.100.225;database=adms7ultimate2;Max Pool Size=1000;Min Pool Size=5;UID=sa;Pwd=Jykj@2019;" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=8.141.155.183,53314;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="YKTDBString" connectionString="Data Source=xcykt;Persist Security Info=True;User ID=xcysdata;Password=xcysdata2019;Unicode=True" providerName="System.Data.OracleClient" />
@@ -67,6 +69,7 @@
<add name="YongyouDb" connectionString="Server=8.141.155.183,53314;Password=bjqjkj@2014~2015!;User ID=sa; Initial Catalog=u8gx" providerName="System.Data.SqlClient" />
<add name="XCMiddleDBString" connectionString="Data Source=FSZJK;Persist Security Info=True;User ID=fszjk;Password=fszjk20220705;Unicode=True" providerName="System.Data.OracleClient" />
<add name="HLZJMiddleDBString" connectionString="Data Source=ORCL;Persist Security Info=True;User ID=digitalschool;Password=digitalschool;Unicode=True" providerName="System.Data.OracleClient" />
<add name="TLMMiddleDBString" connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=libraries.chaoxing.com)(PORT=38023)))(CONNECT_DATA=(SERVICE_NAME=jwxt01)));User Id=TLM_XG;Password=bbfc2d7e4fd0bd829b2f;Pooling='true';Max Pool Size=150" providerName="System.Data.OracleClient" />

</connectionStrings>
<!--


Caricamento…
Annulla
Salva