Commit 6334c9fd by 孙亚楠

dd

parent 58d2f4c8
...@@ -408,6 +408,24 @@ class InvoiceCtl extends CtlBase { ...@@ -408,6 +408,24 @@ class InvoiceCtl extends CtlBase {
return await this.saasinvoiceSve.queryInvoiceStOrderItem(params); return await this.saasinvoiceSve.queryInvoiceStOrderItem(params);
} }
/**
* fn:查询发票(saas_invoice,saas_invoice_apply,st_order_item)详细信息
* @param {*} params
* @param {*} pobj2
* @param {*} req
*/
async queryInvoiceTrad(params, pobj2, req) {
if (!params.id) {
return system.getResult(null, `发票ID 不能为空`);
}
try {
return await this.saasinvoiceSve.queryInvoiceTrad(params);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误`);
}
}
} }
module.exports = InvoiceCtl; module.exports = InvoiceCtl;
...@@ -175,5 +175,36 @@ class SaasinvoiceService extends ServiceBase { ...@@ -175,5 +175,36 @@ class SaasinvoiceService extends ServiceBase {
return system.getResult(null,`系统错误`); return system.getResult(null,`系统错误`);
} }
} }
/**
* 查询发票(saas_invoice,saas_invoice_apply,st_order_item)详细信息
* @param {*} params
*/
async queryInvoiceTrad(params) {
try {
let saasInvoiceApply = await this.callms("invoice", "saasInvoiceInfo", params);
if (saasInvoiceApply.status != 0 || !saasInvoiceApply.data) {
return system.getResult(null, `系统错误`);
}
saasInvoiceApply = saasInvoiceApply.data;
let tradOrder = [];
if (saasInvoiceApply.fee_type == "00") { //个体户注册订单
tradOrder = [];
} else { //查询流水
let tradOrderRes =await this.callms("trade", "invoiceTrade", {
id: saasInvoiceApply.id,
order_type: saasInvoiceApply.fee_type
}) || {};
if (tradOrderRes.status == 0) {
tradOrder = tradOrderRes.data;
}
}
saasInvoiceApply.tradOrder = tradOrder;
return system.getResult(saasInvoiceApply);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误`);
}
}
} }
module.exports = SaasinvoiceService; module.exports = SaasinvoiceService;
\ No newline at end of file
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