ソースを参照

fix: 浙江宁海接口,清单定额GUID相关

vian 4 年 前
コミット
3bf8f1bbe0

+ 1 - 0
modules/all_models/bills.js

@@ -10,6 +10,7 @@ let billsSchema = new Schema({
     type: String,
     index: true
   },
+  "GUID": String, // 接口需要(导入导出不可变,因此不可用ID作为GUID)
   ParentID: String,
   NextSiblingID: String,
   projectID: {

+ 1 - 0
modules/all_models/ration.js

@@ -29,6 +29,7 @@ let rationSchema = new Schema({
     // 公用属性部分
     ID: {type: String, index: true},
     projectID: {type: Number, index: true},
+    "GUID": String, // 接口需要(导入导出不可变,因此不可用ID作为GUID)
     billsItemID: String,
     serialNo: Number,
     code: String,

+ 2 - 2
web/building_saas/standard_interface/export/zhejiang_ninghai.js

@@ -321,7 +321,7 @@ INTERFACE_EXPORT = (() => {
       const { mainFee, assFee } = getMaterialFee(node);
       const attrs = [
         {name: '序号', value: billSeq ++ },
-        {name: 'GUID', value: node.data.ID },
+        {name: 'GUID', value: node.data.GUID || node.data.ID },
         {name: '清单章节', value: getBillSection(node), minLen: 1, enumeration: [
           '100', '200', '300', '400', '500', '600', '700', '800', '900', '1000', '1100', 
           '1200', '1300', '1400', '1500', '1600', '1700', '1800', '1900', '2000', 
@@ -380,7 +380,7 @@ INTERFACE_EXPORT = (() => {
       const { mainFee, assFee } = getMaterialFee(node);
       const attrs = [
         {name: '序号', value: rationSeq ++ },
-        {name: 'GUID', value: node.data.ID },
+        {name: 'GUID', value: node.data.GUID || node.data.ID },
         {name: '定额编号', value: node.data.code},
         {name: '定额名称', value: node.data.name, minLen: 1 },
         {name: '单位', value: node.data.unit, minLen: 1 },

+ 1 - 0
web/building_saas/standard_interface/import/zhejiang_ninghai.js

@@ -108,6 +108,7 @@ INTERFACE_IMPORT = (() => {
       // 第100-700章的数据
       if (oneSevenBills) {
         oneSevenBills.children = extractItemsRecur(oneSevenSrc, [['工程量清单明细']], (src) => ({
+          GUID: getValue(src, ['_GUID']),
           sectionCode: getValue(src, ['_清单章节号']),
           code: getValue(src, ['_子目号']),
           name: getValue(src, ['_子目名称']),