tango-app-api-store-builder 1.0.0-beta-85 → 1.0.0-beta-87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -1
- package/src/controllers/script.controller.js +3193 -311
- package/src/controllers/storeBuilder.controller.js +5 -8
- package/src/controllers/task.controller.js +208 -42
- package/src/routes/script.routes.js +5 -1
- package/src/routes/storeBuilder.routes.js +2 -2
- package/src/routes/task.routes.js +3 -1
- package/src/service/planoTask.service.js +4 -0
- package/src/service/processedTaskservice.js +4 -0
|
@@ -17,9 +17,6 @@ import * as fixtureConfigService from '../service/fixtureConfig.service.js';
|
|
|
17
17
|
import * as planoStaticData from '../service/planoStaticData.service.js';
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
import path from 'path';
|
|
21
|
-
|
|
22
|
-
|
|
23
20
|
dayjs.extend( utc );
|
|
24
21
|
dayjs.extend( customParseFormat );
|
|
25
22
|
|
|
@@ -556,7 +553,7 @@ export async function storeFixturesv1( req, res ) {
|
|
|
556
553
|
{
|
|
557
554
|
$or: [
|
|
558
555
|
{ _id: { $in: planoIds } },
|
|
559
|
-
{
|
|
556
|
+
{ storeName: { $in: req.body.id } },
|
|
560
557
|
],
|
|
561
558
|
},
|
|
562
559
|
{ storeId: 1, storeName: 1, planoId: '$_id', productResolutionLevel: 1, scanType: 1, clientId: 1, validateShelfSections: 1 },
|
|
@@ -578,12 +575,12 @@ export async function storeFixturesv1( req, res ) {
|
|
|
578
575
|
let productCapacity = 0;
|
|
579
576
|
const layoutPolygonWithFixtures = await Promise.all(
|
|
580
577
|
floor.layoutPolygon.map( async ( element ) => {
|
|
581
|
-
const fixtures = await storeFixtureService.
|
|
578
|
+
const fixtures = await storeFixtureService.findAndSort( {
|
|
582
579
|
floorId: floor._id,
|
|
583
580
|
associatedElementType: element.elementType,
|
|
584
581
|
associatedElementNumber: element.elementNumber,
|
|
585
582
|
fixtureType: 'wall',
|
|
586
|
-
}, { shelfcount: 0 } );
|
|
583
|
+
}, { shelfcount: 0 }, { fixtureNumber: 1 } );
|
|
587
584
|
|
|
588
585
|
const fixturesWithStatus = await Promise.all(
|
|
589
586
|
fixtures.map( async ( fixture ) => {
|
|
@@ -2023,12 +2020,12 @@ export async function storeFixturesTask( req, res ) {
|
|
|
2023
2020
|
let productCapacity = 0;
|
|
2024
2021
|
const layoutPolygonWithFixtures = await Promise.all(
|
|
2025
2022
|
floor.layoutPolygon.map( async ( element ) => {
|
|
2026
|
-
const fixtures = await storeFixtureService.
|
|
2023
|
+
const fixtures = await storeFixtureService.findAndSort( {
|
|
2027
2024
|
floorId: floor._id,
|
|
2028
2025
|
associatedElementType: element.elementType,
|
|
2029
2026
|
associatedElementNumber: element.elementNumber,
|
|
2030
2027
|
fixtureType: 'wall',
|
|
2031
|
-
}, { shelfcount: 0 } );
|
|
2028
|
+
}, { shelfcount: 0 }, { fixtureNumber: 1 } );
|
|
2032
2029
|
|
|
2033
2030
|
const fixturesWithStatus = await Promise.all(
|
|
2034
2031
|
fixtures.map( async ( fixture ) => {
|
|
@@ -4,7 +4,7 @@ import * as storeService from '../service/store.service.js';
|
|
|
4
4
|
import * as processedChecklistService from '../service/processedchecklist.service.js';
|
|
5
5
|
import * as userService from '../service/user.service.js';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
|
-
import { logger, fileUpload, signedUrl } from 'tango-app-api-middleware';
|
|
7
|
+
import { logger, fileUpload, signedUrl, download } from 'tango-app-api-middleware';
|
|
8
8
|
import * as planoTaskService from '../service/planoTask.service.js';
|
|
9
9
|
import * as planoService from '../service/planogram.service.js';
|
|
10
10
|
import * as checklistService from '../service/checklist.service.js';
|
|
@@ -202,45 +202,47 @@ export async function createTask( req, res ) {
|
|
|
202
202
|
await Promise.all( storeDetails.map( async ( store ) => {
|
|
203
203
|
let getUserEmail = req.body.stores.find( ( ele ) => ele.store.toLowerCase() == store.storeName.toLowerCase() );
|
|
204
204
|
let planoDetails = await planoService.findOne( { storeId: store.storeId } );
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
if ( planoDetails ) {
|
|
206
|
+
if ( getUserEmail ) {
|
|
207
|
+
let query = [
|
|
208
|
+
{
|
|
209
|
+
$addFields: {
|
|
210
|
+
emailLower: { $toLower: '$email' },
|
|
211
|
+
},
|
|
210
212
|
},
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
{
|
|
214
|
+
$match: {
|
|
215
|
+
clientId: req.body.clientId,
|
|
216
|
+
email: getUserEmail.email.toLowerCase(),
|
|
217
|
+
},
|
|
216
218
|
},
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
219
|
+
];
|
|
220
|
+
userDetails = await userService.aggregate( query );
|
|
221
|
+
// if ( !userDetails.length ) {
|
|
222
|
+
// let userData = {
|
|
223
|
+
// clientId: req.body.clientId,
|
|
224
|
+
// mobileNumber: '',
|
|
225
|
+
// email: getUserEmail.email,
|
|
226
|
+
// userName: getUserEmail.email.split( '@' )[0],
|
|
227
|
+
// };
|
|
228
|
+
// userDetails = await createUser( userData );
|
|
229
|
+
// } else {
|
|
230
|
+
userDetails = userDetails[0];
|
|
231
|
+
// }
|
|
232
|
+
}
|
|
233
|
+
let taskData = { ...data };
|
|
234
|
+
taskData.store_id = store.storeId;
|
|
235
|
+
taskData.storeName = store.storeName;
|
|
236
|
+
taskData.userId = userDetails._id;
|
|
237
|
+
taskData.userName = userDetails.userName;
|
|
238
|
+
taskData.userEmail = userDetails.email;
|
|
239
|
+
taskData.planoId = planoDetails?._id;
|
|
240
|
+
for ( let i=0; i<req.body.days; i++ ) {
|
|
241
|
+
let currDate = dayjs().add( i, 'day' );
|
|
242
|
+
let insertData = { ...taskData, date_string: currDate.format( 'YYYY-MM-DD' ), date_iso: new Date( currDate.format( 'YYYY-MM-DD' ) ), scheduleStartTime_iso: dayjs.utc( `${currDate.format( 'YYYY-MM-DD' )} 12:00 AM`, 'YYYY-MM-DD hh:mm A' ).format() };
|
|
243
|
+
let response = await processedService.updateOne( { date_string: currDate.format( 'YYYY-MM-DD' ), store_id: insertData.store_id, userEmail: insertData.userEmail, planoId: insertData.planoId, sourceCheckList_id: task._id }, insertData );
|
|
244
|
+
console.log( insertData.store_id, response );
|
|
245
|
+
}
|
|
244
246
|
}
|
|
245
247
|
} ) );
|
|
246
248
|
} ) );
|
|
@@ -378,9 +380,9 @@ export async function getTaskDetails( req, res ) {
|
|
|
378
380
|
if ( !req.query.storeId ) {
|
|
379
381
|
return res.sendError( 'Store id is required', 400 );
|
|
380
382
|
}
|
|
381
|
-
let date = req.query?.date || dayjs().format( 'YYYY-MM-DD' );
|
|
382
|
-
let getDetails = await processedService.find( { store_id: req.query.storeId, date_string: date, isPlano: true, checklistStatus: { $ne: 'submit' }, userId: req.user._id }, { checkListName: 1, taskType: '$planoType', checklistStatus: 1 } );
|
|
383
|
-
return res.sendSuccess(
|
|
383
|
+
// let date = req.query?.date || dayjs().format( 'YYYY-MM-DD' );
|
|
384
|
+
// let getDetails = await processedService.find( { store_id: req.query.storeId, date_string: date, isPlano: true, checklistStatus: { $ne: 'submit' }, userId: req.user._id }, { checkListName: 1, taskType: '$planoType', checklistStatus: 1 } );
|
|
385
|
+
return res.sendSuccess( [] );
|
|
384
386
|
} catch ( e ) {
|
|
385
387
|
logger.error( { functionName: 'getTaskDetails', error: e } );
|
|
386
388
|
return res.sendError( e, 500 );
|
|
@@ -491,6 +493,9 @@ export async function updateAnswers( req, res ) {
|
|
|
491
493
|
}
|
|
492
494
|
} );
|
|
493
495
|
|
|
496
|
+
let taskDetails = await processedService.findOne( { date_string: dayjs().format( 'YYYY-MM-DD' ), userId: req.user._id, isPlano: true, planoType: 'layout' } );
|
|
497
|
+
|
|
498
|
+
|
|
494
499
|
let data = {
|
|
495
500
|
fixtureId: req.body.fixtureId,
|
|
496
501
|
answers: req.body.answers,
|
|
@@ -498,9 +503,12 @@ export async function updateAnswers( req, res ) {
|
|
|
498
503
|
planoId: req.body.planoId,
|
|
499
504
|
floorId: req.body.floorId,
|
|
500
505
|
type: req.body.type,
|
|
506
|
+
date_iso: new Date( dayjs().format( 'YYYY-MM-DD' ) ),
|
|
507
|
+
taskId: taskDetails?._id,
|
|
508
|
+
storeName: taskDetails?.storeName,
|
|
501
509
|
};
|
|
502
510
|
|
|
503
|
-
await planoTaskService.updateOne( { planoId: req.body.planoId, floorId: req.body.floorId, fixtureId: req.body.fixtureId, type: req.body.type, date_string: dayjs().format( 'YYYY-MM-DD' ) }, data );
|
|
511
|
+
await planoTaskService.updateOne( { planoId: req.body.planoId, floorId: req.body.floorId, fixtureId: req.body.fixtureId, type: req.body.type, date_string: dayjs().format( 'YYYY-MM-DD' ), ...( taskDetails?._id ) ? { taskId: taskDetails?._id } :{} }, data );
|
|
504
512
|
return res.sendSuccess( 'Fixture details updated successfully' );
|
|
505
513
|
} catch ( e ) {
|
|
506
514
|
logger.error( { functionName: 'updateAnswers', error: e } );
|
|
@@ -608,3 +616,161 @@ export async function getVmDetails( req, res ) {
|
|
|
608
616
|
return res.sendError( e, 500 );
|
|
609
617
|
}
|
|
610
618
|
}
|
|
619
|
+
|
|
620
|
+
export async function generatetaskDetails( req, res ) {
|
|
621
|
+
try {
|
|
622
|
+
let query =[
|
|
623
|
+
{
|
|
624
|
+
$match: {
|
|
625
|
+
date_iso: { $gte: new Date( req.body.fromDate ), $lte: new Date( req.body.toDate ) },
|
|
626
|
+
isPlano: true,
|
|
627
|
+
planoType: 'layout',
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
$project: {
|
|
632
|
+
_id: 0,
|
|
633
|
+
storeName: 1,
|
|
634
|
+
store_id: 1,
|
|
635
|
+
userEmail: 1,
|
|
636
|
+
planoId: 1,
|
|
637
|
+
checklistStatus: 1,
|
|
638
|
+
date_string: 1,
|
|
639
|
+
storeStatus: {
|
|
640
|
+
$cond: {
|
|
641
|
+
if: { $eq: [ '$checklistStatus', 'submit' ] },
|
|
642
|
+
then: 'Yes',
|
|
643
|
+
else: '',
|
|
644
|
+
|
|
645
|
+
},
|
|
646
|
+
},
|
|
647
|
+
},
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
$group: {
|
|
651
|
+
_id: '$store_id',
|
|
652
|
+
count: { $sum: 1 },
|
|
653
|
+
storeName: { $first: '$storeName' },
|
|
654
|
+
checklistStatus: { $push: '$checklistStatus' },
|
|
655
|
+
},
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
$project: {
|
|
659
|
+
_id: 0,
|
|
660
|
+
storeName: 1,
|
|
661
|
+
checklistStatus: 1,
|
|
662
|
+
count: 1,
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
];
|
|
666
|
+
console.log( JSON.stringify( query ) );
|
|
667
|
+
let taskDetails = await processedService.aggregate( query );
|
|
668
|
+
let processedTaskDetails = await planoTaskService.find( { date_string: { $gte: req.body.fromDate, $lte: req.body.toDate }, type: 'layout', status: 'incomplete' } );
|
|
669
|
+
processedTaskDetails.forEach( ( item ) => {
|
|
670
|
+
let taskIndex = taskDetails.findIndex( ( taskItem ) => taskItem.checklistStatus == 'submit' && item.date_string == taskItem.date_string && item.planoId.toString() == taskItem.planoId.toString() );
|
|
671
|
+
if ( taskIndex != -1 ) {
|
|
672
|
+
taskDetails[taskIndex].storeStatus = 'No';
|
|
673
|
+
}
|
|
674
|
+
} );
|
|
675
|
+
|
|
676
|
+
taskDetails.forEach( ( ele ) => {
|
|
677
|
+
delete ele.planoId;
|
|
678
|
+
} );
|
|
679
|
+
// console.log( taskDetails );
|
|
680
|
+
// let completeStore = [ ...new Set( taskDetails.filter( ( ele ) => ele.checklistStatus.includes( 'submit' ) ).map( ( ele ) => ele.storeName ) ) ];
|
|
681
|
+
|
|
682
|
+
// let incompleteStore = [ ...new Set( taskDetails.filter( ( ele ) => !ele.checklistStatus.includes( 'submit' ) ).map( ( ele ) => {
|
|
683
|
+
// return { storeName: ele.storeName, checklistStatus: ele.checklistStatus[ele.checklistStatus.length-1] };
|
|
684
|
+
// } ) ) ];
|
|
685
|
+
|
|
686
|
+
// incompleteStore = incompleteStore.filter( ( ele ) => !completeStore.includes( ele ) );
|
|
687
|
+
|
|
688
|
+
if ( !taskDetails.length ) {
|
|
689
|
+
return res.sendError( 'No date found', 204 );
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
// return res.sendSuccess( { completeCount: completeStore.length, store: completeStore, incompleteStore: incompleteStore, incompleteStoreCount: incompleteStore.length } );
|
|
693
|
+
|
|
694
|
+
await download( taskDetails, res );
|
|
695
|
+
} catch ( e ) {
|
|
696
|
+
logger.error( { functioName: 'generatetaskDetails', error: e } );
|
|
697
|
+
return res.sendError( e, 500 );
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export async function taskSubmitDetails( req, res ) {
|
|
702
|
+
try {
|
|
703
|
+
let query = [
|
|
704
|
+
{
|
|
705
|
+
$match: {
|
|
706
|
+
date_string: { $gte: req.body.fromDate, $lte: req.body.toDate },
|
|
707
|
+
type: 'layout',
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
$lookup: {
|
|
712
|
+
from: 'planograms',
|
|
713
|
+
let: { plano_id: '$planoId' },
|
|
714
|
+
pipeline: [
|
|
715
|
+
{
|
|
716
|
+
$match: {
|
|
717
|
+
$expr: {
|
|
718
|
+
$and: [
|
|
719
|
+
{ $eq: [ '$_id', '$$plano_id' ] },
|
|
720
|
+
],
|
|
721
|
+
},
|
|
722
|
+
},
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
$project: {
|
|
726
|
+
storeName: 1,
|
|
727
|
+
_id: 0,
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
],
|
|
731
|
+
as: 'planogram',
|
|
732
|
+
},
|
|
733
|
+
},
|
|
734
|
+
{ $unwind: { path: '$planogram', preserveNullAndEmptyArrays: true } },
|
|
735
|
+
{
|
|
736
|
+
$project: {
|
|
737
|
+
storeName: '$planogram.storeName',
|
|
738
|
+
answers: 1,
|
|
739
|
+
type: 1,
|
|
740
|
+
status: 1,
|
|
741
|
+
planoId: 1,
|
|
742
|
+
floorId: 1,
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
$group: {
|
|
747
|
+
_id: '$planoId',
|
|
748
|
+
storeName: { $first: '$storeName' },
|
|
749
|
+
answers: { $last: '$answers' },
|
|
750
|
+
type: { $last: '$type' },
|
|
751
|
+
status: { $last: '$status' },
|
|
752
|
+
floorId: { $last: '$floorId' },
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
$project: {
|
|
757
|
+
storeName: 1,
|
|
758
|
+
answers: 1,
|
|
759
|
+
type: 1,
|
|
760
|
+
status: 1,
|
|
761
|
+
planoId: '$_id',
|
|
762
|
+
floorId: 1,
|
|
763
|
+
},
|
|
764
|
+
},
|
|
765
|
+
];
|
|
766
|
+
|
|
767
|
+
let processedTaskDetails = await planoTaskService.aggregate( query );
|
|
768
|
+
let completeStore = [ ...new Set( processedTaskDetails.filter( ( ele ) => ele.status == 'complete' ).map( ( ele ) => ele.storeName ) ) ];
|
|
769
|
+
let incompleteStore = [ ...new Set( processedTaskDetails.filter( ( ele ) => ele.status == 'incomplete' ).map( ( ele ) => ele.storeName ) ) ];
|
|
770
|
+
incompleteStore = incompleteStore.filter( ( ele ) => !completeStore.includes( ele ) );
|
|
771
|
+
return res.sendSuccess( { complete: { count: completeStore.length, storeList: completeStore }, incompleteStore: { count: incompleteStore.length, storeList: incompleteStore }, data: processedTaskDetails } );
|
|
772
|
+
} catch ( e ) {
|
|
773
|
+
logger.error( { functioName: 'taskSubmitDetails', error: e } );
|
|
774
|
+
return res.sendError( e, 500 );
|
|
775
|
+
}
|
|
776
|
+
}
|
|
@@ -23,5 +23,9 @@ scriptRouter
|
|
|
23
23
|
.post( '/getVmTaskData', scriptController.getVmTaskData )
|
|
24
24
|
.post( '/updateVmData', scriptController.updateVmData )
|
|
25
25
|
.post( '/createCrestPlanogram', scriptController.createCrestPlanogram )
|
|
26
|
+
.post( '/updateCrestPlanogram', scriptController.updateCrestPlanogram )
|
|
26
27
|
.post( '/updatelayout', scriptController.updatelayout )
|
|
27
|
-
.post( '/updateCrestVms', scriptController.updateCrestVms )
|
|
28
|
+
.post( '/updateCrestVms', scriptController.updateCrestVms )
|
|
29
|
+
.post( '/downloadPlanoImages', scriptController.downloadPlanoImage )
|
|
30
|
+
.post( '/getVideoUrls', scriptController.getVideoLinks )
|
|
31
|
+
.post( '/updateExcelPlanogram', scriptController.updateExcelPlanogram );
|
|
@@ -10,7 +10,7 @@ export const storeBuilderRouter = express.Router();
|
|
|
10
10
|
storeBuilderRouter
|
|
11
11
|
.post( '/createStoreLayout', isAllowedSessionHandler, validate( validateDtos.createBuilder ), storeBuilderController.createStoreBuilder )
|
|
12
12
|
.post( '/updateStoreLayout', isAllowedSessionHandler, validate( validateDtos.updateStoreLayout ), storeBuilderController.updateStoreLayout )
|
|
13
|
-
.post( '/storeLayoutList',
|
|
13
|
+
.post( '/storeLayoutList', validate( validateDtos.storeLayoutList ), storeBuilderController.getLayoutList )
|
|
14
14
|
.post( '/updateFloor', isAllowedSessionHandler, validate( validateDtos.updateFloor ), storeBuilderController.updateFloor )
|
|
15
15
|
.post( '/uploadBulkStore', isAllowedSessionHandler, storeBuilderController.uploadBulkStore )
|
|
16
16
|
.post( '/uploadFile', isAllowedSessionHandler, storeBuilderController.uploadFile )
|
|
@@ -23,7 +23,7 @@ storeBuilderRouter
|
|
|
23
23
|
// .post( '/FixtureShelfDetails', storeBuilderController.fixtureShelfProduct )
|
|
24
24
|
// .post( '/scan', storeBuilderController.scan )
|
|
25
25
|
.post( '/storeLayout', isAllowedSessionHandler, validate( validateDtos.storeList ), storeBuilderController.storeLayout )
|
|
26
|
-
.post( '/storeFixtures',
|
|
26
|
+
.post( '/storeFixtures', validate( validateDtos.storeList ), storeBuilderController.storeFixturesv1 )
|
|
27
27
|
.post( '/FixtureShelfDetails', isAllowedSessionHandler, validate( validateDtos.fixtureShelfProduct ), storeBuilderController.fixtureShelfProductv1 )
|
|
28
28
|
.post( '/scan', isAllowedSessionHandler, storeBuilderController.scanv1 )
|
|
29
29
|
.post( '/updateMissing', isAllowedSessionHandler, storeBuilderController.updateMissing )
|
|
@@ -12,4 +12,6 @@ storeBuilderTaskRouter
|
|
|
12
12
|
.post( '/updateStatus', isAllowedSessionHandler, taskController.updateStatus )
|
|
13
13
|
.post( '/updateAnswers', isAllowedSessionHandler, taskController.updateAnswers )
|
|
14
14
|
.get( '/getFixtureDetails', isAllowedSessionHandler, taskController.getFixtureDetails )
|
|
15
|
-
.get( '/getVmDetails', isAllowedSessionHandler, taskController.getVmDetails )
|
|
15
|
+
.get( '/getVmDetails', isAllowedSessionHandler, taskController.getVmDetails )
|
|
16
|
+
.post( '/generateTaskExcel', taskController.generatetaskDetails )
|
|
17
|
+
.post( '/getSubmitDetails', taskController.taskSubmitDetails );
|
|
@@ -19,3 +19,7 @@ export async function find( query={}, field={} ) {
|
|
|
19
19
|
export async function count( data ) {
|
|
20
20
|
return model.planoTaskCompliance.countDocuments( data );
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
export async function aggregate( query ) {
|
|
24
|
+
return model.planoTaskCompliance.aggregate( query );
|
|
25
|
+
}
|
|
@@ -16,6 +16,10 @@ export async function deleteMany( query = {} ) {
|
|
|
16
16
|
return model.taskProcessedModel.deleteMany( query );
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export async function aggregate( query = {} ) {
|
|
20
|
+
return model.taskProcessedModel.aggregate( query );
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
export async function find( query = {}, field = {} ) {
|
|
20
24
|
return model.taskProcessedModel.find( query, field );
|
|
21
25
|
}
|