zhangweicheng 5 år sedan
förälder
incheckning
b393aeec64
1 ändrade filer med 59 tillägg och 53 borttagningar
  1. 59 53
      web/building_saas/standard_interface/export/guangdong_zhongshan.js

+ 59 - 53
web/building_saas/standard_interface/export/guangdong_zhongshan.js

@@ -744,9 +744,11 @@ INTERFACE_EXPORT = (() => {
       let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
       let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
       let totalItem = null;
       let totalItem = null;
       let proItem = null; //暂列金额项
       let proItem = null; //暂列金额项
+      let safeItem = null;
       for (let b of bills) {
       for (let b of bills) {
         if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.TOTAL_COST) totalItem = b;
         if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.TOTAL_COST) totalItem = b;
         if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.PROVISIONAL) proItem = b;
         if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.PROVISIONAL) proItem = b;
+        if(b.code == "102-3" && b.name=="安全生产费") safeItem = b;
       }
       }
 
 
       const attrs = [{
       const attrs = [{
@@ -758,8 +760,11 @@ INTERFACE_EXPORT = (() => {
           value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
           value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
         },
         },
       ];
       ];
+      //输出控制价、投标文件时,取调价后的标段总造价。
+      //输出招标文件时,取0
+      if (isBidInvitation) attrs[1].value = 0;
       Element.call(this, "EprjInfo", attrs);
       Element.call(this, "EprjInfo", attrs);
-      this.children.push(new SummaryOfCost(totalItem, proItem,feature));
+      this.children.push(new SummaryOfCost(totalItem, proItem,safeItem,feature));
       this.children.push(new MakeInfo(tenderProject));
       this.children.push(new MakeInfo(tenderProject));
       this.children.push(new Params(tenderProject));
       this.children.push(new Params(tenderProject));
       this.children.push(new getBillsItems(tenderProject));
       this.children.push(new getBillsItems(tenderProject));
@@ -909,6 +914,7 @@ INTERFACE_EXPORT = (() => {
             if (data.quantityCoe["machine"]) MechRatio = data.quantityCoe["machine"];
             if (data.quantityCoe["machine"]) MechRatio = data.quantityCoe["machine"];
           }
           }
 
 
+          //fail: { hint: '错误提示', type: '提示所属(基本就是单位工程名称)' }
           const attrs = [{
           const attrs = [{
               name: "ListCode",
               name: "ListCode",
               value: data.code,
               value: data.code,
@@ -995,7 +1001,7 @@ INTERFACE_EXPORT = (() => {
             },
             },
             {
             {
               name: "FomulaCode",
               name: "FomulaCode",
-              value: "",
+              value: ""
             },
             },
           ];
           ];
 
 
@@ -1202,18 +1208,18 @@ INTERFACE_EXPORT = (() => {
           function CostStructure(item) {
           function CostStructure(item) {
             let CostStructure = new emptyElement('CostStructure');
             let CostStructure = new emptyElement('CostStructure');
             for (let f of cpFeeTypes) {
             for (let f of cpFeeTypes) {
-              if (item.feesIndex && item.feesIndex[f.type] && itemFeeMap[f.type]) CostStructure.children.push(new CostItem(item.feesIndex[f.type]));
+              if(itemFeeMap[f.type]) CostStructure.children.push(new CostItem(item,f.type))
             }
             }
-
-            function CostItem(fee) {
+            if (CostStructure.children.length == 0) CostStructure.children.push(new CostItem({},""))
+            function CostItem(item,type) {
               const attrs = [{
               const attrs = [{
                 name: "ItemNo",
                 name: "ItemNo",
-                value: itemFeeMap[fee.fieldName],
+                value: itemFeeMap[type],
               }, {
               }, {
                 name: 'Sum',
                 name: 'Sum',
                 value: 0 //fee.tenderTotalFee
                 value: 0 //fee.tenderTotalFee
               }]
               }]
-              if (isBidSubmission) attrs[1].value = fee.tenderTotalFee;
+              if (isBidSubmission && item.feesIndex && item.feesIndex[type]) attrs[1].value = item.feesIndex[type].tenderTotalFee;
               Element.call(this, "CostItem", attrs);
               Element.call(this, "CostItem", attrs);
             }
             }
             return CostStructure;
             return CostStructure;
@@ -1228,36 +1234,36 @@ INTERFACE_EXPORT = (() => {
       let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
       let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
       let featrueMap = {};
       let featrueMap = {};
       for (let f of feature) {
       for (let f of feature) {
-        featrueMap[f.dispName] = f;
+        featrueMap[f.key] = f;
       }
       }
       let BuildType = "";
       let BuildType = "";
-      if (featrueMap["建设性质"] == 0) BuildType = "新建";
-      if (featrueMap["建设性质"] == 1) BuildType = "改(扩)建";
+      if (featrueMap["buildType"] == 0) BuildType = "新建";
+      if (featrueMap["buildType"] == 1) BuildType = "改(扩)建";
       let Terrain = "";
       let Terrain = "";
-      if (featrueMap["地形类别"] == 0) Terrain = "平原微丘陵区";
-      if (featrueMap["地形类别"] == 1) Terrain = "山岭重丘陵区";
+      if (featrueMap["terrainCategory"] == 0) Terrain = "平原微丘陵区";
+      if (featrueMap["terrainCategory"] == 1) Terrain = "山岭重丘陵区";
       let DesignSpeed = "";
       let DesignSpeed = "";
-      if (featrueMap["设计时速"] == 0) DesignSpeed = "高速公路";
-      if (featrueMap["设计时速"] == 1) DesignSpeed = "一级公路";
-      if (featrueMap["设计时速"] == 2) DesignSpeed = "二级公路";
-      if (featrueMap["设计时速"] == 3) DesignSpeed = "三级公路";
-      if (featrueMap["设计时速"] == 4) DesignSpeed = "四级公路";
+      if (featrueMap["designSpeed"] == 0) DesignSpeed = "高速公路";
+      if (featrueMap["designSpeed"] == 1) DesignSpeed = "一级公路";
+      if (featrueMap["designSpeed"] == 2) DesignSpeed = "二级公路";
+      if (featrueMap["designSpeed"] == 3) DesignSpeed = "三级公路";
+      if (featrueMap["designSpeed"] == 4) DesignSpeed = "四级公路";
       let Structure = "";
       let Structure = "";
-      if (featrueMap["路面结构"] == 0) Structure = "沥青路面";
-      if (featrueMap["路面结构"] == 1) Structure = "水泥混凝土路面";
-      if (featrueMap["路面结构"] == 2) Structure = "其他类型路面";
+      if (featrueMap["structure"] == 0) Structure = "沥青路面";
+      if (featrueMap["structure"] == 1) Structure = "水泥混凝土路面";
+      if (featrueMap["structure"] == 2) Structure = "其他类型路面";
 
 
       const attrs = [{
       const attrs = [{
           name: "PrjArea",
           name: "PrjArea",
-          value: featrueMap["工程所在地"] ? featrueMap["工程所在地"].value : "",
+          value: featrueMap["projAddress"] ? featrueMap["projAddress"].value : "",
         },
         },
         {
         {
           name: "StartPileNo",
           name: "StartPileNo",
-          value: featrueMap["起点桩号"] ? featrueMap["起点桩号"].value : "",
+          value: featrueMap["startStation"] ? featrueMap["startStation"].value : "",
         },
         },
         {
         {
           name: "EndPileNo",
           name: "EndPileNo",
-          value: featrueMap["终点桩号"] ? featrueMap["终点桩号"].value : "",
+          value: featrueMap["endingStation"] ? featrueMap["endingStation"].value : "",
         },
         },
         {
         {
           name: "BuildType",
           name: "BuildType",
@@ -1269,7 +1275,7 @@ INTERFACE_EXPORT = (() => {
         },
         },
         {
         {
           name: "RoadGrade",
           name: "RoadGrade",
-          value: featrueMap["公路等级"] ? featrueMap["公路等级"].value : "",
+          value: featrueMap["roadGrade"] ? featrueMap["roadGrade"].value : "",
         },
         },
         {
         {
           name: "DesignSpeed",
           name: "DesignSpeed",
@@ -1281,41 +1287,41 @@ INTERFACE_EXPORT = (() => {
         },
         },
         {
         {
           name: "SubgradeWidth",
           name: "SubgradeWidth",
-          value: featrueMap["路基宽度"] ? featrueMap["路基宽度"].value : "",
+          value: featrueMap["subgradeWidth"] ? featrueMap["subgradeWidth"].value : "",
         },
         },
         {
         {
           name: "RoadLength",
           name: "RoadLength",
-          value: featrueMap["路线长度"] ? featrueMap["路线长度"].value : "",
+          value: featrueMap["roadLength"] ? featrueMap["roadLength"].value : "",
         },
         },
         {
         {
           name: "BridgeLength",
           name: "BridgeLength",
-          value: featrueMap["桥梁长度"] ? featrueMap["桥梁长度"].value : "",
+          value: featrueMap["bridgeLength"] ? featrueMap["bridgeLength"].value : "",
         },
         },
         {
         {
           name: "TunnelLength",
           name: "TunnelLength",
-          value: featrueMap["隧道长度"] ? featrueMap["隧道长度"].value : "",
+          value: featrueMap["tunnelLength"] ? featrueMap["tunnelLength"].value : "",
         },
         },
         {
         {
           name: "BriTunRate",
           name: "BriTunRate",
-          value: featrueMap["桥隧比"] ? featrueMap["桥隧比"].value : "",
+          value: featrueMap["briTunRate"] ? featrueMap["briTunRate"].value : "",
         },
         },
         {
         {
           name: "InterchangeNum",
           name: "InterchangeNum",
-          value: featrueMap["互通式立交数"] ? featrueMap["互通式立交数"].value : "",
+          value: featrueMap["interchangeNum"] ? featrueMap["interchangeNum"].value : "",
         },
         },
         {
         {
           name: "StubLengths",
           name: "StubLengths",
-          value: featrueMap["支线、联络线长度"] ? featrueMap["支线、联络线长度"].value : "",
+          value: featrueMap["stubLengths"] ? featrueMap["stubLengths"].value : "",
         },
         },
         {
         {
           name: "LaneLength",
           name: "LaneLength",
-          value: featrueMap["辅道、连接线长度"] ? featrueMap["辅道、连接线长度"].value : "",
+          value: featrueMap["laneLength"] ? featrueMap["laneLength"].value : "",
         },
         },
       ];
       ];
       Element.call(this, "Params", attrs);
       Element.call(this, "Params", attrs);
     }
     }
 
 
-    function SummaryOfCost(totalItem, proItem,feature) {
+    function SummaryOfCost(totalItem, proItem,safeItem,feature) {
       let attrs = [{
       let attrs = [{
           name: "TenderSumLimit",
           name: "TenderSumLimit",
           value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
           value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
@@ -1330,7 +1336,7 @@ INTERFACE_EXPORT = (() => {
         },
         },
         {
         {
           name: "CostForHSE",
           name: "CostForHSE",
-          value: 0,
+          value: safeItem&&safeItem.feesIndex && safeItem.feesIndex.common && safeItem.feesIndex.common.tenderTotalFee ? safeItem.feesIndex.common.tenderTotalFee : 0,
         },
         },
         {
         {
           name: "ProvisionalSums",
           name: "ProvisionalSums",
@@ -1357,8 +1363,8 @@ INTERFACE_EXPORT = (() => {
         dispName: "基本信息",
         dispName: "基本信息",
       });
       });
       for (let i of baseInfo.items) {
       for (let i of baseInfo.items) {
-        let key = i.dispName;
-        if (i.dispName == "编制日期") key = "编制时间";
+        let key = i.key;
+        //if (i.dispName == "编制日期") key = "编制时间";
         baseMap[key] = i;
         baseMap[key] = i;
       }
       }
 
 
@@ -1368,71 +1374,71 @@ INTERFACE_EXPORT = (() => {
         },
         },
         {
         {
           name: "Manage",
           name: "Manage",
-          value: baseMap["建设单位"] ? baseMap["建设单位"].value : "",
+          value: baseMap["constructingUnits"] ? baseMap["constructingUnits"].value : "",
         },
         },
         {
         {
           name: "Designer",
           name: "Designer",
-          value: baseMap["设计单位"] ? baseMap["设计单位"].value : "",
+          value: baseMap["designUnits"] ? baseMap["designUnits"].value : "",
         },
         },
         {
         {
           name: "Compile",
           name: "Compile",
-          value: baseMap["编制单位"] ? baseMap["编制单位"].value : "",
+          value: baseMap["establishUnit"] ? baseMap["establishUnit"].value : "",
         },
         },
         {
         {
           name: "CompileApprover",
           name: "CompileApprover",
-          value: baseMap["编制人"] ? baseMap["编制人"].value : "",
+          value: baseMap["tenderCompiler"] ? baseMap["tenderCompiler"].value : "",
         },
         },
         {
         {
           name: "CompileCertNo",
           name: "CompileCertNo",
-          value: baseMap["编制人证书号"] ? baseMap["编制人证书号"].value : "",
+          value: baseMap["authorNo"] ? baseMap["authorNo"].value : "",
         },
         },
         {
         {
           name: "CompileDate",
           name: "CompileDate",
-          value: baseMap["编制时间"] ? baseMap["编制时间"].value : "",
+          value: baseMap["establishDate"] ? baseMap["establishDate"].value : "",
         },
         },
         {
         {
           name: "Review",
           name: "Review",
-          value: baseMap["复核单位"] ? baseMap["复核单位"].value : "",
+          value: baseMap["reviewUnit"] ? baseMap["reviewUnit"].value : "",
         },
         },
         {
         {
           name: "ReviewApprover",
           name: "ReviewApprover",
-          value: baseMap["复核人"] ? baseMap["复核人"].value : "",
+          value: baseMap["tenderExaminer"] ? baseMap["tenderExaminer"].value : "",
         },
         },
         {
         {
           name: "ReviewCertNo",
           name: "ReviewCertNo",
-          value: baseMap["复核人证书"] ? baseMap["复核人证书"].value : "",
+          value: baseMap["certificateReviewer"] ? baseMap["certificateReviewer"].value : "",
         },
         },
         {
         {
           name: "ReviewDate",
           name: "ReviewDate",
-          value: baseMap["复核日期"] ? baseMap["复核日期"].value : "",
+          value: baseMap["reviewTime"] ? baseMap["reviewTime"].value : "",
         },
         },
         {
         {
           name: "Examine",
           name: "Examine",
-          value: baseMap["审核单位"] ? baseMap["审核单位"].value : "",
+          value: baseMap["auditUnit"] ? baseMap["auditUnit"].value : "",
         },
         },
         {
         {
           name: "ExamineApprover",
           name: "ExamineApprover",
-          value: baseMap["审核人"] ? baseMap["审核人"].value : "",
+          value: baseMap["auditor"] ? baseMap["auditor"].value : "",
         },
         },
         {
         {
           name: "ExamineCertNo",
           name: "ExamineCertNo",
-          value: baseMap["审核人证书"] ? baseMap["审核人证书"].value : "",
+          value: baseMap["auditorNo"] ? baseMap["auditorNo"].value : "",
         },
         },
         {
         {
           name: "ExamineDate",
           name: "ExamineDate",
-          value: baseMap["审核日期"] ? baseMap["审核日期"].value : "",
+          value: baseMap["reviewTime"] ? baseMap["reviewTime"].value : "",
         },
         },
         {
         {
           name: "CompileExplain",
           name: "CompileExplain",
-          value: baseMap["编制说明"] ? baseMap["编制说明"].value : "",
+          value: baseMap["preparationInstructions"] ? baseMap["preparationInstructions"].value : "",
         },
         },
         {
         {
           name: "ExamineExplain",
           name: "ExamineExplain",
-          value: baseMap["审核说明"] ? baseMap["审核说明"].value : "",
+          value: baseMap["auditInstructions"] ? baseMap["auditInstructions"].value : "",
         },
         },
         {
         {
           name: "ProjectExplain",
           name: "ProjectExplain",
-          value: baseMap["工程说明"] ? baseMap["工程说明"].value : "",
+          value: baseMap["auditInstructions"] ? baseMap["auditInstructions"].value : "",
         },
         },
       ];
       ];
       if (isControl || isBidInvitation) { //招标、招标控制价文件,则以下的8、12~18则不输出
       if (isControl || isBidInvitation) { //招标、招标控制价文件,则以下的8、12~18则不输出