소스 검색

初始化资料归集相关

MaiXinRong 1 년 전
부모
커밋
985de8fd79
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/service/filing.js

+ 1 - 1
app/service/filing.js

@@ -54,7 +54,7 @@ module.exports = app => {
             const insertData = [];
             for (const f of templateFiling) {
                 f.newId = this.uuid.v4();
-                const parent = f.tree_pid === rootId ? templateFiling.find(x => { x.id === f.tree_pid; }) : null;
+                const parent = f.tree_pid !== rootId ? templateFiling.find(x => { return x.id === f.tree_pid; }) : null;
                 const newData = {
                     id: f.newId, tree_pid : parent ? parent.newId : rootId, tree_level: f.tree_level, tree_order: f.tree_order,
                     spid, add_user_id: this.ctx.session.sessionUser.accountId, is_fixed: f.tree_level === 1,