|
|
@ -286,10 +286,18 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
if (invoice == null)
|
|
|
|
if (invoice == null)
|
|
|
|
return DataResult.FailedWithDesc(MultiLanguageConst.EmptyData);
|
|
|
|
return DataResult.FailedWithDesc(MultiLanguageConst.EmptyData);
|
|
|
|
|
|
|
|
|
|
|
|
var req = new InvoiceReversalRequest { orderNo = invoice.BillNO };
|
|
|
|
var req = new InvoiceReversalRequest
|
|
|
|
// var result = await api.PostAsync<InvoiceResult<string>>("/api/Invoice/RedInvoicing", req);
|
|
|
|
{
|
|
|
|
|
|
|
|
orderNo = invoice.BillNO,
|
|
|
|
var orgauthinfo = Db.Queryable<SysOrgAuth>().Where(t => t.Id == invoice.SaleDeptId).First();
|
|
|
|
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<SysOrgAuth>().Where(t => t.OrgId == userOrgId).First();
|
|
|
|
api.DefaultHeaders.Add("USER_KEY", orgauthinfo.Key);
|
|
|
|
api.DefaultHeaders.Add("USER_KEY", orgauthinfo.Key);
|
|
|
|
api.DefaultHeaders.Add("USER_SECRET", orgauthinfo.Secret);
|
|
|
|
api.DefaultHeaders.Add("USER_SECRET", orgauthinfo.Secret);
|
|
|
|
var result = await api.PostAsync<InvoiceResult<string>>(AppSetting.app(new string[] { "InvoiceApi", "BaseUrl" }) + "/api/Invoice/RedInvoicing", req);
|
|
|
|
var result = await api.PostAsync<InvoiceResult<string>>(AppSetting.app(new string[] { "InvoiceApi", "BaseUrl" }) + "/api/Invoice/RedInvoicing", req);
|
|
|
|