Commit 03cd7141 by 孙亚楠

Merge branch 'xggsve-invoice' of gitlab.gongsibao.com:jiangyong/zhichan into xggsve-invoice

parents be547d98 aa6e0b25
......@@ -14,7 +14,7 @@ class SaasinvoiceapplyService extends ServiceBase {
this.dictionary = system.getObject("util.dictionary");
}
async byId(params) {
let apply = this.dao.getById(params.id);
let apply = await this.dao.getById(params.id);
this.handleDate(apply, ['updated_at', 'created_at'], 'YYYY-MM-DD HH:mm:ss');
this.dictionary.setRowName("SAAS_INVOICE_APPLY",apply,["owner_type","fee_type","invoice_type","invoice_join"]);
return system.getResult(apply);
......@@ -108,12 +108,11 @@ class SaasinvoiceapplyService extends ServiceBase {
invoice.invoice_time = this.trim(params.invoice_time);
invoice.mail_no = this.trim(params.mail_no);
invoice.invoice_img = this.trim(params.invoice_img);
// await this.db.transaction(async t => {
// _invoice = await this.dao.create(_invoice, t);
// await this.iinvoiceprocessDao.model.bulkCreate(processList, { transaction: t });
// });
invoice = await this.saasinvoiceDao.create(invoice);
invoice = await this.db.transaction(async t => {
invoice = await this.saasinvoiceDao.create(invoice, t);
await this.dao.update({id: apply.id, status: "1040"}, t);
return invoice;
});
return system.getResultSuccess(invoice);
}
......
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