From 1a02791b12af1c7dc0a7816c9ae60f5ede442de4 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期五, 15 十一月 2024 14:32:16 +0800
Subject: [PATCH] 1

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs |  125 -----------------------------------------
 1 files changed, 0 insertions(+), 125 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index 0335a14..e9d9278 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -48,9 +48,7 @@
                 CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
                 if (commonStackerCrane != null)
                 {
-                    //EqptRun(commonStackerCrane);
                     //EqptAlive(commonStackerCrane);
-                    //EqptStatus(commonStackerCrane);
                     //Console.Out.WriteLine(commonStackerCrane.DeviceName);
                     if (!commonStackerCrane.IsEventSubscribed)
                     {
@@ -301,52 +299,6 @@
             return stackerCraneTaskCommand;
         }
 
-        /// <summary>
-        /// 璁惧涓嶮OM绯荤粺瀵规帴锛岃澶囦笂绾�
-        /// </summary>
-        /// <param name="commonStackerCrane"></param>
-        public async void EqptRun(CommonStackerCrane commonStackerCrane)
-        {
-            if (!commonStackerCrane.StackerOnline)
-            {
-                BasicDto dto = new BasicDto
-                {
-                    EmployeeNo = "T00001",
-                    EquipmentCode = commonStackerCrane.DeviceCode,
-                    RequestTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
-                    SessionId = Guid.NewGuid().ToString(),
-                    Software = commonStackerCrane.DeviceName,
-                };
-                var respone = await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptRun", dto.ToJsonString());
-                if (respone != null)
-                {
-                    var result = JsonConvert.DeserializeObject<ResponseEqptRunDto>(respone);
-                    if (result != null && result.Success)
-                    {
-                        var process = _processRepository.QueryData(x => x.EquipmentName == commonStackerCrane.DeviceName).FirstOrDefault();
-                        if (process == null)
-                        {
-                            ResponeRunDto runDto = JsonConvert.DeserializeObject<ResponeRunDto>(respone);
-                            process = new Dt_EquipmentProcess()
-                            {
-                                EquipmentName = commonStackerCrane.DeviceCode,
-                                EquipmentType = commonStackerCrane.DeviceName.Substring(commonStackerCrane.DeviceCode.IndexOf("鍫嗗灈鏈�")),
-                                WipOrderNo = runDto.WipOrderNo,
-                                ProductDesc = runDto.ProductDesc,
-                                ProcessValue = JsonConvert.SerializeObject(result)
-                            };
-                            var isResult = await _processRepository.AddDataAsync(process) > 0;
-                        }
-                        else
-                        {
-                            process.ProcessValue = JsonConvert.SerializeObject(result);
-                            var isResult = await _processRepository.UpdateDataAsync(process);
-                        }
-                        commonStackerCrane.StackerOnline = true;
-                    }
-                }
-            }
-        }
 
         /// <summary>
         /// 璁惧蹇冭烦
@@ -379,82 +331,5 @@
             }
         }
 
-        /// <summary>
-        /// 璁惧鐘舵��
-        /// </summary>
-        /// <param name="commonStackerCrane"></param>
-        public async void EqptStatus(CommonStackerCrane commonStackerCrane)
-        {
-            string code = string.Empty;
-            RequestAlertDto requestAlert = new RequestAlertDto()
-            {
-                EmployeeNo = "T00001",
-                EquipmentCode = commonStackerCrane.DeviceCode,
-                RequestTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
-                SessionId = Guid.NewGuid().ToString(),
-                Software = commonStackerCrane.DeviceName,
-                AlertInfo = new List<AlertInfoDto>()
-            };
-            switch (commonStackerCrane.Status)
-            {
-                case DeviceStatus.Idle:
-                    code = "Waiting";
-                    break;
-
-                case DeviceStatus.Working:
-                    code = "Running";
-                    break;
-
-                case DeviceStatus.Fault:
-                    code = "Alerting";
-                    var alert = new AlertInfoDto()
-                    {
-                        AlertCode = "1001",
-                        AlertDescription = commonStackerCrane.StackerCraneStatusDes,
-                        AlertReset = "1"
-                    };
-                    requestAlert.AlertInfo.Add(alert);
-
-                    await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptAlive", requestAlert.ToJsonString());
-
-                    break;
-
-                case DeviceStatus.Unkonw:
-                    code = "Down";
-                    break;
-
-                case DeviceStatus.Offline:
-                    code = "Maintenance";
-                    break;
-
-                default:
-                    break;
-            }
-            if (code != "Alerting")
-            {
-                requestAlert.AlertInfo = new List<AlertInfoDto>();
-                var alert = new AlertInfoDto()
-                {
-                    AlertCode = "1001",
-                    AlertDescription = commonStackerCrane.StackerCraneStatusDes,
-                    AlertReset = "0"
-                };
-                await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptAlive", requestAlert.ToJsonString());
-            }
-            RequestEqptStatusDto requestEqptStatus = new RequestEqptStatusDto()
-            {
-                EmployeeNo = "T00001",
-                EquipmentCode = commonStackerCrane.DeviceCode,
-                RequestTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
-                SessionId = Guid.NewGuid().ToString(),
-                Software = commonStackerCrane.DeviceName,
-                ChangeTime = DateTime.Now.ToString(),
-                Description = commonStackerCrane.StackerCraneStatusDes,
-                LocationID = "NA",
-                ReasonCode = "123",
-                StatusCode = code
-            };
-            var respone = await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptStatus", requestEqptStatus.ToJsonString());
-        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3