Merge branch 'develop' of github.com:Frappet/hrms-api-org into develop

This commit is contained in:
kittapath 2025-02-06 17:20:09 +07:00
commit 3eee6bd69f
2 changed files with 78 additions and 2 deletions

View file

@ -0,0 +1,25 @@
import { ViewColumn, ViewEntity } from "typeorm";
@ViewEntity({
expression: `SELECT
\`profileId\`, \`period\`, \`year\`, COUNT(*) AS recordCount, SUM(pointSum) AS totalPointSum, SUM(pointSum) / COUNT(*) AS result
FROM \`profileAssessment\`
WHERE \`period\` Is not null
GROUP BY \`profileId\`, \`period\`, \`year\`
ORDER BY \`year\` desc , \`period\` asc
`,
})
export class viewDirectorActing {
@ViewColumn()
profileId: string;
@ViewColumn()
period: string;
@ViewColumn()
year: number;
@ViewColumn()
recordCount: number;
@ViewColumn()
totalPointSum: number;
@ViewColumn()
result: number;
}