Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 53s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 53s
This commit is contained in:
commit
8b69a28c25
2 changed files with 15 additions and 8 deletions
|
|
@ -6041,6 +6041,7 @@ export class CommandController extends Controller {
|
|||
profile.isProbation = item.bodyProfile.isProbation;
|
||||
//เพิ่มใหม่จากรับโอน
|
||||
profile.prefix = item.bodyProfile.prefix ?? null;
|
||||
profile.prefixMain = item.bodyProfile.prefix ?? null;
|
||||
profile.firstName = item.bodyProfile.firstName ?? null;
|
||||
profile.lastName = item.bodyProfile.lastName ?? null;
|
||||
profile.birthDate = item.bodyProfile.birthDate ?? null;
|
||||
|
|
@ -6093,6 +6094,7 @@ export class CommandController extends Controller {
|
|||
profile.amountSpecial = item.bodyProfile.amountSpecial ?? null;
|
||||
profile.isProbation = item.bodyProfile.isProbation;
|
||||
profile.prefix = item.bodyProfile.prefix ?? null;
|
||||
profile.prefixMain = item.bodyProfile.prefix ?? null;
|
||||
profile.firstName = item.bodyProfile.firstName ?? null;
|
||||
profile.lastName = item.bodyProfile.lastName ?? null;
|
||||
profile.birthDate = item.bodyProfile.birthDate ?? null;
|
||||
|
|
@ -6152,6 +6154,7 @@ export class CommandController extends Controller {
|
|||
item.bodyProfile.prefix && item.bodyProfile.prefix != ""
|
||||
? item.bodyProfile.prefix
|
||||
: profile.prefix;
|
||||
profile.prefixMain = item.bodyProfile.prefix ?? null;
|
||||
profile.firstName =
|
||||
item.bodyProfile.firstName && item.bodyProfile.firstName != ""
|
||||
? item.bodyProfile.firstName
|
||||
|
|
|
|||
|
|
@ -78,14 +78,18 @@ import { ViewColumn, ViewEntity } from "typeorm";
|
|||
LEFT JOIN
|
||||
posExecutive ON position.posExecutiveId = posExecutive.id
|
||||
LEFT JOIN (
|
||||
SELECT *
|
||||
FROM profileDiscipline pd1
|
||||
WHERE pd1.date = (
|
||||
SELECT MAX(pd2.date)
|
||||
FROM profileDiscipline pd2
|
||||
WHERE pd2.profileId = pd1.profileId
|
||||
)
|
||||
) AS profileDiscipline ON profileDiscipline.profileId = profile.id
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
pd.*,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY profileId
|
||||
ORDER BY date DESC, id DESC
|
||||
) AS rn
|
||||
FROM profileDiscipline pd
|
||||
) t
|
||||
WHERE rn = 1
|
||||
) AS profileDiscipline ON profileDiscipline.profileId = profile.id
|
||||
LEFT JOIN (
|
||||
SELECT pl1.*
|
||||
FROM profileLeave pl1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue