From 65f191d3f9f72baf40f383ffe1a650d93930df13 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 2 Sep 2024 16:41:26 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=BC=B4=E8=B4=B9=E5=90=8E=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs | 4 +++- DigitalSchoolApi/Web.config | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs index eecf942..9026155 100644 --- a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs +++ b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs @@ -71,7 +71,7 @@ namespace DigitalSchoolApi.Controllers { RecurringJob.AddOrUpdate("PayFeeResultMinutes20", () => GetResult(true), - Cron.Minutely, TimeZoneInfo.Local); + Cron.MinuteInterval(2), TimeZoneInfo.Local); return Ok(); } /// @@ -229,6 +229,7 @@ namespace DigitalSchoolApi.Controllers 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())"); } + continue; } xml.LoadXml(reStr); string s = ((XmlElement)xml.SelectSingleNode("TX/RETURN_CODE")).InnerText; @@ -332,6 +333,7 @@ group by a.FSYear,b.StuNo ) aa left join 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())"); } + //YDCA02910001流水记录不存在;0250E0200001流水记录不存在;YALA02910002查询过于频繁,请稍后再试 } } } diff --git a/DigitalSchoolApi/Web.config b/DigitalSchoolApi/Web.config index 0ca5377..ceaaaff 100644 --- a/DigitalSchoolApi/Web.config +++ b/DigitalSchoolApi/Web.config @@ -53,9 +53,9 @@ - + - + From 3693da08105a11e55c5ef02c182cc2e2c831f242 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Wed, 4 Sep 2024 13:47:18 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=A5=BF=E6=98=8C=EF=BC=9A=E5=90=8C=E6=AD=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Controllers/YKTTrabs.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalSchoolApi/Controllers/YKTTrabs.cs b/DigitalSchoolApi/Controllers/YKTTrabs.cs index 9a46ed2..8b1a6fc 100644 --- a/DigitalSchoolApi/Controllers/YKTTrabs.cs +++ b/DigitalSchoolApi/Controllers/YKTTrabs.cs @@ -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())"); } From 1403ea38dd3e52ba48c79d2ee43dea0a9443b76a Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Wed, 4 Sep 2024 13:47:43 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=A5=BF=E6=98=8C=EF=BC=9A=E7=BC=B4=E8=B4=B9=E5=90=8E=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=BB=BB=E5=8A=A1=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs index 9026155..3b84959 100644 --- a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs +++ b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs @@ -71,7 +71,7 @@ namespace DigitalSchoolApi.Controllers { RecurringJob.AddOrUpdate("PayFeeResultMinutes20", () => GetResult(true), - Cron.MinuteInterval(2), TimeZoneInfo.Local); + Cron.MinuteInterval(5), TimeZoneInfo.Local); return Ok(); } /// @@ -227,7 +227,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,'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; } @@ -331,9 +331,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 + "')"); } - //YDCA02910001流水记录不存在;0250E0200001流水记录不存在;YALA02910002查询过于频繁,请稍后再试 + //s:YDCA02910001流水记录不存在;0250E0200001流水记录不存在;YALA02910002查询过于频繁,请稍后再试 } } } From a2a2661044240394f8c4f34a7258a5c55fbbd123 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 5 Sep 2024 16:50:44 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=A5=BF=E6=98=8C=E6=95=B0=E6=8D=AE=E4=B8=AD=E5=BF=83=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=AD=A6=E7=94=9F=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=80=83?= =?UTF-8?q?=E7=94=9F=E5=8F=B7=E5=90=8C=E6=AD=A5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Controllers/YKTTrabs.cs | 11 +++++++++++ DigitalSchoolApi/Models/XCStudentEntity.cs | 1 + 2 files changed, 12 insertions(+) diff --git a/DigitalSchoolApi/Controllers/YKTTrabs.cs b/DigitalSchoolApi/Controllers/YKTTrabs.cs index 8b1a6fc..d3ad63b 100644 --- a/DigitalSchoolApi/Controllers/YKTTrabs.cs +++ b/DigitalSchoolApi/Controllers/YKTTrabs.cs @@ -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,"); diff --git a/DigitalSchoolApi/Models/XCStudentEntity.cs b/DigitalSchoolApi/Models/XCStudentEntity.cs index 2cfc08f..d27afa8 100644 --- a/DigitalSchoolApi/Models/XCStudentEntity.cs +++ b/DigitalSchoolApi/Models/XCStudentEntity.cs @@ -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 From 1e38ff814112f5413cd65da187ea4d6022154331 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 10 Sep 2024 15:21:32 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=A5=BF=E6=98=8C-=E7=BC=B4=E8=B4=B9=E5=90=8E=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PayFeeResultTwoController.cs | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs index 3b84959..f597ca3 100644 --- a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs +++ b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs @@ -204,6 +204,12 @@ namespace DigitalSchoolApi.Controllers List list = conn.Query("select * from FinaChargeStuOrder where PlaceOrderTime>='" + lastdate + "' and Status=0 and OrderType=1 ").ToList(); foreach (var item in list) { + //校验 + var orderentity = conn.QueryFirstOrDefault($"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"); @@ -262,7 +268,13 @@ namespace DigitalSchoolApi.Controllers //string REM1 = item.StuNo; //string REM2 = item.YearNo.ToString(); if (ORDER_STATUS == "1") - { + { + //校验 + var orderentity2 = conn.QueryFirstOrDefault($"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 + "' ")); @@ -313,17 +325,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 From dd9ff2a120fcd3325eecb335456f01ad0058df10 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Wed, 18 Sep 2024 17:42:53 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=A5=BF=E6=98=8C-=E7=BC=B4=E8=B4=B9=E5=90=8E=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=8E=A5=E5=8F=A3=EF=BC=9A=E4=BC=98=E5=8C=96=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=A1=BA=E5=BA=8F=E5=92=8C=E5=AE=9A=E6=97=B6=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=97=B6=E9=97=B4=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs index f597ca3..0954bca 100644 --- a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs +++ b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs @@ -71,7 +71,7 @@ namespace DigitalSchoolApi.Controllers { RecurringJob.AddOrUpdate("PayFeeResultMinutes20", () => GetResult(true), - Cron.MinuteInterval(5), TimeZoneInfo.Local); + "0 0/5 * * * ?", TimeZoneInfo.Local); return Ok(); } /// @@ -201,7 +201,7 @@ 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 list = conn.Query("select * from FinaChargeStuOrder where PlaceOrderTime>='" + lastdate + "' and Status=0 and OrderType=1 ").ToList(); + List list = conn.Query("select * from FinaChargeStuOrder where PlaceOrderTime>='" + lastdate + "' and Status=0 and OrderType=1 order by PlaceOrderTime desc").ToList(); foreach (var item in list) { //校验 From 456f8c14e04b6ba5549f10f6493c9e8d3b8eccdd Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 23 Sep 2024 13:25:15 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=A5=BF=E6=98=8C-=E7=BC=B4=E8=B4=B9=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96=EF=BC=8C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=AE=8C=E5=96=84=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Controllers/YKTTrabs.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/DigitalSchoolApi/Controllers/YKTTrabs.cs b/DigitalSchoolApi/Controllers/YKTTrabs.cs index d3ad63b..a6857ae 100644 --- a/DigitalSchoolApi/Controllers/YKTTrabs.cs +++ b/DigitalSchoolApi/Controllers/YKTTrabs.cs @@ -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 + " 发送给开票系统原始数据:" + 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 + " 开票系统返回:" + 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 + " 开票系统成功返回:" + 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) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1','{orderEntity.Id}',getdate())"); //查询票据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 + " 查询开票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 + " 查询开票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 + " 查询开票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 + " 开票系统错误:" + 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 + " 开票系统报错:" + e.Message + "',getdate(),'" + orderEntity.Id + "')"); } } } From 665fe20d102058b25fd287a5b335adb5a1c21563 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 27 Sep 2024 09:34:57 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=A5=BF=E6=98=8C=EF=BC=9A=E6=89=B9=E9=87=8F=E8=A1=A5=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E7=A5=A8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PayFeeResultTwoController.cs | 38 ++++++++++++++++++- DigitalSchoolApi/Controllers/YKTTrabs.cs | 24 ++++++------ 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs index 0954bca..c9f6115 100644 --- a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs +++ b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs @@ -106,6 +106,40 @@ namespace DigitalSchoolApi.Controllers BackgroundJob.Enqueue(() => DoUnInvoiceHandleByFSYID(FSYID)); return Ok(); } + /// + /// 根据年度学生缴费id批量触发开票任务 + /// + /// 学年,如2024 + /// + [HttpPost] + public IHttpActionResult SetUnInvoiceHandleByFSYIDs(string yearno) + { + try + { + using (IDbConnection conn = new SqlConnection(_sqlConnection)) + { + var FinaChargeStuYearList = conn.Query($@"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(); + } /// /// 补开发票 @@ -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 + "')"); } } } @@ -268,7 +302,7 @@ namespace DigitalSchoolApi.Controllers //string REM1 = item.StuNo; //string REM2 = item.YearNo.ToString(); if (ORDER_STATUS == "1") - { + { //校验 var orderentity2 = conn.QueryFirstOrDefault($"select * from FinaChargeStuOrder where Id='{item.Id}' "); if (orderentity2 == null || orderentity2.Status == 1) diff --git a/DigitalSchoolApi/Controllers/YKTTrabs.cs b/DigitalSchoolApi/Controllers/YKTTrabs.cs index a6857ae..ce1b708 100644 --- a/DigitalSchoolApi/Controllers/YKTTrabs.cs +++ b/DigitalSchoolApi/Controllers/YKTTrabs.cs @@ -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())"); } } } @@ -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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 发送给开票系统原始数据:" + JsonConvert.SerializeObject(biParam) + "',getdate(),'" + orderEntity.Id + "')"); + "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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统返回:" + datain + "',getdate(),'" + orderEntity.Id + "')"); + "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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')"); + "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,FCSOId,CreateTime) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1','{orderEntity.Id}',getdate())"); + 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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url返回:" + datainvoice + "',getdate(),'" + orderEntity.Id + "')"); + "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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')"); + "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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')"); + "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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')"); + "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,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统报错:" + e.Message + "',getdate(),'" + orderEntity.Id + "')"); + "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 + "')"); } } } From 38eb2d3040ea75830e7565cb0a003f75550b9e50 Mon Sep 17 00:00:00 2001 From: dao Date: Sat, 12 Oct 2024 17:06:33 +0800 Subject: [PATCH 09/16] --- DigitalSchoolApi/Web.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DigitalSchoolApi/Web.config b/DigitalSchoolApi/Web.config index 33d69d6..5148c7f 100644 --- a/DigitalSchoolApi/Web.config +++ b/DigitalSchoolApi/Web.config @@ -53,11 +53,11 @@ - + - + - + From 74592176708b5e0e1df49e377eedc6d39e0ca1b7 Mon Sep 17 00:00:00 2001 From: dao Date: Tue, 15 Oct 2024 15:07:41 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E5=BC=80=E9=97=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HKAttendanceController.cs | 103 ++++++++++++++++++ DigitalSchoolApi/Controllers/YKTController.cs | 25 ++++- 2 files changed, 126 insertions(+), 2 deletions(-) diff --git a/DigitalSchoolApi/Controllers/HKAttendanceController.cs b/DigitalSchoolApi/Controllers/HKAttendanceController.cs index 68f39f3..769761e 100644 --- a/DigitalSchoolApi/Controllers/HKAttendanceController.cs +++ b/DigitalSchoolApi/Controllers/HKAttendanceController.cs @@ -6,10 +6,16 @@ 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 Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Ocsp; namespace DigitalSchoolApi.Controllers { @@ -1114,6 +1120,103 @@ namespace DigitalSchoolApi.Controllers } } + public static string OpenDoor(string id) + { + using (IDbConnection connmis = new SqlConnection(_misConnection)) + { + //获取设备 + var device = connmis.QueryFirstOrDefault($"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 = $"open {device.AdminPwd}11monitor11true101"; + 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 "未找到设备"; + } + + + } + + + public static void CloseDoor(string id) + { + using (IDbConnection connmis = new SqlConnection(_misConnection)) + { + //获取设备 + var device = connmis.QueryFirstOrDefault($"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 = $"close {device.AdminPwd}11monitor11true101"; + 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(); + } + } + } + #region 考勤结构体 /// /// 考勤设备日志 diff --git a/DigitalSchoolApi/Controllers/YKTController.cs b/DigitalSchoolApi/Controllers/YKTController.cs index 7ef5251..5bc2f32 100644 --- a/DigitalSchoolApi/Controllers/YKTController.cs +++ b/DigitalSchoolApi/Controllers/YKTController.cs @@ -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(); } + /// + /// 开门(延迟5秒后调用关门) + /// + /// + 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); + } #region 长阳报名\晚归预警 /// @@ -590,7 +611,7 @@ namespace DigitalSchoolApi.Controllers () => TLMSchoolController.AssignSendEmail(entityList), Cron.Daily(entityList[0].F_Hour.Value), TimeZoneInfo.Local); } - + } } } From a1549aac4fb7e1f3d97192990411db59ad602208 Mon Sep 17 00:00:00 2001 From: dao Date: Tue, 15 Oct 2024 16:54:46 +0800 Subject: [PATCH 11/16] --- .../Controllers/HKAttendanceController.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/DigitalSchoolApi/Controllers/HKAttendanceController.cs b/DigitalSchoolApi/Controllers/HKAttendanceController.cs index 769761e..ef88fb2 100644 --- a/DigitalSchoolApi/Controllers/HKAttendanceController.cs +++ b/DigitalSchoolApi/Controllers/HKAttendanceController.cs @@ -1119,7 +1119,11 @@ namespace DigitalSchoolApi.Controllers return true; } } - + /// + /// 开门 + /// + /// + /// public static string OpenDoor(string id) { using (IDbConnection connmis = new SqlConnection(_misConnection)) @@ -1170,7 +1174,10 @@ namespace DigitalSchoolApi.Controllers } - + /// + /// 关门 + /// + /// public static void CloseDoor(string id) { using (IDbConnection connmis = new SqlConnection(_misConnection)) From 2ede1d60900fbff892d2baafebda88e6d32b3e87 Mon Sep 17 00:00:00 2001 From: dao Date: Thu, 17 Oct 2024 14:01:27 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E5=92=8C=E7=94=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HTSchoolController.cs | 344 ++++++++++++++++++ DigitalSchoolApi/Controllers/YKTController.cs | 27 ++ DigitalSchoolApi/DigitalSchoolApi.csproj | 2 + DigitalSchoolApi/Models/HtEntity.cs | 83 +++++ DigitalSchoolApi/Web.config | 2 +- 5 files changed, 457 insertions(+), 1 deletion(-) create mode 100644 DigitalSchoolApi/Controllers/HTSchoolController.cs create mode 100644 DigitalSchoolApi/Models/HtEntity.cs diff --git a/DigitalSchoolApi/Controllers/HTSchoolController.cs b/DigitalSchoolApi/Controllers/HTSchoolController.cs new file mode 100644 index 0000000..752d89b --- /dev/null +++ b/DigitalSchoolApi/Controllers/HTSchoolController.cs @@ -0,0 +1,344 @@ +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 +{ + /// + /// 塔里木学院定时需求 + /// + 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 中间库同步到数校 + + /// + /// 从中间库同步系部数据 + /// + public static void SyncDepartment() + { + try + { + IEnumerable entityList = null; + using (IDbConnection conn = new SqlConnection(_htMiddleConnection)) + { + entityList = conn.Query("SELECT * FROM nc_orgnization"); + } + using (IDbConnection conn = new SqlConnection(_admsConnection)) + { + try + { + var maxSort = -1; + try + { + maxSort = conn.QueryFirstOrDefault("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($"select * from LR_BASE_DEPARTMENT where DeptNo='{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())"); + } + } + } + + /// + /// 从中间库同步学生数据 + /// + public static void SyncStuInfoAcc() + { + try + { + + IEnumerable entityList = null; + using (IDbConnection conn = new SqlConnection(_htMiddleConnection)) + { + entityList = conn.Query($"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($"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 (var conn=new SqlConnection(_misConnection)) + { + stu= conn.QueryFirstOrDefault($"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,XJZT,XSDQZT) " + + $"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(),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())"); + } + } + } + + /// + /// 从中间库同步教师数据 + /// + public static void SyncEmpInfoAcc() + { + try + { + + IEnumerable entityList = null; + using (IDbConnection conn = new SqlConnection(_htMiddleConnection)) + { + entityList = conn.Query($"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" ? 1 : 0; + + UserEntity model = null; + EmpInfoEntity stu = null; + using (IDbConnection xbconn = new SqlConnection(_admsConnection)) + { + model = xbconn.QueryFirstOrDefault($"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 (var conn = new SqlConnection(_misConnection)) + { + stu = conn.QueryFirstOrDefault($"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(),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())"); + } + } + } + #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; + } + + + + } +} diff --git a/DigitalSchoolApi/Controllers/YKTController.cs b/DigitalSchoolApi/Controllers/YKTController.cs index 5bc2f32..f41345e 100644 --- a/DigitalSchoolApi/Controllers/YKTController.cs +++ b/DigitalSchoolApi/Controllers/YKTController.cs @@ -680,5 +680,32 @@ namespace DigitalSchoolApi.Controllers } #endregion + + #region 和田数据同步 + + /// + /// 从中间库中同步到数校 + /// + /// + 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 } } diff --git a/DigitalSchoolApi/DigitalSchoolApi.csproj b/DigitalSchoolApi/DigitalSchoolApi.csproj index c1c4720..81849f6 100644 --- a/DigitalSchoolApi/DigitalSchoolApi.csproj +++ b/DigitalSchoolApi/DigitalSchoolApi.csproj @@ -405,6 +405,7 @@ + @@ -422,6 +423,7 @@ + diff --git a/DigitalSchoolApi/Models/HtEntity.cs b/DigitalSchoolApi/Models/HtEntity.cs new file mode 100644 index 0000000..624210e --- /dev/null +++ b/DigitalSchoolApi/Models/HtEntity.cs @@ -0,0 +1,83 @@ +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 MajorNo { get; set; } + + public string ClassNo { 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; } + + } +} diff --git a/DigitalSchoolApi/Web.config b/DigitalSchoolApi/Web.config index 1842fb7..d8797c4 100644 --- a/DigitalSchoolApi/Web.config +++ b/DigitalSchoolApi/Web.config @@ -68,7 +68,7 @@ - + + + + + 考勤设备日志 + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 考勤设备管理 + + + + + Id + + + + + DName + + + + + DCode + + + + + IpAddress + + + + + PortNumber + + + + + AdminAccount + + + + + AdminPwd + + + + + F_EnabledMark + + + + + 布防状态 + + + + + 设备最后通讯时间 + + + + + 设备lUserID + + + + + F_CreateDate + + + + + F_CreateUserId + + + + + F_CreateUserName + + + + + F_ModifyDate + + + + + F_ModifyUserId + + + + + F_ModifyUserName + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + 创 建:超级管理员 + 日 期:2020-09-03 14:57 + 描 述:考勤限制 + + + + + 编号 + + + + + 上班时间 + + + + + 下班时间 + + + + + 签到时间开始 + + + + + 签到时间结束 + + + + + 签退时间开始 + + + + + 签退时间结束 + + + + + 打卡次数 + + + + + 中午签到开始时间 + + + + + 中午签到结束时间 + + + + + 中午签退开始时间 + + + + + 中午签退结束时间 + + + + + 中午签到时间 + + + + + 中午签退时间 + + + + + 迟到超时 + + + + + 早退超时 + + + + + 未签到,记为 + + + + + 未签退,记为 + + + + + 是否启用 + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + 创 建:超级管理员 + 日 期:2020-08-28 18:09 + 描 述:考勤记录 + + + + + 编号 + + + + + 员工名字 + + + + + 员工编号 + + + + + 部门 + + + + + 考勤类型 0-未定义,1-上班,2-下班,3-开始休息,4-结束休息,5-开始加班,6-结束加班 + + + + + 考勤时间(服务器时间) + + + + + 打卡时间(考勤机时间) + + + + + 打卡结果 1正常,2迟到,3早退,4上班补签,5下班补签 + + + + + 打卡地点 + + + + + 考勤年 + + + + + 考勤月 + + + + + 考勤日 + + + + + 考勤照片 + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 用户角色结构 + + + + + 长阳报名 + + + + + 报名信息保存草稿24小时后,自动提交 + + + + + + 基础接口 + + + + + 登录接口 + + 帐户 + 帐户密码,32位MD5加密(小写) + + + + + 空闲教室 + + 上课日期,格式为yyyy-MM-dd + 分页页码,默认第一页 + 分页每页记录条数,默认每页10条 + 上课时间(如 11 代表星期一第一节课),第几节课支持多选 + 教学楼号,如09 + 教室名称 + + + + + 教学楼信息查询 + + + + + + 学生课程表 + + 学号 + 学年,格式如:18-19,默认为当前学年 + 学期,如1,默认为当前学期 + 上课开始日期,格式为yyyy-MM-dd + 上课截止日期,格式为yyyy-MM-dd + + + + + 学生成绩 + + 学号 + 学年,格式如:18-19 + 学期,数字整数,如1 + + + + + 教职工和学生基本信息 + + 人员类型 0学生 1教职工 + 分页页码,默认第一页 + 分页每页记录条数,默认每页10条 + + + + + 测试 + + + + + + 西昌一卡通推送 + + + + + + 开启金隅一卡通推送 + + + + + + 西昌在线缴费状态 + + + + + + 西昌中间库学生表更新 + + + + + + 长阳获取饭卡流水 + + + + + + 河南新安定时获取部门用户信息 + + + + + + 金隅消费信息 + + + + + + 测试PUSHWEIXIN + + + + + + 金隅充值记录 + + + + + + 停止西昌一卡通推送 + + + + + + 新疆巴楚教育局与java项目帐号同步 + + + + + + 开始连接并监听考勤事件 + + + + + + 考勤机撤防 + + + + + + 开始领导自动考勤 + + + + + + 结束领导自动考勤 + + + + + + 长阳报名 保存后24小时自动提交 + + + + + + 长阳晚归预警 + + + + + + 往长阳oracle中间库中同步数校基础信息 + + + + + + 往怀来职教oracle中间库中同步数校基础信息 + + + + + + 晚归预警 + + + + + + 锁定超过60天未登录的教师用户 + + + + + + 往塔里木oracle中间库中同步数校基础信息 + + + + + + 塔里木,给教职工发送邮件提醒 + + + + + + 塔里木固定资产,自动更新已提折旧月数 + + + + + + 授权到期提醒 上午九点 + + + + + + 授权到期提醒 下午4点 + + + + + + 部门 经管部 + + + + + 2017级 + + + + + 在校 + + + + + 汉族 + + + + + 家庭住址 + + + + + 年龄16 17 + + + + + 学号 178020242 + + + + + 姓名 + + + + + 班级名称 17财税02 + + + + + 专业 金融财税 + + + + + 西昌新生缴费状态查询 + + + + + 批量开具发票 + + + + + 单张票据开具接口 + + + + + 单张票据开具接口 + + + + + 新疆巴楚教育局与java项目帐号同步 + + + + + 西昌一卡通 + + + + + 西昌中间库更新学生数据 + + + + + 获取充值记录 + + + + + 长阳一卡通交易流水 + + + + + 长阳登录返回 + + + + + 中心序号 + + + + + 中心时间 + + + + + 发生时间 + + + + + 节点名称 + + + + + 学生卡账号 + + + + + 学生卡名称 + + + + + 身份证号 + + + + + 部门名称 + + + + + 部门编码 + + + + + 身份名称 + + + + + 流水类型 + + + + + 余额变化 + + + + + 余额 + + + + + 卡号 + + + + + 营业大组名称 + + + + + 营业小组名称 + + + + + 营业餐次 + + + + + pos机序号 + + + + + 描 述:固定资产 + + + + + 主键 + + + + + 资产编号 + + + + + 资产国标大类 + + + + + 资产分类 + + + + + 资产名称 + + + + + 财务入账日期 + + + + + 价值类型 + + + + + 价值 + + + + + 取得方式 + + + + + 取得日期 + + + + + 使用状况 + + + + + 使用部门 + + + + + 管理部门 + + + + + 使用人 + + + + + 数量 + + + + + 制单人 + + + + + 制单时间 + + + + + 所属单位 + + + + + 卡片状态 + + + + + 折旧年限 + + + + + 累计折旧 + + + + + 已提折旧月数 + + + + + 月折旧额 + + + + + 折旧方法 + + + + + 净值 + + + + + 采购组织形式 + + + + + 品牌 + + + + + 规格型号 + + + + + 存放地点 + + + + + 销售商 + + + + + 使用权面积/建筑面积 + + + + + 财政拨款 + + + + + 非财政拨款 + + + + + 会计凭证号 + + + + + 折旧/摊销状态 + + + + + CreateUserId + + + + + CreateTime + + + + + ModifyUserId + + + + + ModifyTime + + + + + SubmitUserId + + + + + SubmitTime + + + + + 状态(0草稿,1已提交,2审核通过,3审核未通过) + + + + + 流程主键 + + + + + 描 述:新闻公告 + + + + + 新闻主键 + + + + + + 类型(1-新闻2-公告) + + + + + + 阅读Id + + + + + 描 述:学校邮箱管理 + + + + + 邮件账户主键 + + + + + 账户 + + + + + 密码 + + + + + 发件人名称 + + + + + 有效标志 + + + + + 定时发送时间类型(天、周、月、年、) + + + + + 定时发送月 + + + + + 定时发送日 + + + + + 定时发送时 + + + + + 定时发送分 + + + + + 定时发送周 + + + + + 客户端授权码 + + + + + SMTP服务器 + + + + + SMTP服务器端口 + + + + + 描 述:学生宿舍管理 + + + + + 编号 + + + + + 编号 + + + + + 名称 + + + + + 宿舍楼 + + + + + 单元 + + + + + 楼层 + + + + + 负责人 + + + + + 舍长 + + + + + 类型(宿舍楼,单元,楼层,房间) + + + + + 创建人 + + + + + 创建时间 + + + + + 更新人 + + + + + 更新时间 + + + + + 价格 + + + + + 备注说明 + + + + + 电话 + + + + + 位置 + + + + + 校区 + + + + + 系 + + + + + 专业 + + + + + 班级 + + + + + 主班级 + + + + + 性别 + + + + + 住宿学生编号(存值为StuNo) + + + + + 预分学生id + + + + + 父ID + + + + + 是否独卫 + + + + + 星级 + + + + + 预分班级no + + + + + 排序 + + + + + 预分床位数量(宿舍名时有值) + + + + + 寝室类型(几人寝) + + + + + 入住人数 + + + + + 是否归宿 + + + + + 学号 + + + + + 姓名 + + + + + 所属院系代码 + + + + + 专业 + + + + + 班级 + + + + + 出生日期,格式:2019-06-17 + + + + + 1:男,2:女 + + + + + 民族CODE + + + + + 政治面貌CODE + + + + + 学制 + + + + + 培养层次CODE1:博士;2:硕士;3:本科;4:专科;9:其他(不可变更) + + + + + 入学日期 + + + + + 入学年级 + + + + + 学生状态CODE 01:在读,02:休学,03:退学,04:停学,05:复学,06:流失,07:毕业,08:结业,09:肄业,12:保留入学资格,99:其他 + + + + + 学籍状态CODE1:在籍,2:不在籍,3:保留学籍 + + + + + 户籍地址 + + + + + 预计毕业学年 + + + + + 预计毕业日期 + + + + + 预计毕业年 + + + + + 是否在校 + + + + + 学校编号 + + + + + 学号 + + + + + 学籍号 + + + + + 通知书号 + + + + + GraduateYear + + + + + 考生号 + + + + + 系所代码 + + + + + 专业代码 + + + + + 专业方向号(如0,1,2,3,4,5) + 代表无专业方向细分 + + + + + 专业方向名 + + + + + 年级 + + + + + 行政班号 + + + + + 姓名 + + + + + 拼音全称 + + + + + 拼音简称 + + + + + 性别码 + + + + + 出生日期 + + + + + 政治面貌码 + + + + + 家庭出身份 + + + + + 民族码 + + + + + 籍贯省代码 废除 + + + + + 籍贯省代码代码 + + + + + 籍贯市代码 + + + + + 籍贯县代码 + + + + + 籍贯 + + + + + 农业户口(是否农户) + + + + + 考生类别 + + + + + 健康状况 + + + + + 第几志愿 + + + + + TestStuSubjectNo + + + + + 本专科 + + + + + 计划形式 + + + + + 三好 + + + + + 优干 + + + + + 一般学生干部 + + + + + 省市前三 + + + + + 港澳台侨 + + + + + 录取类别 + + + + + 来源地区码 + + + + + 原单位码 + + + + + 原单位 + + + + + 入学年月 + + + + + 宗教 + + + + + 特长 + + + + + 身份证号 + + + + + 入党时间 + + + + + 入团时间 + 团员league + + + + + 校内地址 + + + + + 校内电话 + + + + + 当前异动类别 + + + + + 奖励标志 + + + + + 处分标志 + + + + + 联系人标志 + + + + + 学号异动标志 + + + + + 毕业标志 + + + + + 当前注册标志 + + + + + 毕业年月 + + + + + 毕业证书号 + + + + + 毕业证书备注 + + + + + 备注 + + + + + 报到日期 + + + + + Photo + + + + + TeachPlanNo + + + + + 审查标志 + + + + + 联系电话(手机) + + + + + 电子邮件地址 + + + + + QQ + + + + + 户口所在地 + + + + + 父亲姓名 + + + + + 父亲电话 + + + + + 母亲姓名 + + + + + 档案所在地 + + + + + 母亲电话 + + + + + 用户名 + + + + + 密码 + + + + + MailAddress收件人名址(收件人地址+ 姓名,可置默认值为家庭地址) + + + + + PostalCode邮政编码 + + + + + InSchoolStatus + + + + + TransMark + + + + + ClassTutorNo + + + + + 学籍卡审核 + + + + + PracStatus + + + + + RegisterStatus + + + + + PunishmentDate + + + + + StuId + + + + + 学制 + + + + + 学习形式 + + + + + 学籍异动状态 + + + + + + SyncFlag + + + + + 余额 + + + + + 身体健康状况 + + + + + 身份证件类型 + + + + + 入学方式 + + + + + 就读方式 + + + + + 国籍/地区 + + + + + 婚姻状况 + + + + + 乘火车区间 + + + + + 是否随迁子女 + + + + + 生源地行政区划码 + + + + + 出生地行政区划码 + + + + + 籍贯地行政区划码 + + + + + 户口所在地行政区划码 + + + + + 所属派出所 + + + + + 学生居住地类型 + + + + + 学生来源 + + + + + 招生对象 + + + + + 贫困户否建档立卡贫困户 + + + + + 招生方式 + + + + + 联招合作类型 + + + + + 准考证号 + + + + + 考试总分 + + + + + 联招合作办学形式 + + + + + 联招合作学校代码 + + + + + 校外教学点 + + + + + 分段培养方式 + + + + + 英文姓名 + + + + + 成员1关系 + + + + + 成员1是否监护人 + + + + + 成员1出生年月 + + + + + 成员1身份证件类型 + + + + + 成员1身份证件号 + + + + + 成员1民族 + + + + + 成员1政治面貌 + + + + + 成员1健康状况 + + + + + 成员1工作或学习单位 + + + + + 成员1职务 + + + + + 成员2关系 + + + + + 成员2是否监护人 + + + + + 成员2出生年月 + + + + + 成员2身份证件类型 + + + + + 成员2身份证件号 + + + + + 成员2民族 + + + + + 成员2政治面貌 + + + + + 成员2健康状况 + + + + + 成员2工作或学习单位 + + + + + 成员2职务 + + + + + 开户银行 + + + + + 银行卡账号 + + + + + 开户银行位置 + + + + + 专业 + + + + + 专业代码 + + + + + 名称 + + + + + 院系ID + + + + + 排序号 + + + + + 是否可用 1:是,0:否 + + + + + 专业分类 1:本科;2:专科;3:专升本;用于人才培养方案 + + + + + 代码 + + + + + 名称 + + + + + 课程类型CODE A类(纯理论课)/B类((理论+实践)课)/ C类(纯实践课) + + + + + 课程属性CODE 公共课、专业基础课、专业课。 + + + + + 课程性质CODE 课程性质(单一选项):必修课/专业选修课/公共选修课 + + + + + 是否可用 + + + + + 编制类型 在编(1)、人事代理(2)、其他(9)(不可变更) + + + + + 教学类(10)、行政类(20)、教辅类(30)、工勤类(40)、外聘教师类(80)、科研类(50)、校办企业类(60)、附设机构类(70)、其他类(99)(不可变更) + + + + + 教职工状态 在职(11,含其他原因在岗人员)、延聘(12)、返聘(04)、退休(01)、离职(07)、其他(99,表示不在校)等等,使用国标 + + + + + 学历 博士研究生:01,硕士研究生:10,本科:20,专科:30,中专:40,技工:50,高中,60(不可变更 + + + + + 学位 名誉博士:1,博士:2,硕士:3,学士:4,双学士:5(不可变更) + + + + + 组织机构ID + + + + + 编制类型 + 在编(1)、人事代理(2)、其他(9)(不可变更) + + + + + 教职工状态 + 在职(11,含其他原因在岗人员)、延聘(12)、返聘(04)、退休(01)、离职(07)、其他(99,表示不在校)等等,使用国标 + + + + + 编制类别 + 教学类(10)、行政类(20)、教辅类(30)、工勤类(40)、外聘教师类(80)、科研类(50)、校办企业类(60)、附设机构类(70)、其他类(99)(不可变更) + + + + + 最高学历 + 博士研究生:01,硕士研究生:10,本科:20,专科:30,中专:40,技工:50,高中,60(不可变更) + + + + + 最高学位 + 名誉博士:1,博士:2,硕士:3,学士:4,双学士:5(不可变更) + + + + + 培养层次CODE 1:博士;2:硕士;3:本科;4:专科;9:其他(不可变更 + + + + + 1:多媒体教室;2:语音室;3:实验室;4:计算机房;5:普通教室;6:专用教室;9:其他(不可变更) + + + + + Id + + + + + 接收邮件地址 + + + + + 是否到期前提醒 + + + + + 到期时间(提前几天提醒) + + + + + 邮件标题 + + + + + 邮件内容 + + + + + CreateTime + + + + + CreateUserId + + + + + ModifyTime + + + + + ModifyUserId + + + + + 邮件发送主键 + + + + + + 发件人 + + + + + + 发件人 + + + + + + 收件人 + + + + + + 抄送人 + + + + + + 密送人 + + + + + + 颜色 + + + + + + 主题 + + + + + + 正文 + + + + + + 附件 + + + + + + 状态 + + + + + + 描述 + + + + + + 排序码 + + + + + + 有效标志 + + + + + + 创建时间 + + + + + + 创建用户 + + + + + + 修改时间 + + + + + + 修改用户 + + + + + + 删除用户 + + + + + + 删除时间 + + + + + + 删除用户 + + + + + + 创建时间 + + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + Copyright (c) 2013-2018 北京泉江科技有限公司 + 创 建:超级管理员 + 日 期:2019-11-06 11:48 + 描 述:公众号模板配置 + + + + + 编号 + + + + + 名字 + + + + + Code + + + + + 地址 + + + + + 模板Id + + + + + 公众号ID + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + Copyright (c) 2013-2018 北京泉江科技有限公司 + 创 建:超级管理员 + 日 期:2019-11-06 11:46 + 描 述:公众号配置 + + + + + 编号 + + + + + APPId + + + + + secret + + + + + 是否启用 + + + + + 描 述:班级信息管理 + + + + + ClassId + + + + + 行政班码 + + + + + 行政班名 + + + + + 系所码 + + + + + 专业码 + + + + + 专业方向号(如0,1,2,3,4,5) 0代表无专业方向细分 + + + + + 专业方向名 + + + + + 年级 + + + + + 学生人数 + + + + + 年级内序号 + + + + + 班主任职工号 + + + + + 辅导员职工号 + + + + + 班级名称全称(根据年级、专业名称、序号自动生成) + + + + + 审核标志 + + + + + SyncFlag + + + + + 班级状态 + + + + + 是否是拆分班级 + + + + + Common + + + + + 根据当前时间获取学年和学期 + + + + + + 计算周一的时间 + + + + + + + 计算周日的时间 + + + + + + + 自动生成编号 201008251145409865 + + + + + + 空闲教室 + + + + + 楼号 + + + + + 楼名称 + + + + + 教室号 + + + + + 教室名称 + + + + + 教室楼层 + + + + + 容纳人数 + + + + + 统一操作结果 + + + + + 状态码 + + + + + 操作结果 1成功 0失败 -1 未找到 + + + + + 自定义消息 + + + + + 返回的数据 + + + + + 操作结果 + + + + + 成功 + + + + + 失败 + + + + + 未找到 + + + + + 课程表 + + + + + 课程名称 + + + + + 上课日期 + + + + + 上课时间(如 11 代表星期一第一节课) + + + + + 教师名称 + + + + + 学期 + + + + + 批量开具发票 + + + + + 业务种类 即分配的appid + + + + + 批次号 全局唯一,不能重复(业务系统必须保证整个单位唯一),如单位存在多个业务系统对接,必须在批次号前面加上业务系统唯一标识 + + + + + 业务发生日期 格式:yyyy-MM-dd + + + + + 该批次总笔数 + + + + + 开票数据列表 + + + + + 开票数据列表 + + + + + 业务单号 全局唯一,也叫业务流水号 + + + + + 开票点编码 + + + + + 票据种类编码 + + + + + 收费渠道 + 20 汇款,11 现金,10 境外,22 网银,21 POS,23 微信支付,24 支付宝支付,25 易宝支付,26 生源地贷款,27 支票 + + + + + 缴款人类型 交款人类型:1 个人 2 单位,默认为1 + + + + + 单位机构编码 交款人类型=2,填写值如:统一社会信用代码 + + + + + 收款人 + + + + + 学生姓名(缴款人) + + + + + 开票人 + + + + + 合计金额 + + + + + 收费项目明细 + + + + + 收费项目明细 + + + + + 收费项目编码 + + + + + 收费项目名称 + + + + + 数量 + + + + + 收费标准 + + + + + 金额 + + + + + 单张票据开具接口 + + + + + 业务种类 即分配的appid + + + + + 业务单号 全局唯一,也叫业务流水号 + + + + + 开票点编码 + + + + + 票据种类编码 + + + + + 收费渠道 + 20 汇款,11 现金,10 境外,22 网银,21 POS,23 微信支付,24 支付宝支付,25 易宝支付,26 生源地贷款,27 支票 + + + + + 交款人类型:1 个人 2 单位,默认为1 + + + + + 收款人 + + + + + 开票日期 格式:yyyy-MM-dd + + + + + 学生姓名(缴款人) + + + + + 学生学号 + + + + + 备注 + + + + + 开票人 + + + + + 合计金额 + + + + + 通知方式 0无需通知,1手机通知,2邮箱通知,3两者都通知 + + + + + 收费项目明细 + + + + + 收费项目明细 + + + + + 收费项目编码 + + + + + 收费项目名称 + + + + + 数量 + + + + + 收费标准 + + + + + 金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + Copyright (c) 2013-2018 北京泉江科技有限公司 + 创建人:陈彬彬 + 日 期:2017.03.04 + 描 述:字符串工具方法 + + + + + 空字符串 + + + + + 对html字符串进行编码 + + html字符串 + + + + 格式化文本(防止SQL注入) + + html页面数据 + + + + + 把汉字转换成拼音(全拼) + + 汉字字符串 + 转换后的拼音(全拼)字符串 + + + + 拼音码 + + + + + 拼音码 + + + + + 拼接集合元素 + + 集合元素类型 + 集合 + 引号,默认不带引号,范例:单引号 "'" + 分隔符,默认使用逗号分隔 + + + + 将值的首字母大写 + + 值 + + + + 将值的首字母小写 + + 值 + + + + + 将字符串转成驼峰形式 + + 原始字符串 + + + + 是否包含中文 + + 文本 + + + + 是否包含数字 + + 文本 + + + + 去除重复 + + 值,范例1:"5555",返回"5",范例2:"4545",返回"45" + + + + 截断字符串 + + 文本 + 返回长度 + 添加结束符号的个数,默认0,不添加 + 结束符号,默认为省略号 + + + + 获取结束字符串 + + + + + 获取全局唯一值 + + + + + 获取最后一个属性 + + 属性名,范例,A.B.C,返回"C" + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + Copyright (c) 2013-2018 上海力软信息技术有限公司 + 创建人:陈彬彬 + 日 期:2017.03.04 + 描 述:加密、解密帮助类 + + + + + 加密 + + 需要加密的内容 + + + + + 加密数据 + + 需要加密的内容 + 秘钥 + + + + + 解密 + + 需要解密的内容 + + + + + 解密数据 + + 需要解密的内容 + 秘钥 + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + Copyright (c) 2013-2018 北京泉江科技有限公司 + 创建人:陈彬彬 + 日 期:2017.03.07 + 描 述:mvc过滤模式 + + + + + 创建HttpClient + + + + + + post 请求 + + 请求地址 + 请求参数 + + + + + post 请求 + + 请求地址 + + + + + post 请求 + + 请求地址 + 请求参数 + + + + + get 请求 + + 请求地址 + + + + + + 发起一个HTTP请求(以GET方式) + + + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + Copyright (c) 2013-2018 上海力软信息技术有限公司 + 创建人:陈彬彬 + 日 期:2017.03.04 + 描 述:数据访问(SqlServer) 上下文 + + + + + MD5加密 + + 加密字符 + 加密位数16/32 + + + + + 32位MD5加密(小写) + + 输入字段 + + + + + 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + 创 建:超级管理员 + 日 期:2023-08-12 22:14 + 描 述:FinaChargeStuOrderDetail + + + + + Id + + + + + FCSOId + + + + + ChargeItemCode + + + + + 发票代码 + + + + + ChargeItemName + + + + + 应缴 + + + + + 实缴 + + + + + 待缴 + + + + + 超出余额 + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + 创 建:超级管理员 + 日 期:2023-08-12 22:06 + 描 述:缴费订单管理 + + + + + Id + + + + + FSYId + + + + + 年度 + + + + + 学号 + + + + + 订单编号 + + + + + 应交金额 + + + + + 实交金额 + + + + + 待缴金额 + + + + + 超出余额 + + + + + 缴费订单状态(0未支付,1已支付) + + + + + 下单时间 + + + + + 付款时间 + + + + + 付款方式 + + + + + 订单来源(1二维码缴费,2人工导入) + + + + + 银行流水号 + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + 创 建:超级管理员 + 日 期:2023-08-07 15:52 + 描 述:学生年度缴费管理 + + + + + FSYId + + + + + StuNo + + + + + FSYear + + + + + 应缴金额(收费标准) + + + + + 实缴金额(已缴金额) + + + + + 应缴余额 + + + + + 超出应收额 + + + + + 缴费标志(0未缴费,1已缴清,4部分缴纳) + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + 创 建:超级管理员 + 日 期:2023-08-07 16:40 + 描 述:FinaChargeStuYearItem + + + + + FSYIId + + + + + FSYId + + + + + ChargeItemCode + + + + + 收费项名称 + + + + + ChargeItemType + + + + + 优先级 + + + + + 收费标准 + + + + + SJAmount + + + + + 剩余待缴 + + + + + 超出缴费余额 + + + + + 缴费标志(0未缴费,1已缴清,4部分缴纳) + + + + + F_DeleteMark + + + + + 创建时间 + + + + + 创建人主键 + + + + + 创建人名字 + + + + + 新生缴费明细 + + + + + 新生缴费单 + + + + + ID + + + + + 年度 + + + + + 学号 + + + + + orderid + + + + + 应交金额 + + + + + 实交金额 + + + + + 下单时间 + + + + + 缴费状态 + + + + + 付款时间 + + + + + 票据种类编码表 + + + + + 描 述:教师信息管理 + + + + + 教师用户ID + + + + + EmpId + + + + + 职工号 + + + + + 姓名 + + + + + 性别 + + + + + 出生日期 + + + + + 系所 + + + + + 身份证号 + + + + + 联系电话(手机) + + + + + 电子邮件 + + + + + 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + 创 建:超级管理员 + 日 期:2021-04-23 16:58 + 描 述:消息提醒 + + + + + 主键 + + + + + 接收人 + + + + + 接收人 + + + + + 发送人 + + + + + 发送人 + + + + + 标题 + + + + + 内容 + + + + + 实例url(能跳转) + + + + + 实例Id + + + + + SendTime + + + + + 是否已读 + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + Copyright (c) 2013-2018 北京泉江科技有限公司 + 创建人:陈彬彬 + 日 期:2017.03.04 + 描 述:部门管理 + + + + + 部门主键 + + + + + + 公司主键 + + + + + + 父级主键 + + + + + + 部门代码 + + + + + + 部门名称 + + + + + + 部门简称 + + + + + + 部门类型 + + + + + + 负责人 + + + + + + 外线电话 + + + + + + 内线电话 + + + + + + 电子邮件 + + + + + + 部门传真 + + + + + + 排序码 + + + + + + 删除标记 + + + + + + 有效标志 + + + + + + 备注 + + + + + + 创建日期 + + + + + + 创建用户主键 + + + + + + 创建用户 + + + + + + 修改日期 + + + + + + 修改用户主键 + + + + + + 修改用户 + + + + + + 分管校长Id + + + + + + 排序 + + + + + + 系部 + + + + + DeptId + + + + + 系所代码(部门号) + + + + + 系所名称(部门名) + + + + + 系主任的职工号 + + + + + 专业 + + + + + 标识列 + + + + + 专业代码 + + + + + 专业名称 + + + + + 学制 + + + + + 系所代码 + + + + + 教室 + + + + + ClassroomId + + + + + 教室编号 + + + + + 教室名称 + + + + + 容纳人数 + + + + + 学生 + + + + + 学生用户ID + + + + + 学生ID + + + + + 学号 + + + + + 系所代码 + + + + + 专业代码 + + + + + 年级 + + + + + 行政班号 + + + + + 姓名 + + + + + 性别码 + + + + + 出生日期 + + + + + 身份证号 + + + + + 联系电话(手机) + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + Copyright (c) 2013-2018 上海力软信息技术有限公司 + 创建人:陈彬彬 + 日 期:2017.03.04 + 描 述:用户数据库实体类 + + + + + 编号 + + + + + 数据来源 + + + + + 记录序号 + + + + + 企业代码 + + + + + 钱包类型 + + + + + 一卡通账号 + + + + + 学工号 + + + + + 持卡序号 + + + + + 存款卡操作计 数 + + + + + 消费卡操作计 数 + + + + + 操作时间 + + + + + 余额 + + + + + 操作额 + + + + + 管理费、搭伙 费 + + + + + 科目代码 + + + + + 科目描述 + + + + + 终端编号 + + + + + 终端记录流水 号 + + + + + 上传时间 + + + + + SAM 卡号 + + + + + SAM 卡交易流水 号 + + + + + 交易卡类型 + + + + + TAC 验证码 + + + + + 卡应用序列号 + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + Copyright (c) 2013-2018 上海力软信息技术有限公司 + 创建人:陈彬彬 + 日 期:2017.03.04 + 描 述:用户数据库实体类 + + + + + 编号 + + + + + 数据来源 + + + + + 记录序号 + + + + + 企业代码 + + + + + 钱包类型 + + + + + 一卡通账号 + + + + + 学工号 + + + + + 持卡序号 + + + + + 消费卡操作计 数 + + + + + 操作时间 + + + + + 余额 + + + + + 操作额 + + + + + 管理费、搭伙 费 + + + + + 科目代码 + + + + + 科目描述 + + + + + 终端编号 + + + + + 终端记录流水 号 + + + + + 上传时间 + + + + + SAM 卡号 + + + + + SAM 卡交易流水 号 + + + + + 交易卡类型 + + + + + TAC 验证码 + + + + + 卡应用序列号 + + + + + 新增调用 + + + + + 编辑调用 + + + + + + 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架 + Copyright (c) 2013-2018 上海力软信息技术有限公司 + 创建人:陈彬彬 + 日 期:2017.03.04 + 描 述:用户数据库实体类 + + + + + 用户主键 + + + + + 工号 + + + + + 账户 + + + + + 登录密码 + + + + + 密码秘钥 + + + + + 真实姓名 + + + + + 呢称 + + + + + 头像 + + + + + 快速查询 + + + + + 简拼 + + + + + 性别 + + + + + 生日 + + + + + 手机 + + + + + 电话 + + + + + 电子邮件 + + + + + QQ号 + + + + + 微信号 + + + + + MSN + + + + + 公司主键 + + + + + 部门主键 + + + + + 安全级别 + + + + + 单点登录标识 + + + + + 密码提示问题 + + + + + 密码提示答案 + + + + + 允许多用户同时登录 + + + + + 允许登录时间开始 + + + + + 允许登录时间结束 + + + + + 暂停用户开始日期 + + + + + 暂停用户结束日期 + + + + + 排序码 + + + + + 删除标记 + + + + + 有效标志 + + + + + 备注 + + + + + 创建日期 + + + + + 创建用户主键 + + + + + 创建用户 + + + + + 修改日期 + + + + + 修改用户主键 + + + + + 修改用户 + + + + + 登录信息 + + + + + 登录状态 + + + + + CHCNetSDK 的摘要说明。 + + + + char[16] + + + BYTE[128] + + + From 5b4e7f07e3908de21ae47cac8c4409da6411c4d8 Mon Sep 17 00:00:00 2001 From: dao Date: Thu, 24 Oct 2024 13:28:28 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E5=92=8C=E7=94=B0=E4=B8=AD=E9=97=B4?= =?UTF-8?q?=E5=BA=93=E6=A8=A1=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/Models/HtEntity.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DigitalSchoolApi/Models/HtEntity.cs b/DigitalSchoolApi/Models/HtEntity.cs index 624210e..9795cc2 100644 --- a/DigitalSchoolApi/Models/HtEntity.cs +++ b/DigitalSchoolApi/Models/HtEntity.cs @@ -42,10 +42,13 @@ namespace DigitalSchoolApi.Models 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; } From 81b8e576be8915fde131b0b0c415b3e9d9f00f16 Mon Sep 17 00:00:00 2001 From: dao Date: Fri, 25 Oct 2024 09:08:13 +0800 Subject: [PATCH 15/16] --- DigitalSchoolApi/DigitalSchoolApi.csproj | 4 ++-- DigitalSchoolApi/Web.config | 2 +- DigitalSchoolApi/packages.config | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DigitalSchoolApi/DigitalSchoolApi.csproj b/DigitalSchoolApi/DigitalSchoolApi.csproj index 81849f6..799cabb 100644 --- a/DigitalSchoolApi/DigitalSchoolApi.csproj +++ b/DigitalSchoolApi/DigitalSchoolApi.csproj @@ -97,8 +97,8 @@ ..\packages\MySql.Data.8.0.23\lib\net452\MySql.Data.dll - - ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll ..\packages\Owin.1.0\lib\net40\Owin.dll diff --git a/DigitalSchoolApi/Web.config b/DigitalSchoolApi/Web.config index d8797c4..12d9369 100644 --- a/DigitalSchoolApi/Web.config +++ b/DigitalSchoolApi/Web.config @@ -99,7 +99,7 @@ - + diff --git a/DigitalSchoolApi/packages.config b/DigitalSchoolApi/packages.config index 674fd30..defbf18 100644 --- a/DigitalSchoolApi/packages.config +++ b/DigitalSchoolApi/packages.config @@ -30,7 +30,7 @@ - + From 13a152e19fe4e23f1c6ca44ee8b5ae6f366cb28f Mon Sep 17 00:00:00 2001 From: dao Date: Fri, 25 Oct 2024 12:08:06 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=92=8C=E7=94=B0?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalSchoolApi/App_Data/LogHelper.cs | 33 ++++++++++++++ .../Controllers/HTSchoolController.cs | 43 +++++++++---------- DigitalSchoolApi/DigitalSchoolApi.csproj | 1 + 3 files changed, 54 insertions(+), 23 deletions(-) create mode 100644 DigitalSchoolApi/App_Data/LogHelper.cs diff --git a/DigitalSchoolApi/App_Data/LogHelper.cs b/DigitalSchoolApi/App_Data/LogHelper.cs new file mode 100644 index 0000000..491d0ec --- /dev/null +++ b/DigitalSchoolApi/App_Data/LogHelper.cs @@ -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 + { + + + } + } + } +} diff --git a/DigitalSchoolApi/Controllers/HTSchoolController.cs b/DigitalSchoolApi/Controllers/HTSchoolController.cs index 752d89b..7ef35bb 100644 --- a/DigitalSchoolApi/Controllers/HTSchoolController.cs +++ b/DigitalSchoolApi/Controllers/HTSchoolController.cs @@ -73,7 +73,7 @@ namespace DigitalSchoolApi.Controllers DepartmentEntity model = null; using (IDbConnection xbconn = new SqlConnection(_admsConnection)) { - model = xbconn.QueryFirstOrDefault($"select * from LR_BASE_DEPARTMENT where DeptNo='{item.CODE}'"); + model = xbconn.QueryFirstOrDefault($"select * from LR_BASE_DEPARTMENT where F_EnCode='{item.CODE}'"); } if (model == null) { @@ -162,17 +162,16 @@ namespace DigitalSchoolApi.Controllers 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,'学生'," + + $"'{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 (var conn=new SqlConnection(_misConnection)) + using (IDbConnection conn =new SqlConnection(_misConnection)) { stu= conn.QueryFirstOrDefault($"select * from StuInfoBasic where StuNo='{item.USERNAME}'"); @@ -180,11 +179,11 @@ namespace DigitalSchoolApi.Controllers { 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) " + + "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.Grade}','{item.ClassNo}','{item.StuName}', '',{xb},'','',''," + $"'{item.NationalityNo}','','1','2','0','','{item.IdentityCardNo}','','',''," + - $"'{item.MOBILE}','1','','207fa1a9-160c-4943-a89b-8fa4db0547ce', '2', '1','','');"; + $"'{item.MOBILE}','1','','207fa1a9-160c-4943-a89b-8fa4db0547ce', '2', '1');"; conn.Execute(sql); } else @@ -195,6 +194,7 @@ namespace DigitalSchoolApi.Controllers $"MajorNo='{item.MajorNo}',ClassNo='{item.ClassNo}' where StuNo='{stu.StuNo}';"; conn.Execute(sql); } + } @@ -212,8 +212,8 @@ namespace DigitalSchoolApi.Controllers 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())"); + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),998,'从中间库同步学生信息到数校异常','" + + e.ToString() + "',getdate())"); } } } @@ -223,7 +223,7 @@ namespace DigitalSchoolApi.Controllers { conn.Execute( "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'从中间库同步学生信息到数校异常','错误信息:" + - e.Message + "',getdate())"); + e.ToString() + "',getdate())"); } } } @@ -241,7 +241,7 @@ namespace DigitalSchoolApi.Controllers { entityList = conn.Query($"SELECT * FROM nc_user"); } - + try { //插入sql @@ -249,7 +249,7 @@ namespace DigitalSchoolApi.Controllers { var id = item.ID.Length == 30 ? Guid.ParseExact(item.ID, "N") : Guid.NewGuid(); var MZ = ""; - var xb = item.GENDER == "1" ? 1 : 0; + var xb = item.GENDER == "男性" ? 1 : 0; UserEntity model = null; EmpInfoEntity stu = null; @@ -267,24 +267,21 @@ namespace DigitalSchoolApi.Controllers 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,'教师'," + + $"'{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 (var conn = new SqlConnection(_misConnection)) + using (IDbConnection conn = new SqlConnection(_misConnection)) { stu = conn.QueryFirstOrDefault($"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}'," + + $"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); } @@ -303,7 +300,7 @@ namespace DigitalSchoolApi.Controllers 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,'从中间库同步学生信息到数校完成','学生同步数量:" + + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),000,'从中间库同步老师信息到数校完成','老师同步数量:" + entityList.Count() + "条',getdate())"); } } @@ -312,8 +309,8 @@ namespace DigitalSchoolApi.Controllers 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())"); + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),998,'从中间库同步老师信息到数校异常','" + + e.ToString() + "',getdate())"); } } } @@ -322,8 +319,8 @@ namespace DigitalSchoolApi.Controllers 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())"); + "insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),999,'从中间库同步老师信息到数校异常','错误信息:" + + e.ToString() + "',getdate())"); } } } diff --git a/DigitalSchoolApi/DigitalSchoolApi.csproj b/DigitalSchoolApi/DigitalSchoolApi.csproj index 799cabb..ffb3842 100644 --- a/DigitalSchoolApi/DigitalSchoolApi.csproj +++ b/DigitalSchoolApi/DigitalSchoolApi.csproj @@ -382,6 +382,7 @@ +