【修改代码】
This commit is contained in:
parent
4aa811614d
commit
82454b4e01
@ -113,7 +113,7 @@ func sectionMapToEcsLink(repo *repository.Repository, id string, offset int64, r
|
||||
abDirection = ak > bk
|
||||
}
|
||||
linkId, _ := strconv.Atoi(section.ALinkPosition().Link().Identity.Id())
|
||||
trainKilometer := concertTrainKilometer(section.AKilometer().Value, offset, up)
|
||||
trainKilometer := concertTrainKilometer(ak, offset, up)
|
||||
if abDirection {
|
||||
return int32(linkId), ao + offset, up, abDirection, trainKilometer
|
||||
} else {
|
||||
@ -243,7 +243,7 @@ func ecsLinkMapToSection(offset int64, up bool, link *repository.Link) (
|
||||
var section *repository.PhysicalSection
|
||||
for _, s := range link.PhysicalSections() {
|
||||
ao, bo := s.ALinkPosition().Offset(), s.BLinkPosition().Offset()
|
||||
if (ao <= offset && offset <= bo) || (bo <= offset && offset <= ao) {
|
||||
if (ao <= offset && offset < bo) || (bo <= offset && offset < ao) {
|
||||
section = s
|
||||
break
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user