update
This commit is contained in:
parent
0af89e7ecf
commit
f1c134cb09
1 changed files with 26 additions and 11 deletions
|
|
@ -4926,8 +4926,8 @@ export class ReportController extends Controller {
|
|||
* @summary 04-บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้สมควรได้เลื่อนขั้นค่าจ้าง (แบบ ลจ.กทม.1)
|
||||
*
|
||||
*/
|
||||
@Get("emp2-04/{rootId}/{salaryPeriodId}")
|
||||
async SalaryReportEmp2_4(@Path() rootId: string, @Path() salaryPeriodId: string) {
|
||||
@Get("emp2-04/{rootId}/{salaryPeriodId}/{type}")
|
||||
async SalaryReportEmp2_4(@Path() rootId: string, @Path() salaryPeriodId: string, @Path() type: string = 'ALL') {
|
||||
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||
where: {
|
||||
id: salaryPeriodId,
|
||||
|
|
@ -4938,16 +4938,32 @@ export class ReportController extends Controller {
|
|||
if (!salaryPeriod) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลการขึ้นเงินเดือน");
|
||||
}
|
||||
let condition: any = {
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
salaryPeriodId: salaryPeriodId,
|
||||
},
|
||||
};
|
||||
condition.type = Not("NONE");
|
||||
if(salaryPeriod.period == "APR"){
|
||||
if(type == "HAFT"){
|
||||
condition.type = "HAFT";
|
||||
}else if(type == "FULL"){
|
||||
condition.type = "FULL";
|
||||
}
|
||||
}else{
|
||||
if(type == "HAFT"){
|
||||
condition.type = "HAFT";
|
||||
}else if(type == "FULL"){
|
||||
condition.type = "FULL";
|
||||
}else if(type == "FULLHAFT"){
|
||||
condition.type = "FULLHAFT";
|
||||
}
|
||||
}
|
||||
const _salaryProfileEmp = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
salaryPeriodId: salaryPeriodId,
|
||||
},
|
||||
type: Not("NONE"),
|
||||
},
|
||||
where: condition,
|
||||
order: {
|
||||
rootOrder: "ASC",
|
||||
child1Order: "ASC",
|
||||
|
|
@ -4958,7 +4974,6 @@ export class ReportController extends Controller {
|
|||
posMasterNo: "ASC",
|
||||
},
|
||||
});
|
||||
|
||||
if (!_salaryProfileEmp) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue