【增加打印日志、修改发布地图查询逻辑】

This commit is contained in:
weizhihong 2023-09-11 18:30:03 +08:00
parent 31af6a6da5
commit 7fc0ddb16a
2 changed files with 2 additions and 1 deletions

View File

@ -49,6 +49,7 @@ func init() {
})
dynamics.RegisterTrainInfoHandler(func(info *dynamics.TrainInfo) {
zap.S().Infof("发送到vobc的列车编号为%d \n", info.Number)
for _, simulation := range GetSimulationArr() {
sta, ok := simulation.Memory.Status.TrainStateMap.Load(strconv.Itoa(int(info.Number)))
if !ok {

View File

@ -127,7 +127,7 @@ func QueryProjectPublishedGi(id int32) []*model.PublishedGi {
mids[i] = m.Mid
}
dp := dbquery.PublishedGi
publishedGis, _ := dp.Select(dp.ID, dp.Name, dp.Category).Where(dp.ID.In(mids...)).Find()
publishedGis, _ := dp.Select(dp.ID, dp.Name, dp.Category).Where(dp.ID.In(mids...), dp.Status.Eq(1)).Find()
return publishedGis
}