ออกคำสั่ง
This commit is contained in:
parent
c408f3533d
commit
9f66786502
1 changed files with 73 additions and 3 deletions
|
|
@ -1066,7 +1066,17 @@ export class ReportController extends Controller {
|
|||
salaryRef: v.templateDoc,
|
||||
})),
|
||||
})
|
||||
.then(async res => {})
|
||||
.then(async res => {
|
||||
const lists = await this.personalRepository.find({
|
||||
where: { probation_status: 8, personal_id: In(body.refIds.map(x => x.refId)) },
|
||||
})
|
||||
await Promise.all(
|
||||
lists.map(async list => {
|
||||
list.probation_status = 9
|
||||
await this.personalRepository.save(list)
|
||||
})
|
||||
)
|
||||
})
|
||||
.catch(() => {})
|
||||
return new HttpSuccess()
|
||||
}
|
||||
|
|
@ -1081,6 +1091,32 @@ export class ReportController extends Controller {
|
|||
const lists = await this.personalRepository.find({
|
||||
where: { probation_status: 2, personal_id: In(body.refIds) },
|
||||
})
|
||||
await Promise.all(
|
||||
lists.map(async list => {
|
||||
list.probation_status = 8
|
||||
await this.personalRepository.save(list)
|
||||
})
|
||||
)
|
||||
|
||||
return new HttpSuccess()
|
||||
}
|
||||
@Post("command11/officer/report/delete")
|
||||
public async command11Delete(
|
||||
@Request() req: RequestWithUser,
|
||||
@Body()
|
||||
body: {
|
||||
refIds: string[]
|
||||
}
|
||||
) {
|
||||
const lists = await this.personalRepository.find({
|
||||
where: { probation_status: 8, personal_id: In(body.refIds) },
|
||||
})
|
||||
await Promise.all(
|
||||
lists.map(async list => {
|
||||
list.probation_status = 2
|
||||
await this.personalRepository.save(list)
|
||||
})
|
||||
)
|
||||
|
||||
return new HttpSuccess()
|
||||
}
|
||||
|
|
@ -1111,7 +1147,17 @@ export class ReportController extends Controller {
|
|||
salaryRef: v.templateDoc,
|
||||
})),
|
||||
})
|
||||
.then(async res => {})
|
||||
.then(async res => {
|
||||
const lists = await this.personalRepository.find({
|
||||
where: { probation_status: 8, personal_id: In(body.refIds.map(x => x.refId)) },
|
||||
})
|
||||
await Promise.all(
|
||||
lists.map(async list => {
|
||||
list.probation_status = 9
|
||||
await this.personalRepository.save(list)
|
||||
})
|
||||
)
|
||||
})
|
||||
.catch(() => {})
|
||||
return new HttpSuccess()
|
||||
}
|
||||
|
|
@ -1126,7 +1172,31 @@ export class ReportController extends Controller {
|
|||
const lists = await this.personalRepository.find({
|
||||
where: { probation_status: 3, personal_id: In(body.refIds) },
|
||||
})
|
||||
|
||||
await Promise.all(
|
||||
lists.map(async list => {
|
||||
list.probation_status = 8
|
||||
await this.personalRepository.save(list)
|
||||
})
|
||||
)
|
||||
return new HttpSuccess()
|
||||
}
|
||||
@Post("command12/officer/report/delete")
|
||||
public async command12Delete(
|
||||
@Request() req: RequestWithUser,
|
||||
@Body()
|
||||
body: {
|
||||
refIds: string[]
|
||||
}
|
||||
) {
|
||||
const lists = await this.personalRepository.find({
|
||||
where: { probation_status: 8, personal_id: In(body.refIds) },
|
||||
})
|
||||
await Promise.all(
|
||||
lists.map(async list => {
|
||||
list.probation_status = 3
|
||||
await this.personalRepository.save(list)
|
||||
})
|
||||
)
|
||||
return new HttpSuccess()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue