Merge branch 'develop' into adiDev
This commit is contained in:
commit
b93f4d0693
3 changed files with 27 additions and 8 deletions
|
|
@ -1215,8 +1215,13 @@ export class SalaryPeriodController extends Controller {
|
||||||
.orWhere("profile.prefix LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.prefix LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.firstName LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.firstName LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.lastName LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.lastName LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("CONCAT(profile.prefix,profile.firstName,' ',profile.lastName) LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere(
|
||||||
.orWhere("CONCAT(profile.orgShortName,profile.posMasterNo) LIKE :keyword", { keyword: `%${body.keyword}%` })
|
"CONCAT(profile.prefix,profile.firstName,' ',profile.lastName) LIKE :keyword",
|
||||||
|
{ keyword: `%${body.keyword}%` },
|
||||||
|
)
|
||||||
|
.orWhere("CONCAT(profile.orgShortName,profile.posMasterNo) LIKE :keyword", {
|
||||||
|
keyword: `%${body.keyword}%`,
|
||||||
|
})
|
||||||
// .orWhere("profile.citizenId LIKE :keyword", { keyword: `%${body.keyword}%` })
|
// .orWhere("profile.citizenId LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.position LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.position LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
// .orWhere("profile.posType LIKE :keyword", { keyword: `%${body.keyword}%` })
|
// .orWhere("profile.posType LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
|
|
@ -2167,6 +2172,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
salaryOrgNew.salaryPeriodId = salaryPeriod.id;
|
salaryOrgNew.salaryPeriodId = salaryPeriod.id;
|
||||||
salaryOrgNew.status = "PENDING";
|
salaryOrgNew.status = "PENDING";
|
||||||
salaryOrgNew.rootId = root.rootId;
|
salaryOrgNew.rootId = root.rootId;
|
||||||
|
salaryOrgNew.rootDnaId = root.rootDnaId;
|
||||||
salaryOrgNew.root = root.root;
|
salaryOrgNew.root = root.root;
|
||||||
salaryOrgNew.revisionId = salaryPeriod.revisionId;
|
salaryOrgNew.revisionId = salaryPeriod.revisionId;
|
||||||
salaryOrgNew.snapshot = snapshot;
|
salaryOrgNew.snapshot = snapshot;
|
||||||
|
|
@ -2197,6 +2203,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
salaryOrgNew.salaryPeriodId = salaryPeriod.id;
|
salaryOrgNew.salaryPeriodId = salaryPeriod.id;
|
||||||
salaryOrgNew.status = "PENDING";
|
salaryOrgNew.status = "PENDING";
|
||||||
salaryOrgNew.rootId = root.rootId;
|
salaryOrgNew.rootId = root.rootId;
|
||||||
|
salaryOrgNew.rootDnaId = root.rootDnaId;
|
||||||
salaryOrgNew.root = root.root;
|
salaryOrgNew.root = root.root;
|
||||||
salaryOrgNew.revisionId = salaryPeriod.revisionId;
|
salaryOrgNew.revisionId = salaryPeriod.revisionId;
|
||||||
salaryOrgNew.snapshot = snapshot;
|
salaryOrgNew.snapshot = snapshot;
|
||||||
|
|
@ -2357,7 +2364,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
const salaryOrgSnap2Old: any = await this.salaryOrgRepository.findOne({
|
const salaryOrgSnap2Old: any = await this.salaryOrgRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriodAPROld.id,
|
salaryPeriodId: salaryPeriodAPROld.id,
|
||||||
rootId: _salaryOrg.rootId,
|
rootDnaId: _salaryOrg.rootDnaId,
|
||||||
group: _salaryOrg.group,
|
group: _salaryOrg.group,
|
||||||
snapshot: "SNAP2",
|
snapshot: "SNAP2",
|
||||||
},
|
},
|
||||||
|
|
@ -2374,7 +2381,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
const salaryOrgSnap1 = await this.salaryOrgRepository.findOne({
|
const salaryOrgSnap1 = await this.salaryOrgRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriod.id,
|
salaryPeriodId: salaryPeriod.id,
|
||||||
rootId: _salaryOrg.rootId,
|
rootDnaId: _salaryOrg.rootDnaId,
|
||||||
group: _salaryOrg.group,
|
group: _salaryOrg.group,
|
||||||
snapshot: "SNAP1",
|
snapshot: "SNAP1",
|
||||||
},
|
},
|
||||||
|
|
@ -2423,7 +2430,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
const salaryOrgSnap2Old: any = await this.salaryOrgEmployeeRepository.findOne({
|
const salaryOrgSnap2Old: any = await this.salaryOrgEmployeeRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriodAPROld.id,
|
salaryPeriodId: salaryPeriodAPROld.id,
|
||||||
rootId: _salaryOrg.rootId,
|
rootDnaId: _salaryOrg.rootDnaId,
|
||||||
group: _salaryOrg.group,
|
group: _salaryOrg.group,
|
||||||
snapshot: "SNAP2",
|
snapshot: "SNAP2",
|
||||||
},
|
},
|
||||||
|
|
@ -2439,7 +2446,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
const salaryOrgSnap1 = await this.salaryOrgEmployeeRepository.findOne({
|
const salaryOrgSnap1 = await this.salaryOrgEmployeeRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriod.id,
|
salaryPeriodId: salaryPeriod.id,
|
||||||
rootId: _salaryOrg.rootId,
|
rootDnaId: _salaryOrg.rootDnaId,
|
||||||
group: _salaryOrg.group,
|
group: _salaryOrg.group,
|
||||||
snapshot: "SNAP1",
|
snapshot: "SNAP1",
|
||||||
},
|
},
|
||||||
|
|
@ -2487,7 +2494,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
const salaryOrgSnap1 = await this.salaryOrgRepository.findOne({
|
const salaryOrgSnap1 = await this.salaryOrgRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriod.id,
|
salaryPeriodId: salaryPeriod.id,
|
||||||
rootId: _salaryOrg.rootId,
|
rootDnaId: _salaryOrg.rootDnaId,
|
||||||
group: _salaryOrg.group,
|
group: _salaryOrg.group,
|
||||||
snapshot: "SNAP1",
|
snapshot: "SNAP1",
|
||||||
},
|
},
|
||||||
|
|
@ -2529,7 +2536,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
const salaryOrgSnap1 = await this.salaryOrgEmployeeRepository.findOne({
|
const salaryOrgSnap1 = await this.salaryOrgEmployeeRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriod.id,
|
salaryPeriodId: salaryPeriod.id,
|
||||||
rootId: _salaryOrg.rootId,
|
rootDnaId: _salaryOrg.rootDnaId,
|
||||||
group: _salaryOrg.group,
|
group: _salaryOrg.group,
|
||||||
snapshot: "SNAP1",
|
snapshot: "SNAP1",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,12 @@ export class SalaryOrg extends EntityBase {
|
||||||
})
|
})
|
||||||
rootId: string;
|
rootId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
comment: "คีย์นอก(FK)ของตาราง orgRoot Dna",
|
||||||
|
length: 40,
|
||||||
|
})
|
||||||
|
rootDnaId: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "orgRoot",
|
comment: "orgRoot",
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,12 @@ export class SalaryOrgEmployee extends EntityBase {
|
||||||
})
|
})
|
||||||
rootId: string;
|
rootId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
comment: "คีย์นอก(FK)ของตาราง orgRoot Dna",
|
||||||
|
length: 40,
|
||||||
|
})
|
||||||
|
rootDnaId: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "orgRoot",
|
comment: "orgRoot",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue