瀏覽代碼

update:对接电信实施数据屏蔽空库数据

zoie 1 月之前
父節點
當前提交
8ffa190774
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      models/Device/DeviceSensor.go

+ 4 - 1
models/Device/DeviceSensor.go

@@ -1691,7 +1691,10 @@ func Read_Docking_Real_Data(T_pids []int) (DeviceData_r []DeviceData_Docking) {
 	for _, v := range r {
 	for _, v := range r {
 		sp, _ := Read_DeviceSensorParameter(v.T_sn, v.T_id)
 		sp, _ := Read_DeviceSensorParameter(v.T_sn, v.T_id)
 		deviceDate := Read_DeviceData(v.T_sn, v.T_id)
 		deviceDate := Read_DeviceData(v.T_sn, v.T_id)
-
+		// 空库数据不发送  T_free 0正常   1空库
+		if sp.T_free == 1 {
+			continue
+		}
 		data := DeviceData_Docking{
 		data := DeviceData_Docking{
 			T_monitor:  v.T_monitor,
 			T_monitor:  v.T_monitor,
 			T_online:   v.T_online,
 			T_online:   v.T_online,