Browse Source

fix:安徽马鞍山等导出接口,导出费率信息,除右侧数据外,还应拼凑工程所在地、费率标准的数据。

vian 5 years ago
parent
commit
0cbbe4cf16
1 changed files with 12 additions and 5 deletions
  1. 12 5
      web/building_saas/standard_interface/export/anhui_maanshan.js

+ 12 - 5
web/building_saas/standard_interface/export/anhui_maanshan.js

@@ -273,7 +273,7 @@ INTERFACE_EXPORT = (() => {
         value = item.value;
       } else {
         const selected = item.optionList.find(item => item.selected);
-        value = selected.name;
+        value = selected && selected.name || '';
       }
       const attrs = [
         { name: 'Bm', value: code }, // 编码
@@ -554,7 +554,7 @@ INTERFACE_EXPORT = (() => {
         if (!midLayerMap[midLayerKey]) {
           jingJiBiao.children.push(midLayerMap[midLayerKey] = new Dxgcxx(midLayerCode, midLayerName));
         }
-        midLayerMap[midLayerKey].children.push(setupTender(tenderData, feature));
+        midLayerMap[midLayerKey].children.push(setupTender(tenderData, information, feature));
       }
       // 校验信息
       const [cpuID, diskID, macID] = generateHardwareId().split(';');
@@ -578,7 +578,7 @@ INTERFACE_EXPORT = (() => {
     const projectGLJMap = {}; // 项目人材机与项目人材机数据映射
 
     // 组装单位工程数据
-    function setupTender(tenderData, feature) {
+    function setupTender(tenderData, information, feature) {
       curDetail = tenderDetailMap[tenderData.ID];
       curDetail.projectGLJ.datas.gljList.forEach((glj, index) => {
         projectGLJIDToRcjID[glj.id] = index + 1;
@@ -586,7 +586,7 @@ INTERFACE_EXPORT = (() => {
       });
       const dwgcxx = new Dwgcxx(tenderData.name, feature);
       dwgcxx.children.push(
-        setupFeeRate(curDetail.FeeRate),
+        setupFeeRate(curDetail.FeeRate, information),
         setupBills(curDetail.mainTree),
         ...setupGLJList(curDetail)
       );
@@ -594,7 +594,7 @@ INTERFACE_EXPORT = (() => {
     }
 
     // 组装费率数据
-    function setupFeeRate(feeRateDetail) {
+    function setupFeeRate(feeRateDetail, information) {
       const qfxx = new Qfxx();
       const jjflb = new JjFlb();
       // 费率界面左侧底层数据
@@ -607,7 +607,14 @@ INTERFACE_EXPORT = (() => {
         }
       });
       // 费率界面右侧顶层数据
+      // 除右侧数据外,还应拼凑工程所在地、费率标准的数据。
       const jjflx = new JjFlx();
+      // 工程所在地取建设项目-基本信息中的“工程所在地”;
+      const locationItem = { name: '工程所在地', value: getValueByKey(information, 'projLocation') };
+      jjflx.children.push(new JjFlxMx(locationItem));
+      // 费率标准取,费率-重选标准中当前用的费率标准名称。
+      const feeRateStandardItem = { name: '费率标准', value: feeRateDetail.datas.libName };
+      jjflx.children.push(new JjFlxMx(feeRateStandardItem));
       const flxmxData = feeRateDetail
         .getAllSubRates()
         .filter(item => !item.isSub)