|
@@ -1713,8 +1713,9 @@ module.exports = app => {
|
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, qd.unit);
|
|
|
this.ctx.helper.checkFieldPrecision(qd, qtyFields, precision.value);
|
|
|
const insertResult = await this.transaction.insert(this.tableName, qd);
|
|
|
+ qd.id = insertResult.insertId;
|
|
|
newIds.push(insertResult.insertId);
|
|
|
- await this.ctx.service.pos.insertLedgerPosData(this.transaction, tenderId, insertResult.insertId, data[i].pos);
|
|
|
+ await this.ctx.service.pos.insertLedgerPosData(this.transaction, tenderId, qd, data[i].pos);
|
|
|
await this.calc(tenderId, insertResult.insertId, this.transaction);
|
|
|
}
|
|
|
this.cache.set(cacheKey, maxId + data.length + 1, 'EX', this.ctx.app.config.cacheTime);
|
|
@@ -1782,8 +1783,9 @@ module.exports = app => {
|
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, qd.unit);
|
|
|
this.ctx.helper.checkFieldPrecision(qd, qtyFields, precision.value);
|
|
|
const insertResult = await this.transaction.insert(this.tableName, qd);
|
|
|
+ qd.id = insertResult.insertId;
|
|
|
newIds.push(insertResult.insertId);
|
|
|
- await this.ctx.service.pos.insertLedgerPosData(this.transaction, tenderId, insertResult.insertId, data[i].pos);
|
|
|
+ await this.ctx.service.pos.insertLedgerPosData(this.transaction, tenderId, qd, data[i].pos);
|
|
|
await this.calc(tenderId, insertResult.insertId, this.transaction);
|
|
|
}
|
|
|
this.cache.set(cacheKey, maxId + data.length + 1, 'EX', this.ctx.app.config.cacheTime);
|
|
@@ -1866,7 +1868,7 @@ module.exports = app => {
|
|
|
await this._importCacheTreeNode(transaction, child);
|
|
|
}
|
|
|
} else if (node.pos && node.pos.length > 0) {
|
|
|
- await this.ctx.service.pos.insertLedgerPosDataExcel(transaction, this.ctx.tender.id, data, node.pos);
|
|
|
+ await this.ctx.service.pos.insertLedgerPosData(transaction, this.ctx.tender.id, data, node.pos);
|
|
|
}
|
|
|
}
|
|
|
|