Ver código fonte

广西接口反馈调整

Tony Kang 2 anos atrás
pai
commit
ad367b480b

+ 94 - 8
web/building_saas/standard_interface/export/guangxi_common.js

@@ -354,11 +354,11 @@ INTERFACE_EXPORT = (() => {
             value: uuid.v1()
             value: uuid.v1()
           }
           }
         ];
         ];
-        if (isBidSubmission)
-          attrs.splice(6, 0, {
-            name: "BidderVer",
-            value: UTIL.getNowFormatTime(true),
-          });
+        // if (isBidSubmission)
+        //   attrs.splice(6, 0, {
+        //     name: "BidderVer",
+        //     value: UTIL.getNowFormatTime(true),
+        //   });
         Element.call(this, "SystemInfo", attrs);
         Element.call(this, "SystemInfo", attrs);
       }
       }
   
   
@@ -622,6 +622,22 @@ INTERFACE_EXPORT = (() => {
               name: "IsAdd",
               name: "IsAdd",
               value: g.unit_price.is_add,
               value: g.unit_price.is_add,
             },
             },
+            {
+              name: "Num",
+              value: g.quantity,
+            },
+            {
+              name: "BudgetSum", 
+              value: scMathUtil.roundForObj(g.quantity * g.unit_price.market_price, tpdata.property.decimal.bills.unitPrice), //项目的人工费(人工预算价*人工数量)
+            },
+            {
+              name: "NormSum",
+              value: scMathUtil.roundForObj(g.quantity * g.unit_price.base_price, tpdata.property.decimal.bills.unitPrice), //项目的定额人工费(人工定额价*人工数量)
+            },
+            {
+              name: "KeyId",
+              value: uuid.v1()
+            },
           ];
           ];
           Element.call(this, "Mp", attrs);
           Element.call(this, "Mp", attrs);
         }
         }
@@ -687,6 +703,22 @@ INTERFACE_EXPORT = (() => {
               name: "PackageRecycleFee",
               name: "PackageRecycleFee",
               value: g.unit_price.packageRecoverValue ? g.unit_price.packageRecoverValue : 0,
               value: g.unit_price.packageRecoverValue ? g.unit_price.packageRecoverValue : 0,
             },
             },
+            {
+              name: "Num",
+              value: g.quantity,
+            },
+            {
+              name: "BudgetSum", 
+              value: scMathUtil.roundForObj(g.quantity * g.unit_price.market_price, tpdata.property.decimal.bills.unitPrice), //项目的材料费(材料预算价*材料数量)
+            },
+            {
+              name: "NormSum",
+              value: scMathUtil.roundForObj(g.quantity * g.unit_price.base_price, tpdata.property.decimal.bills.unitPrice), //项目的定额材料费(材料定额价*材料数量)
+            },
+            {
+              name: "KeyId",
+              value: uuid.v1()
+            },
           ];
           ];
           Element.call(this, "Material", attrs);
           Element.call(this, "Material", attrs);
           // if (g.unit_price.calcMaterial == 1) { //有材料计算
           // if (g.unit_price.calcMaterial == 1) { //有材料计算
