add command code
This commit is contained in:
parent
c082ae8891
commit
2b07acf656
1 changed files with 11 additions and 9 deletions
|
|
@ -348,6 +348,7 @@ export class CommandController extends Controller {
|
|||
commandAffectDate: command.commandAffectDate,
|
||||
commandExcecuteDate: command.commandExcecuteDate,
|
||||
commandTypeName: command.commandType?.name || null,
|
||||
commandCode: command.commandType?.code || null,
|
||||
commandSysId: command.commandType?.commandSysId || null,
|
||||
};
|
||||
return new HttpSuccess(_command);
|
||||
|
|
@ -2664,7 +2665,7 @@ export class CommandController extends Controller {
|
|||
await this.posMasterRepository.save(data);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
|
||||
@Post("command40/officer/report")
|
||||
public async command40SalaryOfficer(
|
||||
@Request() req: RequestWithUser,
|
||||
|
|
@ -3019,10 +3020,9 @@ export class CommandController extends Controller {
|
|||
if (!posMaster) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบตำแหน่งดังกล่าว");
|
||||
}
|
||||
if(posMaster.next_holderId != null) {
|
||||
|
||||
if (posMaster.next_holderId != null) {
|
||||
const shortName =
|
||||
posMaster != null && posMaster.orgChild4 != null
|
||||
posMaster != null && posMaster.orgChild4 != null
|
||||
? `${posMaster.orgChild4.orgChild4ShortName}${posMaster.posMasterNo}`
|
||||
: posMaster != null && posMaster.orgChild3 != null
|
||||
? `${posMaster.orgChild3.orgChild3ShortName}${posMaster.posMasterNo}`
|
||||
|
|
@ -3034,13 +3034,13 @@ export class CommandController extends Controller {
|
|||
? `${posMaster.orgRoot.orgRootShortName}${posMaster.posMasterNo}`
|
||||
: null;
|
||||
const profile = await this.profileRepository.findOne({
|
||||
where: { id: posMaster.next_holderId }
|
||||
where: { id: posMaster.next_holderId },
|
||||
});
|
||||
const position = await this.positionRepository.findOne({
|
||||
where: {
|
||||
where: {
|
||||
posMasterId: posMaster.id,
|
||||
positionIsSelected: true
|
||||
}
|
||||
positionIsSelected: true,
|
||||
},
|
||||
});
|
||||
const dest_item = await this.salaryRepo.findOne({
|
||||
where: { profileId: profile?.id },
|
||||
|
|
@ -3121,7 +3121,9 @@ export class CommandController extends Controller {
|
|||
}[];
|
||||
},
|
||||
) {
|
||||
const posMasters = await this.posMasterRepository.find({ where: { id: In(body.refIds.map(x => x.refId)) } });
|
||||
const posMasters = await this.posMasterRepository.find({
|
||||
where: { id: In(body.refIds.map((x) => x.refId)) },
|
||||
});
|
||||
const data = posMasters.map((_data) => ({
|
||||
..._data,
|
||||
statusReport: "PENDING",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue