Prechádzať zdrojové kódy

fix: 安徽导入接口,部分基本信息字段需要映射

vian 5 rokov pred
rodič
commit
12f8ecd2a2

+ 20 - 3
web/building_saas/standard_interface/import/anhui_chizhou.js

@@ -24,6 +24,23 @@ INTERFACE_IMPORT = (() => {
 
     const subArea = areaKey.split('@')[1];
 
+    const natureConstructionMap = {
+      '1': '新建',
+      '2': '改扩建',
+    };
+    const roadGradeMap = {
+      '1': '高速公路',
+      '2': '一级公路',
+      '3': '二级公路',
+      '4': '三级公路',
+      '5': '四级公路',
+      '6': '独立桥梁',
+      '7': '独立隧道',
+    };
+    const taxModeMap = {
+      '1': '一般计税',
+      '2': '简易计税',
+    };
     // 提取基本信息,xml中提取出来的基本信息,最终会与模板基本信息进行合并处理。(接口内不需要处理合并)
     function setupInformation(projectSrc) {
       const gcxx = getValue(projectSrc, ['工程信息']);
@@ -36,11 +53,11 @@ INTERFACE_IMPORT = (() => {
         { key: 'endChainages', value: getValue(gcxx, ['_终点桩号']) },
         { key: 'constructionAddress', value: getValue(gcxx, ['_建设地址']) },
         { key: 'projOverview', value: getValue(gcxx, ['_项目概况']) },
-        { key: 'natureConstruction', value: getValue(gcxx, ['_建设性质']) },
-        { key: 'roadGrade', value: getValue(gcxx, ['_专业划分']) },
+        { key: 'natureConstruction', value: natureConstructionMap[getValue(gcxx, ['_建设性质'])] || '' },
+        { key: 'roadGrade', value: roadGradeMap[getValue(gcxx, ['_专业划分'])] || '' },
         { key: 'roadDistance', value: getValue(gcxx, ['_道路里程']) },
         { key: 'designUnit', value: getValue(gcxx, ['_设计单位']) },
-        { key: 'taxMode', value: getValue(gcxx, ['_计税方式']) },
+        { key: 'taxMode', value: taxModeMap[getValue(gcxx, ['_计税方式'])] },
         { key: 'projType', value: getValue(gcxx, ['_文件类型']) },
         { key: 'tendereeName', value: getValue(zbxx, ['_招标人']) },
         { key: 'tendereeTaxpayerIdentificationNo', value: getValue(zbxx, ['_招标人纳税识别号']) },

+ 5 - 1
web/building_saas/standard_interface/import/anhui_maanshan.js

@@ -25,6 +25,10 @@ INTERFACE_IMPORT = (() => {
 
     const subArea = areaKey.split('@')[1];
 
+    const taxModeMap = {
+      '1': '一般计税',
+      '2': '简易计税',
+    };
     // 提取基本信息,xml中提取出来的基本信息,最终会与模板基本信息进行合并处理。(接口内不需要处理合并)
     function setupInformation(projectSrc) {
       // key:基本信息模板中的key,作为合并时的匹配字段
@@ -33,7 +37,7 @@ INTERFACE_IMPORT = (() => {
         { key: 'projType', value: getValue(projectSrc, ['_Bzlx']) },
         { key: 'startEndChainages', value: getValue(projectSrc, ['_Xmqzzh']) },
         { key: 'constructingUnits', value: getValue(projectSrc, ['_Jsdw']) },
-        { key: 'taxMode', value: getValue(projectSrc, ['_Jsfs']) },
+        { key: 'taxMode', value: taxModeMap[getValue(projectSrc, ['_Jsfs'])] || '' },
         { key: 'tendereeName', value: getValue(projectSrc, ['ZhaoBiaoXx', '_Zbr']) },
         { key: 'costConsultant', value: getValue(projectSrc, ['ZhaoBiaoXx', '_Zxr']) },
         { key: 'tenderAuthorizer', value: getValue(projectSrc, ['ZhaoBiaoXx', '_ZbrDb']) },