เพิ่มขั้นเงินเดือน
This commit is contained in:
parent
153d29557b
commit
297d567fad
3 changed files with 25 additions and 4 deletions
|
|
@ -1643,7 +1643,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
orgProfiles.map(async (profile: any) => {
|
orgProfileEmployees.map(async (profile: any) => {
|
||||||
const salaryOrgNew = await this.salaryOrgEmployeeRepository.findOne({
|
const salaryOrgNew = await this.salaryOrgEmployeeRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriod.id,
|
salaryPeriodId: salaryPeriod.id,
|
||||||
|
|
@ -1979,7 +1979,6 @@ export class SalaryPeriodController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
total = 1000;
|
total = 1000;
|
||||||
let orgProfileEmployees: any;
|
|
||||||
let _orgProfileEmployees = await new CallAPI().PostData(
|
let _orgProfileEmployees = await new CallAPI().PostData(
|
||||||
request,
|
request,
|
||||||
"org/unauthorize/profile/salary/employee/gen",
|
"org/unauthorize/profile/salary/employee/gen",
|
||||||
|
|
@ -1991,7 +1990,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
period: salaryPeriod.period,
|
period: salaryPeriod.period,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
orgProfileEmployees = _orgProfileEmployees.data;
|
let orgProfileEmployees = _orgProfileEmployees.data;
|
||||||
total = _orgProfileEmployees.total;
|
total = _orgProfileEmployees.total;
|
||||||
if (total > 1000) {
|
if (total > 1000) {
|
||||||
const page = Math.ceil(total / 1000);
|
const page = Math.ceil(total / 1000);
|
||||||
|
|
@ -2113,7 +2112,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
orgProfiles.map(async (profile: any) => {
|
orgProfileEmployees.map(async (profile: any) => {
|
||||||
const salaryOrgNew = await this.salaryOrgEmployeeRepository.findOne({
|
const salaryOrgNew = await this.salaryOrgEmployeeRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
salaryPeriodId: salaryPeriod.id,
|
salaryPeriodId: salaryPeriod.id,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,14 @@ export class SalaryProfileEmployee extends EntityBase {
|
||||||
})
|
})
|
||||||
salaryOrgId: string;
|
salaryOrgId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "double",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ขั้นเงินเดือน",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
salaryLevel: number | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "คำนำหน้า",
|
comment: "คำนำหน้า",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableSalayprofileAddSalarylevel1710744556698 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableSalayprofileAddSalarylevel1710744556698'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`salaryLevel\` double NULL COMMENT 'ขั้นเงินเดือน'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`salaryLevel\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue