cjy 2 weeks ago
commit 303708a1e9

@ -69,9 +69,6 @@ namespace DS.WMS.Core.Invoice.Method
Reason = r.Reason,
ReimbTime = r.CreateTime,
ApprovalTime = r.ApprovalTime
}, true)
.ToQueryPageAsync(request.PageCondition);

@ -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<InvoiceResult<string>>("/api/Invoice/RedInvoicing", req);
var req = new InvoiceReversalRequest
{
orderNo = invoice.BillNO,
chyyDm = request.chyyDm,
lrfsf = request.lrfsf,
senid = ""//待完善
};
var orgauthinfo = Db.Queryable<SysOrgAuth>().Where(t => t.Id == invoice.SaleDeptId).First();
//如果开票中所属机构为空,则取用户的orgId
var userOrgId = (invoice.SaleDeptId != null && invoice.SaleDeptId > 0) ? invoice.SaleDeptId : User.OrgId;
//接口请求key密钥
var orgauthinfo = Db.Queryable<SysOrgAuth>().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<InvoiceResult<string>>(AppSetting.app(new string[] { "InvoiceApi", "BaseUrl" }) + "/api/Invoice/RedInvoicing", req);

Loading…
Cancel
Save