From c9d7c44fa1ab35e1a49e4395c8d5a9f26e7df24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=A4=20=E6=A2=81?= Date: Fri, 8 Dec 2023 21:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E6=98=8C=E7=BC=B4=E8=B4=B9=E4=BA=8C?= =?UTF-8?q?=E6=9C=9F=E8=A1=A5=E5=BC=80=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PayFeeResultTwoController.cs | 39 ++++++++++++++++++- DigitalSchoolApi/Controllers/YKTTrabs.cs | 2 +- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs index b072dd7..b2383f0 100644 --- a/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs +++ b/DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs @@ -94,6 +94,18 @@ namespace DigitalSchoolApi.Controllers BackgroundJob.Enqueue(() => UnInvoiceHandle(true)); return Ok(); } + /// + /// 根据年度学生缴费id触发开票任务 + /// + /// + /// + [HttpPost] + public IHttpActionResult SetUnInvoiceHandleByFSYID(string FSYID) + { + + BackgroundJob.Enqueue(() => DoUnInvoiceHandleByFSYID(FSYID)); + return Ok(); + } /// /// 补开发票 @@ -106,7 +118,6 @@ namespace DigitalSchoolApi.Controllers return Ok(); } - public void UnInvoiceHandle(bool isexcel) { try @@ -140,6 +151,32 @@ namespace DigitalSchoolApi.Controllers } } } + public void DoUnInvoiceHandleByFSYID(string FSYID) + { + try + { + using (IDbConnection conn = new SqlConnection(_sqlConnection)) + { + List stuorderlist = null; + stuorderlist = conn.Query(@"select StuNo,YearNo,FSYId,'ExcelOffLine' as PayMode from FinaChargeStuOrder where Status=1 and fsyid='"+ FSYID + @"' + group by StuNo, YearNo, FSYId, PayMode").ToList(); + foreach (var stuorderEntity in stuorderlist) + { + //开票 + YKTTrabs.InvoiceEBillMethodTwo(stuorderEntity); + break; + } + } + } + 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','" + e.Message + "',getdate())"); + } + } + } public void GetResult(bool iflasttenminutes) { diff --git a/DigitalSchoolApi/Controllers/YKTTrabs.cs b/DigitalSchoolApi/Controllers/YKTTrabs.cs index abf6fce..70081a9 100644 --- a/DigitalSchoolApi/Controllers/YKTTrabs.cs +++ b/DigitalSchoolApi/Controllers/YKTTrabs.cs @@ -1059,7 +1059,7 @@ namespace DigitalSchoolApi.Controllers } if (orderEntity.PayMode == "ExcelOffLine")//BHK:建行;THK:他行;ZFB:支付宝;CFT:微信 { - biParam.channel = "26"; + biParam.channel = "11"; } biParam.payerType = "1"; biParam.recer = "林智慧";