|
@@ -686,8 +686,6 @@ module.exports = app => {
|
|
|
const analysisExcel = new AnalysisExcel(this.ctx, this.setting);
|
|
|
const tempData = await this.ctx.service.tenderNodeTemplate.getData(templateId, true);
|
|
|
const cacheTree = analysisExcel.analysisData(excelData, tempData, { filterZeroGcl: filter });
|
|
|
- const cacheKey = keyPre + this.ctx.tender.id;
|
|
|
- const orgMaxId = parseInt(await this.cache.get(cacheKey));
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
await transaction.delete(this.tableName, { tender_id: this.ctx.tender.id });
|
|
@@ -731,13 +729,10 @@ module.exports = app => {
|
|
|
await transaction.insert(this.ctx.service.pos.tableName, cacheTree.pos);
|
|
|
}
|
|
|
await transaction.commit();
|
|
|
- this.cache.set(cacheKey, cacheTree.keyNodeId, 'EX', this.ctx.app.config.cacheTime);
|
|
|
+ this._cacheMaxLid(this.ctx.tender.id, cacheTree.keyNodeId);
|
|
|
return { bills: datas, pos: cacheTree.pos };
|
|
|
} catch (err) {
|
|
|
await transaction.rollback();
|
|
|
- if (orgMaxId) {
|
|
|
- this.cache.set(cacheKey, cacheTree.keyNodeId, 'EX', this.ctx.app.config.cacheTime);
|
|
|
- }
|
|
|
throw err;
|
|
|
}
|
|
|
}
|