add viewProfileEmp
This commit is contained in:
parent
db3c9583f6
commit
ee71e985ab
3 changed files with 65 additions and 8 deletions
|
|
@ -1174,12 +1174,12 @@ export class OrganizationUnauthorizeController extends Controller {
|
|||
* @summary ผลการประเมิน 5 ปีย้อนหลังนับจากปีปัจจุบัน
|
||||
*
|
||||
*/
|
||||
@Get("calculateEvaluation")
|
||||
@Get("calculateEvaluation/{type}")
|
||||
async calculateEvaluation(
|
||||
// @Path() node: number,
|
||||
@Path() type: string,
|
||||
// @Path() nodeId: string,
|
||||
) {
|
||||
|
||||
const conType = type.toUpperCase();
|
||||
// let condition :any = {};
|
||||
// switch (node) {
|
||||
// case 0:
|
||||
|
|
@ -1206,7 +1206,10 @@ export class OrganizationUnauthorizeController extends Controller {
|
|||
// ...condition
|
||||
// }
|
||||
})
|
||||
|
||||
// if(conType == "EMPLOYEE"){
|
||||
// const lists = await this.viewProfileEmployeeEvaluationRepo.find({
|
||||
// })
|
||||
// }
|
||||
const groupData: any = {};
|
||||
const year = new Date().getFullYear();
|
||||
const years = [year, year - 1, year - 2, year - 3, year - 4];
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export class ReportController extends Controller {
|
|||
.andWhere(rootId?'posMaster.orgRootId = :rootId': "1=1", { rootId: rootId })
|
||||
.andWhere('posMaster.current_holderId Is Not Null')
|
||||
.andWhere('positions.positionIsSelected = :positionIsSelected', { positionIsSelected: true })
|
||||
.andWhere( yearInAD && yearInAD != null? 'YEAR(current_holder.dateAppoint) = :year': "1=1", { year: yearInAD })
|
||||
.andWhere( yearInAD && yearInAD != null? 'YEAR(current_holder.dateAppoint) = :year': "1=1", { year: yearInAD }) //ตอนนี้ where ที่วันที่บรรจุ (รอ prove) ว่าจะ where ที่ไหน
|
||||
.andWhere(`
|
||||
TIMESTAMPDIFF(YEAR, current_holder.birthDate, CURDATE()) >= :minAge
|
||||
AND TIMESTAMPDIFF(YEAR, current_holder.birthDate, CURDATE()) <= :maxAge
|
||||
|
|
@ -137,12 +137,11 @@ export class ReportController extends Controller {
|
|||
...item ,
|
||||
count: Extension.ToThaiNumber(item.count.toString()),
|
||||
}));
|
||||
|
||||
return new HttpSuccess({
|
||||
template: "registry-officer",
|
||||
reportName: "xlsx-report",
|
||||
data: {
|
||||
year: year?Extension.ToThaiNumber(year.toString()):Extension.ToThaiNumber(new Date().getFullYear().toString()),
|
||||
year: year?Extension.ToThaiNumber((year + 543).toString()):Extension.ToThaiNumber(((new Date()).getFullYear()+543).toString()),
|
||||
date: Extension.ToThaiNumber(Extension.ToThaiShortDate(new Date())),
|
||||
list: result
|
||||
},
|
||||
|
|
@ -248,7 +247,7 @@ export class ReportController extends Controller {
|
|||
template: "registry-emp",
|
||||
reportName: "xlsx-report",
|
||||
data: {
|
||||
year: year?Extension.ToThaiNumber(year.toString()):Extension.ToThaiNumber(new Date().getFullYear().toString()),
|
||||
year: year?Extension.ToThaiNumber((year + 543).toString()):Extension.ToThaiNumber(((new Date()).getFullYear()+543).toString()),
|
||||
date: Extension.ToThaiNumber(Extension.ToThaiShortDate(new Date())),
|
||||
list: result
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue