no message
This commit is contained in:
parent
7697d6d46a
commit
c0b920819d
6 changed files with 56 additions and 6 deletions
|
|
@ -110,6 +110,7 @@ export class CommandController extends Controller {
|
|||
: `${commandTypeId}`,
|
||||
},
|
||||
)
|
||||
.orderBy("commandSalary.createdAt", "ASC")
|
||||
.skip((page - 1) * pageSize)
|
||||
.take(pageSize)
|
||||
.getManyAndCount();
|
||||
|
|
@ -196,6 +197,8 @@ export class CommandController extends Controller {
|
|||
detailHeader: command.detailHeader,
|
||||
detailBody: command.detailBody,
|
||||
detailFooter: command.detailFooter,
|
||||
isBangkok: command.isBangkok,
|
||||
isAttachment: command.isAttachment,
|
||||
commandAffectDate: command.commandAffectDate,
|
||||
commandExcecuteDate: command.commandExcecuteDate,
|
||||
commandTypeName: command.commandType?.name || null,
|
||||
|
|
@ -224,6 +227,7 @@ export class CommandController extends Controller {
|
|||
detailFooter: string | null;
|
||||
commandAffectDate: Date | null;
|
||||
commandExcecuteDate: Date | null;
|
||||
isBangkok: boolean | null;
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
|
|
@ -268,7 +272,7 @@ export class CommandController extends Controller {
|
|||
id: x.id,
|
||||
citizenId: x.citizenId,
|
||||
prefix: x.prefix,
|
||||
fristName: x.fristName,
|
||||
firstName: x.firstName,
|
||||
lastName: x.lastName,
|
||||
profileId: x.profileId,
|
||||
order: x.order,
|
||||
|
|
@ -320,7 +324,7 @@ export class CommandController extends Controller {
|
|||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
@Get("tap2/swap/{direction}/{commandReciveId}")
|
||||
@Get("tab2/swap/{direction}/{commandReciveId}")
|
||||
public async swapSalary(
|
||||
@Path() direction: string,
|
||||
commandReciveId: string,
|
||||
|
|
@ -448,7 +452,7 @@ export class CommandController extends Controller {
|
|||
id: item.id,
|
||||
citizenId: item.citizenId,
|
||||
prefix: item.prefix,
|
||||
fristName: item.fristName,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
position: item.position,
|
||||
org: item.org,
|
||||
|
|
@ -501,7 +505,7 @@ export class CommandController extends Controller {
|
|||
commandSend.citizenId = profile.citizenId;
|
||||
commandSend.prefix =
|
||||
profile.rank != null && profile.rank != "" ? profile.rank : profile.prefix;
|
||||
commandSend.fristName = profile.firstName;
|
||||
commandSend.firstName = profile.firstName;
|
||||
commandSend.lastName = profile.lastName;
|
||||
commandSend.position = profile.position;
|
||||
commandSend.org =
|
||||
|
|
|
|||
|
|
@ -92,6 +92,14 @@ export class Command extends EntityBase {
|
|||
})
|
||||
positionDetail: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: null,
|
||||
type: "boolean",
|
||||
comment: "คำสั่งกรุงเทพมหานคร",
|
||||
})
|
||||
isBangkok: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "สถานะบัญชีแนบท้าย",
|
||||
default: true,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export class CommandRecive extends EntityBase {
|
|||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
fristName: string;
|
||||
firstName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export class CommandSend extends EntityBase {
|
|||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
fristName: string;
|
||||
firstName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
|
|||
|
|
@ -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 'ชื่อ'`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue