no message
This commit is contained in:
parent
43a55e1764
commit
26492de4b8
1 changed files with 0 additions and 9 deletions
|
|
@ -254,21 +254,12 @@ export class kpiCapacityController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Get("summary")
|
@Get("summary")
|
||||||
async listSummaryKpiCapacity() {
|
async listSummaryKpiCapacity() {
|
||||||
// let kpiCapacity = await this.kpiCapacityRepository.find({
|
|
||||||
// groupby
|
|
||||||
// relations: ["kpiUserCapacitys"],
|
|
||||||
// });
|
|
||||||
const kpiCapacity = await AppDataSource.getRepository(KpiCapacity)
|
const kpiCapacity = await AppDataSource.getRepository(KpiCapacity)
|
||||||
.createQueryBuilder("kpiCapacity")
|
.createQueryBuilder("kpiCapacity")
|
||||||
.groupBy("kpiCapacity.type")
|
.groupBy("kpiCapacity.type")
|
||||||
// .select("COUNT(kpiUserCapacitys.id) as total", "kpiCapacity")
|
|
||||||
.select(["kpiCapacity.type AS type", "COUNT(kpiCapacity.type) AS total"])
|
.select(["kpiCapacity.type AS type", "COUNT(kpiCapacity.type) AS total"])
|
||||||
.getRawMany();
|
.getRawMany();
|
||||||
|
|
||||||
// const mapFormula = kpiCapacity.map((item) => ({
|
|
||||||
// name: item.name,
|
|
||||||
// total: item.kpiUserCapacitys.length + 1,
|
|
||||||
// }));
|
|
||||||
return new HttpSuccess(kpiCapacity);
|
return new HttpSuccess(kpiCapacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue