|  |  | @ -34,20 +34,21 @@ func (the *InfoHandler) getStationInfo(p *common_models.ProcessData) *common_mod | 
			
		
	
		
			
				
					|  |  |  | 		p.Stations = s | 
			
		
	
		
			
				
					|  |  |  | 	} else { | 
			
		
	
		
			
				
					|  |  |  | 		//无法查询到完整的 重新获取
 | 
			
		
	
		
			
				
					|  |  |  | 		log.Printf("重获取设备[%s]的 DeviceStationObj", p.DeviceData.DeviceId) | 
			
		
	
		
			
				
					|  |  |  | 		stationIds, err := the.configHelper.GetDeviceStationIds(p.DeviceData.DeviceId) | 
			
		
	
		
			
				
					|  |  |  | 		if err != nil { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 			log.Printf("GetDeviceStationIds err =>%s", err.Error()) | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		p.Stations, err = the.configHelper.GetStations(stationIds...) | 
			
		
	
		
			
				
					|  |  |  | 		the.getFormulaInfo(p) | 
			
		
	
		
			
				
					|  |  |  | 		//补全 设备数据输入单位
 | 
			
		
	
		
			
				
					|  |  |  | 		p.DeviceData.RawUnit = p.DeviceData.DeviceInfo.DeviceMeta.GetOutputUnit() | 
			
		
	
		
			
				
					|  |  |  | 		//存储测点obj
 | 
			
		
	
		
			
				
					|  |  |  | 		err = the.configHelper.SetDeviceStationObjs(p.DeviceData.DeviceId, p.Stations) | 
			
		
	
		
			
				
					|  |  |  | 		if err != nil { | 
			
		
	
		
			
				
					|  |  |  | 			log.Printf("缓存异常 err=%s", err.Error()) | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 	//补全 设备数据输入单位
 | 
			
		
	
		
			
				
					|  |  |  | 	p.DeviceData.RawUnit = p.DeviceData.DeviceInfo.DeviceMeta.GetOutputUnit() | 
			
		
	
		
			
				
					|  |  |  | 	the.getThresholdInfo(p) | 
			
		
	
		
			
				
					|  |  |  | 	return p | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -72,7 +73,15 @@ func (the *InfoHandler) getFormulaInfo(p *common_models.ProcessData) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | func (the *InfoHandler) getThresholdInfo(p *common_models.ProcessData) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	for _, stationInfo := range p.Stations { | 
			
		
	
		
			
				
					|  |  |  | 		the.configHelper.GetStationThreshold(stationInfo.Info.Id) | 
			
		
	
		
			
				
					|  |  |  | 	for i, stationInfo := range p.Stations { | 
			
		
	
		
			
				
					|  |  |  | 		if stationInfo.Info.Id == 14 { | 
			
		
	
		
			
				
					|  |  |  | 			log.Println("==") | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		threshold, err := the.configHelper.GetStationThreshold(stationInfo.Info.Id) | 
			
		
	
		
			
				
					|  |  |  | 		if err == nil && threshold != nil && threshold.Items != nil { | 
			
		
	
		
			
				
					|  |  |  | 			//p.Stations[i].Threshold = threshold
 | 
			
		
	
		
			
				
					|  |  |  | 			log.Println("==", i) | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 	log.Println("=") | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |