Browse Source

考勤机抓图

master^2
王晓寒 4 weeks ago
parent
commit
fa056c417f
12 changed files with 6205 additions and 35 deletions
  1. +33
    -0
      DigitalSchoolApi/App_Data/LogHelper.cs
  2. +110
    -0
      DigitalSchoolApi/Controllers/HKAttendanceController.cs
  3. +341
    -0
      DigitalSchoolApi/Controllers/HTSchoolController.cs
  4. +58
    -10
      DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs
  5. +50
    -2
      DigitalSchoolApi/Controllers/YKTController.cs
  6. +25
    -14
      DigitalSchoolApi/Controllers/YKTTrabs.cs
  7. +5
    -2
      DigitalSchoolApi/DigitalSchoolApi.csproj
  8. +5491
    -0
      DigitalSchoolApi/DigitalSchoolApi.xml
  9. +86
    -0
      DigitalSchoolApi/Models/HtEntity.cs
  10. +1
    -0
      DigitalSchoolApi/Models/XCStudentEntity.cs
  11. +4
    -6
      DigitalSchoolApi/Web.config
  12. +1
    -1
      DigitalSchoolApi/packages.config

+ 33
- 0
DigitalSchoolApi/App_Data/LogHelper.cs View File

@@ -0,0 +1,33 @@
using System;
using System.IO;

namespace Util.Log
{
public class LogHelper
{
public static void Info(string msg)
{
try
{
#region log
//文件路径
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}

//文件
string fileName = Path.Combine(path, $"{DateTime.Now:yyyyMMdd}.log");
string message = $"{DateTime.Now:yyyy-MM-dd HH:mm:ss} logInfo:{msg}。{Environment.NewLine}";
File.AppendAllText(fileName, message);
#endregion
}
catch
{


}
}
}
}

+ 110
- 0
DigitalSchoolApi/Controllers/HKAttendanceController.cs View File

@@ -6,11 +6,17 @@ using System.Data.SqlClient;
using System.Diagnostics.Eventing.Reader;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.InteropServices;
using System.Text;
using System.Web;
using AlarmCSharpDemo;
using Antlr.Runtime.Misc;
using Dapper;
using Learun.Util;
using Org.BouncyCastle.Asn1.X509;
using Org.BouncyCastle.Ocsp;

namespace DigitalSchoolApi.Controllers
{
@@ -1114,6 +1120,110 @@ namespace DigitalSchoolApi.Controllers
return true;
}
}
/// <summary>
/// 开门
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public static string OpenDoor(string id)
{
using (IDbConnection connmis = new SqlConnection(_misConnection))
{
//获取设备
var device = connmis.QueryFirstOrDefault<ADR_DeviceEntity>($"select * from ADR_Device where F_EnabledMark=1 and Id='{id}'");
if(device!=null)
{
string url = $"http://{device.IpAddress}/ISAPI/AccessControl/RemoteControl/door/1";
string username = device.AdminAccount;
string password = device.AdminPwd;
string data = $"<?xml version=\"1.0\" encoding=\"UTF-8\"?><RemoteControlDoor xmlns=\"http://www.isapi.org/ver20/XMLSchema\" version=\"2.0\"><cmd>open</cmd> <password>{device.AdminPwd}</password><employeeNo>1</employeeNo><channelNo>1</channelNo><controlType>monitor</controlType><personnelChannelGroupInfoList><personnelChannelGroupInfo><personnelChannelGroupID>1</personnelChannelGroupID><personnelChannelInfoList><personnelChannelInfo><personnelChannelID>1</personnelChannelID></personnelChannelInfo></personnelChannelInfoList></personnelChannelGroupInfo></personnelChannelGroupInfoList><lastOpenDoorFlag>true</lastOpenDoorFlag><callNumber>101</callNumber></RemoteControlDoor>";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "PUT";
request.ContentType = "application/xml";
request.Credentials = new NetworkCredential(username, password);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
HttpWebResponse response;

try
{
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
response = (HttpWebResponse)ex.Response;
}
//Console.WriteLine("Response status: {0}", response.StatusDescription);
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);

string responseFromServer = reader.ReadToEnd();

//Console.WriteLine(responseFromServer);
reader.Close();
dataStream.Close();

response.Close();
return "开门成功";
}
return "未找到设备";
}

}

/// <summary>
/// 关门
/// </summary>
/// <param name="id"></param>
public static void CloseDoor(string id)
{
using (IDbConnection connmis = new SqlConnection(_misConnection))
{
//获取设备
var device = connmis.QueryFirstOrDefault<ADR_DeviceEntity>($"select * from ADR_Device where F_EnabledMark=1 and Id='{id}'");
if (device != null)
{
string url = $"http://{device.IpAddress}/ISAPI/AccessControl/RemoteControl/door/1";
string username = device.AdminAccount;
string password = device.AdminPwd;
string data = $"<?xml version=\"1.0\" encoding=\"UTF-8\"?><RemoteControlDoor xmlns=\"http://www.isapi.org/ver20/XMLSchema\" version=\"2.0\"><cmd>close</cmd> <password>{device.AdminPwd}</password><employeeNo>1</employeeNo><channelNo>1</channelNo><controlType>monitor</controlType><personnelChannelGroupInfoList><personnelChannelGroupInfo><personnelChannelGroupID>1</personnelChannelGroupID><personnelChannelInfoList><personnelChannelInfo><personnelChannelID>1</personnelChannelID></personnelChannelInfo></personnelChannelInfoList></personnelChannelGroupInfo></personnelChannelGroupInfoList><lastOpenDoorFlag>true</lastOpenDoorFlag><callNumber>101</callNumber></RemoteControlDoor>";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "PUT";
request.ContentType = "application/xml";
request.Credentials = new NetworkCredential(username, password);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
HttpWebResponse response;

try
{
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
response = (HttpWebResponse)ex.Response;
}
//Console.WriteLine("Response status: {0}", response.StatusDescription);
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);

string responseFromServer = reader.ReadToEnd();

//Console.WriteLine(responseFromServer);
reader.Close();
dataStream.Close();

response.Close();
}
}
}

public static string CaptureJPEG(string id)
{


+ 341
- 0
DigitalSchoolApi/Controllers/HTSchoolController.cs View File

@@ -0,0 +1,341 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.OracleClient;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using Dapper;
using DigitalSchoolApi.App_Data;
using DigitalSchoolApi.Models;
using Learun.Application.Organization;
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
{
/// <summary>
/// 塔里木学院定时需求
/// </summary>
public class HTSchoolController
{
private readonly static string _admsConnection = ConfigurationManager.ConnectionStrings["CoreDBString"].ConnectionString;
private readonly static string _misConnection = ConfigurationManager.ConnectionStrings["ConnectionPfcMisDBString"].ConnectionString;
private static string _htMiddleConnection = ConfigurationManager.ConnectionStrings["htMiddleDBString"].ConnectionString;

//private readonly static string _tlmMiddleConnection =ConfigurationManager.ConnectionStrings["TLMMiddleDBString"].ConnectionString;



#region 中间库同步到数校

/// <summary>
/// 从中间库同步系部数据
/// </summary>
public static void SyncDepartment()
{
try
{
IEnumerable<HTMiddleOrganize> entityList = null;
using (IDbConnection conn = new SqlConnection(_htMiddleConnection))
{
entityList = conn.Query<HTMiddleOrganize>("SELECT * FROM nc_orgnization");
}
using (IDbConnection conn = new SqlConnection(_admsConnection))
{
try
{
var maxSort = -1;
try
{
maxSort = conn.QueryFirstOrDefault<int>("select MAX(F_Order) FROM LR_BASE_DEPARTMENT");
}
catch (Exception e)
{
maxSort = -1;
}

//插入sql
foreach (var item in entityList)
{
DepartmentEntity model = null;
using (IDbConnection xbconn = new SqlConnection(_admsConnection))
{
model = xbconn.QueryFirstOrDefault<DepartmentEntity>($"select * from LR_BASE_DEPARTMENT where F_EnCode='{item.CODE}'");
}
if (model == null)
{
maxSort++;
var id = item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N") : Guid.NewGuid();
//没有就新增
var sql =
"INSERT INTO LR_BASE_DEPARTMENT (F_DepartmentId, F_CompanyId, F_ParentId, F_EnCode, F_FullName, F_Order,F_DeleteMark,F_EnabledMark) " +
$"VALUES ('{id}', '207fa1a9-160c-4943-a89b-8fa4db0547ce', '{item.FID}', '{item.CODE}', '{item.NAME}', {maxSort},0,1);";
conn.Execute(sql);
}
else
{
//存在就修改
var sql = $"UPDATE LR_BASE_DEPARTMENT SET F_FullName='{item.NAME}',F_ParentId='{item.FID}' where F_EnCode='{model.F_EnCode}';";
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())");
}
}
}

/// <summary>
/// 从中间库同步学生数据
/// </summary>
public static void SyncStuInfoAcc()
{
try
{

IEnumerable<HTMiddleStuInfo> entityList = null;
using (IDbConnection conn = new SqlConnection(_htMiddleConnection))
{
entityList = conn.Query<HTMiddleStuInfo>($"SELECT * FROM nc_stuInfo");
}

try
{
//插入sql
foreach (var item in entityList)
{
var id = item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N") : Guid.NewGuid();
var MZ = "";
var xb = item.GenderNo == "1" ? 1 : 0;

UserEntity model = null;
StuInfoBasicEntity stu = null;
using (IDbConnection xbconn = new SqlConnection(_admsConnection))
{
model = xbconn.QueryFirstOrDefault<UserEntity>($"select * from LR_Base_User where F_Account='{item.USERNAME}'");

if (model == null)
{

var key = Md5Helper.Encrypt(CreateNo(), 16).ToLower();
var pwd = Md5Helper.Encrypt(DESEncrypt.Encrypt(Md5Helper.Encrypt("ht123456", 32).ToLower(), key).ToLower(), 32).ToLower();

var userSql =
$"INSERT INTO LR_Base_User (F_UserId,F_EnCode,F_Account,F_Mobile,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.USERNAME}','{item.USERNAME}','{item.MOBILE}','{pwd}','{key}','{item.StuName}',{xb},'207fa1a9-160c-4943-a89b-8fa4db0547ce','{item.DeptNo}',0,1,'学生'," +
$"'{DateTime.Now:yyyy-MM-dd hh:mm:ss}','System','数据同步','{item.IdentityCardNo}');";

xbconn.Execute(userSql);

}
}

using (IDbConnection conn =new SqlConnection(_misConnection))
{
stu= conn.QueryFirstOrDefault<StuInfoBasicEntity>($"select * from StuInfoBasic where StuNo='{item.USERNAME}'");

if (stu == null)
{
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) " +
$"VALUES('{id}','{item.USERNAME}','{item.CODE}','','','', '{item.DeptNo}', '{item.MajorNo}'," +
$"'{item.Grade}','{item.ClassNo}','{item.StuName}', '',{xb},'','',''," +
$"'{item.NationalityNo}','','1','2','0','','{item.IdentityCardNo}','','',''," +
$"'{item.MOBILE}','1','','207fa1a9-160c-4943-a89b-8fa4db0547ce', '2', '1');";
conn.Execute(sql);
}
else
{
var sql =
$"UPDATE StuInfoBasic SET StuName='{item.StuName}',GenderNo={xb},IdentityCardNo='{item.IdentityCardNo}'," +
$"Grade='{item.Grade}',DeptNo='{item.DeptNo}',StuCode='{item.CODE}',mobile='{item.MOBILE}'," +
$"MajorNo='{item.MajorNo}',ClassNo='{item.ClassNo}' where StuNo='{stu.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(),998,'从中间库同步学生信息到数校异常','" +
e.ToString() + "',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.ToString() + "',getdate())");
}
}
}

/// <summary>
/// 从中间库同步教师数据
/// </summary>
public static void SyncEmpInfoAcc()
{
try
{

IEnumerable<HTMiddleEmpInfo> entityList = null;
using (IDbConnection conn = new SqlConnection(_htMiddleConnection))
{
entityList = conn.Query<HTMiddleEmpInfo>($"SELECT * FROM nc_user");
}
try
{
//插入sql
foreach (var item in entityList)
{
var id = item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N") : Guid.NewGuid();
var MZ = "";
var xb = item.GENDER == "男性" ? 1 : 0;

UserEntity model = null;
EmpInfoEntity stu = null;
using (IDbConnection xbconn = new SqlConnection(_admsConnection))
{
model = xbconn.QueryFirstOrDefault<UserEntity>($"select * from LR_Base_User where F_Account='{item.USERNAME}'");

if (model == null)
{

var key = Md5Helper.Encrypt(CreateNo(), 16).ToLower();
var pwd = Md5Helper.Encrypt(DESEncrypt.Encrypt(Md5Helper.Encrypt("ht123456", 32).ToLower(), key).ToLower(), 32).ToLower();


var userSql =
$"INSERT INTO LR_Base_User (F_UserId,F_EnCode,F_Account,F_Mobile,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.USERNAME}','{item.USERNAME}','{item.MOBILE}','{pwd}','{key}','{item.NAME}',{xb},'207fa1a9-160c-4943-a89b-8fa4db0547ce','{item.MOCODE}',0,1,'教师'," +
$"'{DateTime.Now:yyyy-MM-dd hh:mm:ss}','System','数据同步','{item.CARDNO}');";
xbconn.Execute(userSql);


}

}
using (IDbConnection conn = new SqlConnection(_misConnection))
{
stu = conn.QueryFirstOrDefault<EmpInfoEntity>($"select * from EmpInfo where EmpNo='{item.USERNAME}'");
if (stu == null)
{
var sql = "INSERT INTO EmpInfo (EmpId,EmpNo,EmpName,GenderNo,DeptNo,IdentityCardNo,mobile,EMail,IsInActiveStatus,CheckMark,F_CompanyId) " +
$"VALUES('{id}','{item.USERNAME}','{item.NAME}',{xb},'{item.MOCODE}','{item.CARDNO}', '{item.MOBILE}', '{item.EMAIL}'," +
$"'{item.STATUS}','1','207fa1a9-160c-4943-a89b-8fa4db0547ce');";
conn.Execute(sql);
}
else
{
var sql =
$"UPDATE EmpInfo SET EmpName='{item.NAME}',GenderNo={xb},IdentityCardNo='{item.CARDNO}'," +
$"DeptNo='{item.MOCODE}',mobile='{item.MOBILE}',EMail='{item.EMAIL}',IsInActiveStatus='{item.STATUS}' where EmpNo='{stu.EmpNo}';";
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(),000,'从中间库同步老师信息到数校完成','老师同步数量:" +
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(),998,'从中间库同步老师信息到数校异常','" +
e.ToString() + "',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.ToString() + "',getdate())");
}
}
}
#endregion


private static string CreateNo()
{
Random random = new Random();
string strRandom = random.Next(1000, 10000).ToString(); //生成编号
string code = DateTime.Now.ToString("yyyyMMddHHmmss") + strRandom;//形如
return code;
}



}
}

+ 58
- 10
DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs View File

@@ -71,7 +71,7 @@ namespace DigitalSchoolApi.Controllers
{
RecurringJob.AddOrUpdate("PayFeeResultMinutes20",
() => GetResult(true),
Cron.Minutely, TimeZoneInfo.Local);
"0 0/5 * * * ?", TimeZoneInfo.Local);
return Ok();
}
/// <summary>
@@ -106,6 +106,40 @@ namespace DigitalSchoolApi.Controllers
BackgroundJob.Enqueue(() => DoUnInvoiceHandleByFSYID(FSYID));
return Ok();
}
/// <summary>
/// 根据年度学生缴费id批量触发开票任务
/// </summary>
/// <param name="yearno">学年,如2024</param>
/// <returns></returns>
[HttpPost]
public IHttpActionResult SetUnInvoiceHandleByFSYIDs(string yearno)
{
try
{
using (IDbConnection conn = new SqlConnection(_sqlConnection))
{
var FinaChargeStuYearList = conn.Query<FinaChargeStuYearEntity>($@"select f.*
from FinaChargeStuYear f
left join StuEnrollInvoiceRecord s on f.StuNo=s.StuNo and f.FSYear=s.YearNo
where f.FSYear='{yearno}' and f.PayFeeStatus =1
and s.Id is null");
foreach (var item in FinaChargeStuYearList)
{
DoUnInvoiceHandleByFSYID(item.FSYId);
}
}
}
catch (Exception e)
{
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','" + yearno + "学年批量开票异常:" + e.Message + "',getdate())");
}
}

return Ok();
}

/// <summary>
/// 补开发票
@@ -186,7 +220,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','" + e.Message + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FSYId:" + FSYID + ",异常原因:" + e.Message + "',getdate(),'" + FSYID + "')");
}
}
}
@@ -201,9 +235,15 @@ namespace DigitalSchoolApi.Controllers
string lastdate = iflasttenminutes
? DateTime.Now.AddMinutes(-30).ToString("yyyy-MM-dd HH:mm:ss")
: DateTime.Now.AddDays(-20).ToString("yyyy-MM-dd HH:mm:ss");
List<FinaChargeStuOrderEntity> list = conn.Query<FinaChargeStuOrderEntity>("select * from FinaChargeStuOrder where PlaceOrderTime>='" + lastdate + "' and Status=0 and OrderType=1 ").ToList();
List<FinaChargeStuOrderEntity> list = conn.Query<FinaChargeStuOrderEntity>("select * from FinaChargeStuOrder where PlaceOrderTime>='" + lastdate + "' and Status=0 and OrderType=1 order by PlaceOrderTime desc").ToList();
foreach (var item in list)
{
//校验
var orderentity = conn.QueryFirstOrDefault<FinaChargeStuOrderEntity>($"select * from FinaChargeStuOrder where Id='{item.Id}' ");
if (orderentity == null || orderentity.Status == 1)
{
continue;
}
//轮询建行商户平台
XmlDocument xml = new XmlDocument();
xml.Load(AppContext.BaseDirectory + "\\Content\\payxml\\PayResultXMLFile.xml");
@@ -227,8 +267,9 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'ccb','FCSOId:" + item.Id + " 对接支付结果地址接口失败:" + reStr + ":" + e.Message + ":" + e.StackTrace + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'ccb','FCSOId:" + item.Id + " 对接支付结果地址接口失败:" + reStr + ":" + e.Message + ":" + e.StackTrace + "',getdate(),'" + item.Id + "')");
}
continue;
}
xml.LoadXml(reStr);
string s = ((XmlElement)xml.SelectSingleNode("TX/RETURN_CODE")).InnerText;
@@ -262,6 +303,12 @@ namespace DigitalSchoolApi.Controllers
//string REM2 = item.YearNo.ToString();
if (ORDER_STATUS == "1")
{
//校验
var orderentity2 = conn.QueryFirstOrDefault<FinaChargeStuOrderEntity>($"select * from FinaChargeStuOrder where Id='{item.Id}' ");
if (orderentity2 == null || orderentity2.Status == 1)
{
continue;
}
conn.Execute("update FinaChargeStuOrder set SJAmount='" + PAYMENT_MONEY + "',Status='" + ORDER_STATUS + "',PayTime='" + TRAN_DATE + "',PayMode='" + PAY_MODE + "',BankOrder='" + OriOvrlsttnEV_Trck_No + "' where orderid='" + Orderid + "'");
////判断实缴金额是否缴清费用
//decimal sjcount = Convert.ToDecimal(conn.ExecuteScalar("select isnull(sum(SJAmount),0) from FinaChargeStuOrder where StuNo='" + REM1 + "' and Status=1 and YearNo='" + REM2 + "' "));
@@ -312,17 +359,17 @@ group by a.FSYear,b.StuNo ) aa left join
"'0','" + newitem.FSBlance + "',getdate(),'1')");
}
}
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'ccb','FCSOId:" + item.Id + " orderid:" + Orderid + " StuNo:" + REM1 + " 缴费状态更新成功',getdate())");
}
int PayFeeStatus = Convert.ToInt32(conn.ExecuteScalar("select PayFeeStatus from FinaChargeStuYear where StuNo='" + item.StuNo + "' and FSYear='" + item.YearNo + "'"));
if (PayFeeStatus == 1)
{
//开票
Task.Run(() => YKTTrabs.InvoiceEBillMethodTwo(item));
}
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'ccb','FCSOId:" + item.Id + " orderid:" + Orderid + " StuNo:" + REM1 + " 缴费状态更新成功',getdate())");
}
}
}
else
@@ -330,8 +377,9 @@ group by a.FSYear,b.StuNo ) aa left join
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'ccb','FCSOId:" + item.Id + " error:code=" + s + "xml=" + Learun.Util.Str.ReplaceHtml(reStr) + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'ccb','FCSOId:" + item.Id + " error:code=" + s + "xml=" + Learun.Util.Str.ReplaceHtml(reStr) + "',getdate(),'" + item.Id + "')");
}
//s:YDCA02910001流水记录不存在;0250E0200001流水记录不存在;YALA02910002查询过于频繁,请稍后再试
}
}
}


