【仿真列表增加运行环境ID】
This commit is contained in:
parent
57d1fbad6e
commit
ad9d4f57aa
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user