@@ -707,7 +739,10 @@ INTERFACE_EXPORT = (() => {
   
   
           function Consume(r, o) {
           function Consume(r, o) {
             this.name = "Consume";
             this.name = "Consume";
-            this.attrs = [];
+            this.attrs = [{
+              name: "KeyId",
+              value: uuid.v1()
+            }];
             this.children = [];
             this.children = [];
             for (let g of o.ration_gljs) {
             for (let g of o.ration_gljs) {
               if (g.rationID == r.ID) {
               if (g.rationID == r.ID) {
@@ -718,6 +753,24 @@ INTERFACE_EXPORT = (() => {
           }
           }
   
   
           function ConsumeItem(g, ration_quantity) {
           function ConsumeItem(g, ration_quantity) {
+            let costType = parseInt(g.type);
+            if (costType < 100) {
+              costType = 1;
+            } else if (costType >= 300) {
+              costType = 3;
+            } else {
+              //判断主材
+              for (let pglj of pgljData.gljList) {
+                if (pglj.glj_id === g.GLJID) {
+                  if (pglj.is_main_material == 1) {
+                    costType = 3;
+                  } else {
+                    costType = 2;
+                  }
+                  break;
+                }
+              }
+            }
             const attrs = [{
             const attrs = [{
                 name: "Code", //待获取
                 name: "Code", //待获取
                 value: g.code,
                 value: g.code,
@@ -725,6 +778,14 @@ INTERFACE_EXPORT = (() => {
               {
               {
                 name: "Consumption",
                 name: "Consumption",
                 value: scMathUtil.roundForObj(ration_quantity * parseFloat(g.quantity), tpdata.property.decimal.glj.quantity),
                 value: scMathUtil.roundForObj(ration_quantity * parseFloat(g.quantity), tpdata.property.decimal.glj.quantity),
+              }, 
+              {
+                name: "CostType",
+                value: costType,
+              }, 
+              {
+                name: "KeyId",
+                value: uuid.v1()
               },
               },
             ];
             ];
             Element.call(this, "ConsumeItem", attrs);
             Element.call(this, "ConsumeItem", attrs);
@@ -826,6 +887,22 @@ INTERFACE_EXPORT = (() => {
               name: "IsAdd",
               name: "IsAdd",
               value: g.unit_price.is_add,
               value: g.unit_price.is_add,
             },
             },
+            {
+              name: "Num",
+              value: g.quantity,
+            },
+            {
+              name: "BudgetSum", 
+              value: scMathUtil.roundForObj(g.quantity * g.unit_price.market_price, tpdata.property.decimal.bills.unitPrice), //项目的机械费(机械预算价*机械数量)
+            },
+            {
+              name: "NormSum",
+              value: scMathUtil.roundForObj(g.quantity * g.unit_price.base_price, tpdata.property.decimal.bills.unitPrice), //项目的定额机械费(机械定额价*机械数量)
+            },
+            {
+              name: "KeyId",
+              value: uuid.v1()
+            },
           ];
           ];
           Element.call(this, "Mech", attrs);
           Element.call(this, "Mech", attrs);
           let FixedCostItems = [];
           let FixedCostItems = [];
@@ -864,6 +941,9 @@ INTERFACE_EXPORT = (() => {
             const attrs = [{
             const attrs = [{
               name: "VariableCostSum",
               name: "VariableCostSum",
               value: sum,
               value: sum,
+            },{
+              name: "KeyId",
+              value: uuid.v1()
             }];
             }];
             Element.call(this, "VariableCost", attrs);
             Element.call(this, "VariableCost", attrs);
           }
           }
@@ -886,6 +966,9 @@ INTERFACE_EXPORT = (() => {
             }, {
             }, {
               name: "FixedRate",
               name: "FixedRate",
               value: 1,
               value: 1,
+            },{
+              name: "KeyId",
+              value: uuid.v1()
             }];
             }];
             Element.call(this, "FixedCost", attrs);
             Element.call(this, "FixedCost", attrs);
           }
           }
@@ -1567,6 +1650,10 @@ INTERFACE_EXPORT = (() => {
   
   
             function Consume(ration) {
             function Consume(ration) {
               let consume = new emptyElement('Consume');
               let consume = new emptyElement('Consume');
+              // consume.attrs = [{
+              //   name: "KeyId",
+              //   value: uuid.v1()
+              // }];
               for (let rg of ration.rationGLJList) {
               for (let rg of ration.rationGLJList) {
                 consume.children.push(new ConsumeItem(rg));
                 consume.children.push(new ConsumeItem(rg));
               }
               }
@@ -1580,8 +1667,7 @@ INTERFACE_EXPORT = (() => {
                   name: "Consumption",
                   name: "Consumption",
                   value: rg.tenderQuantity
                   value: rg.tenderQuantity
                 }];
                 }];
-                Element.call(this, "ConsumeItem", attrs);
-  
+                Element.call(this, "ConsumeItem", attrs);  
               }
               }
   
   
             }
             }