+ 50
- 2
DigitalSchoolApi/Controllers/YKTController.cs View File

@@ -6,6 +6,8 @@ using System.Data.SqlClient;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
using Dapper;
using DigitalSchoolApi.Models;
@@ -14,7 +16,7 @@ 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;
@@ -273,6 +275,25 @@ namespace DigitalSchoolApi.Controllers
RecurringJob.RemoveIfExists("LeaderAttendance");
return Ok();
}
/// <summary>
/// 开门(延迟5秒后调用关门)
/// </summary>
/// <returns></returns>
public IHttpActionResult OpenCloseDoor(string id,bool c)
{
var r = HKAttendanceController.OpenDoor(id);

if (c)
{
Task.Factory.StartNew(() =>
{

Thread.Sleep(5000);
HKAttendanceController.CloseDoor(id);
});
}
return Ok(r);
}

public IHttpActionResult CaptureJPEG(string id)
{
@@ -600,7 +621,7 @@ namespace DigitalSchoolApi.Controllers
() => TLMSchoolController.AssignSendEmail(entityList),
Cron.Daily(entityList[0].F_Hour.Value), TimeZoneInfo.Local);
}
}
}
}
@@ -669,5 +690,32 @@ namespace DigitalSchoolApi.Controllers
}

#endregion

