@@ -65,10 +65,10 @@ module.exports = app => {
// 整理数据
const insertData = [];
for (const tmp of datas) {
- tmp.ledger_id = tmp.id;
+ tmp.ledger_id = tmp.template_id;
tmp.ledger_pid = tmp.pid;
tmp.tender_id = tenderId;
- delete tmp.id;
+ delete tmp.template_id;
delete tmp.pid;
tmp.id = this.uuid.v4();
insertData.push(tmp);
@@ -38,7 +38,9 @@ module.exports = app => {
}
// 获取所有数据
- const templateData = await this.db.select(this.tableName);
+ const templateData = await this.db.select(this.tableName, {
+ columns: ['code', 'name', 'unit', 'source', 'remark', 'pid', 'level', 'order', 'full_path', 'is_leaf', 'template_id'],
+ });
if (templateData.length <= 0) {
return [];