fix #649 สมรรถนะประจำกลุ่มงานไม่แสดง
This commit is contained in:
parent
6c777e9589
commit
25e5f19142
1 changed files with 9 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ import HttpStatusCode from "../interfaces/http-status";
|
|||
import { KpiCapacity } from "../entities/kpiCapacity";
|
||||
import { Position } from "../entities/position";
|
||||
import { KpiCapacityDetail } from "../entities/kpiCapacityDetail";
|
||||
import { Like, In } from "typeorm";
|
||||
import { Like, In, Not, IsNull } from "typeorm";
|
||||
import permission from "../interfaces/permission";
|
||||
import { RequestWithUser } from "../middlewares/user";
|
||||
import { setLogDataDiff } from "../interfaces/utils";
|
||||
|
|
@ -230,13 +230,19 @@ export class kpiCapacityController extends Controller {
|
|||
@Get("group")
|
||||
async GetKpiCapacityTypeGROUP(@Query("positionName") positionName: string) {
|
||||
let position = await this.positionRepository.findOne({
|
||||
where: { name: Like(`${positionName}`) },
|
||||
where: {
|
||||
name: Like(`${positionName}`),
|
||||
kpiLink: Not(IsNull()) || Not("")
|
||||
},
|
||||
relations: ["kpiLink", "kpiLink.kpiCapacitys"],
|
||||
});
|
||||
|
||||
if (position == null) {
|
||||
position = await this.positionRepository.findOne({
|
||||
where: { name: "นักจัดการงานทั่วไป" },
|
||||
where: {
|
||||
name: "นักจัดการงานทั่วไป",
|
||||
kpiLink: Not(IsNull()) || Not("")
|
||||
},
|
||||
relations: ["kpiLink", "kpiLink.kpiCapacitys"],
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue