add dpis controller
This commit is contained in:
parent
497decefe4
commit
4852131651
74 changed files with 606 additions and 336 deletions
|
|
@ -46,7 +46,7 @@ export function calculateRetireDate(birthDate: Date) {
|
|||
var year = d.getFullYear();
|
||||
var month = d.getMonth();
|
||||
var day = d.getDate();
|
||||
var c = new Date(year + 60, month, day-1);
|
||||
var c = new Date(year + 60, month, day - 1);
|
||||
return c;
|
||||
}
|
||||
export function calculateRetireLaw(birthDate: Date) {
|
||||
|
|
@ -94,8 +94,8 @@ export function calculateRetireYear(birthDate: Date) {
|
|||
|
||||
return yy + 61;
|
||||
}
|
||||
export async function removeProfileInOrganize(profileId: string, type:string) {
|
||||
const currentRevision = await AppDataSource.getRepository(OrgRevision)
|
||||
export async function removeProfileInOrganize(profileId: string, type: string) {
|
||||
const currentRevision = await AppDataSource.getRepository(OrgRevision)
|
||||
.createQueryBuilder("orgRevision")
|
||||
.where("orgRevision.orgRevisionIsDraft = false")
|
||||
.andWhere("orgRevision.orgRevisionIsCurrent = true")
|
||||
|
|
@ -110,7 +110,7 @@ export async function removeProfileInOrganize(profileId: string, type:string) {
|
|||
.where("posMaster.orgRevisionId = :orgRevisionId", { orgRevisionId: currentRevision?.id })
|
||||
.andWhere("posMaster.current_holderId = :profileId", { profileId })
|
||||
.getOne();
|
||||
|
||||
|
||||
await AppDataSource.getRepository(PosMaster)
|
||||
.createQueryBuilder()
|
||||
.update(PosMaster)
|
||||
|
|
@ -136,7 +136,7 @@ export async function removeProfileInOrganize(profileId: string, type:string) {
|
|||
.where("id IN (:...ids)", { ids: findPosition.map((item) => item.id) })
|
||||
.execute();
|
||||
}
|
||||
if (type === "EMPLOYEE") {
|
||||
if (type === "EMPLOYEE") {
|
||||
const findProfileInEmpPosMaster = await AppDataSource.getRepository(EmployeePosMaster)
|
||||
.createQueryBuilder("employeePosMaster")
|
||||
.where("employeePosMaster.orgRevisionId = :orgRevisionId", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue