kk1 employee
This commit is contained in:
parent
6efa73eeeb
commit
e81ed7f778
2 changed files with 35 additions and 31 deletions
|
|
@ -3410,7 +3410,9 @@ export class ImportDataController extends Controller {
|
||||||
@Post("update-profileSalary")
|
@Post("update-profileSalary")
|
||||||
async UpdateProfileSalary(@Request() request: { user: Record<string, any> }) {
|
async UpdateProfileSalary(@Request() request: { user: Record<string, any> }) {
|
||||||
let rowCount = 0;
|
let rowCount = 0;
|
||||||
const profileSalarys: any = await this.salaryRepo.find({ where: { refId: Not(IsNull()) } });
|
const profileSalarys: any = await this.salaryRepo.find({
|
||||||
|
where: { refId: Not(IsNull()), profileEmployeeId: IsNull(), posNumCodeSit: IsNull() },
|
||||||
|
});
|
||||||
|
|
||||||
for await (const _item of profileSalarys) {
|
for await (const _item of profileSalarys) {
|
||||||
const OFFICER = await this.HR_POSITION_OFFICERRepo.findOne({
|
const OFFICER = await this.HR_POSITION_OFFICERRepo.findOne({
|
||||||
|
|
@ -3434,7 +3436,9 @@ export class ImportDataController extends Controller {
|
||||||
@Post("update-profileSalaryEmp")
|
@Post("update-profileSalaryEmp")
|
||||||
async UpdateProfileSalaryEmp(@Request() request: { user: Record<string, any> }) {
|
async UpdateProfileSalaryEmp(@Request() request: { user: Record<string, any> }) {
|
||||||
let rowCount = 0;
|
let rowCount = 0;
|
||||||
const profileSalarys: any = await this.salaryRepo.find({ where: { refId: Not(IsNull()) } });
|
const profileSalarys: any = await this.salaryRepo.find({
|
||||||
|
where: { refId: Not(IsNull()), profileId: IsNull(), posNumCodeSit: IsNull() },
|
||||||
|
});
|
||||||
|
|
||||||
for await (const _item of profileSalarys) {
|
for await (const _item of profileSalarys) {
|
||||||
const EMPLOYEE = await this.HR_POSITION_EMPLOYEERepo.findOne({
|
const EMPLOYEE = await this.HR_POSITION_EMPLOYEERepo.findOne({
|
||||||
|
|
|
||||||
|
|
@ -618,7 +618,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString()) ??
|
Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString()) ??
|
||||||
null,
|
null,
|
||||||
DisciplineDetail: item.detail ?? null,
|
DisciplineDetail: item.detail ?? null,
|
||||||
RefNo: Extension.ToThaiNumber(item.refCommandNo) ?? null,
|
RefNo: item.refCommandNo ? Extension.ToThaiNumber(item.refCommandNo) : null,
|
||||||
}))
|
}))
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue