From 4ac0310eb051b39dd1c4666411ff1cd97ea5d8fb Mon Sep 17 00:00:00 2001 From: douhandong Date: Thu, 7 Nov 2024 17:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B2=E7=BA=A2=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Invoice/Method/InInvoiceService.cs | 3 --- .../Invoice/Method/InvoiceIssuanceService.cs | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Method/InInvoiceService.cs b/ds-wms-service/DS.WMS.Core/Invoice/Method/InInvoiceService.cs index b7e8ef81..b9fdb704 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Method/InInvoiceService.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Method/InInvoiceService.cs @@ -69,9 +69,6 @@ namespace DS.WMS.Core.Invoice.Method Reason = r.Reason, ReimbTime = r.CreateTime, ApprovalTime = r.ApprovalTime - - - }, true) .ToQueryPageAsync(request.PageCondition); diff --git a/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceIssuanceService.cs b/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceIssuanceService.cs index e3984d91..7a224203 100644 --- a/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceIssuanceService.cs +++ b/ds-wms-service/DS.WMS.Core/Invoice/Method/InvoiceIssuanceService.cs @@ -286,10 +286,18 @@ namespace DS.WMS.Core.Invoice.Method if (invoice == null) return DataResult.FailedWithDesc(MultiLanguageConst.EmptyData); - var req = new InvoiceReversalRequest { orderNo = invoice.BillNO }; - // var result = await api.PostAsync>("/api/Invoice/RedInvoicing", req); - - var orgauthinfo = Db.Queryable().Where(t => t.Id == invoice.SaleDeptId).First(); + var req = new InvoiceReversalRequest + { + orderNo = invoice.BillNO, + chyyDm = request.chyyDm, + lrfsf = request.lrfsf, + senid = ""//待完善 + }; + + //如果开票中所属机构为空,则取用户的orgId + var userOrgId = (invoice.SaleDeptId != null && invoice.SaleDeptId > 0) ? invoice.SaleDeptId : User.OrgId; + //接口请求key密钥 + var orgauthinfo = Db.Queryable().Where(t => t.OrgId == userOrgId).First(); api.DefaultHeaders.Add("USER_KEY", orgauthinfo.Key); api.DefaultHeaders.Add("USER_SECRET", orgauthinfo.Secret); var result = await api.PostAsync>(AppSetting.app(new string[] { "InvoiceApi", "BaseUrl" }) + "/api/Invoice/RedInvoicing", req);