ออกคำสั่งเงินเดือน
This commit is contained in:
parent
c1f70f6dd0
commit
2344141016
1 changed files with 96 additions and 10 deletions
|
|
@ -6553,11 +6553,15 @@ export class ReportController extends Controller {
|
|||
|
||||
const _salaryRank = salaryRank.map((item) => ({
|
||||
id: item.id,
|
||||
citizenId: item.citizenId,
|
||||
posMasterNo: `${item.orgShortName}${item.posMasterNo}`,
|
||||
positionName: item.position,
|
||||
posType: item.posType,
|
||||
posLevel: item.posLevel,
|
||||
profileId: item.profileId,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
profileId: item.profileId,
|
||||
citizenId: item.citizenId,
|
||||
}));
|
||||
|
||||
return new HttpSuccess(_salaryRank);
|
||||
|
|
@ -6599,11 +6603,15 @@ export class ReportController extends Controller {
|
|||
|
||||
const _salaryRank = salaryRank.map((item) => ({
|
||||
id: item.id,
|
||||
citizenId: item.citizenId,
|
||||
posMasterNo: `${item.orgShortName}${item.posMasterNo}`,
|
||||
positionName: item.position,
|
||||
posType: item.posType,
|
||||
posLevel: item.posLevel,
|
||||
profileId: item.profileId,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
profileId: item.profileId,
|
||||
citizenId: item.citizenId,
|
||||
}));
|
||||
|
||||
return new HttpSuccess(_salaryRank);
|
||||
|
|
@ -6639,11 +6647,15 @@ export class ReportController extends Controller {
|
|||
|
||||
const _salaryRank = salaryRank.map((item) => ({
|
||||
id: item.id,
|
||||
citizenId: item.citizenId,
|
||||
posMasterNo: `${item.orgShortName}${item.posMasterNo}`,
|
||||
positionName: item.position,
|
||||
posType: item.posType,
|
||||
posLevel: item.posLevel,
|
||||
profileId: item.profileId,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
profileId: item.profileId,
|
||||
citizenId: item.citizenId,
|
||||
}));
|
||||
|
||||
return new HttpSuccess(_salaryRank);
|
||||
|
|
@ -6678,11 +6690,15 @@ export class ReportController extends Controller {
|
|||
|
||||
const _salaryRank = salaryRank.map((item) => ({
|
||||
id: item.id,
|
||||
citizenId: item.citizenId,
|
||||
posMasterNo: `${item.orgShortName}${item.posMasterNo}`,
|
||||
positionName: item.position,
|
||||
posType: item.posType,
|
||||
posLevel: `${item.posTypeShort}${item.posLevel}`,
|
||||
profileId: item.profileId,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
profileId: item.profileId,
|
||||
citizenId: item.citizenId,
|
||||
}));
|
||||
|
||||
return new HttpSuccess(_salaryRank);
|
||||
|
|
@ -6717,11 +6733,15 @@ export class ReportController extends Controller {
|
|||
|
||||
const _salaryRank = salaryRank.map((item) => ({
|
||||
id: item.id,
|
||||
citizenId: item.citizenId,
|
||||
posMasterNo: `${item.orgShortName}${item.posMasterNo}`,
|
||||
positionName: item.position,
|
||||
posType: item.posType,
|
||||
posLevel: `${item.posTypeShort}${item.posLevel}`,
|
||||
profileId: item.profileId,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
profileId: item.profileId,
|
||||
citizenId: item.citizenId,
|
||||
}));
|
||||
|
||||
return new HttpSuccess(_salaryRank);
|
||||
|
|
@ -6871,6 +6891,14 @@ export class ReportController extends Controller {
|
|||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
const salaryProfile = await this.salaryProfileRepository.find({
|
||||
where: { id: In(body.refIds) },
|
||||
});
|
||||
const data = salaryProfile.map((_data) => ({
|
||||
..._data,
|
||||
status: "REPORT",
|
||||
}));
|
||||
await this.salaryProfileRepository.save(data);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
/**
|
||||
|
|
@ -6888,6 +6916,64 @@ export class ReportController extends Controller {
|
|||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
const salaryProfile = await this.salaryProfileEmployeeRepository.find({
|
||||
where: { id: In(body.refIds) },
|
||||
});
|
||||
const data = salaryProfile.map((_data) => ({
|
||||
..._data,
|
||||
status: "REPORT",
|
||||
}));
|
||||
await this.salaryProfileEmployeeRepository.save(data);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
/**
|
||||
* API ออกคำสั่ง
|
||||
*
|
||||
* @summary ออกคำสั่ง
|
||||
*
|
||||
* @param {string} id Guid, *Id ผังเงินเดือน
|
||||
*/
|
||||
@Post("command/officer/report/delete")
|
||||
async SalaryOfficerReportCommandDelete(
|
||||
@Body()
|
||||
body: {
|
||||
refIds: string[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
const salaryProfile = await this.salaryProfileRepository.find({
|
||||
where: { id: In(body.refIds) },
|
||||
});
|
||||
const data = salaryProfile.map((_data) => ({
|
||||
..._data,
|
||||
status: "PENDING",
|
||||
}));
|
||||
await this.salaryProfileRepository.save(data);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
/**
|
||||
* API ออกคำสั่ง
|
||||
*
|
||||
* @summary ออกคำสั่ง
|
||||
*
|
||||
* @param {string} id Guid, *Id ผังเงินเดือน
|
||||
*/
|
||||
@Post("command/employee/report/delete")
|
||||
async SalaryEmployeeReportCommandDelete(
|
||||
@Body()
|
||||
body: {
|
||||
refIds: string[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
const salaryProfile = await this.salaryProfileEmployeeRepository.find({
|
||||
where: { id: In(body.refIds) },
|
||||
});
|
||||
const data = salaryProfile.map((_data) => ({
|
||||
..._data,
|
||||
status: "PENDING",
|
||||
}));
|
||||
await this.salaryProfileEmployeeRepository.save(data);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue