|
|
@ -43,10 +43,12 @@ func GetGroupInfo(station common_models.Station) []GroupStation { |
|
|
|
result := make([]GroupStation, 0) |
|
|
|
if gps != nil { |
|
|
|
for i := 0; i < len(gps); i++ { |
|
|
|
result = append(result, GroupStation{ |
|
|
|
Group: gps[i], |
|
|
|
Station: station, |
|
|
|
}) |
|
|
|
if gps[i].Id != 0 { |
|
|
|
result = append(result, GroupStation{ |
|
|
|
Group: gps[i], |
|
|
|
Station: station, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -91,9 +93,12 @@ func (gc *GroupCalc) processData(inData *common_models.ProcessData) *common_mode |
|
|
|
resultStations = append(resultStations, station) |
|
|
|
} else { |
|
|
|
calcRet, err := gc.cacheAndCalc(&station, inData.DeviceData.DimensionId, inData.DeviceData.TaskId, inData.DeviceData.AcqTime) |
|
|
|
|
|
|
|
if err == nil { |
|
|
|
log.Printf("************* 95行 沉降分组计算成功,返回记录数 len(calcRet)={%d} *************", len(calcRet)) |
|
|
|
resultStations = append(resultStations, calcRet...) |
|
|
|
} else { |
|
|
|
println(err) |
|
|
|
} |
|
|
|
log.Printf("************* 98行 分组一次处理,缓存记录数 len(resultStations)={%d} *************", len(resultStations)) |
|
|
|
} |
|
|
@ -104,15 +109,16 @@ func (gc *GroupCalc) processData(inData *common_models.ProcessData) *common_mode |
|
|
|
for _, station := range resultStations { |
|
|
|
if len(station.Data.ThemeData) > 0 { |
|
|
|
////TODO #TEST BEGIN | filterSensorIds 需要排查的测点ID,主要排查分组测点主题数据未入ES的问题。
|
|
|
|
//filterSensorIds := []int{42, 15, 32, 43, 13, 33, 17, 14}
|
|
|
|
//filterSensorIds := []int{18, 20, 21}
|
|
|
|
//for _, number := range filterSensorIds {
|
|
|
|
// if number == station.Info.Id {
|
|
|
|
// log.Printf("*************** 116行 沉降分组测点有返回 %v %v %v %+v *************", station.Info.Id, station.Info.Name, station.Data.CollectTime, station.Data)
|
|
|
|
// log.Printf("*************** 110行 沉降分组测点有返回 %v %v %v %+v *************", station.Info.Id, station.Info.Name, station.Data.CollectTime, station.Data)
|
|
|
|
// break
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
//// #TEST END
|
|
|
|
// 需要返回的测点
|
|
|
|
//log.Printf("*************** 121行 沉降分组测点有返回 %v %v %v %+v *************", station.Info.Id, station.Info.Name, station.Data.CollectTime, station.Data)
|
|
|
|
result = append(result, station) |
|
|
|
|
|
|
|
} else { |
|
|
@ -199,7 +205,8 @@ func (gc *GroupCalc) cacheAndCalc(station *common_models.Station, dimensionId st |
|
|
|
gc.dumpGroupTheme(task, calcRet) |
|
|
|
} else { |
|
|
|
task.SetTimeout() |
|
|
|
log.Println("****沉降分组计算任务超期策略dimensionId,taskId,acqTime,injectTime,deadlineTime****", task.stationGroup.Id, task.stationGroup.Name, task.dimensionId, task.taskId, task.acqTime, task.InjectTime, task.DeadlineTime) |
|
|
|
log.Printf("****[%d][%s]沉降分组计算任务超期策略: dimensionId:%v\n taskId:%v\n acqTime:%v\n injectTime:%v\n deadlineTime:%v\n", |
|
|
|
task.stationGroup.Id, task.stationGroup.Name, task.dimensionId, task.taskId, task.acqTime, task.InjectTime, task.DeadlineTime) |
|
|
|
calcTasks.Store(key, *task) |
|
|
|
} |
|
|
|
} |
|
|
|