เปลี่ยนปีคศเป็นพศคำสั่งช่วยราชการ (:4845)
This commit is contained in:
parent
fd7a2af0a1
commit
8ad480baae
1 changed files with 134 additions and 133 deletions
|
|
@ -805,8 +805,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: [commandRecive.refId],
|
refIds: [commandRecive.refId],
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
const commandId = commandRecive.commandId;
|
const commandId = commandRecive.commandId;
|
||||||
await this.commandReciveRepository.delete(commandRecive.id);
|
await this.commandReciveRepository.delete(commandRecive.id);
|
||||||
|
|
@ -849,8 +849,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: [commandRecive.refId],
|
refIds: [commandRecive.refId],
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
const commandId = commandRecive.commandId;
|
const commandId = commandRecive.commandId;
|
||||||
await this.commandReciveRepository.delete(commandRecive.id);
|
await this.commandReciveRepository.delete(commandRecive.id);
|
||||||
|
|
@ -893,8 +893,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: [commandRecive.refId],
|
refIds: [commandRecive.refId],
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
const commandId = commandRecive.commandId;
|
const commandId = commandRecive.commandId;
|
||||||
await this.commandReciveRepository.delete(commandRecive.id);
|
await this.commandReciveRepository.delete(commandRecive.id);
|
||||||
|
|
@ -1178,8 +1178,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: command.commandRecives.map((x) => x.refId),
|
refIds: command.commandRecives.map((x) => x.refId),
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
await this.commandReciveRepository.delete({ commandId: command.id });
|
await this.commandReciveRepository.delete({ commandId: command.id });
|
||||||
command.status = "CANCEL";
|
command.status = "CANCEL";
|
||||||
|
|
@ -1244,8 +1244,8 @@ export class CommandController extends Controller {
|
||||||
.PostData(request, path + "/delete", {
|
.PostData(request, path + "/delete", {
|
||||||
refIds: command.commandRecives.map((x) => x.refId),
|
refIds: command.commandRecives.map((x) => x.refId),
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
await this.commandSendCCRepository.delete({ commandSendId: In(commandSend.map((x) => x.id)) });
|
await this.commandSendCCRepository.delete({ commandSendId: In(commandSend.map((x) => x.id)) });
|
||||||
await this.commandReciveRepository.delete({ commandId: command.id });
|
await this.commandReciveRepository.delete({ commandId: command.id });
|
||||||
|
|
@ -1434,8 +1434,8 @@ export class CommandController extends Controller {
|
||||||
refIds: command.commandRecives.filter((x) => x.refId != null).map((x) => x.refId),
|
refIds: command.commandRecives.filter((x) => x.refId != null).map((x) => x.refId),
|
||||||
status: "WAITING",
|
status: "WAITING",
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
await this.commandRepository.save(command);
|
await this.commandRepository.save(command);
|
||||||
} else {
|
} else {
|
||||||
const path = commandTypePath(command.commandType.code);
|
const path = commandTypePath(command.commandType.code);
|
||||||
|
|
@ -1572,7 +1572,7 @@ export class CommandController extends Controller {
|
||||||
);
|
);
|
||||||
await this.profileRepository.save(profiles);
|
await this.profileRepository.save(profiles);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
type = "EMPLOYEE";
|
type = "EMPLOYEE";
|
||||||
try {
|
try {
|
||||||
|
|
@ -1604,7 +1604,7 @@ export class CommandController extends Controller {
|
||||||
);
|
);
|
||||||
await this.profileEmployeeRepository.save(profiles);
|
await this.profileEmployeeRepository.save(profiles);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
@ -1670,7 +1670,7 @@ export class CommandController extends Controller {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
type = "EMPLOYEE";
|
type = "EMPLOYEE";
|
||||||
try {
|
try {
|
||||||
|
|
@ -1727,7 +1727,7 @@ export class CommandController extends Controller {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch { }
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
@ -1940,7 +1940,7 @@ export class CommandController extends Controller {
|
||||||
.then((x) => {
|
.then((x) => {
|
||||||
res = x;
|
res = x;
|
||||||
})
|
})
|
||||||
.catch((x) => {});
|
.catch((x) => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
let _command;
|
let _command;
|
||||||
|
|
@ -2294,7 +2294,7 @@ export class CommandController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
_command = res;
|
_command = res;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
let issue =
|
let issue =
|
||||||
command.isBangkok == "OFFICE"
|
command.isBangkok == "OFFICE"
|
||||||
|
|
@ -2700,8 +2700,8 @@ export class CommandController extends Controller {
|
||||||
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
|
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
|
||||||
status: "REPORT",
|
status: "REPORT",
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
|
|
@ -2711,8 +2711,8 @@ export class CommandController extends Controller {
|
||||||
commandTypeId: requestBody.commandTypeId,
|
commandTypeId: requestBody.commandTypeId,
|
||||||
commandCode: commandCode,
|
commandCode: commandCode,
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
let order =
|
let order =
|
||||||
command.commandRecives == null || command.commandRecives.length <= 0
|
command.commandRecives == null || command.commandRecives.length <= 0
|
||||||
|
|
@ -3725,7 +3725,7 @@ export class CommandController extends Controller {
|
||||||
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
|
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
|
||||||
profile.posMasterNo = getPosMasterNo(posMaster);
|
profile.posMasterNo = getPosMasterNo(posMaster);
|
||||||
profile.org = getOrgFullName(posMaster);
|
profile.org = getOrgFullName(posMaster);
|
||||||
if(!posMaster.isSit){
|
if (!posMaster.isSit) {
|
||||||
profile.posLevelId = positionNew.posLevelId;
|
profile.posLevelId = positionNew.posLevelId;
|
||||||
profile.posTypeId = positionNew.posTypeId;
|
profile.posTypeId = positionNew.posTypeId;
|
||||||
profile.position = positionNew.positionName;
|
profile.position = positionNew.positionName;
|
||||||
|
|
@ -4842,7 +4842,7 @@ export class CommandController extends Controller {
|
||||||
agency: item.officerOrg,
|
agency: item.officerOrg,
|
||||||
dateStart: item.dateStart,
|
dateStart: item.dateStart,
|
||||||
dateEnd: item.dateEnd,
|
dateEnd: item.dateEnd,
|
||||||
commandNo: `${item.commandNo}/${item.commandYear}`,
|
commandNo: `${item.commandNo}/${_commandYear}`,
|
||||||
commandName: item.commandName,
|
commandName: item.commandName,
|
||||||
refId: item.refId,
|
refId: item.refId,
|
||||||
refCommandDate: new Date(),
|
refCommandDate: new Date(),
|
||||||
|
|
@ -6927,7 +6927,8 @@ export class CommandController extends Controller {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
relations: { orgRevision: true, orgRoot: true, orgChild1: true, orgChild2: true, orgChild3: true, orgChild4: true }
|
relations: { orgRevision: true, orgRoot: true, orgChild1: true, orgChild2: true, orgChild3: true, orgChild4: true }
|
||||||
}); }
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (posMaster == null)
|
if (posMaster == null)
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
|
||||||
|
|
@ -7025,7 +7026,7 @@ export class CommandController extends Controller {
|
||||||
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
|
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
|
||||||
profile.posMasterNo = getPosMasterNo(posMaster);
|
profile.posMasterNo = getPosMasterNo(posMaster);
|
||||||
profile.org = getOrgFullName(posMaster);
|
profile.org = getOrgFullName(posMaster);
|
||||||
if(!posMaster.isSit){
|
if (!posMaster.isSit) {
|
||||||
profile.posLevelId = positionNew.posLevelId;
|
profile.posLevelId = positionNew.posLevelId;
|
||||||
profile.posTypeId = positionNew.posTypeId;
|
profile.posTypeId = positionNew.posTypeId;
|
||||||
profile.position = positionNew.positionName;
|
profile.position = positionNew.positionName;
|
||||||
|
|
@ -7117,8 +7118,8 @@ export class CommandController extends Controller {
|
||||||
prefix: avatar,
|
prefix: avatar,
|
||||||
fileName: fileName,
|
fileName: fileName,
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => { })
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
@ -8229,7 +8230,7 @@ export class CommandController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
_command = res;
|
_command = res;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
|
|
||||||
let issue =
|
let issue =
|
||||||
command.isBangkok == "OFFICE"
|
command.isBangkok == "OFFICE"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue