Commit dd55b74b by 王昆

d

parent 2223b91c
......@@ -9,7 +9,6 @@ class InvoiceCtl extends CtlBase {
super();
this.saasinvoiceSve = system.getObject("service.saas.saasinvoiceSve");
this.orderSve = system.getObject("service.saas.orderSve");
this.tradeSve = system.getObject("service.trade.tradeSve");
this.redisClient = system.getObject("util.redisClient");
}
......@@ -364,6 +363,24 @@ class InvoiceCtl extends CtlBase {
}
}
/**
* 发票账单列表
* @param {*} params
* @param {*} pobj2
* @param {*} req
*/
async invoiceOrder(params, pobj2, req){
if(!params.id){
return system.getResult(null,`发票ID 不能为空`);
}
try {
return await this.saasinvoiceSve.invoiceOrder(params);
} catch (error) {
console.log(error);
return system.getResult(null,`系统错误`);
}
}
}
......
......@@ -7,6 +7,9 @@ class SaasinvoiceService extends ServiceBase {
super();
this.DEFAULT_BUSINESSMEN_TYPE = "10"; //默认的 销售方类型 个体工商户
this.DEFAULT_CHANNEL_ID = "2"; //默认的 渠道类型
this.tradeSve = system.getObject("service.trade.tradeSve");
}
async platforminvoicePage(params) {
......@@ -136,5 +139,35 @@ class SaasinvoiceService extends ServiceBase {
}
return await this.callms("invoice", "invoiceApply", params);
}
/**
* 发票详情
* @param {*} params
*/
async invoiceOrder(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.tradeSve.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;
\ No newline at end of file
......@@ -90,6 +90,11 @@ class TradeService extends ServiceBase {
return rs;
}
async invoiceTrade(params) {
let rs = await this.callms("trade", "invoiceTrade", params) || {};
return rs;
}
async tradeFeedBack(params) {
let rs = await this.callms("trade", "itemTradeOfflineCB", params) || {};
return rs;
......
......@@ -206,7 +206,7 @@ class System {
uc: dev + ":3106" + path,
// 交易
trade: dev + ":3107" + path,
trade: local + ":3107" + path,
}
} else {
return {
......
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