เพิ่มฟิวคุณสมบัติบุคคล

This commit is contained in:
Kittapath 2024-03-07 15:28:08 +07:00
parent c94d3eb547
commit 07c310ae26
2 changed files with 23 additions and 18 deletions

View file

@ -199,9 +199,10 @@ export class OrganizationUnauthorizeController extends Controller {
child4: item.orgChild4?.orgChild4Name ? item.orgChild4.orgChild4Name : null,
result: null,
duration: null,
punish: null,
retired: null,
retired2: null,
isPunish: false,
isSuspension: false,
isAbsent: false,
isLeave: false,
isRetired: false,
};
});

View file

@ -57,7 +57,10 @@ export class ProfileController extends Controller {
where: { citizenId: requestBody.citizenId },
});
if (_profile) {
throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, "เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว");
throw new HttpError(
HttpStatusCode.INTERNAL_SERVER_ERROR,
"เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว",
);
}
if (requestBody.posLevelId == "") {
requestBody.posLevelId = null;
@ -88,10 +91,7 @@ export class ProfileController extends Controller {
});
if (checkCitizenId) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว",
);
throw new HttpError(HttpStatusCode.NOT_FOUND, "เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว");
}
const profile = Object.assign(new Profile(), requestBody);
@ -126,7 +126,10 @@ export class ProfileController extends Controller {
where: { id: Not(id), citizenId: requestBody.citizenId },
});
if (_profile) {
throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, "เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว");
throw new HttpError(
HttpStatusCode.INTERNAL_SERVER_ERROR,
"เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว",
);
}
if (requestBody.posLevelId == "") {
@ -161,10 +164,7 @@ export class ProfileController extends Controller {
});
if (checkCitizenId) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว",
);
throw new HttpError(HttpStatusCode.NOT_FOUND, "เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว");
}
profile.lastUpdateUserId = request.user.sub;
@ -781,7 +781,10 @@ export class ProfileController extends Controller {
where: { id: Not(id), citizenId: requestBody.citizenId },
});
if (profile) {
throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, "เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว");
throw new HttpError(
HttpStatusCode.INTERNAL_SERVER_ERROR,
"เลขประจำตัวประชาชนนี้มีอยู่ในระบบแล้ว",
);
}
return new HttpSuccess();
}
@ -996,7 +999,7 @@ export class ProfileController extends Controller {
{
keyword: `%${body.keyword}%`,
},
)
);
}),
)
.skip((body.page - 1) * body.pageSize)
@ -1063,9 +1066,10 @@ export class ProfileController extends Controller {
child4: item.orgChild4?.orgChild4Name ? item.orgChild4.orgChild4Name : null,
result: null,
duration: null,
punish: null,
retired: null,
retired2: null,
isPunish: false,
isSuspension: false,
isAbsent: false,
isLeave: false,
isRetired: false,
};
});