fix ระบบข้อมูลการประเมิน>>ตัวชี้วัด (ตามตำแหน่ง) ระบบบแจ้งไม่พบตัวชี้วัด #1253
This commit is contained in:
parent
903ff74171
commit
401584c8af
1 changed files with 3 additions and 1 deletions
|
|
@ -231,7 +231,9 @@ export class kpiRoleController extends Controller {
|
|||
const kpiPeriod = await this.kpiPeriodRepository
|
||||
.createQueryBuilder("kpiPeriod")
|
||||
.where("kpiPeriod.year = :year", { year: requestBody.year })
|
||||
.andWhere("kpiPeriod.durationKPI = :durationKPI", { durationKPI: requestBody.period })
|
||||
.andWhere(requestBody.period ? "kpiPeriod.durationKPI = :durationKPI" : "1=1", {
|
||||
durationKPI: requestBody.period,
|
||||
})
|
||||
.getOne();
|
||||
if (!kpiPeriod) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตัวชี้วัดตามตำแหน่งนี้");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue