ทะเบียนประวัติค้นหาขั้นสูง #1406
This commit is contained in:
parent
8d010cd389
commit
8079693f19
1 changed files with 8 additions and 5 deletions
|
|
@ -32,7 +32,8 @@ import { viewRegistryOfficer } from "../entities/view/viewRegistryOfficer";
|
|||
import { viewRegistryEmployee } from "../entities/view/viewRegistryEmployee";
|
||||
import { EmployeeTempPosMaster } from "../entities/EmployeeTempPosMaster";
|
||||
// import { sendWebSocket } from "../services/webSocket";
|
||||
|
||||
import { Registry } from "../entities/Registry";
|
||||
import { RegistryEmployee } from "../entities/RegistryEmployee";
|
||||
@Route("api/v1/org/report")
|
||||
@Tags("Report")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -153,8 +154,9 @@ export class ReportController extends Controller {
|
|||
} else if (tenureType != "" && tenureType == "posExecutive") {
|
||||
tenureTypeCondition = "registryOfficer.posExecutiveYears BETWEEN :tenureMin AND :tenureMax";
|
||||
}
|
||||
|
||||
const [lists, total] = await AppDataSource.getRepository(viewRegistryOfficer)
|
||||
// ดึงผ่าน Table แทน View
|
||||
// const [lists, total] = await AppDataSource.getRepository(viewRegistryOfficer)
|
||||
const [lists, total] = await AppDataSource.getRepository(Registry)
|
||||
.createQueryBuilder("registryOfficer")
|
||||
.where(nodeCondition, {
|
||||
nodeId: nodeId,
|
||||
|
|
@ -493,8 +495,9 @@ export class ReportController extends Controller {
|
|||
retireLawCondition =
|
||||
"DATE(registryEmployee.dateRetireLaw) >= :startDateRetireLaw AND DATE(registryEmployee.dateRetireLaw) <= :endDateRetireLaw";
|
||||
}
|
||||
|
||||
const [lists, total] = await AppDataSource.getRepository(viewRegistryEmployee)
|
||||
// ดึงผ่าน Table แทน View
|
||||
// const [lists, total] = await AppDataSource.getRepository(viewRegistryEmployee)
|
||||
const [lists, total] = await AppDataSource.getRepository(RegistryEmployee)
|
||||
.createQueryBuilder("registryEmployee")
|
||||
.where(nodeCondition, {
|
||||
nodeId: nodeId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue