pos num sit
This commit is contained in:
parent
3230ace376
commit
696873974c
1 changed files with 24 additions and 0 deletions
|
|
@ -3428,6 +3428,30 @@ export class ImportDataController extends Controller {
|
|||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary เงินเดือน ข้าราชการ
|
||||
*/
|
||||
@Post("update-profileSalaryEmp")
|
||||
async UpdateProfileSalaryEmp(@Request() request: { user: Record<string, any> }) {
|
||||
let rowCount = 0;
|
||||
const profileSalarys: any = await this.salaryRepo.find({ where: { refId: Not(IsNull()) } });
|
||||
|
||||
for await (const _item of profileSalarys) {
|
||||
const EMPLOYEE = await this.HR_POSITION_EMPLOYEERepo.findOne({
|
||||
select: ["id", "POS_NUM_CODE_SIT", "POS_NUM_CODE_SIT_ABB"],
|
||||
where: { id: _item.refId },
|
||||
});
|
||||
if (EMPLOYEE) {
|
||||
rowCount++;
|
||||
_item.posNumCodeSit = EMPLOYEE.POS_NUM_CODE_SIT;
|
||||
_item.posNumCodeSitAbb = EMPLOYEE.POS_NUM_CODE_SIT_ABB;
|
||||
await this.salaryRepo.save(_item);
|
||||
console.log(rowCount);
|
||||
}
|
||||
}
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
OrgRank(value: string) {
|
||||
switch (value.trim().toUpperCase()) {
|
||||
case "DEPARTMENT":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue