Commit 58d2f4c8 by 孙亚楠

dd

parent ebfa5eae
...@@ -400,6 +400,14 @@ class InvoiceCtl extends CtlBase { ...@@ -400,6 +400,14 @@ class InvoiceCtl extends CtlBase {
} }
} }
//fn:查询发票(saas_invoice,saas_invoice_apply,st_order_item)详细信息
async queryInvoiceStOrderItem(params, pobj2, req){
if(!params.id){
return system.getResult(null,`发票【${params.id}】不存在`);
}
return await this.saasinvoiceSve.queryInvoiceStOrderItem(params);
}
} }
module.exports = InvoiceCtl; module.exports = InvoiceCtl;
...@@ -149,5 +149,31 @@ class SaasinvoiceService extends ServiceBase { ...@@ -149,5 +149,31 @@ class SaasinvoiceService extends ServiceBase {
console.log("invoice handle push result:", res.data); console.log("invoice handle push result:", res.data);
return res.data; return res.data;
} }
/**
* fn:查询发票(saas_invoice,saas_invoice_apply,st_order_item)详细信息
* @param params
* @returns {Promise<void>}
*/
async queryInvoiceStOrderItem(params){
try{
//将saas_invoice 和saas_invoice_apply的信息查出来
let res = await this.callms("invoice", "saasInvoiceInfo", params);
if(res.status!=0 || !res.data){
return system.getResult(null,'网络请求超时');
}
let saasInvoice = res.data;
//将对应的交易流水也查出来 st_order_item
let invoiceOrderRes = await this.callms("order", "saasOrderPage", { saas_invoice_id: this.trim(params.id) ,currentPage:1,pageSize:99999});
if (invoiceOrderRes.status == 0) {
invoiceOrderRes = invoiceOrderRes.data.rows || [];
}
saasInvoice.invoiceOrder = invoiceOrderRes;
return system.getResult(saasInvoice);
}catch (e) {
console.log(e);
return system.getResult(null,`系统错误`);
}
}
} }
module.exports = SaasinvoiceService; module.exports = SaasinvoiceService;
\ No newline at end of file
...@@ -197,7 +197,7 @@ class System { ...@@ -197,7 +197,7 @@ class System {
merchant: dev + ":3101" + path, merchant: dev + ":3101" + path,
// 订单服务 // 订单服务
order: dev + ":3103" + path, order: local + ":3103" + path,
// 发票服务 // 发票服务
invoice: dev + ":3105" + path, invoice: dev + ":3105" + path,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment