作者 zhuangmx

油炸机温度

@@ -6,6 +6,17 @@ import ( @@ -6,6 +6,17 @@ import (
6 ) 6 )
7 7
8 func TransformToDeviceCollectionDomainModelFromPgModels(deviceCollectionModel *models.DeviceCollection) (*domain.DeviceCollection, error) { 8 func TransformToDeviceCollectionDomainModelFromPgModels(deviceCollectionModel *models.DeviceCollection) (*domain.DeviceCollection, error) {
  9 + if deviceCollectionModel.DeviceType == domain.DeviceTypeYouZhaJi {
  10 + if tmp, ok := deviceCollectionModel.Values["Temp1"]; ok {
  11 + deviceCollectionModel.Values["FrontTemp"] = tmp
  12 + }
  13 + if tmp, ok := deviceCollectionModel.Values["Temp2"]; ok {
  14 + deviceCollectionModel.Values["TankTemp"] = tmp
  15 + }
  16 + if tmp, ok := deviceCollectionModel.Values["Temp3"]; ok {
  17 + deviceCollectionModel.Values["BackTemp"] = tmp
  18 + }
  19 + }
9 return &domain.DeviceCollection{ 20 return &domain.DeviceCollection{
10 DeviceCollectionId: deviceCollectionModel.DeviceCollectionId, 21 DeviceCollectionId: deviceCollectionModel.DeviceCollectionId,
11 WorkShopName: deviceCollectionModel.WorkShopName, 22 WorkShopName: deviceCollectionModel.WorkShopName,