migrate + fix issue #1636
This commit is contained in:
parent
c729526f0f
commit
6472798b69
4 changed files with 1332 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue