แก้วันที่มีผลคำสั่ง
This commit is contained in:
parent
d781920ad4
commit
71cfc78c6e
1 changed files with 10 additions and 1 deletions
|
|
@ -893,7 +893,16 @@ export class CommandController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้");
|
||||||
}
|
}
|
||||||
command.isSign = true;
|
command.isSign = true;
|
||||||
if (new Date().getDate() > command.commandExcecuteDate.getDate()) {
|
if (command.commandExcecuteDate == null)
|
||||||
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบวันที่คำสั่งมีผล");
|
||||||
|
if (
|
||||||
|
new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()) <
|
||||||
|
new Date(
|
||||||
|
command.commandExcecuteDate.getFullYear(),
|
||||||
|
command.commandExcecuteDate.getMonth(),
|
||||||
|
command.commandExcecuteDate.getDate(),
|
||||||
|
)
|
||||||
|
) {
|
||||||
command.status = "WAITING";
|
command.status = "WAITING";
|
||||||
} else {
|
} else {
|
||||||
command.status = "REPORTED";
|
command.status = "REPORTED";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue