瀏覽代碼

修改设备为空bug

oyq28 2 年之前
父節點
當前提交
7579dd241f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      IMCS_CCS/Service/Impl/TaskJobService.cs

+ 4 - 0
IMCS_CCS/Service/Impl/TaskJobService.cs

@@ -1285,6 +1285,10 @@ namespace IMCS.CCS.Service.Impl
 
                     //缓存取PLC tagvalue 值
                     List<CcsTagValue> tagValues = new List<CcsTagValue>();
+                    if(device == null)
+                    {
+                        continue;
+                    }
                     string tag_value_redis_key = imcs_redis_key + device.Ip + ":" + device.ProtocolType;
                     var tagData = await _redisService.Database.StringGetAsync(tag_value_redis_key);
                     if (tagData.IsNullOrEmpty)