#region 和田数据同步

/// <summary>
/// 和田从中间库中同步到数校
/// </summary>
/// <returns></returns>
public IHttpActionResult SyncDataToDs()
{
//部门
RecurringJob.AddOrUpdate("HTSyncDepartmentToDs",
() => HTSchoolController.SyncDepartment(),
Cron.Daily(1), TimeZoneInfo.Local);

//教师
RecurringJob.AddOrUpdate("HTSyncEmpInfoToDs",
() => HTSchoolController.SyncEmpInfoAcc(),
Cron.Daily(1), TimeZoneInfo.Local);
//学生
RecurringJob.AddOrUpdate("HTSyncStuInfoToDs",
() => HTSchoolController.SyncStuInfoAcc(),
Cron.Daily(1), TimeZoneInfo.Local);

return Ok();
}
#endregion
}
}

+ 25
- 14
DigitalSchoolApi/Controllers/YKTTrabs.cs View File

@@ -811,7 +811,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'typecode','FCSOId:" + orderEntity.Id + " 开票typecode:" + item.Key + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'typecode','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";开票typecode:" + item.Key + "',getdate())");
}
InvoiceEBillByTypeTwo(conn, orderEntity, item.Key, item);
}
@@ -820,7 +820,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票异常:" + ex.Message + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";开票异常:" + ex.Message + "',getdate())");
}
}
}
@@ -831,7 +831,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票准备报错:" + ex.Message + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";开票准备报错:" + ex.Message + "',getdate())");
}
}
}
@@ -941,7 +941,7 @@ namespace DigitalSchoolApi.Controllers
string checkCode = billInfo.checkCode;
//记录票号
var recordId = Guid.NewGuid();
conn.Execute($"insert into StuEnrollInvoiceRecord(Id,YearNo,StuNo,billNo,random,billStatus) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1')");
conn.Execute($"insert into StuEnrollInvoiceRecord(Id,YearNo,StuNo,billNo,random,billStatus,FCSOId,CreateTime) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1','{orderEntity.Id}',getdate())");
//conn.Execute("update StuEnrollFeeOrder set billBatchCode='" + eBillCode + "',billNo='" + eBillNo + "',random='" + checkCode + "',billStatus=1 where orderid='" + OrderId + "'");
if (IsNewOrOld)
{
@@ -1086,7 +1086,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 发送给开票系统原始数据:" + JsonConvert.SerializeObject(biParam) + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";发送给开票系统原始数据:" + JsonConvert.SerializeObject(biParam) + "',getdate(),'" + orderEntity.Id + "')");
}
var data = Convert.ToBase64String(encoding.GetBytes(JsonConvert.SerializeObject(biParam)));
var noise = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000);
@@ -1113,7 +1113,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统返回:" + datain + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";开票系统返回:" + datain + "',getdate(),'" + orderEntity.Id + "')");
}
string returnresult = encoding.GetString(Convert.FromBase64String(datain));
if (returnresult != "")
@@ -1127,7 +1127,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统成功返回:" + messagedecode + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";开票系统成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
dynamic billInfo = JsonConvert.DeserializeObject(messagedecode);
string eBillCode = billInfo.eBillCode;
@@ -1135,7 +1135,7 @@ namespace DigitalSchoolApi.Controllers
string checkCode = billInfo.checkCode;
//记录票号
var recordId = Guid.NewGuid();
conn.Execute($"insert into StuEnrollInvoiceRecord(Id,YearNo,StuNo,billNo,random,billStatus) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1')");
conn.Execute($"insert into StuEnrollInvoiceRecord(Id,YearNo,StuNo,billNo,random,billStatus,FCSOId,CreateTime,FSYId) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1','{orderEntity.Id}',getdate(),'{orderEntity.FSYId}')");

