Browse Source

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

vian 5 years ago
parent
commit
9b0904c215
1 changed files with 2 additions and 7 deletions
  1. 2 7
      modules/main/facade/ration_facade.js

+ 2 - 7
modules/main/facade/ration_facade.js

@@ -239,17 +239,12 @@ async function createNewMaterialRation(std,quantityDecimal,projectID){
 }
 
 async function addMultiRation(datas,compilation) {
-    /* let rst = [];
+    let rst = [];
     for(let data of datas){
         let r = await addNewRation(data,compilation);
         rst.push(r);
     }
-    return rst; */
-    const task = [];
-    for (const data of datas) {
-        task.push(addNewRation(data, compilation));
-    }
-    return await Promise.all(task);
+    return rst;
 }
 
 async function getSameSectionRations(data,userId,compilationId){