#1451,#1452
This commit is contained in:
parent
2f0d86ed58
commit
f456c0821b
3 changed files with 58 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ import { SalaryOrgEmployee } from "../entities/SalaryOrgEmployee";
|
||||||
import { SalaryProfileEmployee } from "../entities/SalaryProfileEmployee";
|
import { SalaryProfileEmployee } from "../entities/SalaryProfileEmployee";
|
||||||
import { setLogDataDiff } from "../interfaces/utils";
|
import { setLogDataDiff } from "../interfaces/utils";
|
||||||
import { RequestWithUser } from "../middlewares/user";
|
import { RequestWithUser } from "../middlewares/user";
|
||||||
|
import permission from "../interfaces/permission";
|
||||||
|
|
||||||
import CallAPI from "../interfaces/call-api";
|
import CallAPI from "../interfaces/call-api";
|
||||||
import { isNotEmittedStatement } from "typescript";
|
import { isNotEmittedStatement } from "typescript";
|
||||||
|
|
@ -7581,6 +7582,7 @@ export class ReportController extends Controller {
|
||||||
// }),
|
// }),
|
||||||
// )
|
// )
|
||||||
.andWhere("salaryProfileEmployee.status36 = :status", { status: "PENDING" })
|
.andWhere("salaryProfileEmployee.status36 = :status", { status: "PENDING" })
|
||||||
|
.andWhere("salaryProfileEmployee.rootId = :rootId", { rootId: body.rootId })
|
||||||
.select([
|
.select([
|
||||||
"salaryProfileEmployee.id",
|
"salaryProfileEmployee.id",
|
||||||
"salaryProfileEmployee.orgShortName",
|
"salaryProfileEmployee.orgShortName",
|
||||||
|
|
@ -8829,6 +8831,7 @@ export class ReportController extends Controller {
|
||||||
commandYear: v.commandYear,
|
commandYear: v.commandYear,
|
||||||
commandId: v.commandId,
|
commandId: v.commandId,
|
||||||
salaryLevel: salary.salaryLevel && salary.salaryLevelNew ? salary.salaryLevelNew : salary.salaryLevel,
|
salaryLevel: salary.salaryLevel && salary.salaryLevelNew ? salary.salaryLevelNew : salary.salaryLevel,
|
||||||
|
group: salary.group && salary.groupNew ? salary.groupNew : salary.group,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const before = null;
|
const before = null;
|
||||||
|
|
|
||||||
|
|
@ -1554,6 +1554,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
await new permission().PermissionList(request, "SYS_SALARY_OFFICER");
|
await new permission().PermissionList(request, "SYS_SALARY_OFFICER");
|
||||||
|
const _data = await new permission().PermissionOrgList(request, "SYS_SALARY_OFFICER");
|
||||||
const salaryOrg = await this.salaryOrgRepository.findOne({
|
const salaryOrg = await this.salaryOrgRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: id,
|
||||||
|
|
@ -1626,6 +1627,56 @@ export class SalaryPeriodController extends Controller {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
.andWhere(
|
||||||
|
_data.root != undefined && _data.root != null
|
||||||
|
? _data.root[0] != null
|
||||||
|
? `rootId IN (:...root)`
|
||||||
|
: `rootId is null`
|
||||||
|
: "1=1",
|
||||||
|
{
|
||||||
|
root: ["4b574414-5faa-438c-829a-3c6444582cfd"],
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.andWhere(
|
||||||
|
_data.child1 != undefined && _data.child1 != null
|
||||||
|
? _data.child1[0] != null
|
||||||
|
? `child1Id IN (:...child1)`
|
||||||
|
: `child1Id is null`
|
||||||
|
: "1=1",
|
||||||
|
{
|
||||||
|
child1: _data.child1,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.andWhere(
|
||||||
|
_data.child2 != undefined && _data.child2 != null
|
||||||
|
? _data.child2[0] != null
|
||||||
|
? `child2Id IN (:...child2)`
|
||||||
|
: `child2Id is null`
|
||||||
|
: "1=1",
|
||||||
|
{
|
||||||
|
child2: _data.child2,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.andWhere(
|
||||||
|
_data.child3 != undefined && _data.child3 != null
|
||||||
|
? _data.child3[0] != null
|
||||||
|
? `child3Id IN (:...child3)`
|
||||||
|
: `child3Id is null`
|
||||||
|
: "1=1",
|
||||||
|
{
|
||||||
|
child3: _data.child3,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.andWhere(
|
||||||
|
_data.child4 != undefined && _data.child4 != null
|
||||||
|
? _data.child4[0] != null
|
||||||
|
? `child4Id IN (:...child4)`
|
||||||
|
: `child4Id is null`
|
||||||
|
: "1=1",
|
||||||
|
{
|
||||||
|
child4: _data.child4,
|
||||||
|
},
|
||||||
|
)
|
||||||
.orderBy("profile.rootOrder", "ASC")
|
.orderBy("profile.rootOrder", "ASC")
|
||||||
.addOrderBy("profile.child1Order", "ASC")
|
.addOrderBy("profile.child1Order", "ASC")
|
||||||
.addOrderBy("profile.child2Order", "ASC")
|
.addOrderBy("profile.child2Order", "ASC")
|
||||||
|
|
@ -2738,6 +2789,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
});
|
});
|
||||||
salaryProfileNew.type = salaryOld == null ? 0 : salaryOld.type;
|
salaryProfileNew.type = salaryOld == null ? 0 : salaryOld.type;
|
||||||
salaryProfileNew.salaryLevel = salaryOld && salaryOld.salaryLevelNew ? salaryOld.salaryLevelNew : salaryOld?.salaryLevel;
|
salaryProfileNew.salaryLevel = salaryOld && salaryOld.salaryLevelNew ? salaryOld.salaryLevelNew : salaryOld?.salaryLevel;
|
||||||
|
salaryProfileNew.group = salaryOld && salaryOld.groupNew ? salaryOld.groupNew : salaryOld?.group;
|
||||||
salaryProfileNew.amount = salaryOld == null ? 0 : salaryOld.amount;
|
salaryProfileNew.amount = salaryOld == null ? 0 : salaryOld.amount;
|
||||||
salaryProfileNew.amountSpecial = salaryOld == null ? 0 : salaryOld.amountSpecial;
|
salaryProfileNew.amountSpecial = salaryOld == null ? 0 : salaryOld.amountSpecial;
|
||||||
salaryProfileNew.amountUse = salaryOld == null ? 0 : salaryOld.amountUse;
|
salaryProfileNew.amountUse = salaryOld == null ? 0 : salaryOld.amountUse;
|
||||||
|
|
|
||||||
|
|
@ -1121,6 +1121,9 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
.orWhere("CONCAT(profile.orgShortName,profile.posMasterNo) LIKE :keyword", {
|
.orWhere("CONCAT(profile.orgShortName,profile.posMasterNo) LIKE :keyword", {
|
||||||
keyword: `%${body.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}%` })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue