Commit dabce60c by 孙亚楠

dd

parent 6b041fca
...@@ -5,14 +5,14 @@ class TestAPI extends APIBase { ...@@ -5,14 +5,14 @@ class TestAPI extends APIBase {
constructor() { constructor() {
super(); super();
this.orderSve = system.getObject("service.saas.orderSve"); this.orderSve = system.getObject("service.saas.orderSve");
this.invocieSve = system.getObject("service.saas.orderSve"); this.saasinvoiceSve = system.getObject("service.saas.saasinvoiceSve");
} }
async statusNotify(pobj, query, req) { async statusNotify(pobj, query, req) {
if (pobj.status == "1190") {
if (!pobj.source_no) { if (!pobj.source_no) {
return system.getResult(null, "订单号不存在"); return system.getResult(null, "订单号不存在");
} }
if (pobj.status == "1190") {
let data = { let data = {
id: pobj.source_no, id: pobj.source_no,
sve_deliver_express_no: pobj.guest_mail_no, sve_deliver_express_no: pobj.guest_mail_no,
...@@ -20,12 +20,15 @@ class TestAPI extends APIBase { ...@@ -20,12 +20,15 @@ class TestAPI extends APIBase {
}; };
// 客户交付交付订单状态是1190时的推送信息 // 客户交付交付订单状态是1190时的推送信息
return await this.orderSve.sveDeliver(data); return await this.orderSve.sveDeliver(data);
} else if (pobj.status == "1000000" || "2000000") { //建账信息 } else if (pobj.status == "1000000" || pobj.status == "2000000") { //建账信息
if (!pobj.source_no) {
return system.getResult(null, "订单号不存在");
}
let res = await this.orderSve.sveBusinessmen(pobj); let res = await this.orderSve.sveBusinessmen(pobj);
return res; return res;
}else if(pobj.status="3000000"){ }else if(pobj.state=="3000000"){
//发票完成推送 //发票完成推送
let res = await this.invoiceSve.saveSaasInvoice(pobj); let res = await this.saasinvoiceSve.saveSaasInvoice(pobj);
return res; return res;
} }
return pobj; return pobj;
......
...@@ -48,5 +48,14 @@ class SaasinvoiceService extends ServiceBase { ...@@ -48,5 +48,14 @@ class SaasinvoiceService extends ServiceBase {
row.price = system.f2y(row.price); row.price = system.f2y(row.price);
} }
} }
/**
* fn:发票推送
* @param {*} params
*/
async saveSaasInvoice(params){
var rs = await this.callms("invoice", "saveSaasInvoice", params);
return rs;
}
} }
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