tango-app-api-audit 3.5.10 → 3.5.12
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
CHANGED
|
@@ -255,7 +255,7 @@ export async function getAuditFile( req, res ) {
|
|
|
255
255
|
},
|
|
256
256
|
];
|
|
257
257
|
}
|
|
258
|
-
const auditInsertData = inserQuery? await
|
|
258
|
+
const auditInsertData = inserQuery? await aggregateAuditStoreData( inserQuery ): null;
|
|
259
259
|
const auditStatus =
|
|
260
260
|
userDetails && userDetails.length > 0 ? userDetails[0].auditStatus : null;
|
|
261
261
|
switch ( auditStatus ) {
|
|
@@ -537,9 +537,10 @@ export async function getAuditFile( req, res ) {
|
|
|
537
537
|
fetchData.ContinuationToken = decodeURIComponent( inputData.nextId );
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
+
logger.info( { msg: msg, leve: '............1' } );
|
|
540
541
|
const getQuery = msg.audit_type =='ReAudit'?
|
|
541
542
|
{
|
|
542
|
-
size: inputData?.limit ||
|
|
543
|
+
size: inputData?.limit || 500,
|
|
543
544
|
_source: [ 'module', 'status', 'date', 'store_id', 'outputCluster', 'personPath', 'REIDCluster', 'isEmployee', 'isJunk', 'EmployeeStatusFinal' ], // Only fetch necessary fields
|
|
544
545
|
|
|
545
546
|
query: {
|
|
@@ -571,7 +572,7 @@ export async function getAuditFile( req, res ) {
|
|
|
571
572
|
|
|
572
573
|
}:
|
|
573
574
|
{
|
|
574
|
-
size: inputData?.limit ||
|
|
575
|
+
size: inputData?.limit || 500,
|
|
575
576
|
_source: [ 'module', 'status', 'date', 'store_id', 'personPath', 'REIDCluster', 'EmployeeStatusProposed', 'isJunk', 'EmployeeStatusFinal' ], // Only fetch necessary fields
|
|
576
577
|
|
|
577
578
|
query: {
|
|
@@ -599,6 +600,7 @@ export async function getAuditFile( req, res ) {
|
|
|
599
600
|
};
|
|
600
601
|
logger.info( { fetchData: fetchData, msg: msg, inputData: inputData, type: 'debug-bucketNameIssue' } );
|
|
601
602
|
const list = msg.zone_id === 'track' ? inputData.nextId? await scrollResponse( inputData.nextId ):await searchOpenSearchData( msg.index_name, getQuery ): await listFileByPath( fetchData );
|
|
603
|
+
logger.info( { list: list, msg: msg, level: '.........2' } );
|
|
602
604
|
const folderPath = msg.zone_id === 'track' ? list?.body?.hits?.hits : list.data;
|
|
603
605
|
const nextQuery =msg.zone_id !== 'track' ? list.pageToken: '';
|
|
604
606
|
if ( msg.zone_id === 'track' ) {
|
|
@@ -1576,7 +1578,7 @@ export async function save( req, res ) {
|
|
|
1576
1578
|
const temp = getData?.body?.hits?.hits?.map( ( item ) => item._id );
|
|
1577
1579
|
const body = temp.flatMap( ( id ) => [
|
|
1578
1580
|
{ update: { _index: openSearch.trackerInput, _id: id } },
|
|
1579
|
-
{ doc: { outputCluster: imgName, EmployeeStatusFinal: 1, isJunk: false } },
|
|
1581
|
+
{ doc: { outputCluster: imgName, auditOutputCluster: imgName, EmployeeStatusFinal: 1, isJunk: false } },
|
|
1580
1582
|
] );
|
|
1581
1583
|
const re= await bulkUpdate( body );
|
|
1582
1584
|
logger.info( { re: re, storeId: inputData.storeId, fileDate: inputData.fileDate, function: 'tracking save - customer' } );
|
|
@@ -1707,7 +1709,7 @@ export async function save( req, res ) {
|
|
|
1707
1709
|
logger.info( { custoemrTemp: temp } );
|
|
1708
1710
|
const body = temp.flatMap( ( id ) => [
|
|
1709
1711
|
{ update: { _index: openSearch.trackerInput, _id: id } },
|
|
1710
|
-
{ doc: { outputCluster: 50000 } },
|
|
1712
|
+
{ doc: { outputCluster: 50000, auditOutputCluster: 50000 } },
|
|
1711
1713
|
] );
|
|
1712
1714
|
const re= await bulkUpdate( body );
|
|
1713
1715
|
logger.info( { getCusId: getCusId, re: re, storeId: inputData.storeId, auditType: inputData.auditType, fileDate: inputData.fileDate, function: 'tracking save - junk false mapping' } );
|