فهرست منبع

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuCost

zhangweicheng 5 سال پیش
والد
کامیت
1452db02cb

+ 8 - 0
web/building_saas/standard_interface/config.js

@@ -64,6 +64,14 @@ const INTERFACE_CONFIG = (() => {
         [CONTROL]: '.XCGLKZJ',
       },
     },
+    '安徽@亳州': {
+      scriptName: 'anhui_maanshan.js',
+      fileSuffix: {
+        [BID_INVITATION]: '.BZGLZB',
+        [BID_SUBMISSION]: '.BZGLTB',
+        [CONTROL]: '.BZGLKZJ',
+      },
+    },
     '安徽@池州': {
       scriptName: 'anhui_chizhou.js',
       fileSuffix: {

+ 105 - 106
web/building_saas/standard_interface/export/anhui_chizhou.js

@@ -18,7 +18,6 @@ INTERFACE_EXPORT = (() => {
             },
             UTIL: {
                 getValueByKey,
-                getHan,
                 getFee,
                 generateHardwareId,
             },
@@ -31,16 +30,15 @@ INTERFACE_EXPORT = (() => {
             RationType,
         } = window.commonConstants
 
-        const GljType = gljUtil.gljType;
-
-        const { isEmptyVal, isDef } = window.commonUtil;
-
         const isBidInvitation = exportKind === BID_INVITATION; // 是否是招标
         const isBidSubmission = exportKind === BID_SUBMISSION; // 是否是投标
         const isControl = exportKind === CONTROL; // 是否是控制价
 
         let serialNo;
         let vTree;
+        const info = projectData.property && projectData.property.basicInformation || [];
+        const summary = projectData.summaryInfo[projectData.ID];
+        // const feature = tenderDetailMap[projectData.children[0].ID].property.projectFeature;
 // ------------------------------------------------------------------------------------------------------------
         // 提取字符串中的数字
         function getNum(str) {
@@ -71,95 +69,101 @@ INTERFACE_EXPORT = (() => {
             Element.call(this, nodeName, attrArr);
         }
 
-        function GongCXX(information) {
+        function GongCXX() {
             const attrs = [
-                { name: '项目编号', value: getValueByKey(information, 'projNum') },
-                { name: '项目名称', value: getValueByKey(information, '') },
-                { name: '建设单位', value: getValueByKey(information, 'constructingUnits') },
-                { name: '起始桩号', value: getValueByKey(information, 'startAndChainages') },
-                { name: '终点桩号', value: getValueByKey(information, 'startAndChainages') },
-                { name: '建设地址', value: getValueByKey(information, '') },
-                { name: '项目概况', value: getValueByKey(information, '') },
-                { name: '建设性质', value: getValueByKey(information, '') },
-                { name: '专业划分', value: getValueByKey(information, '') },
-                { name: '道路里程', value: getValueByKey(information, '') },
-                { name: '设计单位', value: getValueByKey(information, '') },
-                { name: '计税方式', value: getValueByKey(information, 'taxMode') },
-                { name: '文件类型', value: getValueByKey(information, 'projType') },
-                { name: '标准版本号', value: getValueByKey(information, '') },
-                { name: 'GUID', value: getValueByKey(information, '') }
+                { name: '项目编号', value: getValueByKey(info, 'projNum') },
+                { name: '项目名称', value: projectData.name },
+                { name: '建设单位', value: getValueByKey(info, 'constructingUnits') },
+                { name: '起始桩号', value: getValueByKey(info, 'startAndChainages') },
+                { name: '终点桩号', value: getValueByKey(info, 'startAndChainages') },
+                { name: '建设地址', value: getValueByKey(info, '') },
+                { name: '项目概况', value: getValueByKey(info, '') },
+                { name: '建设性质', value: getValueByKey(info, '') },
+                { name: '专业划分', value: getValueByKey(info, '') },
+                { name: '道路里程', value: getValueByKey(info, '') },
+                { name: '设计单位', value: getValueByKey(info, '') },
+                { name: '计税方式', value: getValueByKey(info, 'taxMode') },
+                { name: '文件类型', value: getValueByKey(info, 'projType') },
+                { name: '标准版本号', value: getValueByKey(info, '') },
+                { name: 'GUID', value: projectData._id }
             ];
             Element.call(this, '工程信息', attrs);
         }
-        function ZhaoBiaoXx(information) {
+        function ZhaoBiaoXX() {
             const attrs = [
-                { name: '招标人', value: getValueByKey(information, 'tendereeName') },
-                { name: '招标人纳税识别号', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') },
-                { name: '招标法定代表人或其授权人', value: getValueByKey(information, 'tenderAuthorizer') },
-                { name: '招标法人或其授权人身份证号', value: getValueByKey(information, 'tenderAuthorizerIDNo') },
-                { name: '造价咨询人', value: getValueByKey(information, 'costConsultant') },
-                { name: '造价咨询人纳税识别号', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') },
-                { name: '造价咨询人法定代表人或其授权人', value: getValueByKey(information, 'consultantAuthorizer') },
-                { name: '造价咨询法人或其授权人身份证号', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') },
-                { name: '编制人', value: getValueByKey(information, 'tenderCompiler') },
-                { name: '编制人资格证号', value: getValueByKey(information, '') },
-                { name: '编制日期', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE},
-                { name: '复核人', value: getValueByKey(information, 'tenderExaminer') },
-                { name: '复核人资格证号', value: getValueByKey(information, '') },
-                { name: '复核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }
+                { name: '招标人', value: getValueByKey(info, 'tendereeName') },
+                { name: '招标人纳税识别号', value: getValueByKey(info, 'tendereeTaxpayerIdentificationNo') },
+                { name: '招标法定代表人或其授权人', value: getValueByKey(info, 'tenderAuthorizer') },
+                { name: '招标法人或其授权人身份证号', value: getValueByKey(info, 'tenderAuthorizerIDNo') },
+                { name: '造价咨询人', value: getValueByKey(info, 'costConsultant') },
+                { name: '造价咨询人纳税识别号', value: getValueByKey(info, 'costConsultantTaxpayerIdentificationNo') },
+                { name: '造价咨询人法定代表人或其授权人', value: getValueByKey(info, 'consultantAuthorizer') },
+                { name: '造价咨询法人或其授权人身份证号', value: getValueByKey(info, 'consultantAuthorizerTaxpayerIdentificationNo') },
+                { name: '编制人', value: getValueByKey(info, 'tenderCompiler') },
+                { name: '编制人资格证号', value: getValueByKey(info, '') },
+                { name: '编制日期', value: getValueByKey(info, 'compilationTime'), type: TYPE.DATE},
+                { name: '复核人', value: getValueByKey(info, 'tenderExaminer') },
+                { name: '复核人资格证号', value: getValueByKey(info, '') },
+                { name: '复核日期', value: getValueByKey(info, 'reviewTime'), type: TYPE.DATE }
             ];
             Element.call(this, '招标信息', attrs);
         }
-        function ZhaoBiaoKzXx(information, totalCost) {
+        function ZhaoBiaoKZJ() {
             const attrs = [
-                { name: '招标人', value: getValueByKey(information, 'tendereeName') },
-                { name: '招标人纳税识别号', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') },
-                { name: '招标法定代表人或其授权人', value: getValueByKey(information, 'tenderAuthorizer') },
-                { name: '招标法人或其授权人身份证号', value: getValueByKey(information, 'tenderAuthorizerIDNo') },
-                { name: '造价咨询人', value: getValueByKey(information, 'costConsultant') },
-                { name: '造价咨询人纳税识别号', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') },
-                { name: '造价咨询人法定代表人或其授权人', value: getValueByKey(information, 'consultantAuthorizer') },
-                { name: '造价咨询法人或其授权人身份证号', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') },
-                { name: '编制人', value: getValueByKey(information, 'tenderCompiler') },
-                { name: '编制人资格证号', value: getValueByKey(information, '') },
-                { name: '编制日期', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE},
-                { name: '复核人', value: getValueByKey(information, 'tenderExaminer') },
-                { name: '复核人资格证号', value: getValueByKey(information, '') },
-                { name: '复核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
-                { name: '审核人', value: getValueByKey(information, 'tenderExaminer') },
-                { name: '审核人资格证号', value: getValueByKey(information, '') },
-                { name: '审核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
-                { name: '控制价总价', value: totalCost, type: TYPE.DECIMAL },
-                { name: '工期', value: getValueByKey(information, '') },
-                { name: '质量要求', value: getValueByKey(information, '') }
+                { name: '招标人', value: getValueByKey(info, 'tendereeName') },
+                { name: '招标人纳税识别号', value: getValueByKey(info, 'tendereeTaxpayerIdentificationNo') },
+                { name: '招标法定代表人或其授权人', value: getValueByKey(info, 'tenderAuthorizer') },
+                { name: '招标法人或其授权人身份证号', value: getValueByKey(info, 'tenderAuthorizerIDNo') },
+                { name: '造价咨询人', value: getValueByKey(info, 'costConsultant') },
+                { name: '造价咨询人纳税识别号', value: getValueByKey(info, 'costConsultantTaxpayerIdentificationNo') },
+                { name: '造价咨询人法定代表人或其授权人', value: getValueByKey(info, 'consultantAuthorizer') },
+                { name: '造价咨询法人或其授权人身份证号', value: getValueByKey(info, 'consultantAuthorizerTaxpayerIdentificationNo') },
+                { name: '编制人', value: getValueByKey(info, 'tenderCompiler') },
+                { name: '编制人资格证号', value: getValueByKey(info, '') },
+                { name: '编制日期', value: getValueByKey(info, 'compilationTime'), type: TYPE.DATE},
+                { name: '复核人', value: getValueByKey(info, 'tenderExaminer') },
+                { name: '复核人资格证号', value: getValueByKey(info, '') },
+                { name: '复核日期', value: getValueByKey(info, 'reviewTime'), type: TYPE.DATE },
+
+                { name: '审核人', value: getValueByKey(info, 'tenderExaminer') },
+                { name: '审核人资格证号', value: getValueByKey(info, '') },
+                { name: '审核日期', value: getValueByKey(info, 'reviewTime'), type: TYPE.DATE },
+
+                { name: '控制价总价', value: summary.totalCost, type: TYPE.DECIMAL },
+                { name: '工期', value: getValueByKey(info, '') },
+                { name: '质量要求', value: getValueByKey(info, '') }
             ];
             Element.call(this, '招标控制价', attrs);
         }
-        function TouBiaoXx(information, totalCost) {
+        function TouBiaoXX() {
+            let hardID = generateHardwareId();
+            let [cpuId, diskId, macId] = hardID.split(";");
+
             const attrs = [
-                { name: '投标人', value: getValueByKey(information, 'bidderName') },
-                { name: '投标人纳税识别号', value: getValueByKey(information, '') },
-                { name: '投标人法定代表或其授权人', value: getValueByKey(information, 'bidderAuthorizer') },
-                { name: '投标人法人或其授权人身份证号', value: getValueByKey(information, '') },
-                { name: '编制人', value: getValueByKey(information, 'tenderCompiler') },
-                { name: '编制人资格证号', value: getValueByKey(information, '') },
-                { name: '编制日期', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE},
-                { name: '复核人', value: getValueByKey(information, 'tenderExaminer') },
-                { name: '复核人资格证号', value: getValueByKey(information, '') },
-                { name: '复核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
-                { name: '审核人', value: getValueByKey(information, 'tenderExaminer') },
-                { name: '审核人资格证号', value: getValueByKey(information, '') },
-                { name: '审核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
-                { name: '投标总价', value: totalCost, type: TYPE.DECIMAL },
-                { name: '工期', value: getValueByKey(information, '') },
-                { name: '投标担保金额', value: getValueByKey(information, '') },
-                { name: '质量承诺', value: getValueByKey(information, '') },
-                { name: '投标担保方式', value: getValueByKey(information, '') },
-                { name: '造价软件品牌', value: getValueByKey(information, '') },
-                { name: '造价软件版本', value: getValueByKey(information, '') },
-                { name: '造价软件加密锁编号', value: getValueByKey(information, '') },
-                { name: '计算机硬件信息', value: getValueByKey(information, '') },
-                { name: '', value: getValueByKey(information, '') }
+                { name: '投标人', value: getValueByKey(info, 'bidderName') },
+                { name: '投标人纳税识别号', value: getValueByKey(info, 'bidderAuthorizerIDNo') },
+                { name: '投标人法定代表或其授权人', value: getValueByKey(info, 'bidderAuthorizer') },
+                { name: '投标人法人或其授权人身份证号', value: getValueByKey(info, 'bidderAuthorizerTaxpayerIdentificationNo') },
+                { name: '编制人', value: getValueByKey(info, 'tenderCompiler') },
+                { name: '编制人资格证号', value: getValueByKey(info, 'authorNo') },
+                { name: '编制日期', value: getValueByKey(info, 'compilationTime'), type: TYPE.DATE},
+                { name: '复核人', value: getValueByKey(info, 'tenderExaminer') },
+                { name: '复核人资格证号', value: getValueByKey(info, '') },
+                { name: '复核日期', value: getValueByKey(info, 'reviewTime'), type: TYPE.DATE },
+                { name: '审核人', value: getValueByKey(info, 'tenderExaminer') },
+                { name: '审核人资格证号', value: getValueByKey(info, 'auditorNo') },
+                { name: '审核日期', value: getValueByKey(info, 'reviewTime'), type: TYPE.DATE },
+
+                { name: '投标总价', value: summary.totalCost, type: TYPE.DECIMAL },
+                { name: '工期', value: getValueByKey(info, '') },
+                { name: '投标担保金额', value: getValueByKey(info, '') },
+                { name: '质量承诺', value: getValueByKey(info, '') },
+                { name: '投标担保方式', value: getValueByKey(info, '') },
+
+                { name: '造价软件品牌', value: '纵横公路云造价' },
+                { name: '造价软件版本', value: "Ver" + VERSION },
+                { name: '造价软件加密锁编号', value: userID },
+                { name: '计算机硬件信息', value: cpuId + diskId + macId }
             ];
             Element.call(this, '投标信息', attrs);
         }
@@ -282,14 +286,13 @@ INTERFACE_EXPORT = (() => {
             recursiveAddBills(AItem.nextSibling, AXMLParent);
         }
 
-        // 清单表
-        function createGCLQDB(tenderData, gongCLQDB){
-            vTree = tenderDetailMap[tenderData.ID].mainTree;
+        function createGCLQDB(Bid, gongCLQDB){
+            vTree = tenderDetailMap[Bid.ID].mainTree;
             serialNo = 0;
             recursiveAddBills(vTree.roots[0].children[0], gongCLQDB);
         };
 
-        function createJiRGXXB(tenderData, jiRGXXB){
+        function createJiRGXXB(Bid, jiRGXXB){
             let vJRG, vKind, vChild;
             let vJRGNode, vKindNode, vChildNode;
 
@@ -344,7 +347,7 @@ INTERFACE_EXPORT = (() => {
 
         }
 
-        function createZaoJHZB(tenderData, ZaoJHZB) {
+        function createZaoJHZB(Bid, ZaoJHZB) {
             const map_ZC_LB = [
                 {key: '第100章至700章清单', zc: '', lb: '1'},
                 {key: '已包含在清单合计中的材料', zc: '', lb: '2'},
@@ -399,8 +402,8 @@ INTERFACE_EXPORT = (() => {
             };
         }
 
-        function createRenCJHZ(tenderData, RenCJHZ) {
-            const pGLJs = tenderDetailMap[tenderData.ID].projectGLJ.datas.gljList;
+        function createRenCJHZ(Bid, RenCJHZ) {
+            const pGLJs = tenderDetailMap[Bid.ID].projectGLJ.datas.gljList;
             for (let i = 0; i < pGLJs.length; i++){
                 let pGLJ = pGLJs[i];
                 let attrs = [
@@ -424,16 +427,15 @@ INTERFACE_EXPORT = (() => {
             }
         }
 
-
         // 生成标段工程
-        function createGLBDGC(tenderData, gongLGCSJ, gongLGCHZ, Num){
+        function createGLBDGC(Bid, gongLGCSJ, gongLGCHZ, Num){
             let attrs0 = [
                 { name: '序号', value: Num },
-                { name: '标段名称', value: tenderData.name },
-                { name: '金额', value: projectData.summaryInfo[tenderData.ID].totalCost }
+                { name: '标段名称', value: Bid.name },
+                { name: '金额', value: projectData.summaryInfo[Bid.ID].totalCost }
             ];
 
-            const attrs1 = [{ name: '唯一标识-Guid', value: tenderData._id }];           // 公路标段工程
+            const attrs1 = [{ name: '唯一标识-Guid', value: Bid._id }];           // 公路标段工程
             const gongLBDGC = new CreateNode('公路标段工程', attrs0.concat(attrs1));
             gongLGCSJ.children.push(gongLBDGC);
             const gongCLQDB = new CreateNode('工程量清单表');
@@ -442,10 +444,10 @@ INTERFACE_EXPORT = (() => {
             const RenCJHZ = new CreateNode('人材机汇总');
             gongLBDGC.children = [gongCLQDB, jiRGXXB, ZaoJHZB, RenCJHZ];
 
-            createGCLQDB(tenderData, gongCLQDB);
-            createJiRGXXB(tenderData, jiRGXXB);
-            createZaoJHZB(tenderData, ZaoJHZB);
-            createRenCJHZ(tenderData, RenCJHZ);
+            createGCLQDB(Bid, gongCLQDB);
+            createJiRGXXB(Bid, jiRGXXB);
+            createZaoJHZB(Bid, ZaoJHZB);
+            createRenCJHZ(Bid, RenCJHZ);
 
             // 同步生成 公路工程汇总明细 数据
             const attrs2 = [{ name: '备注', value: '' }];
@@ -455,29 +457,26 @@ INTERFACE_EXPORT = (() => {
 
         // 组装主体框架数据
         function setupConstruction() {
-            const information = projectData.property && projectData.property.basicInformation || [];
-            const summaryInfo = projectData.summaryInfo[projectData.ID];
-
             const chiZGLGC = new CreateNode('池州公路工程');
-            const gongCXX = new GongCXX(information);   // 工程信息
+            const gongCXX = new GongCXX();   // 工程信息
             const zhaoTBXX = new CreateNode('招投标信息');
             const gongLGCSJ = new CreateNode('公路工程数据');
             chiZGLGC.children = [gongCXX, zhaoTBXX, gongLGCSJ];
 
             if (isBidInvitation)
-                zhaoTBXX.children.push(new ZhaoBiaoXx(information));
+                zhaoTBXX.children.push(new ZhaoBiaoXX());
             else if (isControl)
-                zhaoTBXX.children.push(new ZhaoBiaoKzXx(information, summaryInfo.totalCost));
+                zhaoTBXX.children.push(new ZhaoBiaoKZJ());
             else
-                zhaoTBXX.children.push(new TouBiaoXx(information, summaryInfo.totalCost));
+                zhaoTBXX.children.push(new TouBiaoXX());
 
             const gongLGCHZ = new CreateNode('公路工程汇总');
             gongLGCSJ.children.push(gongLGCHZ);
 
             let n = 0;
-            for (const tenderData of projectData.children) {
+            for (const Bid of projectData.children) {
                 n++;
-                createGLBDGC(tenderData, gongLGCSJ, gongLGCHZ, n);
+                createGLBDGC(Bid, gongLGCSJ, gongLGCHZ, n);
             }
             gongLGCSJ.children.push(gongLGCSJ.children.shift());
 

+ 1 - 1
web/building_saas/standard_interface/export/anhui_maanshan.js

@@ -69,7 +69,7 @@ INTERFACE_EXPORT = (() => {
         { name: 'Jsdw', value: getValueByKey(information, 'constructingUnits') }, // 建设单位
         { name: 'Czzt', value: czzt[exportKind] }, // 操作状态:招标、投标、招标控制,即导出接口时,所选的文件类型
         { name: 'Jsfs', value: taxModeMap[getValueByKey(information, 'taxMode')] || '1', type: TYPE.INT }, // 计税方式,默认1。1=一般计税 2=简易计税
-        { name: 'Version', value: ['淮北', '铜陵'].includes(subArea) ? '1.1' : '1.0' },
+        { name: 'Version', value: ['淮北', '铜陵', '毫州'].includes(subArea) ? '1.1' : '1.0' },
       ];
       Element.call(this, 'JingJiBiao', attrs);
     }