แฟ้ประวัติแบบย่อ
This commit is contained in:
parent
d2050cbfea
commit
8b8375fe43
3 changed files with 205 additions and 104 deletions
|
|
@ -31,7 +31,7 @@ import {
|
|||
UpdateProfileMother,
|
||||
UpdateProfileCouple,
|
||||
} from "../entities/Profile";
|
||||
import { Brackets, IsNull, Like, Not } from "typeorm";
|
||||
import { Brackets, In, IsNull, Like, Not } from "typeorm";
|
||||
import { OrgRevision } from "../entities/OrgRevision";
|
||||
import { PosMaster } from "../entities/PosMaster";
|
||||
import { PosLevel } from "../entities/PosLevel";
|
||||
|
|
@ -116,12 +116,11 @@ export class ProfileController extends Controller {
|
|||
private profileLeaveRepository = AppDataSource.getRepository(ProfileLeave);
|
||||
private posMasterActRepository = AppDataSource.getRepository(PosMasterAct);
|
||||
private profileChildrenRepository = AppDataSource.getRepository(ProfileChildren);
|
||||
private changeNameRepository = AppDataSource.getRepository(ProfileChangeName);
|
||||
private profileActpositionRepo = AppDataSource.getRepository(ProfileActposition);
|
||||
private dutyRepository = AppDataSource.getRepository(ProfileDuty);
|
||||
private profileAssessmentsRepository = AppDataSource.getRepository(ProfileAssessment);
|
||||
private profileAbilityRepo = AppDataSource.getRepository(ProfileAbility);
|
||||
|
||||
private changeNameRepository = AppDataSource.getRepository(ProfileChangeName);
|
||||
private profileActpositionRepo = AppDataSource.getRepository(ProfileActposition);
|
||||
private dutyRepository = AppDataSource.getRepository(ProfileDuty);
|
||||
private profileAssessmentsRepository = AppDataSource.getRepository(ProfileAssessment);
|
||||
private profileAbilityRepo = AppDataSource.getRepository(ProfileAbility);
|
||||
|
||||
/**
|
||||
* report ประวัติแบบย่อ ข้าราชการ
|
||||
|
|
@ -254,8 +253,11 @@ export class ProfileController extends Controller {
|
|||
"orgChild4",
|
||||
"positionExecutive",
|
||||
],
|
||||
where: { profileId: id },
|
||||
order: { commandDateAffect: "ASC" },
|
||||
where: {
|
||||
profileId: id,
|
||||
commandCode: In(["1", "2", "3", "4", "8", "10", "11", "12", "15", "16"]),
|
||||
},
|
||||
order: { order: "ASC" },
|
||||
});
|
||||
|
||||
const salarys =
|
||||
|
|
@ -271,6 +273,7 @@ export class ProfileController extends Controller {
|
|||
orgChild2: item.orgChild2,
|
||||
orgChild3: item.orgChild3,
|
||||
orgChild4: item.orgChild4,
|
||||
positionCee: item.positionCee,
|
||||
positionExecutive: item.positionExecutive,
|
||||
}))
|
||||
: [
|
||||
|
|
@ -877,7 +880,15 @@ export class ProfileController extends Controller {
|
|||
@Get("kk1/{id}")
|
||||
public async getKk1new(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
const profiles = await this.profileRepo.findOne({
|
||||
relations: ["currentSubDistrict", "currentDistrict", "currentProvince","registrationSubDistrict", "registrationDistrict", "registrationProvince", "profileAvatars"],
|
||||
relations: [
|
||||
"currentSubDistrict",
|
||||
"currentDistrict",
|
||||
"currentProvince",
|
||||
"registrationSubDistrict",
|
||||
"registrationDistrict",
|
||||
"registrationProvince",
|
||||
"profileAvatars",
|
||||
],
|
||||
order: {
|
||||
profileAvatars: { createdAt: "ASC" },
|
||||
},
|
||||
|
|
@ -1014,10 +1025,18 @@ export class ProfileController extends Controller {
|
|||
? cert_raw.slice(-2).map((item) => ({
|
||||
certificateType: item.certificateType ?? null,
|
||||
issuer: item.issuer ?? null,
|
||||
certificateNo: item.certificateNo?Extension.ToThaiNumber(item.certificateNo):null,
|
||||
issueDate: item.issueDate?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.issueDate)):null,
|
||||
expireDate: item.expireDate?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.expireDate)):null,
|
||||
issueToExpireDate: item.issueDate?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.issueDate)):"" + item.expireDate?" - " + Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.expireDate)): null,
|
||||
certificateNo: item.certificateNo ? Extension.ToThaiNumber(item.certificateNo) : null,
|
||||
issueDate: item.issueDate
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.issueDate))
|
||||
: null,
|
||||
expireDate: item.expireDate
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.expireDate))
|
||||
: null,
|
||||
issueToExpireDate: item.issueDate
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.issueDate))
|
||||
: "" + item.expireDate
|
||||
? " - " + Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.expireDate))
|
||||
: null,
|
||||
}))
|
||||
: [
|
||||
{
|
||||
|
|
@ -1074,8 +1093,9 @@ export class ProfileController extends Controller {
|
|||
const disciplines =
|
||||
discipline_raw.length > 0
|
||||
? discipline_raw.slice(-2).map((item) => ({
|
||||
disciplineYear:
|
||||
item.refCommandDate?Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString()):null,
|
||||
disciplineYear: item.refCommandDate
|
||||
? Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString())
|
||||
: null,
|
||||
disciplineDetail: item.detail ?? null,
|
||||
refNo: Extension.ToThaiNumber(item.refCommandNo) ?? null,
|
||||
}))
|
||||
|
|
@ -1248,14 +1268,14 @@ export class ProfileController extends Controller {
|
|||
where: { profileId: id },
|
||||
});
|
||||
const children =
|
||||
children_raw.length > 0
|
||||
? children_raw.map((item,index) => ({
|
||||
no: Extension.ToThaiNumber((index+1).toString()),
|
||||
children_raw.length > 0
|
||||
? children_raw.map((item, index) => ({
|
||||
no: Extension.ToThaiNumber((index + 1).toString()),
|
||||
childrenPrefix: item.childrenPrefix,
|
||||
childrenFirstName: item.childrenFirstName,
|
||||
childrenLastName: item.childrenLastName,
|
||||
childrenFullName: `${item.childrenPrefix}${item.childrenFirstName} ${item.childrenLastName}`,
|
||||
childrenLive: item.childrenLive == true?"มีชีวิต":"ถึงแก่กรรม",
|
||||
childrenLive: item.childrenLive == true ? "มีชีวิต" : "ถึงแก่กรรม",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
|
|
@ -1272,9 +1292,11 @@ export class ProfileController extends Controller {
|
|||
order: { createdAt: "ASC" },
|
||||
});
|
||||
const changeName =
|
||||
changeName_raw.length > 0
|
||||
changeName_raw.length > 0
|
||||
? changeName_raw.map((item) => ({
|
||||
createdAt: item.createdAt?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.createdAt)):null,
|
||||
createdAt: item.createdAt
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.createdAt))
|
||||
: null,
|
||||
status: item.status,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
|
|
@ -1289,22 +1311,32 @@ export class ProfileController extends Controller {
|
|||
lastName: "-",
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
const position_raw = await this.salaryRepo.find({
|
||||
where: { profileId: id },
|
||||
order: { order: "ASC" },
|
||||
});
|
||||
const positionList =
|
||||
position_raw.length > 0
|
||||
position_raw.length > 0
|
||||
? position_raw.map((item) => ({
|
||||
commandDateAffect: item.commandDateAffect?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.commandDateAffect)):"",
|
||||
commandDateSign: item.commandDateSign?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.commandDateSign)):"",
|
||||
posNo: item.posNoAbb?Extension.ToThaiNumber(item.posNoAbb):"" + item.posNo?Extension.ToThaiNumber(item.posNo):"",
|
||||
commandDateAffect: item.commandDateAffect
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.commandDateAffect))
|
||||
: "",
|
||||
commandDateSign: item.commandDateSign
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.commandDateSign))
|
||||
: "",
|
||||
posNo: item.posNoAbb
|
||||
? Extension.ToThaiNumber(item.posNoAbb)
|
||||
: "" + item.posNo
|
||||
? Extension.ToThaiNumber(item.posNo)
|
||||
: "",
|
||||
position: item.positionName,
|
||||
posType: item.positionType,
|
||||
posLevel: item.positionLevel?Extension.ToThaiNumber(item.positionLevel):"",
|
||||
amount: item.amount?Extension.ToThaiNumber(Number(item.amount).toLocaleString()):"",
|
||||
positionSalaryAmount: item.positionSalaryAmount?Extension.ToThaiNumber(Number(item.positionSalaryAmount).toLocaleString()):"",
|
||||
posLevel: item.positionLevel ? Extension.ToThaiNumber(item.positionLevel) : "",
|
||||
amount: item.amount ? Extension.ToThaiNumber(Number(item.amount).toLocaleString()) : "",
|
||||
positionSalaryAmount: item.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(Number(item.positionSalaryAmount).toLocaleString())
|
||||
: "",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
|
|
@ -1325,11 +1357,17 @@ export class ProfileController extends Controller {
|
|||
order: { createdAt: "ASC" },
|
||||
});
|
||||
const actposition =
|
||||
actposition_raw.length > 0
|
||||
actposition_raw.length > 0
|
||||
? actposition_raw.map((item) => ({
|
||||
date: item.dateStart?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateStart)):"" + item.dateEnd?" - " + Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateEnd)):"",
|
||||
refCommandDate: item.refCommandDate?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.refCommandDate)):"",
|
||||
refCommandNo: item.refCommandNo?Extension.ToThaiNumber(item.refCommandNo):"",
|
||||
date: item.dateStart
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateStart))
|
||||
: "" + item.dateEnd
|
||||
? " - " + Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateEnd))
|
||||
: "",
|
||||
refCommandDate: item.refCommandDate
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.refCommandDate))
|
||||
: "",
|
||||
refCommandNo: item.refCommandNo ? Extension.ToThaiNumber(item.refCommandNo) : "",
|
||||
position: item.position,
|
||||
posNo: item.posNo,
|
||||
}))
|
||||
|
|
@ -1347,75 +1385,126 @@ export class ProfileController extends Controller {
|
|||
order: { createdAt: "ASC" },
|
||||
});
|
||||
const duty =
|
||||
duty_raw.length > 0
|
||||
duty_raw.length > 0
|
||||
? duty_raw.map((item) => ({
|
||||
date: item.dateStart?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateStart)):"" + item.dateEnd?" - " + Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateEnd)):"",
|
||||
refCommandDate: item.refCommandDate?Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.refCommandDate)):"",
|
||||
refCommandNo: item.refCommandNo?Extension.ToThaiNumber(item.refCommandNo):"",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
refCommandDate: "-",
|
||||
refCommandNo: "-",
|
||||
},
|
||||
];
|
||||
date: item.dateStart
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateStart))
|
||||
: "" + item.dateEnd
|
||||
? " - " + Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.dateEnd))
|
||||
: "",
|
||||
refCommandDate: item.refCommandDate
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.refCommandDate))
|
||||
: "",
|
||||
refCommandNo: item.refCommandNo ? Extension.ToThaiNumber(item.refCommandNo) : "",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
refCommandDate: "-",
|
||||
refCommandNo: "-",
|
||||
},
|
||||
];
|
||||
const assessments_raw = await this.profileAssessmentsRepository.find({
|
||||
where: { profileId: id },
|
||||
order: { createdAt: "ASC" },
|
||||
});
|
||||
const assessments =
|
||||
assessments_raw.length > 0
|
||||
assessments_raw.length > 0
|
||||
? assessments_raw.map((item) => ({
|
||||
year: item.year?Extension.ToThaiNumber(item.year):"",
|
||||
period: item.period && item.period == "APR"?"เมษายน":"ตุลาคม",
|
||||
point1: item.point1?Extension.ToThaiNumber((item.point1).toString()):"",
|
||||
point1Total: item.point1Total?Extension.ToThaiNumber((item.point1Total).toString()):"",
|
||||
point2: item.point2?Extension.ToThaiNumber((item.point2).toString()):"",
|
||||
point2Total: item.point2Total?Extension.ToThaiNumber((item.point2Total).toString()):"",
|
||||
pointSum: item.pointSum?Extension.ToThaiNumber((item.pointSum).toString()):"",
|
||||
pointSumTh: item.pointSum?Extension.textPoint(item.pointSum):"",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
year: "-",
|
||||
period: "-",
|
||||
point1: "-",
|
||||
point2: "-",
|
||||
pointSum: "-",
|
||||
pointSumTh: "-",
|
||||
},
|
||||
];
|
||||
year: item.year ? Extension.ToThaiNumber(item.year) : "",
|
||||
period: item.period && item.period == "APR" ? "เมษายน" : "ตุลาคม",
|
||||
point1: item.point1 ? Extension.ToThaiNumber(item.point1.toString()) : "",
|
||||
point1Total: item.point1Total
|
||||
? Extension.ToThaiNumber(item.point1Total.toString())
|
||||
: "",
|
||||
point2: item.point2 ? Extension.ToThaiNumber(item.point2.toString()) : "",
|
||||
point2Total: item.point2Total
|
||||
? Extension.ToThaiNumber(item.point2Total.toString())
|
||||
: "",
|
||||
pointSum: item.pointSum ? Extension.ToThaiNumber(item.pointSum.toString()) : "",
|
||||
pointSumTh: item.pointSum ? Extension.textPoint(item.pointSum) : "",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
year: "-",
|
||||
period: "-",
|
||||
point1: "-",
|
||||
point2: "-",
|
||||
pointSum: "-",
|
||||
pointSumTh: "-",
|
||||
},
|
||||
];
|
||||
const profileAbility_raw = await this.profileAbilityRepo.find({
|
||||
where: { profileId: id },
|
||||
order: { createdAt: "ASC" },
|
||||
});
|
||||
const profileAbility =
|
||||
profileAbility_raw.length > 0
|
||||
profileAbility_raw.length > 0
|
||||
? profileAbility_raw.map((item) => ({
|
||||
field: item.field?item.field:"",
|
||||
detail: item.detail?item.detail:"",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
field: "-",
|
||||
detail: "-",
|
||||
},
|
||||
];
|
||||
const sum = profiles?Extension.ToThaiNumber((Number(profiles.amount) + Number(profiles.positionSalaryAmount) + Number(profiles.mouthSalaryAmount) + Number(profiles.amountSpecial)).toLocaleString()):"";
|
||||
const fullCurrentAddress = profiles?Extension.ToThaiNumber(profiles.currentAddress + " ตำบล/แขวง " + profiles.currentSubDistrict.name + " อำเภอ/เขต " + profiles.currentDistrict.name + " จังหวัด " + profiles.currentProvince.name + profiles.currentZipCode):"";
|
||||
const fullRegistrationAddress = profiles?Extension.ToThaiNumber(profiles.registrationAddress + " ตำบล/แขวง " + profiles.registrationSubDistrict.name + " อำเภอ/เขต " + profiles.registrationDistrict.name + " จังหวัด " + profiles.registrationProvince.name + profiles.registrationZipCode):"";
|
||||
field: item.field ? item.field : "",
|
||||
detail: item.detail ? item.detail : "",
|
||||
}))
|
||||
: [
|
||||
{
|
||||
field: "-",
|
||||
detail: "-",
|
||||
},
|
||||
];
|
||||
const sum = profiles
|
||||
? Extension.ToThaiNumber(
|
||||
(
|
||||
Number(profiles.amount) +
|
||||
Number(profiles.positionSalaryAmount) +
|
||||
Number(profiles.mouthSalaryAmount) +
|
||||
Number(profiles.amountSpecial)
|
||||
).toLocaleString(),
|
||||
)
|
||||
: "";
|
||||
const fullCurrentAddress = profiles
|
||||
? Extension.ToThaiNumber(
|
||||
profiles.currentAddress +
|
||||
" ตำบล/แขวง " +
|
||||
profiles.currentSubDistrict.name +
|
||||
" อำเภอ/เขต " +
|
||||
profiles.currentDistrict.name +
|
||||
" จังหวัด " +
|
||||
profiles.currentProvince.name +
|
||||
profiles.currentZipCode,
|
||||
)
|
||||
: "";
|
||||
const fullRegistrationAddress = profiles
|
||||
? Extension.ToThaiNumber(
|
||||
profiles.registrationAddress +
|
||||
" ตำบล/แขวง " +
|
||||
profiles.registrationSubDistrict.name +
|
||||
" อำเภอ/เขต " +
|
||||
profiles.registrationDistrict.name +
|
||||
" จังหวัด " +
|
||||
profiles.registrationProvince.name +
|
||||
profiles.registrationZipCode,
|
||||
)
|
||||
: "";
|
||||
const data = {
|
||||
fullName: `${profiles?.prefix}${profiles?.firstName} ${profiles?.lastName}`,
|
||||
prefix: profiles?.prefix != null ? profiles.prefix : "",
|
||||
firstName: profiles?.firstName != null ? profiles.firstName : "",
|
||||
lastName: profiles?.lastName != null ? profiles.lastName : "",
|
||||
position: profiles?.position != null ? profiles.position : "",
|
||||
amount: profiles?.amount != null ? Extension.ToThaiNumber(profiles.amount.toLocaleString()) : "",
|
||||
positionSalaryAmount: profiles?.positionSalaryAmount != null ? Extension.ToThaiNumber(profiles.positionSalaryAmount.toLocaleString()) : "",
|
||||
mouthSalaryAmount: profiles?.mouthSalaryAmount != null ? Extension.ToThaiNumber(profiles.mouthSalaryAmount.toLocaleString()) : "",
|
||||
amountSpecial: profiles?.amountSpecial != null ? Extension.ToThaiNumber(profiles.amountSpecial.toLocaleString()) : "",
|
||||
salarySum:sum,
|
||||
amount:
|
||||
profiles?.amount != null ? Extension.ToThaiNumber(profiles.amount.toLocaleString()) : "",
|
||||
positionSalaryAmount:
|
||||
profiles?.positionSalaryAmount != null
|
||||
? Extension.ToThaiNumber(profiles.positionSalaryAmount.toLocaleString())
|
||||
: "",
|
||||
mouthSalaryAmount:
|
||||
profiles?.mouthSalaryAmount != null
|
||||
? Extension.ToThaiNumber(profiles.mouthSalaryAmount.toLocaleString())
|
||||
: "",
|
||||
amountSpecial:
|
||||
profiles?.amountSpecial != null
|
||||
? Extension.ToThaiNumber(profiles.amountSpecial.toLocaleString())
|
||||
: "",
|
||||
salarySum: sum,
|
||||
ocFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
||||
birthDate: profiles?.birthDate
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(profiles.birthDate))
|
||||
|
|
@ -1435,14 +1524,16 @@ export class ProfileController extends Controller {
|
|||
profileFamilyFather?.fatherLastName
|
||||
? `${profileFamilyFather?.fatherPrefix ?? ""}${profileFamilyFather?.fatherFirstName ?? ""} ${profileFamilyFather?.fatherLastName ?? ""}`.trim()
|
||||
: null,
|
||||
fatherLive:profileFamilyFather && profileFamilyFather?.fatherLive == true?"มีชีวิต":"ถึงแก่กรรม",
|
||||
fatherLive:
|
||||
profileFamilyFather && profileFamilyFather?.fatherLive == true ? "มีชีวิต" : "ถึงแก่กรรม",
|
||||
motherFullName:
|
||||
profileFamilyMother?.motherPrefix ||
|
||||
profileFamilyMother?.motherFirstName ||
|
||||
profileFamilyMother?.motherLastName
|
||||
? `${profileFamilyMother?.motherPrefix ?? ""}${profileFamilyMother?.motherFirstName ?? ""} ${profileFamilyMother?.motherLastName ?? ""}`.trim()
|
||||
: null,
|
||||
motherLive:profileFamilyMother && profileFamilyMother?.motherLive == true?"มีชีวิต":"ถึงแก่กรรม",
|
||||
motherLive:
|
||||
profileFamilyMother && profileFamilyMother?.motherLive == true ? "มีชีวิต" : "ถึงแก่กรรม",
|
||||
coupleFullName:
|
||||
profileFamilyCouple?.couplePrefix ||
|
||||
profileFamilyCouple?.coupleFirstName ||
|
||||
|
|
@ -1450,7 +1541,8 @@ export class ProfileController extends Controller {
|
|||
? `${profileFamilyCouple?.couplePrefix ?? ""}${profileFamilyCouple?.coupleFirstName ?? ""} ${profileFamilyCouple?.coupleLastName ?? ""}`.trim()
|
||||
: null,
|
||||
coupleLastNameOld: profileFamilyCouple?.coupleLastNameOld ?? null,
|
||||
coupleLive:profileFamilyCouple && profileFamilyCouple?.coupleLive == true?"มีชีวิต":"ถึงแก่กรรม",
|
||||
coupleLive:
|
||||
profileFamilyCouple && profileFamilyCouple?.coupleLive == true ? "มีชีวิต" : "ถึงแก่กรรม",
|
||||
currentAddress:
|
||||
profiles.currentAddress != null ? Extension.ToThaiNumber(profiles.currentAddress) : "",
|
||||
currentSubDistrict:
|
||||
|
|
@ -1466,12 +1558,12 @@ export class ProfileController extends Controller {
|
|||
? Extension.ToThaiNumber(profiles.currentProvince.name)
|
||||
: "",
|
||||
currentZipcode:
|
||||
profiles.currentZipCode != null
|
||||
? Extension.ToThaiNumber(profiles.currentZipCode)
|
||||
: "",
|
||||
profiles.currentZipCode != null ? Extension.ToThaiNumber(profiles.currentZipCode) : "",
|
||||
fullCurrentAddress: fullCurrentAddress,
|
||||
registrationAddress:
|
||||
profiles.registrationAddress != null ? Extension.ToThaiNumber(profiles.registrationAddress) : "",
|
||||
profiles.registrationAddress != null
|
||||
? Extension.ToThaiNumber(profiles.registrationAddress)
|
||||
: "",
|
||||
registrationSubDistrict:
|
||||
profiles.registrationSubDistrict != null
|
||||
? Extension.ToThaiNumber(profiles.registrationSubDistrict.name)
|
||||
|
|
|
|||
|
|
@ -246,8 +246,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
"positionCee",
|
||||
"positionExecutive",
|
||||
],
|
||||
where: { profileEmployeeId: id },
|
||||
order: { commandDateAffect: "ASC" },
|
||||
where: {
|
||||
profileEmployeeId: id,
|
||||
commandCode: In(["1", "2", "3", "4", "8", "10", "11", "12", "15", "16"]),
|
||||
},
|
||||
order: { order: "ASC" },
|
||||
});
|
||||
const salarys =
|
||||
salary_raw.length > 1
|
||||
|
|
@ -2443,9 +2446,10 @@ export class ProfileEmployeeController extends Controller {
|
|||
dateRetireLaw: profile.dateRetireLaw,
|
||||
posMaster: posMaster == null ? null : posMaster.posMasterNo,
|
||||
posMasterNo: posMaster == null ? null : posMaster.posMasterNo,
|
||||
posLevelName: profile.posLevel == null && profile.posType == null
|
||||
? null
|
||||
: `${profile.posType.posTypeShortName} ${profile.posLevel.posLevelName}`,
|
||||
posLevelName:
|
||||
profile.posLevel == null && profile.posType == null
|
||||
? null
|
||||
: `${profile.posType.posTypeShortName} ${profile.posLevel.posLevelName}`,
|
||||
posLevelRank: profile.posLevel == null ? null : profile.posLevel.posLevelRank,
|
||||
posLevelId: profile.posLevel == null ? null : profile.posLevel.id,
|
||||
posTypeName: profile.posType == null ? null : profile.posType.posTypeName,
|
||||
|
|
@ -2836,9 +2840,10 @@ export class ProfileEmployeeController extends Controller {
|
|||
posTypeId: item.posTypeId,
|
||||
posTypeName: item.posType?.posTypeName,
|
||||
posLevelId: item.posLevelId,
|
||||
posLevelName: item.posLevel == null && item.posType == null
|
||||
? null
|
||||
: `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`,
|
||||
posLevelName:
|
||||
item.posLevel == null && item.posType == null
|
||||
? null
|
||||
: `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`,
|
||||
educationDegree:
|
||||
latestProfileEducation != null && latestProfileEducation.educationLevel != null
|
||||
? latestProfileEducation.educationLevel
|
||||
|
|
@ -4637,9 +4642,10 @@ export class ProfileEmployeeController extends Controller {
|
|||
posTypeId: item.posTypeId,
|
||||
posTypeName: item.posType?.posTypeName,
|
||||
posLevelId: item.posLevelId,
|
||||
posLevelName: item.posLevel == null && item.posType == null
|
||||
? null
|
||||
: `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`,
|
||||
posLevelName:
|
||||
item.posLevel == null && item.posType == null
|
||||
? null
|
||||
: `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`,
|
||||
educationDegree:
|
||||
latestProfileEducation != null && latestProfileEducation.educationLevel != null
|
||||
? latestProfileEducation.educationLevel
|
||||
|
|
|
|||
|
|
@ -241,8 +241,11 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
"positionCee",
|
||||
"positionExecutive",
|
||||
],
|
||||
where: { profileEmployeeId: id },
|
||||
order: { commandDateAffect: "ASC" },
|
||||
where: {
|
||||
profileEmployeeId: id,
|
||||
commandCode: In(["1", "2", "3", "4", "8", "10", "11", "12", "15", "16"]),
|
||||
},
|
||||
order: { order: "ASC" },
|
||||
});
|
||||
const salarys =
|
||||
salary_raw.length > 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue