From 51209276978941f884b62e31323c8209a259f4f6 Mon Sep 17 00:00:00 2001 From: ddlucky Date: Wed, 14 Jun 2023 17:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=BA=97=E5=86=B2=E7=BA=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chfee_invoice_HangXinController.cs | 33 ++++++++++--------- .../Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs | 20 +++++++++++ .../Chfee_invoice_HangXin/Chfee_Invoice.cs | 7 ++-- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs index d77055dd..2b5b5b19 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs @@ -1570,18 +1570,21 @@ namespace DSWeb.Areas.Account.Controllers /// public DBResult SetInvoiceFee(ChInvoice_HangXin BlueInvoice) { - var result = new DBResult(); - if (BlueInvoice.INVOICETYPE == 2) - { - //申请开票 - var dataList = ChinvoiceapplicationDAL.GetDataListAll("INVBILLNO='" + BlueInvoice.BILLNO + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"])); - result = ChinvoiceDAL.DelAppList(dataList, BlueInvoice.BILLNO); - } - else - { - var dataList = ChinvoiceDAL.GetBodyList("BILLNO='" + BlueInvoice.BILLNO + "'"); - result = ChinvoiceDAL.DelFeeDo(dataList, BlueInvoice.GID); - } + //var result = new DBResult(); + //if (BlueInvoice.INVOICETYPE == 2) + //{ + // //申请开票 + // var dataList = ChinvoiceapplicationDAL.GetDataListAll("INVBILLNO='" + BlueInvoice.BILLNO + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"])); + // result = ChinvoiceDAL.DelAppList(dataList, BlueInvoice.BILLNO); + //} + //else + //{ + // var dataList = ChinvoiceDAL.GetBodyList("BILLNO='" + BlueInvoice.BILLNO + "'"); + // result = ChinvoiceDAL.DelFeeDo(dataList, BlueInvoice.GID); + //} + //return result; + + var result = ChinvoiceDAL.SetInvoiceFee(BlueInvoice,Session); return result; } @@ -2031,8 +2034,8 @@ namespace DSWeb.Areas.Account.Controllers ChinvoiceDAL.SetRed(redhead); //将原票内的申请和费用恢复原状 - //var BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + head.REDCODE + "' and cm.INVOICENO='" + head.REDNUM + "'"); - //result = SetInvoiceFee(BlueInvoice); + BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + redhead.REDCODE + "' and cm.INVOICENO='" + redhead.REDNUM + "'"); + result = SetInvoiceFee(BlueInvoice); } //如果状态为开出成功 则执行锁定 @@ -2066,7 +2069,7 @@ namespace DSWeb.Areas.Account.Controllers head.billUuid = redhead.BILLNO; - result = hx.PostRedConfirm(redhead, ref head, detailList); + result = hx.PostRedConfirm(redhead, ref head, detailList,Session); if (result.Success == false) { diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs index 2204cfe6..cda78e48 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs @@ -4952,6 +4952,24 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin #endregion + + + public static DBResult SetInvoiceFee(ChInvoice_HangXin BlueInvoice, System.Web.HttpSessionStateBase Session) + { + var result = new DBResult(); + if (BlueInvoice.INVOICETYPE == 2) + { + //申请开票 + var dataList = ChinvoiceapplicationDAL.GetDataListAll("INVBILLNO='" + BlueInvoice.BILLNO + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["USERCODE"]), Convert.ToString(Session["COMPANYID"])); + result = ChinvoiceDAL.DelAppList(dataList, BlueInvoice.BILLNO); + } + else + { + var dataList = ChinvoiceDAL.GetBodyList("BILLNO='" + BlueInvoice.BILLNO + "'"); + result = ChinvoiceDAL.DelFeeDo(dataList, BlueInvoice.GID); + } + return result; + } } public static class AES @@ -5013,6 +5031,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin #endregion + + } } diff --git a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs index 3c27da97..73388e86 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs @@ -25,6 +25,7 @@ using static System.Net.WebRequestMethods; using sun.security.krb5.@internal.crypto; using DSWeb.Areas.CommMng.Controllers; using DSWeb.MvcShipping.DAL.MsSysParamSet; +using System.Web; namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin { @@ -2391,7 +2392,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin /// /// /// - public DBResult PostRedConfirm(ChInvoice_HangXin head, ref ChInvoice_HangXin bluehead, List detailList) + public DBResult PostRedConfirm(ChInvoice_HangXin head, ref ChInvoice_HangXin bluehead, List detailList,HttpSessionStateBase Session) { //var billno = head.BILLNO; @@ -2466,8 +2467,8 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin ChinvoiceDAL.SetRed(head); //将原票内的申请和费用恢复原状 - //var BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + head.REDCODE + "' and cm.INVOICENO='" + head.REDNUM + "'"); - //result = SetInvoiceFee(BlueInvoice); + var BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + head.REDCODE + "' and cm.INVOICENO='" + head.REDNUM + "'"); + result = ChinvoiceDAL.SetInvoiceFee(BlueInvoice,Session); } //如果状态为开出成功 则执行锁定