fix หลังออกคำสั่งไม่บันทึกลงทะเบียนประวัติ

This commit is contained in:
Bright 2024-10-30 10:23:36 +07:00
parent e23981d2e5
commit 09701e131a

View file

@ -7185,6 +7185,58 @@ export class ReportController extends Controller {
return new HttpSuccess(_salaryRank);
}
/**
* API
*
* @summary
*
* @param {string} id Guid, *Id
*/
@Post("command/officer/report")
async SalaryOfficerReportCommand(
@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: "REPORT",
}));
await this.salaryProfileRepository.save(data);
return new HttpSuccess();
}
/**
* API
*
* @summary
*
* @param {string} id Guid, *Id
*/
@Post("command/employee/report")
async SalaryEmployeeReportCommand(
@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: "REPORT",
}));
await this.salaryProfileEmployeeRepository.save(data);
return new HttpSuccess();
}
/**
* API
@ -7224,10 +7276,10 @@ export class ReportController extends Controller {
.PostData(request, "/org/profile/salary", {
profileId: salary.profileId,
date: new Date(),
amount: salary.positionSalaryAmount,
amount: v.amount,
commandId: v.commandId,
positionSalaryAmount: salary.amountSpecial,
mouthSalaryAmount: null,
positionSalaryAmount: v.positionSalaryAmount,
mouthSalaryAmount: v.mouthSalaryAmount,
posNo: salary.orgShortName + salary.posMasterNo,
position: salary.position,
positionLine: null,
@ -7290,10 +7342,10 @@ export class ReportController extends Controller {
.PostData(request, "/org/profile-employee/salary", {
profileEmployeeId: salary.profileId,
date: new Date(),
amount: salary.positionSalaryAmount,
amount: v.amount,
commandId: v.commandId,
positionSalaryAmount: salary.amountSpecial,
mouthSalaryAmount: null,
positionSalaryAmount: v.positionSalaryAmount,
mouthSalaryAmount: v.mouthSalaryAmount,
posNo: salary.orgShortName + salary.posMasterNo,
position: salary.position,
positionType: salary.posType,
@ -7315,56 +7367,7 @@ export class ReportController extends Controller {
);
return new HttpSuccess();
}
/**
* API
*
* @summary
*
* @param {string} id Guid, *Id
*/
@Post("command/officer/report")
async SalaryOfficerReportCommand(
@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: "REPORT",
}));
await this.salaryProfileRepository.save(data);
return new HttpSuccess();
}
/**
* API
*
* @summary
*
* @param {string} id Guid, *Id
*/
@Post("command/employee/report")
async SalaryEmployeeReportCommand(
@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: "REPORT",
}));
await this.salaryProfileEmployeeRepository.save(data);
return new HttpSuccess();
}
/**
* API
*
@ -7390,6 +7393,7 @@ export class ReportController extends Controller {
await this.salaryProfileRepository.save(data);
return new HttpSuccess();
}
/**
* API
*