sort commandcode
This commit is contained in:
parent
6ac682d98c
commit
4a87969337
2 changed files with 5 additions and 3 deletions
|
|
@ -43,13 +43,15 @@ export class CommandCodeController extends Controller {
|
||||||
select: [
|
select: [
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
|
"caption",
|
||||||
|
"order",
|
||||||
"code",
|
"code",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"createdFullName",
|
"createdFullName",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
],
|
],
|
||||||
order: { id: "ASC" },
|
order: { order: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(_commandCode);
|
return new HttpSuccess(_commandCode);
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +67,7 @@ export class CommandCodeController extends Controller {
|
||||||
async GetById(@Path() id: string) {
|
async GetById(@Path() id: string) {
|
||||||
const _commandCode = await this.commandCodeRepository.findOne({
|
const _commandCode = await this.commandCodeRepository.findOne({
|
||||||
where: { id },
|
where: { id },
|
||||||
select: ["id", "name", "code"],
|
select: ["id", "name", "code", "order", "caption"],
|
||||||
});
|
});
|
||||||
if (!_commandCode) {
|
if (!_commandCode) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเชื่อมโยงคำสั่งนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเชื่อมโยงคำสั่งนี้");
|
||||||
|
|
|
||||||
|
|
@ -2629,7 +2629,7 @@ export class ImportDataController extends Controller {
|
||||||
@Post("update-profileSalary")
|
@Post("update-profileSalary")
|
||||||
async UpdateProfileSalary(@Request() request: { user: Record<string, any> }) {
|
async UpdateProfileSalary(@Request() request: { user: Record<string, any> }) {
|
||||||
let rowCount = 0;
|
let rowCount = 0;
|
||||||
const profileSalarys: any = await this.salaryRepo.find();
|
const profileSalarys: any = await this.salaryRepo.find({ where: { refId: IsNull() } });
|
||||||
|
|
||||||
for await (const _item of profileSalarys) {
|
for await (const _item of profileSalarys) {
|
||||||
const OFFICER = await this.OFFICERRepo.findOne({
|
const OFFICER = await this.OFFICERRepo.findOne({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue