merge调整

This commit is contained in:
walker 2024-01-10 11:17:32 +08:00
parent 92e5491927
commit c27ef7c675
2 changed files with 4 additions and 3 deletions

View File

@ -538,7 +538,7 @@ func initIBPUid(data *graphicData.IBPGraphicStorage) *IBPUidStructure {
// 构建仿真内所有地图UID映射信号布置图ID,这里为了解决多地图时根据UID反向寻找避免多次循环地图直接获取平面布置图元素 // 构建仿真内所有地图UID映射信号布置图ID,这里为了解决多地图时根据UID反向寻找避免多次循环地图直接获取平面布置图元素
func buildRepositoryAllUidsMap(mapIds []int32, repo *repository.Repository) map[string]*elementIdStructure { func buildRepositoryAllUidsMap(mapIds []int32, repo *repository.Repository) map[string]*elementIdStructure {
mapLen := len(repo.CheckPointList()) + len(repo.PhysicalSectionList()) + len(repo.SignalList()) + mapLen := len(repo.CheckPointList()) + len(repo.PhysicalSectionList()) + len(repo.SignalList()) +
len(repo.TurnoutList()) + len(repo.TransponderList()) + len(repo.SlopeList()) + len(repo.TurnoutList()) + len(repo.ResponderList()) + len(repo.SlopeList()) +
len(repo.SectionalCurvatureList()) len(repo.SectionalCurvatureList())
allUidMap := make(map[string]*elementIdStructure, mapLen) allUidMap := make(map[string]*elementIdStructure, mapLen)
saveToAllUidMap := func(es map[uint32]*elementIdStructure) { saveToAllUidMap := func(es map[uint32]*elementIdStructure) {

View File

@ -2,10 +2,11 @@ package memory
import ( import (
"fmt" "fmt"
"joylink.club/bj-rtsts-server/dto" "joylink.club/bj-rtsts-server/dto"
"joylink.club/bj-rtsts-server/sys_error" "joylink.club/bj-rtsts-server/sys_error"
"joylink.club/rtsssimulation/component" "joylink.club/rtsssimulation/component"
"joylink.club/rtsssimulation/component/component_proto" "joylink.club/rtsssimulation/component/component_data"
"joylink.club/rtsssimulation/entity" "joylink.club/rtsssimulation/entity"
) )
@ -22,7 +23,7 @@ func TransponderMove(simulation *VerifySimulation, req *dto.TransponderMoveReqDt
if !ok { if !ok {
panic(sys_error.New(fmt.Sprintf("没有[id:%s]的应答器", req.TransponderId))) panic(sys_error.New(fmt.Sprintf("没有[id:%s]的应答器", req.TransponderId)))
} }
component.LinkPositionType.SetValue(te, component_proto.LinkPosition{ component.LinkPositionType.SetValue(te, component_data.LinkPosition{
LinkId: req.LinkId, LinkId: req.LinkId,
Offset: req.Offset, Offset: req.Offset,
}) })