Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2025-07-17 13:19:02 +07:00
commit fec6d44fbf
5 changed files with 1344 additions and 10 deletions

View file

@ -5575,6 +5575,7 @@ export class CommandController extends Controller {
profile.roleKeycloaks = result && roleKeycloak ? [roleKeycloak] : [];
profile.keycloak =
userKeycloakId && typeof userKeycloakId === "string" ? userKeycloakId : "";
profile.registrationAddress = item.bodyProfile.registrationAddress;
profile.registrationProvinceId = registrationProvinceId
? registrationProvinceId.id
: _null;
@ -5584,9 +5585,12 @@ export class CommandController extends Controller {
profile.registrationSubDistrictId = registrationSubDistrictId
? registrationSubDistrictId.id
: _null;
profile.registrationZipCode = item.bodyProfile.registrationZipCode;
profile.currentAddress = item.bodyProfile.currentAddress;
profile.currentProvinceId = currentProvinceId ? currentProvinceId.id : _null;
profile.currentDistrictId = currentDistrictId ? currentDistrictId.id : _null;
profile.currentSubDistrictId = currentSubDistrictId ? currentSubDistrictId.id : _null;
profile.currentZipCode = item.bodyProfile.currentZipCode;
profile.email = item.bodyProfile.email;
profile.dateStart = item.bodyProfile.dateStart;
profile.amount = item.bodyProfile.amount ?? null;
@ -5624,6 +5628,7 @@ export class CommandController extends Controller {
profile.roleKeycloaks = result && roleKeycloak ? [roleKeycloak] : [];
profile.keycloak =
userKeycloakId && typeof userKeycloakId === "string" ? userKeycloakId : "";
profile.registrationAddress = item.bodyProfile.registrationAddress;
profile.registrationProvinceId = registrationProvinceId
? registrationProvinceId.id
: _null;
@ -5633,9 +5638,12 @@ export class CommandController extends Controller {
profile.registrationSubDistrictId = registrationSubDistrictId
? registrationSubDistrictId.id
: _null;
profile.registrationZipCode = item.bodyProfile.registrationZipCode;
profile.currentAddress = item.bodyProfile.currentAddress;
profile.currentProvinceId = currentProvinceId ? currentProvinceId.id : _null;
profile.currentDistrictId = currentDistrictId ? currentDistrictId.id : _null;
profile.currentSubDistrictId = currentSubDistrictId ? currentSubDistrictId.id : _null;
profile.currentZipCode = item.bodyProfile.currentZipCode;
profile.email = item.bodyProfile.email;
profile.dateStart = item.bodyProfile.dateStart;
profile.amount = item.bodyProfile.amount ?? null;
@ -5665,6 +5673,7 @@ export class CommandController extends Controller {
profile.dateLeave = _null;
profile.dateRetire = _dateRetire;
profile.dateRetireLaw = _dateRetireLaw;
profile.registrationAddress = item.bodyProfile.registrationAddress;
profile.registrationProvinceId = registrationProvinceId
? registrationProvinceId.id
: _null;
@ -5674,9 +5683,12 @@ export class CommandController extends Controller {
profile.registrationSubDistrictId = registrationSubDistrictId
? registrationSubDistrictId.id
: _null;
profile.registrationZipCode = item.bodyProfile.registrationZipCode;
profile.currentAddress = item.bodyProfile.currentAddress;
profile.currentProvinceId = currentProvinceId ? currentProvinceId.id : _null;
profile.currentDistrictId = currentDistrictId ? currentDistrictId.id : _null;
profile.currentSubDistrictId = currentSubDistrictId ? currentSubDistrictId.id : _null;
profile.currentZipCode = item.bodyProfile.currentZipCode;
profile.email = item.bodyProfile.email;
profile.telephoneNumber = item.bodyProfile.telephoneNumber;
profile.phone = item.bodyProfile.phone;

View file

@ -4854,11 +4854,11 @@ export class PositionController extends Controller {
let checkChildConditions: any = {};
let keywordAsInt: any;
let searchShortName = "1=1";
let searchShortName0 = `CONCAT(orgRoot.orgRootShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
let searchShortName1 = `CONCAT(orgChild1.orgChild1ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
let searchShortName2 = `CONCAT(orgChild2.orgChild2ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
let searchShortName3 = `CONCAT(orgChild3.orgChild3ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
let searchShortName4 = `CONCAT(orgChild4.orgChild4ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
let searchShortName0 = `CONCAT(orgRoot.orgRootShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
let searchShortName1 = `CONCAT(orgChild1.orgChild1ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
let searchShortName2 = `CONCAT(orgChild2.orgChild2ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
let searchShortName3 = `CONCAT(orgChild3.orgChild3ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
let searchShortName4 = `CONCAT(orgChild4.orgChild4ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
let _data = await new permission().PermissionOrgList(request, "SYS_POS_CONDITION");
if (body.type === 0) {
typeCondition = {
@ -4868,7 +4868,7 @@ export class PositionController extends Controller {
checkChildConditions = {
orgChild1Id: IsNull(),
};
searchShortName = `CONCAT(orgRoot.orgRootShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix) like '%${body.keyword}%'`;
searchShortName = `CONCAT(orgRoot.orgRootShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, "")) like '%${body.keyword}%'`;
} else {
}
} else if (body.type === 1) {
@ -4879,7 +4879,7 @@ export class PositionController extends Controller {
checkChildConditions = {
orgChild2Id: IsNull(),
};
searchShortName = `CONCAT(orgChild1.orgChild1ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix) like '%${body.keyword}%'`;
searchShortName = `CONCAT(orgChild1.orgChild1ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, "")) like '%${body.keyword}%'`;
} else {
}
} else if (body.type === 2) {
@ -4890,7 +4890,7 @@ export class PositionController extends Controller {
checkChildConditions = {
orgChild3Id: IsNull(),
};
searchShortName = `CONCAT(orgChild2.orgChild2ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix) like '%${body.keyword}%'`;
searchShortName = `CONCAT(orgChild2.orgChild2ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, "")) like '%${body.keyword}%'`;
} else {
}
} else if (body.type === 3) {
@ -4901,14 +4901,14 @@ export class PositionController extends Controller {
checkChildConditions = {
orgChild4Id: IsNull(),
};
searchShortName = `CONCAT(orgChild3.orgChild3ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix) like '%${body.keyword}%'`;
searchShortName = `CONCAT(orgChild3.orgChild3ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, "")) like '%${body.keyword}%'`;
} else {
}
} else if (body.type === 4) {
typeCondition = {
orgChild4Id: body.id,
};
searchShortName = `CONCAT(orgChild4.orgChild4ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix) like '%${body.keyword}%'`;
searchShortName = `CONCAT(orgChild4.orgChild4ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, "")) like '%${body.keyword}%'`;
}
let findPosition: any;
let masterId = new Array();

View file

@ -1005,6 +1005,7 @@ export class ProfileSalaryTempController extends Controller {
...rest,
isDelete: false,
isEdit: false,
isEntry: rest.isEntry,
createdUserId: req.user.sub,
createdFullName: req.user.name,
lastUpdateUserId: req.user.sub,
@ -1044,6 +1045,7 @@ export class ProfileSalaryTempController extends Controller {
...rest,
isDelete: false,
isEdit: false,
isEntry: rest.isEntry,
createdUserId: req.user.sub,
createdFullName: req.user.name,
lastUpdateUserId: req.user.sub,

View file

@ -292,6 +292,14 @@ export class ProfileSalaryTemp extends EntityBase {
})
posNumCodeSitAbb: string;
@Column({
nullable: true,
length: 255,
comment: "ด้านทางการบริหาร",
default: null,
})
positionExecutiveField: string;
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryTemps)
@JoinColumn({ name: "salaryId" })
profileSalary: ProfileSalary;
@ -342,6 +350,7 @@ export class CreateProfileSalaryTemp {
commandName?: string | null;
posNumCodeSit?: string | null;
posNumCodeSitAbb?: string | null;
positionExecutiveField?: string | null;
}
export type UpdateProfileSalaryTemp = {
@ -375,4 +384,5 @@ export type UpdateProfileSalaryTemp = {
commandName?: string | null;
posNumCodeSit?: string | null;
posNumCodeSitAbb?: string | null;
positionExecutiveField?: string | null;
};

File diff suppressed because one or more lines are too long