yandaniu 2 ngày trước cách đây
mục cha
commit
7201ecad48

BIN
.vs/Ropin.Inspection.Api/FileContentIndex/3eb9bf8f-0556-4bcd-9697-3ab8cd394704.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/578db026-ce12-45fc-b30e-9d5eb0fea468.vsidx


+ 44 - 44
Ropin.Inspection.Api/Controllers/Base/AIController.cs

@@ -173,50 +173,50 @@ namespace Ropin.Inspection.Api.Controllers.Base
         //    Console.WriteLine("进入/device/business/generalApp/pushData/alarmData/没有JObject" + deviceNo);
         //    return await Task.FromResult(ApiResultModel<object>.GetSuccess(new object { }));
         //}
-        [HttpPost]
-        [AllowAnonymous]
-        [Route("/device/business/generalApp/pushData/alarmData/{deviceNo}")]
-        public async Task<ApiResultModel<object>> AlarmData([FromRoute] string deviceNo, AlarmDataModel alarmDataModel)
-        {
-            Console.WriteLine("进入/device/business/generalApp/pushData/alarmData/" + deviceNo);
-            var devIds = await _vmcCameraService.GetCameraByTDH(alarmDataModel.deviceNo);
-            int row = 0;
-            foreach (var x in devIds)
-            {
-                List<MessageFile> messageFiles = new List<MessageFile>();
-                var textJson = new
-                {
-                    PanoramaId = alarmDataModel.panoramaId,
-                    PanoramaUrl = alarmDataModel.panoramaUrl,
-                    RoiJson = alarmDataModel.roiJson,
-                    NonRoiJson = alarmDataModel.nonRoiJson,
-                    DetectionFrameJson = alarmDataModel.detectionFrameJson
-                };
-                var datas = JsonConvert.SerializeObject(textJson);
-                MessageFile messageFile = new MessageFile();
-                messageFile.Text = datas;
-                messageFile.Type = "FILE_TYP_006";
-                messageFiles.Add(messageFile);
-                TpushMsgModel model = new TpushMsgModel
-                {
-                    C_DevStoreCode = x,
-                    C_MsgTypeCode = "MSG_TYPE_024",
-                    Subject = "AI盒子报警",
-                    Msg = alarmDataModel.alarmType,
-                    UserName = "AI盒子",
-                    UserMobile = "",
-                    CreateOn = alarmDataModel.captureTime,
-                    GenerationType = 1,
-                    msgStatus = 1,
-                    FileList = messageFiles
-                };
-                bool bol = await _pushMsgService.PushAlarmMsgAsync(model, model.Subject);
-                log.Info($"执行发送结果=[{bol}]");
-                if (bol) { row++; }
-            }
-            return ApiResultModel<object>.GetSuccess(row);
-            //return await Task.FromResult(ApiResultModel<object>.GetSuccess(new object { }));
-        }
+        //[HttpPost]
+        //[AllowAnonymous]
+        //[Route("/device/business/generalApp/pushData/alarmData/{deviceNo}")]
+        //public async Task<ApiResultModel<object>> AlarmData([FromRoute] string deviceNo, AlarmDataModel alarmDataModel)
+        //{
+        //    Console.WriteLine("进入/device/business/generalApp/pushData/alarmData/" + deviceNo);
+        //    var devIds = await _vmcCameraService.GetCameraByTDH(alarmDataModel.deviceNo);
+        //    int row = 0;
+        //    foreach (var x in devIds)
+        //    {
+        //        List<MessageFile> messageFiles = new List<MessageFile>();
+        //        var textJson = new
+        //        {
+        //            PanoramaId = alarmDataModel.panoramaId,
+        //            PanoramaUrl = alarmDataModel.panoramaUrl,
+        //            RoiJson = alarmDataModel.roiJson,
+        //            NonRoiJson = alarmDataModel.nonRoiJson,
+        //            DetectionFrameJson = alarmDataModel.detectionFrameJson
+        //        };
+        //        var datas = JsonConvert.SerializeObject(textJson);
+        //        MessageFile messageFile = new MessageFile();
+        //        messageFile.Text = datas;
+        //        messageFile.Type = "FILE_TYP_006";
+        //        messageFiles.Add(messageFile);
+        //        TpushMsgModel model = new TpushMsgModel
+        //        {
+        //            C_DevStoreCode = x,
+        //            C_MsgTypeCode = "MSG_TYPE_024",
+        //            Subject = "AI盒子报警",
+        //            Msg = alarmDataModel.alarmType,
+        //            UserName = "AI盒子",
+        //            UserMobile = "",
+        //            CreateOn = alarmDataModel.captureTime,
+        //            GenerationType = 1,
+        //            msgStatus = 1,
+        //            FileList = messageFiles
+        //        };
+        //        bool bol = await _pushMsgService.PushAlarmMsgAsync(model, model.Subject);
+        //        log.Info($"执行发送结果=[{bol}]");
+        //        if (bol) { row++; }
+        //    }
+        //    return ApiResultModel<object>.GetSuccess(row);
+        //    //return await Task.FromResult(ApiResultModel<object>.GetSuccess(new object { }));
+        //}
 
         /// <summary>
         /// 注册