|
@@ -1665,7 +1665,7 @@ module.exports = app => {
|
|
};
|
|
};
|
|
qd.full_path = selectData.full_path + '.' + qd.ledger_id;
|
|
qd.full_path = selectData.full_path + '.' + qd.ledger_id;
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, qd.unit);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, qd.unit);
|
|
- this.ctx.helper.checkPrecision(qd, qtyFields, precision.value);
|
|
|
|
|
|
+ this.ctx.helper.checkFieldPrecision(qd, qtyFields, precision.value);
|
|
const insertResult = await this.transaction.insert(this.tableName, qd);
|
|
const insertResult = await this.transaction.insert(this.tableName, qd);
|
|
newIds.push(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, insertResult.insertId, data[i].pos);
|
|
@@ -1734,7 +1734,7 @@ module.exports = app => {
|
|
};
|
|
};
|
|
qd.full_path = parentData.full_path + '.' + qd.ledger_id;
|
|
qd.full_path = parentData.full_path + '.' + qd.ledger_id;
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, qd.unit);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, qd.unit);
|
|
- this.ctx.helper.checkPrecision(qd, qtyFields, precision.value);
|
|
|
|
|
|
+ this.ctx.helper.checkFieldPrecision(qd, qtyFields, precision.value);
|
|
const insertResult = await this.transaction.insert(this.tableName, qd);
|
|
const insertResult = await this.transaction.insert(this.tableName, qd);
|
|
newIds.push(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, insertResult.insertId, data[i].pos);
|
|
@@ -1812,14 +1812,15 @@ module.exports = app => {
|
|
drawing_code: node.drawing_code,
|
|
drawing_code: node.drawing_code,
|
|
};
|
|
};
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, data.unit);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, data.unit);
|
|
- this.ctx.helper.checkPrecision(data, qtyFields, precision.value);
|
|
|
|
|
|
+ this.ctx.helper.checkFieldPrecision(data, qtyFields, precision.value);
|
|
const result = await transaction.insert(this.tableName, data);
|
|
const result = await transaction.insert(this.tableName, data);
|
|
|
|
+ data.id = result.insertId;
|
|
if (node.children && node.children.length > 0) {
|
|
if (node.children && node.children.length > 0) {
|
|
for (const child of node.children) {
|
|
for (const child of node.children) {
|
|
await this._importCacheTreeNode(transaction, child);
|
|
await this._importCacheTreeNode(transaction, child);
|
|
}
|
|
}
|
|
} else if (node.pos && node.pos.length > 0) {
|
|
} else if (node.pos && node.pos.length > 0) {
|
|
- await this.ctx.service.pos.insertLedgerPosData(transaction, this.ctx.tender.id, result.insertId, node.pos);
|
|
|
|
|
|
+ await this.ctx.service.pos.insertLedgerPosDataExcel(transaction, this.ctx.tender.id, data, node.pos);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|