#2387 [กทม]. ระบบโครงสร้างอัตรากำลัง >> กรณีนั่งทับตำแหน่ง

This commit is contained in:
adisak 2026-04-02 12:04:33 +07:00
parent dc31ec0d7d
commit 38e5ed0e91
4 changed files with 30 additions and 19 deletions

View file

@ -3699,11 +3699,14 @@ export class CommandController extends Controller {
posMasterId: item.posmasterId,
},
});
// ถ้าไม่ใช่ตำแหน่งนั่งทับ (isSit = false) ถึงจะอัพเดทตำแหน่งในทะเบียนประวัติ
if (positionNew != null) {
positionNew.positionIsSelected = true;
profile.posLevelId = positionNew.posLevelId;
profile.posTypeId = positionNew.posTypeId;
profile.position = positionNew.positionName;
if(!posMaster.isSit){
profile.posLevelId = positionNew.posLevelId;
profile.posTypeId = positionNew.posTypeId;
profile.position = positionNew.positionName;
}
profile.amount = item.amount ?? null;
profile.amountSpecial = item.amountSpecial ?? null;
await this.profileRepository.save(profile);
@ -6892,14 +6895,17 @@ export class CommandController extends Controller {
posMasterId: item.bodyPosition.posmasterId,
},
});
// ถ้าไม่ใช่ตำแหน่งนั่งทับ (isSit = false) ถึงจะอัพเดทตำแหน่งในทะเบียนประวัติ
if (positionNew != null) {
positionNew.positionIsSelected = true;
profile.posLevelId = positionNew.posLevelId;
profile.posTypeId = positionNew.posTypeId;
profile.position = positionNew.positionName;
// profile.dateStart = new Date();
await this.profileRepository.save(profile, { data: req });
setLogDataDiff(req, { before, after: profile });
if(!posMaster.isSit){
profile.posLevelId = positionNew.posLevelId;
profile.posTypeId = positionNew.posTypeId;
profile.position = positionNew.positionName;
// profile.dateStart = new Date();
await this.profileRepository.save(profile, { data: req });
setLogDataDiff(req, { before, after: profile });
}
await this.positionRepository.save(positionNew, { data: req });
}
await CreatePosMasterHistoryOfficer(posMaster.id, req);