This commit is contained in:
kittapath 2025-03-06 15:18:43 +07:00
parent 990d80e64d
commit f38e5b26f0
3 changed files with 108 additions and 108 deletions

View file

@ -1289,7 +1289,7 @@ export class ImportDataController extends Controller {
education.educationLevel = hrFundCourseCode ? hrFundCourseCode.FUND_COURSE_NAME : null_; education.educationLevel = hrFundCourseCode ? hrFundCourseCode.FUND_COURSE_NAME : null_;
education.educationLevelId = hrFundCourseCode ? hrFundCourseCode.refId : null_; education.educationLevelId = hrFundCourseCode ? hrFundCourseCode.refId : null_;
education.institute = item.INSTITUE; education.institute = item.INSTITUE;
education.level = item.EDUCATION_SEQ ? null_ : Number(item.EDUCATION_SEQ); education.level = item.EDUCATION_SEQ ? Number(item.EDUCATION_SEQ) : null_;
education.startDate = startDate; education.startDate = startDate;
education.endDate = endDate; education.endDate = endDate;
education.createdUserId = request.user.sub; education.createdUserId = request.user.sub;

View file

@ -47,10 +47,10 @@ import { ViewColumn, ViewEntity } from "typeorm";
ed.degree, ed.degree,
ed.profileEmployeeId, ed.profileEmployeeId,
ed.level, ed.level,
ROW_NUMBER() OVER (PARTITION BY ed.profileEmployeeId ORDER BY ed.level ASC) AS ed_number ROW_NUMBER() OVER (PARTITION BY ed.profileEmployeeId ORDER BY ed.level DESC) AS ed_number
FROM profileEducation ed FROM profileEducation ed
WHERE ed.isUse IS TRUE WHERE ed.isUse IS TRUE
ORDER BY ed.level ASC ORDER BY ed.level DESC
), ),
PositionDate AS ( PositionDate AS (
SELECT SELECT
@ -126,120 +126,120 @@ import { ViewColumn, ViewEntity } from "typeorm";
`, `,
}) })
export class viewRegistryEmployee { export class viewRegistryEmployee {
@ViewColumn() @ViewColumn()
profileEmployeeId: string; profileEmployeeId: string;
@ViewColumn() @ViewColumn()
citizenId: string; citizenId: string;
@ViewColumn() @ViewColumn()
prefix: string; prefix: string;
@ViewColumn() @ViewColumn()
firstName: string; firstName: string;
@ViewColumn() @ViewColumn()
lastName: string; lastName: string;
@ViewColumn() @ViewColumn()
isProbation: boolean; isProbation: boolean;
@ViewColumn() @ViewColumn()
isLeave: boolean; isLeave: boolean;
@ViewColumn() @ViewColumn()
isRetirement: boolean; isRetirement: boolean;
@ViewColumn() @ViewColumn()
leaveType: string; leaveType: string;
@ViewColumn() @ViewColumn()
posMasterNo: string; posMasterNo: string;
@ViewColumn() @ViewColumn()
orgRootId: string; orgRootId: string;
@ViewColumn() @ViewColumn()
orgChild1Id: string; orgChild1Id: string;
@ViewColumn() @ViewColumn()
orgChild2Id: string; orgChild2Id: string;
@ViewColumn() @ViewColumn()
orgChild3Id: string; orgChild3Id: string;
@ViewColumn() @ViewColumn()
orgChild4Id: string; orgChild4Id: string;
@ViewColumn() @ViewColumn()
orgRootName: string; orgRootName: string;
@ViewColumn() @ViewColumn()
orgChild1Name: string; orgChild1Name: string;
@ViewColumn() @ViewColumn()
orgChild2Name: string; orgChild2Name: string;
@ViewColumn() @ViewColumn()
orgChild3Name: string; orgChild3Name: string;
@ViewColumn() @ViewColumn()
orgChild4Name: string; orgChild4Name: string;
@ViewColumn() @ViewColumn()
org: string; org: string;
@ViewColumn() @ViewColumn()
searchShortName: string; searchShortName: string;
@ViewColumn() @ViewColumn()
position: string; position: string;
@ViewColumn() @ViewColumn()
posTypeName: string; posTypeName: string;
@ViewColumn() @ViewColumn()
posLevelName: string; posLevelName: string;
@ViewColumn() @ViewColumn()
gender: string; gender: string;
@ViewColumn() @ViewColumn()
relationship: string; relationship: string;
@ViewColumn() @ViewColumn()
dateAppoint: Date; dateAppoint: Date;
@ViewColumn() @ViewColumn()
dateRetire: Date; dateRetire: Date;
@ViewColumn() @ViewColumn()
dateRetireLaw: Date; dateRetireLaw: Date;
@ViewColumn() @ViewColumn()
birthdate: Date; birthdate: Date;
@ViewColumn() @ViewColumn()
degree: string; degree: string;
@ViewColumn() @ViewColumn()
age: number; age: number;
@ViewColumn() @ViewColumn()
Years: number; Years: number;
@ViewColumn() @ViewColumn()
Months: number; Months: number;
@ViewColumn() @ViewColumn()
Days: number; Days: number;
@ViewColumn() @ViewColumn()
levelYears: number; levelYears: number;
@ViewColumn() @ViewColumn()
levelMonths: number; levelMonths: number;
@ViewColumn() @ViewColumn()
levelDays: number; levelDays: number;
} }

View file

@ -51,10 +51,10 @@ import { ViewColumn, ViewEntity } from "typeorm";
ed.degree, ed.degree,
ed.profileId, ed.profileId,
ed.level, ed.level,
ROW_NUMBER() OVER (PARTITION BY ed.profileId ORDER BY ed.level ASC) AS ed_number ROW_NUMBER() OVER (PARTITION BY ed.profileId ORDER BY ed.level DESC) AS ed_number
FROM profileEducation ed FROM profileEducation ed
WHERE ed.isUse IS TRUE WHERE ed.isUse IS TRUE
ORDER BY ed.level ASC ORDER BY ed.level DESC
), ),
PositionDate AS ( PositionDate AS (
SELECT SELECT