fix
This commit is contained in:
parent
29fca33c2e
commit
08bf5e53c6
1 changed files with 10 additions and 2 deletions
|
|
@ -10,12 +10,13 @@ import { PosLevel } from "../entities/PosLevel";
|
||||||
import Extension from "../interfaces/extension";
|
import Extension from "../interfaces/extension";
|
||||||
import { DevelopmentScholarship } from "../entities/DevelopmentScholarship";
|
import { DevelopmentScholarship } from "../entities/DevelopmentScholarship";
|
||||||
import { IsNull, Not } from "typeorm";
|
import { IsNull, Not } from "typeorm";
|
||||||
|
import { viewDevScholarship } from "../entities/view/viewDevScholarship";
|
||||||
@Route("api/v1/development/report")
|
@Route("api/v1/development/report")
|
||||||
@Tags("Report")
|
@Tags("Report")
|
||||||
@Security("bearerAuth")
|
@Security("bearerAuth")
|
||||||
export class ReportController extends Controller {
|
export class ReportController extends Controller {
|
||||||
private developmentScholarshipRepository = AppDataSource.getRepository(DevelopmentScholarship);
|
private developmentScholarshipRepository = AppDataSource.getRepository(DevelopmentScholarship);
|
||||||
|
private viewDevScholarship = AppDataSource.getRepository(viewDevScholarship);
|
||||||
/**
|
/**
|
||||||
* API Report รายการโครงการ/หลักสูตรการฝึกอบรมที่หน่วยงานของกรุงเทพมหานครเป็นผู้จัด
|
* API Report รายการโครงการ/หลักสูตรการฝึกอบรมที่หน่วยงานของกรุงเทพมหานครเป็นผู้จัด
|
||||||
*
|
*
|
||||||
|
|
@ -861,7 +862,7 @@ export class ReportController extends Controller {
|
||||||
template: "reportFund5",
|
template: "reportFund5",
|
||||||
reportName: "reportFund5",
|
reportName: "reportFund5",
|
||||||
data: {
|
data: {
|
||||||
year: Extension.ToThaiNumber(year.toString()),
|
year: Extension.ToThaiNumber((year+543).toString()),
|
||||||
data: formattedData,
|
data: formattedData,
|
||||||
total: Extension.ToThaiNumber(total.toString()),
|
total: Extension.ToThaiNumber(total.toString()),
|
||||||
totalBudgetApprove: Extension.ToThaiNumber(totalBudgetApprove.toString()),
|
totalBudgetApprove: Extension.ToThaiNumber(totalBudgetApprove.toString()),
|
||||||
|
|
@ -888,6 +889,12 @@ export class ReportController extends Controller {
|
||||||
"ม.3",
|
"ม.3",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// const development = await this.viewDevScholarship.find({
|
||||||
|
// where:{
|
||||||
|
// degreeLevel: In(degree),
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
// const totalBudgetApprove = development.reduce((sum, item) => sum + Number(item.budgetApprove), 0);
|
// const totalBudgetApprove = development.reduce((sum, item) => sum + Number(item.budgetApprove), 0);
|
||||||
// const formattedData = development.map((item, index) => {
|
// const formattedData = development.map((item, index) => {
|
||||||
|
|
@ -931,6 +938,7 @@ export class ReportController extends Controller {
|
||||||
template: "reportFund6",
|
template: "reportFund6",
|
||||||
reportName: "reportFund6",
|
reportName: "reportFund6",
|
||||||
data: {
|
data: {
|
||||||
|
year: Extension.ToThaiNumber((year+543).toString()),
|
||||||
data: "",
|
data: "",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue