diff --git a/dto/simulation.go b/dto/simulation.go index b09d71c..f8dee89 100644 --- a/dto/simulation.go +++ b/dto/simulation.go @@ -138,10 +138,11 @@ type CheckMapDataRspDto struct { // 仿真实例的基本信息响应 type SimulationInfoRspDto struct { - SimulationId string `form:"simulationId" json:"simulationId"` - MapId int32 `json:"mapId" form:"mapId"` - MapIds []int32 `form:"mapIds" json:"mapIds"` - ProjectId int32 `form:"projectId" json:"projectId"` + SimulationId string `form:"simulationId" json:"simulationId"` + MapId int32 `json:"mapId" form:"mapId"` + MapIds []int32 `form:"mapIds" json:"mapIds"` + ProjectId int32 `form:"projectId" json:"projectId"` + ProjectRunConfigId int32 `form:"runConfigId" json:"runConfigId" ` // 运行环境ID } type SimulationInfoRspDtoArr []SimulationInfoRspDto diff --git a/ts/simulation/wayside/memory/wayside_simulation.go b/ts/simulation/wayside/memory/wayside_simulation.go index e693cd7..8ae81fe 100644 --- a/ts/simulation/wayside/memory/wayside_simulation.go +++ b/ts/simulation/wayside/memory/wayside_simulation.go @@ -431,6 +431,14 @@ func (s *VerifySimulation) initRunConfig(runConfig *dto.ProjectRunConfigDto) err return nil } +// 获取仿真运行参数ID +func (s *VerifySimulation) GetRunConfigId() int32 { + if s.runConfig == nil { + return 0 + } + return s.runConfig.Id +} + // 初始化运行资源 func (s *VerifySimulation) initRepository() error { // 构建Repository diff --git a/ts/test_simulation_manage.go b/ts/test_simulation_manage.go index 127a7dd..c162857 100644 --- a/ts/test_simulation_manage.go +++ b/ts/test_simulation_manage.go @@ -129,10 +129,11 @@ func ListAllSimulations() []*dto.SimulationInfoRspDto { simulationMap.Range(func(_, v any) bool { s := v.(*memory.VerifySimulation) simArr = append(simArr, &dto.SimulationInfoRspDto{ - SimulationId: s.SimulationId, - MapId: s.MapIds[0], - MapIds: s.MapIds, - ProjectId: s.ProjectId, + SimulationId: s.SimulationId, + MapId: s.MapIds[0], + MapIds: s.MapIds, + ProjectId: s.ProjectId, + ProjectRunConfigId: s.GetRunConfigId(), }) return true })