|
@@ -48,11 +48,11 @@ module.exports = app => {
|
|
|
|
|
|
const billsHis = `${this.ctx.session.sessionProject.id}/${tender.id}/ledger/bills${timestamp}.json`;
|
|
|
const bills = await this.ctx.service.ledger.getData(tender.id);
|
|
|
- await this.ctx.oss.put(billsHis, Buffer.from(JSON.stringify(bills), 'utf8'));
|
|
|
+ await this.ctx.hisOss.put(this.ctx.hisOssPath + billsHis, Buffer.from(JSON.stringify(bills), 'utf8'));
|
|
|
|
|
|
const posHis = `${this.ctx.session.sessionProject.id}/${tender.id}/ledger/pos${timestamp}.json`;
|
|
|
const pos = await this.ctx.service.pos.getPosData({ tid: tender.id });
|
|
|
- await this.ctx.oss.put(posHis, Buffer.from(JSON.stringify(pos), 'utf8'));
|
|
|
+ await this.ctx.hisOss.put(this.ctx.hisOssPath + posHis, Buffer.from(JSON.stringify(pos), 'utf8'));
|
|
|
|
|
|
const result = await this.db.insert(this.tableName, {
|
|
|
pid: this.ctx.session.sessionProject.id, tid: tender.id,
|
|
@@ -75,11 +75,11 @@ module.exports = app => {
|
|
|
|
|
|
const billsHis = `${this.ctx.session.sessionProject.id}/${revise.tid}/ledger/bills${timestamp}-r.json`;
|
|
|
const bills = await this.ctx.service.reviseBills.getData(revise.tid);
|
|
|
- await this.ctx.oss.put(billsHis, Buffer.from(JSON.stringify(bills), 'utf8'));
|
|
|
+ await this.ctx.hisOss.put(this.ctx.hisOssPath + billsHis, Buffer.from(JSON.stringify(bills), 'utf8'));
|
|
|
|
|
|
const posHis = `${this.ctx.session.sessionProject.id}/${revise.tid}/ledger/pos${timestamp}-r.json`;
|
|
|
const pos = await this.ctx.service.revisePos.getData(revise.tid);
|
|
|
- await this.ctx.oss.put(posHis, Buffer.from(JSON.stringify(pos), 'utf8'));
|
|
|
+ await this.ctx.hisOss.put(this.ctx.hisOssPath + posHis, Buffer.from(JSON.stringify(pos), 'utf8'));
|
|
|
|
|
|
const result = await this.db.insert(this.tableName, {
|
|
|
pid: this.ctx.session.sessionProject.id, tid: revise.tid,
|
|
@@ -108,12 +108,12 @@ module.exports = app => {
|
|
|
const billsHis = `${this.ctx.session.sessionProject.id}/${change.tid}/ledger/bills${timestamp}-c.json`;
|
|
|
const bills = await this.ctx.service.ledger.getData(change.tid);
|
|
|
if (newBillsNodes.length > 0) bills.push(...newBillsNodes);
|
|
|
- await this.ctx.oss.put(billsHis, Buffer.from(JSON.stringify(bills), 'utf8'));
|
|
|
+ await this.ctx.hisOss.put(this.ctx.hisOssPath + billsHis, Buffer.from(JSON.stringify(bills), 'utf8'));
|
|
|
|
|
|
const posHis = `${this.ctx.session.sessionProject.id}/${change.tid}/ledger/pos${timestamp}-c.json`;
|
|
|
const pos = await this.ctx.service.pos.getPosData({ tid: change.tid });
|
|
|
if (newPosNodes.length > 0) pos.push(...newPosNodes);
|
|
|
- await this.ctx.oss.put(posHis, Buffer.from(JSON.stringify(pos), 'utf8'));
|
|
|
+ await this.ctx.hisOss.put(this.ctx.hisOssPath + posHis, Buffer.from(JSON.stringify(pos), 'utf8'));
|
|
|
|
|
|
const result = await transaction.insert(this.tableName, {
|
|
|
pid: this.ctx.session.sessionProject.id, tid: change.tid,
|