2026_08_31
This commit is contained in:
commit
73015386e9
2320 files changed
+80291
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { AggregateRepository } from './aggregate.repository';
|
||||
import { VisualisierungenService } from '../visualisierungen/visualisierungen.service';
|
||||
|
||||
@Injectable()
|
||||
export class AggregateService {
|
||||
anlage ="testXXX"
|
||||
constructor(
|
||||
private readonly repo: AggregateRepository,
|
||||
private readonly visuService:VisualisierungenService
|
||||
) { }
|
||||
|
||||
async getAllAggregate(){
|
||||
return this.repo.findAll(this.anlage)
|
||||
}
|
||||
|
||||
async getById(id:number){
|
||||
const agg = await this.repo.findBy(this.anlage,{id:id});
|
||||
if(!agg) return {success:false,error:"Aggregat nicht gefunden"}
|
||||
console.log(agg)
|
||||
const visu = await this.visuService.getAllVisuaAggData(agg);
|
||||
return visu;
|
||||
}
|
||||
|
||||
async getByAntriebsId(id:number){
|
||||
//return this.repo.findBy(this.anlage,{SPSAntriebId:id});
|
||||
const agg = await this.repo.findBy(this.anlage,{SPSAntriebId:id});
|
||||
if(!agg) return {success:false,error:"Aggregat nicht gefunden"}
|
||||
console.log(agg)
|
||||
const visu = await this.visuService.getAllVisuaAggData(agg);
|
||||
return visu;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user