Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2025-02-04 15:28:42 +07:00
commit b93f4d0693
3 changed files with 27 additions and 8 deletions

View file

@ -1215,8 +1215,13 @@ export class SalaryPeriodController extends Controller {
.orWhere("profile.prefix LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere("profile.firstName 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("CONCAT(profile.orgShortName,profile.posMasterNo) LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere(
"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.position 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.status = "PENDING";
salaryOrgNew.rootId = root.rootId;
salaryOrgNew.rootDnaId = root.rootDnaId;
salaryOrgNew.root = root.root;
salaryOrgNew.revisionId = salaryPeriod.revisionId;
salaryOrgNew.snapshot = snapshot;
@ -2197,6 +2203,7 @@ export class SalaryPeriodController extends Controller {
salaryOrgNew.salaryPeriodId = salaryPeriod.id;
salaryOrgNew.status = "PENDING";
salaryOrgNew.rootId = root.rootId;
salaryOrgNew.rootDnaId = root.rootDnaId;
salaryOrgNew.root = root.root;
salaryOrgNew.revisionId = salaryPeriod.revisionId;
salaryOrgNew.snapshot = snapshot;
@ -2357,7 +2364,7 @@ export class SalaryPeriodController extends Controller {
const salaryOrgSnap2Old: any = await this.salaryOrgRepository.findOne({
where: {
salaryPeriodId: salaryPeriodAPROld.id,
rootId: _salaryOrg.rootId,
rootDnaId: _salaryOrg.rootDnaId,
group: _salaryOrg.group,
snapshot: "SNAP2",
},
@ -2374,7 +2381,7 @@ export class SalaryPeriodController extends Controller {
const salaryOrgSnap1 = await this.salaryOrgRepository.findOne({
where: {
salaryPeriodId: salaryPeriod.id,
rootId: _salaryOrg.rootId,
rootDnaId: _salaryOrg.rootDnaId,
group: _salaryOrg.group,
snapshot: "SNAP1",
},
@ -2423,7 +2430,7 @@ export class SalaryPeriodController extends Controller {
const salaryOrgSnap2Old: any = await this.salaryOrgEmployeeRepository.findOne({
where: {
salaryPeriodId: salaryPeriodAPROld.id,
rootId: _salaryOrg.rootId,
rootDnaId: _salaryOrg.rootDnaId,
group: _salaryOrg.group,
snapshot: "SNAP2",
},
@ -2439,7 +2446,7 @@ export class SalaryPeriodController extends Controller {
const salaryOrgSnap1 = await this.salaryOrgEmployeeRepository.findOne({
where: {
salaryPeriodId: salaryPeriod.id,
rootId: _salaryOrg.rootId,
rootDnaId: _salaryOrg.rootDnaId,
group: _salaryOrg.group,
snapshot: "SNAP1",
},
@ -2487,7 +2494,7 @@ export class SalaryPeriodController extends Controller {
const salaryOrgSnap1 = await this.salaryOrgRepository.findOne({
where: {
salaryPeriodId: salaryPeriod.id,
rootId: _salaryOrg.rootId,
rootDnaId: _salaryOrg.rootDnaId,
group: _salaryOrg.group,
snapshot: "SNAP1",
},
@ -2529,7 +2536,7 @@ export class SalaryPeriodController extends Controller {
const salaryOrgSnap1 = await this.salaryOrgEmployeeRepository.findOne({
where: {
salaryPeriodId: salaryPeriod.id,
rootId: _salaryOrg.rootId,
rootDnaId: _salaryOrg.rootDnaId,
group: _salaryOrg.group,
snapshot: "SNAP1",
},