//查询票据url
var invoiceobj = new { billBatchCode = eBillCode, billNo = eBillNo, random = checkCode, channelMode = "1" };
@@ -1162,7 +1162,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url返回:" + datainvoice + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";查询开票url返回:" + datainvoice + "',getdate(),'" + orderEntity.Id + "')");
}
string returnresultinvoice = encoding.GetString(Convert.FromBase64String(datainvoice));
resultobj = JsonConvert.DeserializeObject(returnresultinvoice);
@@ -1173,7 +1173,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url成功返回:" + messagedecode + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";查询开票url成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
dynamic InvoiceUrlInfo = JsonConvert.DeserializeObject(messagedecode);
string pictureUrl = InvoiceUrlInfo.pictureUrl;
@@ -1187,7 +1187,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url错误:" + messagedecode + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";查询开票url错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
}
}
@@ -1198,7 +1198,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统错误:" + messagedecode + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";开票系统错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
}
}
@@ -1210,7 +1210,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统报错:" + e.Message + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + ";开票系统报错:" + e.Message + "',getdate(),'" + orderEntity.Id + "')");
}
}
}
@@ -1458,7 +1458,7 @@ namespace DigitalSchoolApi.Controllers
conncore.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'中间库班级数据','获取oracle班级数据共{bjxx.Count()}条',getdate())");
conncore.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'中间库教室数据','获取oracle教室数据共{jsxx.Count()}条',getdate())");
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'中间库教室数据','获取oracle教室数据共{zzjg.Count()}条',getdate())");
conncore.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'中间库学生数据','获取oracle学生数据共{xsxx.Count()}条',getdate())");
}
@@ -1942,6 +1942,11 @@ namespace DigitalSchoolApi.Controllers
{
sb.Append($" ClassNo='{item.CLASS_ID}',");
}
//考生号
if (!string.IsNullOrEmpty(item.KSH))
{
sb.Append($" ksh='{item.KSH}',");
}
if (!string.IsNullOrEmpty(item.FORMER_NAME))
{
sb.Append($" FORMER_NAME='{item.FORMER_NAME}',");
@@ -2089,6 +2094,12 @@ namespace DigitalSchoolApi.Controllers
fieleSb.Append("ClassNo,");
sb.Append($" '{xsxx.CLASS_ID}',");
}
//考生号
if (!string.IsNullOrEmpty(xsxx.KSH))
{
fieleSb.Append("ksh,");
sb.Append($" '{xsxx.KSH}',");
}
if (!string.IsNullOrEmpty(xsxx.PINYIN))
{
fieleSb.Append("SpellFull,");


+ 5
- 2
DigitalSchoolApi/DigitalSchoolApi.csproj View File

@@ -97,8 +97,8 @@
<Reference Include="MySql.Data, Version=8.0.23.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.8.0.23\lib\net452\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
@@ -382,6 +382,7 @@
<ItemGroup>
<Compile Include="App_Data\LicenseChecker.cs" />
<Compile Include="App_Data\LicenseManager.cs" />
<Compile Include="App_Data\LogHelper.cs" />
<Compile Include="App_Data\Mail\MailHelper.cs" />
<Compile Include="App_Data\Mail\Model\MailAccount .cs" />
<Compile Include="App_Data\Mail\Model\MailFile.cs" />
@@ -405,6 +406,7 @@
<Compile Include="Controllers\HLSchoolController.cs" />
<Compile Include="Controllers\PayFeeResultTwoController.cs" />
<Compile Include="Controllers\PayFeeResultController.cs" />
<Compile Include="Controllers\HTSchoolController.cs" />
<Compile Include="Controllers\TLMSchoolController.cs" />
<Compile Include="Controllers\EmailSendController.cs" />
<Compile Include="Controllers\CYDormitoryReturnController.cs" />
@@ -422,6 +424,7 @@
<Compile Include="Models\FinaChargeStuOrderEntity.cs" />
<Compile Include="Models\FinaChargeStuYearEntity.cs" />
<Compile Include="Models\FinaChargeStuYearItemEntity.cs" />
<Compile Include="Models\HtEntity.cs" />
<Compile Include="Models\NewsEntity.cs" />
<Compile Include="Models\EmailManagementEntity.cs" />
<Compile Include="Models\Acc_DormitoryBuildEntity.cs" />


+ 5491
- 0
DigitalSchoolApi/DigitalSchoolApi.xml
File diff suppressed because it is too large
View File


+ 86
- 0
DigitalSchoolApi/Models/HtEntity.cs View File

@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DigitalSchoolApi.Models
{
internal interface HtEntity
{
}

public class HTMiddleOrganize
{
public string ID { get; set; }

public string NAME { get; set; }

public string FID { get; set; }

public string CODE { get; set; }
}

public class HTMiddleStuInfo
{

public string ID { get; set; }
public string USERNAME { get; set; }

public string StuName { get; set; }

public string IdentityCardNo { get; set; }

public string NationalityNo { get; set; }

public string Grade { get; set; }

public string EntranceDate { get; set; }

public string RegisterDate { get; set; }

public string MailAddress { get; set; }

public string DeptNo { get; set; }
public string DeptName { get; set; }

public string MajorNo { get; set; }
public string MajorName { get; set; }

public string ClassNo { get; set; }
public string ClassName { get; set; }

public string GenderNo { get; set; }

public string CODE { get; set; }

public string MOBILE { get; set; }

public string EMAIL { get; set; }
}

public class HTMiddleEmpInfo
{

public string ID { get; set; }

public string CODE { get; set; }


public string NAME { get; set; }
public string USERNAME { get; set; }

public string MOCODE { get; set; }

public string GENDER { get; set; }

public string CARDNO { get; set; }

public string MOBILE { get; set; }

public string EMAIL { get; set; }

public string STATUS { get; set; }

}
}

+ 1
- 0
DigitalSchoolApi/Models/XCStudentEntity.cs View File

@@ -932,6 +932,7 @@ namespace DigitalSchoolApi.Models
public string STU_STATE_CODE { get; set; }
public string STU_ROLL_CODE { get; set; }
public string IS_NORMAL { get; set; }
public string KSH { get; set; }
}

public class V_Dept


+ 4
- 6
DigitalSchoolApi/Web.config View File

@@ -53,11 +53,9 @@
</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" />
@@ -70,7 +68,7 @@
<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" />
<add name="htMiddleDBString" connectionString="Server=112.45.152.8,17049;Initial Catalog=tsgxtjh;User ID=tsgxtjh;Password=Qs6cYOzFoQupbr12MFZm" providerName="System.Data.SqlClient" />
</connectionStrings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
@@ -101,7 +99,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />


+ 1
- 1
DigitalSchoolApi/packages.config View File

@@ -30,7 +30,7 @@
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
<package id="Modernizr" version="2.6.2" targetFramework="net461" />
<package id="MySql.Data" version="8.0.23" targetFramework="net461" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net461" />
<package id="Owin" version="1.0" targetFramework="net452" />
<package id="SSH.NET" version="2020.0.0" targetFramework="net461" />
<package id="Swagger-Net" version="8.3.20.403" targetFramework="net472" />


Loading…
Cancel
Save