Browse Source

fix: export author with other zhengshen

ryanemax 6 months ago
parent
commit
9e03204e8a
1 changed files with 18 additions and 9 deletions
  1. 18 9
      server/cloud/tbook/func-tbook-export.js

+ 18 - 9
server/cloud/tbook/func-tbook-export.js

@@ -337,6 +337,8 @@ function fixVolumeData(json,volumeData,index,totalJson,isChildren){
     json.isFirstNot = circleCheck[volumeData?.importantProject?.length > 0?0:1];
     // 作者列表 + 政治审查表
     totalJson.examineList = totalJson.examineList || []
+    totalJson.zhengshenList = totalJson.zhengshenList || []
+
     // console.log(volumeData?.authorList)
     for (let index = 0; index < 6; index++) { // 补充空值
         if(!volumeData?.authorList?.[index]){
@@ -347,9 +349,11 @@ function fixVolumeData(json,volumeData,index,totalJson,isChildren){
          item.index = index + 1
          item.birth = toYearMonth(item?.birth)
          if(item?.examine){
+            
             if(!(isChildren&&volumeIndex==0)){ // 子册第一册不重复导出
                 // totalJson.examineList = pushDistinctItem(totalJson.examineList,item) // 名称去重
-                console.log(item)
+                // console.log(item)
+                totalJson.zhengshenList.push(item?.examine);
                 totalJson.examineList.push(item); // 全量导出
             }
          }
@@ -363,7 +367,7 @@ function fixVolumeData(json,volumeData,index,totalJson,isChildren){
     if(volumeData?.otherEditor){
         if(!(isChildren&&volumeIndex==0)){ // 子册第一册不重复导出
             // totalJson.otherList = pushDistinctItem(totalJson.otherList,volumeData?.otherEditor) // 名称去重
-            console.log(volumeData?.otherEditor)
+            totalJson.zhengshenList.push(volumeData?.otherEditor)
             totalJson.otherList.push(volumeData?.otherEditor); //全量导出
         }
     }
@@ -481,17 +485,22 @@ function renderReportDocsByTextbook(textbook){
     // console.log("json.examineList");
     // console.log(json.examineList);
 
-    json.examineList.forEach(author=>{
-        if(author?.examine) mergeFiles.push(author?.examine)
-    })
+    // json.examineList.forEach(author=>{
+    //     if(author?.examine) mergeFiles.push(author?.examine)
+    // })
     // console.log(mergeFiles)
 
-    let otherMap = {}
-    json?.otherList?.forEach(item=>{ // 合并不重复其他编者政治审查表
-        if(otherMap[item]) return
-        otherMap[item] = true
+    // let otherMap = {}
+    json?.zhengshenList?.forEach(item=>{ // 合并不重复其他编者政治审查表
+        // if(otherMap[item]) return
+        // otherMap[item] = true
         mergeFiles.push(item)
     })
+    // json?.otherList?.forEach(item=>{ // 合并不重复其他编者政治审查表
+    //     if(otherMap[item]) return
+    //     otherMap[item] = true
+    //     mergeFiles.push(item)
+    // })
 
     // 3.图书编校质量自查结果记录表(必须提供)
     // (教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册以不同文件分别上传。格式要求从申报平台下载。)