|
@@ -79,8 +79,8 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c |
|
@@ -79,8 +79,8 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c |
79
|
}
|
79
|
}
|
80
|
|
80
|
|
81
|
//处理设备数据
|
81
|
//处理设备数据
|
82
|
- switch deviceCollection.DeviceType {
|
|
|
83
|
- case domain.DeviceTypeBaoXianJi, domain.DeviceTypeChuanChuanJi, domain.DeviceTypeFengKouJi, domain.DeviceTypeFengXiangJi:
|
82
|
+ //switch deviceCollection.DeviceType {
|
|
|
83
|
+ //case domain.DeviceTypeBaoXianJi, domain.DeviceTypeChuanChuanJi, domain.DeviceTypeFengKouJi, domain.DeviceTypeFengXiangJi:
|
84
|
if v, ok := deviceCollection.Values["count"]; ok {
|
84
|
if v, ok := deviceCollection.Values["count"]; ok {
|
85
|
curCount, errCurCount := strconv.Atoi(fmt.Sprintf("%v", v))
|
85
|
curCount, errCurCount := strconv.Atoi(fmt.Sprintf("%v", v))
|
86
|
v, ok = lastDeviceCollectionRecord.Values["count"]
|
86
|
v, ok = lastDeviceCollectionRecord.Values["count"]
|
|
@@ -101,8 +101,8 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c |
|
@@ -101,8 +101,8 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c |
101
|
deviceCollection.Values["count"] = 0
|
101
|
deviceCollection.Values["count"] = 0
|
102
|
}
|
102
|
}
|
103
|
}
|
103
|
}
|
104
|
- break
|
|
|
105
|
- }
|
104
|
+ // break
|
|
|
105
|
+ //}
|
106
|
err = domainService.SendWorkshopDeviceData(deviceCollection)
|
106
|
err = domainService.SendWorkshopDeviceData(deviceCollection)
|
107
|
if err != nil {
|
107
|
if err != nil {
|
108
|
log.Logger.Error("车间设备数据加入redis失败:" + err.Error())
|
108
|
log.Logger.Error("车间设备数据加入redis失败:" + err.Error())
|