แนบไฟล์คำสั่ง

This commit is contained in:
kittapath 2024-09-16 15:15:59 +07:00
parent 9d755fc8ff
commit d3aa76b3f8
6 changed files with 107 additions and 6 deletions

View file

@ -296,7 +296,7 @@ export class ImportDataController extends Controller {
await Promise.all(
profiles.map(async (_item) => {
const existingProfile = await this.HR_POSITION_OFFICERRepo.find({
where: { CIT: _item.citizenId },
where: { CIT: _item.citizenId, FLAG_PERSON_TYPE: "1" },
select: [
"CIT",
"MP_POS_DATE",
@ -319,7 +319,9 @@ export class ImportDataController extends Controller {
rowCount++;
const profileSalary = new ProfileSalary();
profileSalary.date =
item.MP_POS_DATE == "" ? null_ : Extension.ConvertToDateTimeV2(item.MP_POS_DATE);
item.MP_POS_DATE == ""
? null_
: new Date(item.MP_POS_DATE.replace(" +0700 +07:00", ""));
const SALARY: any =
item.SALARY == null || item.SALARY == "" ? null_ : Number(item.SALARY);
profileSalary.amount = SALARY;