This commit is contained in:
AdisakKanthawilang 2025-02-17 14:46:25 +07:00
parent 188a028bec
commit a05e6178fa
2 changed files with 43 additions and 44 deletions

View file

@ -122,7 +122,7 @@ export class ImportDataController extends Controller {
// }
const existingProfile = await this.profileRepo.findOne({
where: { citizenId: item.ID },
where: { citizenId: item.id.toString() },
});
if (existingProfile) {
profile.id = existingProfile.id;
@ -152,7 +152,7 @@ export class ImportDataController extends Controller {
}
let dateRetire = new Date(item.BORN);
profile.citizenId = item.ID == "" ? "" : item.ID;
profile.citizenId = item.id.toString() == "" ? "" : item.id.toString();
profile.rank =
item.RANK_NAME == "" ||
item.RANK_NAME == "นาย" ||
@ -1817,7 +1817,7 @@ export class ImportDataController extends Controller {
rowCount++;
const existingProfile = await this.profileRepo.findOne({
where: { citizenId: item.ID },
where: { citizenId: item.id.toString() },
});
if (existingProfile == null) {
continue;