From f94288b728f81b20c29e626526c584c11a7894a3 Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期六, 05 四月 2025 14:02:06 +0800
Subject: [PATCH] 1

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |  228 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 114 insertions(+), 114 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
index 7982e18..8860533 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
@@ -1,128 +1,128 @@
-锘�#region << 鐗� 鏈� 娉� 閲� >>
-/*----------------------------------------------------------------
- * 鍛藉悕绌洪棿锛歐IDESEAWCS_Tasks.ConveyorLineJob
- * 鍒涘缓鑰咃細鑳$搴�
- * 鍒涘缓鏃堕棿锛�2024/8/2 16:13:36
- * 鐗堟湰锛歏1.0.0
- * 鎻忚堪锛�
- *
- * ----------------------------------------------------------------
- * 淇敼浜猴細
- * 淇敼鏃堕棿锛�
- * 鐗堟湰锛歏1.0.1
- * 淇敼璇存槑锛�
- * 
- *----------------------------------------------------------------*/
-#endregion << 鐗� 鏈� 娉� 閲� >>
+锘�//#region << 鐗� 鏈� 娉� 閲� >>
+///*----------------------------------------------------------------
+// * 鍛藉悕绌洪棿锛歐IDESEAWCS_Tasks.ConveyorLineJob
+// * 鍒涘缓鑰咃細鑳$搴�
+// * 鍒涘缓鏃堕棿锛�2024/8/2 16:13:36
+// * 鐗堟湰锛歏1.0.0
+// * 鎻忚堪锛�
+// *
+// * ----------------------------------------------------------------
+// * 淇敼浜猴細
+// * 淇敼鏃堕棿锛�
+// * 鐗堟湰锛歏1.0.1
+// * 淇敼璇存槑锛�
+// * 
+// *----------------------------------------------------------------*/
+//#endregion << 鐗� 鏈� 娉� 閲� >>
 
-using AutoMapper;
-using Quartz;
-using System.Text.RegularExpressions;
-using WIDESEA_Common.Log;
-using WIDESEAWCS_Common.TaskEnum;
-using WIDESEAWCS_DTO.Enum;
-using WIDESEAWCS_ISystemServices;
-using WIDESEAWCS_ITaskInfoService;
-using WIDESEAWCS_Model.Models;
-using WIDESEAWCS_Model.Models.System;
-using WIDESEAWCS_QuartzJob;
-using WIDESEAWCS_QuartzJob.Service;
-using WIDESEAWCS_Tasks.ConveyorLineJob;
+//using AutoMapper;
+//using Quartz;
+//using System.Text.RegularExpressions;
+//using WIDESEA_Common.Log;
+//using WIDESEAWCS_Common.TaskEnum;
+//using WIDESEAWCS_DTO.Enum;
+//using WIDESEAWCS_ISystemServices;
+//using WIDESEAWCS_ITaskInfoService;
+//using WIDESEAWCS_Model.Models;
+//using WIDESEAWCS_Model.Models.System;
+//using WIDESEAWCS_QuartzJob;
+//using WIDESEAWCS_QuartzJob.Service;
+//using WIDESEAWCS_Tasks.ConveyorLineJob;
 
-namespace WIDESEAWCS_Tasks
-{
-    [DisallowConcurrentExecution]
-    public class CommonConveyorLineJob : IJob
-    {
-        private readonly ITaskService _taskService;
-        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
-        private readonly IRouterService _routerService;
-        private readonly IOrderDetailsService _OrderDetailsService;
-        private readonly IMapper _mapper;
+//namespace WIDESEAWCS_Tasks
+//{
+//    [DisallowConcurrentExecution]
+//    public class CommonConveyorLineJob : IJob
+//    {
+//        private readonly ITaskService _taskService;
+//        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
+//        private readonly IRouterService _routerService;
+//        private readonly IOrderDetailsService _OrderDetailsService;
+//        private readonly IMapper _mapper;
 
-        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IOrderDetailsService orderDetails, IMapper mapper)
-        {
-            _taskService = taskService;
-            _taskExecuteDetailService = taskExecuteDetailService;
-            _routerService = routerService;
-            _OrderDetailsService = orderDetails;
-            _mapper = mapper;
-        }
+//        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IOrderDetailsService orderDetails, IMapper mapper)
+//        {
+//            _taskService = taskService;
+//            _taskExecuteDetailService = taskExecuteDetailService;
+//            _routerService = routerService;
+//            _OrderDetailsService = orderDetails;
+//            _mapper = mapper;
+//        }
 
-        public Task Execute(IJobExecutionContext context)
-        {
-            try
-            {
+//        public Task Execute(IJobExecutionContext context)
+//        {
+//            try
+//            {
                
-                CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
+//                CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
                 
-                if (conveyorLine != null)
-                {
-                    if (conveyorLine.Communicator.Read<bool>("DB7.3030.0"))   //鐢宠
-                    {
+//                if (conveyorLine != null)
+//                {
+//                    if (conveyorLine.Communicator.Read<bool>("DB7.3030.0"))   //鐢宠
+//                    {
 
-                        string Barcodes = conveyorLine.Communicator.Read<string>("DB7.3032");   //璇绘潯鐮�
-                        string pattern = @"\d+";  // 鍖归厤鏁板瓧
-                        Match match = Regex.Match(Barcodes, pattern);
-                        string barcodeNumber = match.Value;
-                        if (barcodeNumber != "")
-                        {
-                            int toplc = _OrderDetailsService.GetOrderDetails(barcodeNumber);
-                            if (toplc != -1)
-                            {
-                                conveyorLine.Communicator.Write("DB7.3022", (int)toplc);   //鍐欏叆鍘诲悜
-                                conveyorLine.Communicator.Write("DB7.3028.0", (bool)true);    //鍐欏叆鍙嶉
-                                WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "鎴愬姛", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屽啓鍏ュ幓鍚憑toplc}" });
-                                if (conveyorLine.Communicator.Read<bool>("DB7.3116"))
-                                {
-                                    conveyorLine.Communicator.Write("DB7.3022", (int)0);   //娓呴櫎鍐欏叆鍘诲悜
-                                    conveyorLine.Communicator.Write("DB7.3028.0", (bool)false);   //娓呴櫎鍐欏叆鍙嶉
-                                    WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "鎴愬姛", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屾竻闄よ緭閫佺嚎鍙嶉鎴愬姛" });
-                                    //璋冨彇鍙嶉MES鎵樼洏鏉$爜
+//                        string Barcodes = conveyorLine.Communicator.Read<string>("DB7.3032");   //璇绘潯鐮�
+//                        string pattern = @"\d+";  // 鍖归厤鏁板瓧
+//                        Match match = Regex.Match(Barcodes, pattern);
+//                        string barcodeNumber = match.Value;
+//                        if (barcodeNumber != "")
+//                        {
+//                            int toplc = _OrderDetailsService.GetOrderDetails(barcodeNumber);
+//                            if (toplc != -1)
+//                            {
+//                                conveyorLine.Communicator.Write("DB7.3022", (int)toplc);   //鍐欏叆鍘诲悜
+//                                conveyorLine.Communicator.Write("DB7.3028.0", (bool)true);    //鍐欏叆鍙嶉
+//                                WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "鎴愬姛", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屽啓鍏ュ幓鍚憑toplc}" });
+//                                if (conveyorLine.Communicator.Read<bool>("DB7.3116"))
+//                                {
+//                                    conveyorLine.Communicator.Write("DB7.3022", (int)0);   //娓呴櫎鍐欏叆鍘诲悜
+//                                    conveyorLine.Communicator.Write("DB7.3028.0", (bool)false);   //娓呴櫎鍐欏叆鍙嶉
+//                                    WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "鎴愬姛", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屾竻闄よ緭閫佺嚎鍙嶉鎴愬姛" });
+//                                    //璋冨彇鍙嶉MES鎵樼洏鏉$爜
 
-                                   var datast= _OrderDetailsService.ToMesBarc(int.Parse(barcodeNumber));
-                                    if (datast.code==1)
-                                    {
-                                        WriteLog.Write_Log("ToMes", "鏉$爜鍙嶉Mes", "鎴愬姛", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屽弽棣堟垚鍔�" });
-                                    }
-                                    else
-                                    {
-                                        WriteLog.Write_Log("ToMes", "鏉$爜鍙嶉Mes", "澶辫触", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屽弽棣堝け璐�" });
-                                    }
+//                                   var datast= _OrderDetailsService.ToMesBarc(int.Parse(barcodeNumber));
+//                                    if (datast.code==1)
+//                                    {
+//                                        WriteLog.Write_Log("ToMes", "鏉$爜鍙嶉Mes", "鎴愬姛", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屽弽棣堟垚鍔�" });
+//                                    }
+//                                    else
+//                                    {
+//                                        WriteLog.Write_Log("ToMes", "鏉$爜鍙嶉Mes", "澶辫触", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屽弽棣堝け璐�" });
+//                                    }
 
                                     
-                                }
-                                else
-                                {
-                                    WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屾竻闄よ緭閫佺嚎鍙嶉澶辫触" });
-                                }
-                            }
-                            else
-                            {
-                                conveyorLine.Communicator.Write("DB7.3028.1", (bool)true);
-                                WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屾湭鎵惧埌鏁版嵁鏄庣粏璇︽儏闀垮害锛屽啓鍏ユ姤璀︿俊鎭�" });
-                            }
-                        }
-                        else
-                        {
-                            WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = $"鏈鍙栧埌鎵樼洏鏉$爜锛屾潯鐮侀敊璇瘂barcodeNumber}" });
-                        }
-                    }
-                    else
-                    {
+//                                }
+//                                else
+//                                {
+//                                    WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屾竻闄よ緭閫佺嚎鍙嶉澶辫触" });
+//                                }
+//                            }
+//                            else
+//                            {
+//                                conveyorLine.Communicator.Write("DB7.3028.1", (bool)true);
+//                                WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = $"鏉$爜锛歿barcodeNumber}锛屾湭鎵惧埌鏁版嵁鏄庣粏璇︽儏闀垮害锛屽啓鍏ユ姤璀︿俊鎭�" });
+//                            }
+//                        }
+//                        else
+//                        {
+//                            WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = $"鏈鍙栧埌鎵樼洏鏉$爜锛屾潯鐮侀敊璇瘂barcodeNumber}" });
+//                        }
+//                    }
+//                    else
+//                    {
 
-                        WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = "鏈鍙栧埌鎵爜鏋敵璇�" });
-                    }
-                }
+//                        WriteLog.Write_Log("鎵爜鏋�", "鎵爜绔欏彴", "閿欒", new { 淇℃伅 = "鏈鍙栧埌鎵爜鏋敵璇�" });
+//                    }
+//                }
 
-            }
-            catch (Exception ex)
-            {
-                //Console.Out.WriteLine(nameof(CommonConveyorLineJob) + ":" + ex.ToString());
-            }
-            return Task.CompletedTask;
-        }
+//            }
+//            catch (Exception ex)
+//            {
+//                //Console.Out.WriteLine(nameof(CommonConveyorLineJob) + ":" + ex.ToString());
+//            }
+//            return Task.CompletedTask;
+//        }
 
         
-    }
-}
+//    }
+//}

--
Gitblit v1.9.3