diff --git a/src/controllers/ProfileSalaryController.ts b/src/controllers/ProfileSalaryController.ts index b9ea0520..8c7c6e33 100644 --- a/src/controllers/ProfileSalaryController.ts +++ b/src/controllers/ProfileSalaryController.ts @@ -82,6 +82,9 @@ export class ProfileSalaryController extends Controller { @Get("tenure/{profileId}") public async getPositionTenure(@Path() profileId: string, @Request() req: RequestWithUser) { + const sql_mode = await AppDataSource.query( + "SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));", + ); const position = await AppDataSource.query("CALL GetProfileSalaryPosition(?)", [profileId]); const _position = position.length > 0 ? position[0] : []; const mapPosition = diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 77a8a2ec..a7be928d 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -259,6 +259,9 @@ export class ReportController extends Controller { tenureTypeCondition = "registryOfficer.Years BETWEEN :tenureMin AND :tenureMax"; //xxxxxxxxxxxx } + const sql_mode = await AppDataSource.query( + "SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));", + ); const [lists, total] = await AppDataSource.getRepository(viewRegistryOfficer) .createQueryBuilder("registryOfficer") .where(nodeCondition, {