เพิ่มเงื่อนไข cron-job และ เพิ่ม validate ProfileController
This commit is contained in:
parent
fa36abfe85
commit
126eced955
2 changed files with 44 additions and 0 deletions
|
|
@ -1576,6 +1576,16 @@ export class OrganizationController extends Controller {
|
|||
orgRevisionDraft.orgRevisionIsCurrent = true;
|
||||
orgRevisionDraft.orgRevisionIsDraft = false;
|
||||
await this.orgRevisionRepository.save(orgRevisionDraft);
|
||||
|
||||
const posMaster = await this.posMasterRepository.find({
|
||||
where: { orgRevisionId: orgRevisionDraft.id },
|
||||
});
|
||||
posMaster.forEach(async (item) => {
|
||||
item.current_holderId = item.next_holderId;
|
||||
item.next_holderId = null;
|
||||
await this.posMasterRepository.save(item);
|
||||
});
|
||||
|
||||
return new HttpSuccess();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue