no message

This commit is contained in:
kittapath 2024-09-25 21:05:16 +07:00
parent 7697d6d46a
commit c0b920819d
6 changed files with 56 additions and 6 deletions

View file

@ -110,6 +110,7 @@ export class CommandController extends Controller {
: `${commandTypeId}`, : `${commandTypeId}`,
}, },
) )
.orderBy("commandSalary.createdAt", "ASC")
.skip((page - 1) * pageSize) .skip((page - 1) * pageSize)
.take(pageSize) .take(pageSize)
.getManyAndCount(); .getManyAndCount();
@ -196,6 +197,8 @@ export class CommandController extends Controller {
detailHeader: command.detailHeader, detailHeader: command.detailHeader,
detailBody: command.detailBody, detailBody: command.detailBody,
detailFooter: command.detailFooter, detailFooter: command.detailFooter,
isBangkok: command.isBangkok,
isAttachment: command.isAttachment,
commandAffectDate: command.commandAffectDate, commandAffectDate: command.commandAffectDate,
commandExcecuteDate: command.commandExcecuteDate, commandExcecuteDate: command.commandExcecuteDate,
commandTypeName: command.commandType?.name || null, commandTypeName: command.commandType?.name || null,
@ -224,6 +227,7 @@ export class CommandController extends Controller {
detailFooter: string | null; detailFooter: string | null;
commandAffectDate: Date | null; commandAffectDate: Date | null;
commandExcecuteDate: Date | null; commandExcecuteDate: Date | null;
isBangkok: boolean | null;
}, },
@Request() request: RequestWithUser, @Request() request: RequestWithUser,
) { ) {
@ -268,7 +272,7 @@ export class CommandController extends Controller {
id: x.id, id: x.id,
citizenId: x.citizenId, citizenId: x.citizenId,
prefix: x.prefix, prefix: x.prefix,
fristName: x.fristName, firstName: x.firstName,
lastName: x.lastName, lastName: x.lastName,
profileId: x.profileId, profileId: x.profileId,
order: x.order, order: x.order,
@ -320,7 +324,7 @@ export class CommandController extends Controller {
return new HttpSuccess(); return new HttpSuccess();
} }
@Get("tap2/swap/{direction}/{commandReciveId}") @Get("tab2/swap/{direction}/{commandReciveId}")
public async swapSalary( public async swapSalary(
@Path() direction: string, @Path() direction: string,
commandReciveId: string, commandReciveId: string,
@ -448,7 +452,7 @@ export class CommandController extends Controller {
id: item.id, id: item.id,
citizenId: item.citizenId, citizenId: item.citizenId,
prefix: item.prefix, prefix: item.prefix,
fristName: item.fristName, firstName: item.firstName,
lastName: item.lastName, lastName: item.lastName,
position: item.position, position: item.position,
org: item.org, org: item.org,
@ -501,7 +505,7 @@ export class CommandController extends Controller {
commandSend.citizenId = profile.citizenId; commandSend.citizenId = profile.citizenId;
commandSend.prefix = commandSend.prefix =
profile.rank != null && profile.rank != "" ? profile.rank : profile.prefix; profile.rank != null && profile.rank != "" ? profile.rank : profile.prefix;
commandSend.fristName = profile.firstName; commandSend.firstName = profile.firstName;
commandSend.lastName = profile.lastName; commandSend.lastName = profile.lastName;
commandSend.position = profile.position; commandSend.position = profile.position;
commandSend.org = commandSend.org =

View file

@ -92,6 +92,14 @@ export class Command extends EntityBase {
}) })
positionDetail: string; positionDetail: string;
@Column({
nullable: true,
default: null,
type: "boolean",
comment: "คำสั่งกรุงเทพมหานคร",
})
isBangkok: boolean;
@Column({ @Column({
comment: "สถานะบัญชีแนบท้าย", comment: "สถานะบัญชีแนบท้าย",
default: true, default: true,

View file

@ -27,7 +27,7 @@ export class CommandRecive extends EntityBase {
length: 255, length: 255,
default: null, default: null,
}) })
fristName: string; firstName: string;
@Column({ @Column({
nullable: true, nullable: true,

View file

@ -28,7 +28,7 @@ export class CommandSend extends EntityBase {
length: 255, length: 255,
default: null, default: null,
}) })
fristName: string; firstName: string;
@Column({ @Column({
nullable: true, nullable: true,

View file

@ -0,0 +1,24 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateCommandReciveAddSalary11727260590227 implements MigrationInterface {
name = 'UpdateCommandReciveAddSalary11727260590227'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandRecive\` CHANGE \`fristName\` \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandSend\` CHANGE \`fristName\` \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandSend\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandSend\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandSend\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandSend\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandSend\` CHANGE \`firstName\` \`fristName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` CHANGE \`firstName\` \`fristName\` varchar(255) NULL COMMENT 'ชื่อ'`);
}
}

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateCommandReciveAddIsbangkok1727272904603 implements MigrationInterface {
name = 'UpdateCommandReciveAddIsbangkok1727272904603'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`command\` ADD \`isBangkok\` tinyint NULL COMMENT 'คำสั่งกรุงเทพมหานคร'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`command\` DROP COLUMN \`isBangkok\``);
}
}