report 10

This commit is contained in:
kittapath 2024-10-17 10:38:32 +07:00
parent 437632f39c
commit a53cf4212f
2 changed files with 30 additions and 32 deletions

View file

@ -1013,10 +1013,9 @@ export class CommandController extends Controller {
if (command.commandExcecuteDate == null) if (command.commandExcecuteDate == null)
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบวันที่คำสั่งมีผล"); throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบวันที่คำสั่งมีผล");
let profiles = command && command.commandRecives.length > 0 let profiles =
? command.commandRecives command && command.commandRecives.length > 0
.filter((x) => x.profileId != null) ? command.commandRecives.filter((x) => x.profileId != null).map((x) => x.profileId)
.map((x) => x.profileId)
: []; : [];
await new CallAPI() await new CallAPI()
@ -1075,8 +1074,8 @@ export class CommandController extends Controller {
relations: ["commandType", "commandRecives"], relations: ["commandType", "commandRecives"],
where: { where: {
commandExcecuteDate: Between(today, tomorrow), commandExcecuteDate: Between(today, tomorrow),
status: "WAITING" status: "WAITING",
} },
}); });
const data = { const data = {
@ -1119,7 +1118,7 @@ export class CommandController extends Controller {
token: _data.access_token, token: _data.access_token,
}; };
sendToQueue(msg); sendToQueue(msg);
}) });
return new HttpSuccess(); return new HttpSuccess();
} }
@ -2782,7 +2781,7 @@ export class CommandController extends Controller {
case "C-PM-09": case "C-PM-09":
return "/retirement/other/out/report"; return "/retirement/other/out/report";
case "C-PM-10": case "C-PM-10":
return "/xxxxxx"; return "/probation/report/command10/officer/report";
case "C-PM-11": case "C-PM-11":
return "/probation/report/command11/officer/report"; return "/probation/report/command11/officer/report";
case "C-PM-12": case "C-PM-12":

View file

@ -1,4 +1,4 @@
import { Body, Controller, Get, Path, Post, Request, Route, Security, Tags } from "tsoa"; import { Body, Controller, Get, Post, Request, Route, Security, Tags } from "tsoa";
import { AppDataSource } from "../database/data-source"; import { AppDataSource } from "../database/data-source";
import { RequestWithUser } from "../middlewares/user"; import { RequestWithUser } from "../middlewares/user";
import HttpError from "../interfaces/http-error"; import HttpError from "../interfaces/http-error";
@ -14,7 +14,6 @@ import { StateUserComment } from "../entities/StateUserComment";
import { MetaWorkflow } from "../entities/MetaWorkflow"; import { MetaWorkflow } from "../entities/MetaWorkflow";
import { MetaState } from "../entities/MetaState"; import { MetaState } from "../entities/MetaState";
import { MetaStateOperator } from "../entities/MetaStateOperator"; import { MetaStateOperator } from "../entities/MetaStateOperator";
import { PosMasterAssign } from "../entities/PosMasterAssign";
import { PosMaster } from "../entities/PosMaster"; import { PosMaster } from "../entities/PosMaster";
import { IsNull, Not } from "typeorm"; import { IsNull, Not } from "typeorm";