report
This commit is contained in:
parent
fa83d942e8
commit
3f17faa338
13 changed files with 36 additions and 179 deletions
|
|
@ -3214,7 +3214,8 @@ export class ReportController extends Controller {
|
|||
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
isNext: false,
|
||||
type: In(["NONE"]),
|
||||
// amountSpecial: MoreThan(0),xx
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -3505,6 +3506,7 @@ export class ReportController extends Controller {
|
|||
rootId: rootId,
|
||||
salaryPeriodId: salaryPeriodId,
|
||||
},
|
||||
isGood: true,
|
||||
type: Not("NONE"),
|
||||
},
|
||||
order: {
|
||||
|
|
@ -3901,7 +3903,8 @@ export class ReportController extends Controller {
|
|||
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
isNext: true,
|
||||
// isNext: true,
|
||||
amountSpecial: MoreThan(0),
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -4915,8 +4918,8 @@ export class ReportController extends Controller {
|
|||
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
amountSpecial: Not(IsNull()),
|
||||
type: Not("NONE"),
|
||||
amountSpecial: MoreThan(0),
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -5101,7 +5104,8 @@ export class ReportController extends Controller {
|
|||
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
type: "NONE",
|
||||
type: In(["NONE"]),
|
||||
// amountSpecial: MoreThan(0),xx
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -5573,7 +5577,7 @@ export class ReportController extends Controller {
|
|||
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
type: Not("NONE"),
|
||||
isGood: true,
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -5858,7 +5862,8 @@ export class ReportController extends Controller {
|
|||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
isRetired: true,
|
||||
isNext: false,
|
||||
type: In(["NONE"]),
|
||||
// amountSpecial: MoreThan(0),xxx
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -6267,8 +6272,8 @@ export class ReportController extends Controller {
|
|||
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
type: Not(In(["NONE", "PENDING"])),
|
||||
amountSpecial: 0,
|
||||
type: In(["NONE"]),
|
||||
// amountSpecial: MoreThan(0),xxx
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -7727,7 +7732,7 @@ export class ReportController extends Controller {
|
|||
positionSalaryAmount: item.positionSalaryAmount,
|
||||
}));
|
||||
|
||||
return new HttpSuccess(_salaryRank);
|
||||
return new HttpSuccess(_salaryRank.length);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -370,6 +370,13 @@ export class SalaryProfileEmployee extends EntityBase {
|
|||
})
|
||||
duration: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ดีเด่น",
|
||||
default: null,
|
||||
})
|
||||
isGood: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "การลงโทษทางวินัย",
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableProfileemployeeAddGroupNew11711035132085 implements MigrationInterface {
|
||||
name = 'UpdateTableProfileemployeeAddGroupNew11711035132085'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`group\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`group\` double NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`group\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`group\` int NULL COMMENT 'กลุ่มบัญชีการจ้าง'`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableProfileemployeeAddGroupNew21711081845764 implements MigrationInterface {
|
||||
name = 'UpdateTableProfileemployeeAddGroupNew21711081845764'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`positionSalaryAmountPer\` double NOT NULL COMMENT 'เปอร์เซ็นเงินพิเศษ' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`positionSalaryAmountPer\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryprofileAddRoot1711596443220 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryprofileAddRoot1711596443220'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrg\` ADD \`root\` varchar(255) NULL COMMENT 'orgRoot'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrg\` DROP COLUMN \`root\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryprofileAddRoot11711631590179 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryprofileAddRoot11711631590179'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrgEmployee\` ADD \`root\` varchar(255) NULL COMMENT 'orgRoot'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrgEmployee\` DROP COLUMN \`root\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryProfileEmployeeAddIsSpecial1712043041340 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryProfileEmployeeAddIsSpecial1712043041340'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`isSpecial\` tinyint NULL COMMENT 'ฉ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`isSpecial\` tinyint NULL COMMENT 'ฉ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`isSpecial\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`isSpecial\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryprofileAddProfileId1713980385738 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryprofileAddProfileId1713980385738'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`profileId\` varchar(40) NULL COMMENT 'ไอดีโปรไฟล์'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`profileId\` varchar(40) NULL COMMENT 'ไอดีโปรไฟล์'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`profileId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`profileId\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryProfileAddRank1716881317736 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryProfileAddRank1716881317736'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`rank\` varchar(255) NULL COMMENT 'ยศ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`rank\` varchar(255) NULL COMMENT 'ยศ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`rank\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`rank\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryprofileAddResult1718606376807 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryprofileAddResult1718606376807'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`result\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`result\` double NULL COMMENT 'ผลการประเมินผลการปฏิบัติราชการ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`result\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`result\` varchar(255) NULL COMMENT 'ผลการประเมินผลการปฏิบัติราชการ'`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryorgAddIsclose1743787344650 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryorgAddIsclose1743787344650'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrg\` ADD \`isClose\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrgEmployee\` ADD \`isClose\` tinyint NOT NULL COMMENT 'สถานะการใช้งาน' DEFAULT 0`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrgEmployee\` DROP COLUMN \`isClose\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryOrg\` DROP COLUMN \`isClose\``);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryorgAddOrder1743847173845 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryorgAddOrder1743847173845'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`rootOrder\` varchar(40) NULL COMMENT 'order orgRoot'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`child1Order\` varchar(40) NULL COMMENT 'Order orgChild1'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`child2Order\` varchar(40) NULL COMMENT 'Order orgChild2'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`child3Order\` varchar(40) NULL COMMENT 'Order orgChild3'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`child4Order\` varchar(40) NULL COMMENT 'Order orgChild4'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`rootOrder\` varchar(40) NULL COMMENT 'Order orgRoot'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`child1Order\` varchar(40) NULL COMMENT 'Order orgChild1'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`child2Order\` varchar(40) NULL COMMENT 'Order orgChild2'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`child3Order\` varchar(40) NULL COMMENT 'Order orgChild3'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`child4Order\` varchar(40) NULL COMMENT 'Order orgChild4'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`child4Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`child3Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`child2Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`child1Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`rootOrder\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`child4Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`child3Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`child2Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`child1Order\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`rootOrder\``);
|
||||
}
|
||||
|
||||
}
|
||||
15
src/migration/1746095843641-update300420250045.ts
Normal file
15
src/migration/1746095843641-update300420250045.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class Update3004202500451746095843641 implements MigrationInterface {
|
||||
name = "Update3004202500451746095843641";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE \`salaryProfileEmployee\` ADD \`isGood\` tinyint NULL COMMENT 'ดีเด่น'`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`isGood\``);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue