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