瀏覽代碼

浙江杭州接口调整

Tony Kang 1 年之前
父節點
當前提交
6254b2b6a8
共有 1 個文件被更改,包括 40 次插入4 次删除
  1. 40 4
      web/building_saas/standard_interface/export/zhejiang_hangzhou.js

+ 40 - 4
web/building_saas/standard_interface/export/zhejiang_hangzhou.js

@@ -77,6 +77,29 @@ INTERFACE_EXPORT = (() => {
         '简易计税': '2',
         '简易计税': '2',
       }
       }
 
 
+      const chapterMap = {
+        '第100章': 100,
+        '第200章': 200,
+        '第300章': 300,
+        '第400章': 400,
+        '第500章': 500,
+        '第600章': 600,
+        '第700章': 700,
+        '第800章': 800,
+        '第900章': 900,
+        '第1000章': 1000,
+        '第1100章': 1100,
+        '第1200章': 1200,
+        '第1300章': 1300,
+        '第1400章': 1400,
+        '第1500章': 1500,
+        '第1600章': 1600,
+        '第1700章': 1700,
+        '第1800章': 1800,
+        '第1900章': 1900,
+        '第2000章': 2000,
+      };
+  
       // 是否是材料
       // 是否是材料
       const isMaterial = (type) => {
       const isMaterial = (type) => {
         return /^2/.test(type);
         return /^2/.test(type);
@@ -493,8 +516,14 @@ INTERFACE_EXPORT = (() => {
         let chaptNo = getSection(node);
         let chaptNo = getSection(node);
         let lb = getLB(node);
         let lb = getLB(node);
         if (isOneSeven) {
         if (isOneSeven) {
-          // chaptNo = `${(index + 1) * 100}`;
-          chaptNo = (node.data.name || '').replace(/[^0-9]/g, '')
+          // chaptNo = (node.data.name || '').replace(/[^0-9]/g, '')
+          chaptNo = `${(index + 1) * 100}`;
+          for (const proKey in chapterMap) {
+            if (node.data.name && node.data.name.indexOf(proKey) >= 0) {
+              chaptNo = `${chapterMap[proKey]}`;
+              break;
+            }
+          }
           lb = chaptNo;
           lb = chaptNo;
         }
         }
         // isBidSubmission //这是投标判断
         // isBidSubmission //这是投标判断
@@ -633,8 +662,15 @@ INTERFACE_EXPORT = (() => {
           nodes.forEach((node, index) => {
           nodes.forEach((node, index) => {
             let lnStr = longNoStr;
             let lnStr = longNoStr;
             if (longNoStr === '') {
             if (longNoStr === '') {
-              // lnStr = `${(index + 1) * 100}`;
-              lnStr = getBillSection(node);
+              lnStr = `${(index + 1) * 100}`;
+              // lnStr = getBillSection(node);
+              for (const proKey in chapterMap) {
+                if (node.data.name && node.data.name.indexOf(proKey) >= 0) {
+                  lnStr = `${chapterMap[proKey]}`;
+                  break;
+                }
+              }
+
             }
             }
             const glcqdmx = new GongCLQDMX(node, lnStr);
             const glcqdmx = new GongCLQDMX(node, lnStr);
             rst.push(glcqdmx);
             rst.push(glcqdmx);