|
|
@@ -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){
|