作者 zhuangmx

油炸机温度

... ... @@ -6,6 +6,17 @@ import (
)
func TransformToDeviceCollectionDomainModelFromPgModels(deviceCollectionModel *models.DeviceCollection) (*domain.DeviceCollection, error) {
if deviceCollectionModel.DeviceType == domain.DeviceTypeYouZhaJi {
if tmp, ok := deviceCollectionModel.Values["Temp1"]; ok {
deviceCollectionModel.Values["FrontTemp"] = tmp
}
if tmp, ok := deviceCollectionModel.Values["Temp2"]; ok {
deviceCollectionModel.Values["TankTemp"] = tmp
}
if tmp, ok := deviceCollectionModel.Values["Temp3"]; ok {
deviceCollectionModel.Values["BackTemp"] = tmp
}
}
return &domain.DeviceCollection{
DeviceCollectionId: deviceCollectionModel.DeviceCollectionId,
WorkShopName: deviceCollectionModel.WorkShopName,
... ...