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 checkChildConditions: any = {};
|
||||||
let keywordAsInt: any;
|
let keywordAsInt: any;
|
||||||
let searchShortName = "1=1";
|
let searchShortName = "1=1";
|
||||||
let searchShortName0 = `CONCAT(orgRoot.orgRootShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
|
let searchShortName0 = `CONCAT(orgRoot.orgRootShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
|
||||||
let searchShortName1 = `CONCAT(orgChild1.orgChild1ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
|
let searchShortName1 = `CONCAT(orgChild1.orgChild1ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
|
||||||
let searchShortName2 = `CONCAT(orgChild2.orgChild2ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
|
let searchShortName2 = `CONCAT(orgChild2.orgChild2ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
|
||||||
let searchShortName3 = `CONCAT(orgChild3.orgChild3ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix)`;
|
let searchShortName3 = `CONCAT(orgChild3.orgChild3ShortName," ",COALESCE(posMaster.posMasterNoPrefix, ""),posMaster.posMasterNo,COALESCE(posMaster.posMasterNoSuffix, ""))`;
|
||||||
let searchShortName4 = `CONCAT(orgChild4.orgChild4ShortName," ",posMaster.posMasterNoPrefix,posMaster.posMasterNo,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");
|
let _data = await new permission().PermissionOrgList(request, "SYS_POS_CONDITION");
|
||||||
if (body.type === 0) {
|
if (body.type === 0) {
|
||||||
typeCondition = {
|
typeCondition = {
|
||||||
|
|
@ -4868,7 +4868,7 @@ export class PositionController extends Controller {
|
||||||
checkChildConditions = {
|
checkChildConditions = {
|
||||||
orgChild1Id: IsNull(),
|
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 {
|
||||||
}
|
}
|
||||||
} else if (body.type === 1) {
|
} else if (body.type === 1) {
|
||||||
|
|
@ -4879,7 +4879,7 @@ export class PositionController extends Controller {
|
||||||
checkChildConditions = {
|
checkChildConditions = {
|
||||||
orgChild2Id: IsNull(),
|
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 {
|
||||||
}
|
}
|
||||||
} else if (body.type === 2) {
|
} else if (body.type === 2) {
|
||||||
|
|
@ -4890,7 +4890,7 @@ export class PositionController extends Controller {
|
||||||
checkChildConditions = {
|
checkChildConditions = {
|
||||||
orgChild3Id: IsNull(),
|
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 {
|
||||||
}
|
}
|
||||||
} else if (body.type === 3) {
|
} else if (body.type === 3) {
|
||||||
|
|
@ -4901,14 +4901,14 @@ export class PositionController extends Controller {
|
||||||
checkChildConditions = {
|
checkChildConditions = {
|
||||||
orgChild4Id: IsNull(),
|
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 {
|
||||||
}
|
}
|
||||||
} else if (body.type === 4) {
|
} else if (body.type === 4) {
|
||||||
typeCondition = {
|
typeCondition = {
|
||||||
orgChild4Id: body.id,
|
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 findPosition: any;
|
||||||
let masterId = new Array();
|
let masterId = new Array();
|
||||||
|
|
|
||||||
|
|
@ -1005,6 +1005,7 @@ export class ProfileSalaryTempController extends Controller {
|
||||||
...rest,
|
...rest,
|
||||||
isDelete: false,
|
isDelete: false,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
isEntry: rest.isEntry,
|
||||||
createdUserId: req.user.sub,
|
createdUserId: req.user.sub,
|
||||||
createdFullName: req.user.name,
|
createdFullName: req.user.name,
|
||||||
lastUpdateUserId: req.user.sub,
|
lastUpdateUserId: req.user.sub,
|
||||||
|
|
@ -1044,6 +1045,7 @@ export class ProfileSalaryTempController extends Controller {
|
||||||
...rest,
|
...rest,
|
||||||
isDelete: false,
|
isDelete: false,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
isEntry: rest.isEntry,
|
||||||
createdUserId: req.user.sub,
|
createdUserId: req.user.sub,
|
||||||
createdFullName: req.user.name,
|
createdFullName: req.user.name,
|
||||||
lastUpdateUserId: req.user.sub,
|
lastUpdateUserId: req.user.sub,
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,14 @@ export class ProfileSalaryTemp extends EntityBase {
|
||||||
})
|
})
|
||||||
posNumCodeSitAbb: string;
|
posNumCodeSitAbb: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 255,
|
||||||
|
comment: "ด้านทางการบริหาร",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
positionExecutiveField: string;
|
||||||
|
|
||||||
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryTemps)
|
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryTemps)
|
||||||
@JoinColumn({ name: "salaryId" })
|
@JoinColumn({ name: "salaryId" })
|
||||||
profileSalary: ProfileSalary;
|
profileSalary: ProfileSalary;
|
||||||
|
|
@ -342,6 +350,7 @@ export class CreateProfileSalaryTemp {
|
||||||
commandName?: string | null;
|
commandName?: string | null;
|
||||||
posNumCodeSit?: string | null;
|
posNumCodeSit?: string | null;
|
||||||
posNumCodeSitAbb?: string | null;
|
posNumCodeSitAbb?: string | null;
|
||||||
|
positionExecutiveField?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileSalaryTemp = {
|
export type UpdateProfileSalaryTemp = {
|
||||||
|
|
@ -375,4 +384,5 @@ export type UpdateProfileSalaryTemp = {
|
||||||
commandName?: string | null;
|
commandName?: string | null;
|
||||||
posNumCodeSit?: string | null;
|
posNumCodeSit?: string | null;
|
||||||
posNumCodeSitAbb?: 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