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