CC/iWareCC_ASRS/Common/SystemValue.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/Common/SystemWarningMsg.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/FormCC.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/FormCC.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/ThreadService/05_BZ30(齐套验证)/DataProcess_ValidateQiTao.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/iWareCC.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCommon/Utils/Log4Net/LogType.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCommon/log4net_iWare.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
CC/iWareCC_ASRS/Common/SystemValue.cs
@@ -134,7 +134,7 @@ /// </summary> public static bool isAllowRuning_DataProcess_RobotBuffer_ModeChange = false; public static bool isAllowRuning_PrintHandler = false; public static bool isAllowRuning_DataProcess_ValidateQiTao = false; /// <summary> /// æ¯å¦å 许æ§è¡ å åæºå ¥å£æ«ç æ£æµçº¿ç¨ CC/iWareCC_ASRS/Common/SystemWarningMsg.cs
@@ -101,7 +101,7 @@ /// <summary> /// è¾é线任å¡å®æç¡®è®¤çè¦åæ¶æ¯ /// </summary> public static string _lbl_Alert_PrintHandler = string.Empty; public static string _lbl_Alert_DataProcess_ValidateQiTao = string.Empty; /// <summary> /// æ¸ çæ°æ®ç°åº çè¦åæ¶æ¯ CC/iWareCC_ASRS/FormCC.Designer.cs
@@ -244,8 +244,8 @@ this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound = new System.Windows.Forms.CheckBox(); this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = new System.Windows.Forms.Label(); this.ck_DataProcess_RobotBuffer_IssueOutboundTask = new System.Windows.Forms.CheckBox(); this.lbl_Alert_PrintHandler = new System.Windows.Forms.Label(); this.ck_PrintHandler = new System.Windows.Forms.CheckBox(); this.lbl_DataProcess_ValidateQiTao = new System.Windows.Forms.Label(); this.ck_DataProcess_ValidateQiTao = new System.Windows.Forms.CheckBox(); this.lbl_MainTaskDecompose = new System.Windows.Forms.Label(); this.ckMainTaskDecompose = new System.Windows.Forms.CheckBox(); this.lbl_Alert_DeleteData = new System.Windows.Forms.Label(); @@ -3016,8 +3016,8 @@ this.groupBox1.Controls.Add(this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound); this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask); this.groupBox1.Controls.Add(this.ck_DataProcess_RobotBuffer_IssueOutboundTask); this.groupBox1.Controls.Add(this.lbl_Alert_PrintHandler); this.groupBox1.Controls.Add(this.ck_PrintHandler); this.groupBox1.Controls.Add(this.lbl_DataProcess_ValidateQiTao); this.groupBox1.Controls.Add(this.ck_DataProcess_ValidateQiTao); this.groupBox1.Controls.Add(this.lbl_MainTaskDecompose); this.groupBox1.Controls.Add(this.ckMainTaskDecompose); this.groupBox1.Controls.Add(this.lbl_Alert_DeleteData); @@ -3286,28 +3286,28 @@ this.ck_DataProcess_RobotBuffer_IssueOutboundTask.UseVisualStyleBackColor = true; this.ck_DataProcess_RobotBuffer_IssueOutboundTask.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // lbl_Alert_PrintHandler // lbl_DataProcess_ValidateQiTao // this.lbl_Alert_PrintHandler.AutoSize = true; this.lbl_Alert_PrintHandler.BackColor = System.Drawing.Color.White; this.lbl_Alert_PrintHandler.ForeColor = System.Drawing.Color.Red; this.lbl_Alert_PrintHandler.Location = new System.Drawing.Point(215, 492); this.lbl_Alert_PrintHandler.Name = "lbl_Alert_PrintHandler"; this.lbl_Alert_PrintHandler.Size = new System.Drawing.Size(70, 15); this.lbl_Alert_PrintHandler.TabIndex = 37; this.lbl_Alert_PrintHandler.Text = "label11"; this.lbl_DataProcess_ValidateQiTao.AutoSize = true; this.lbl_DataProcess_ValidateQiTao.BackColor = System.Drawing.Color.White; this.lbl_DataProcess_ValidateQiTao.ForeColor = System.Drawing.Color.Red; this.lbl_DataProcess_ValidateQiTao.Location = new System.Drawing.Point(215, 492); this.lbl_DataProcess_ValidateQiTao.Name = "lbl_DataProcess_ValidateQiTao"; this.lbl_DataProcess_ValidateQiTao.Size = new System.Drawing.Size(70, 15); this.lbl_DataProcess_ValidateQiTao.TabIndex = 37; this.lbl_DataProcess_ValidateQiTao.Text = "label11"; // // ck_PrintHandler // ck_DataProcess_ValidateQiTao // this.ck_PrintHandler.AutoSize = true; this.ck_PrintHandler.Location = new System.Drawing.Point(4, 492); this.ck_PrintHandler.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ck_PrintHandler.Name = "ck_PrintHandler"; this.ck_PrintHandler.Size = new System.Drawing.Size(125, 19); this.ck_PrintHandler.TabIndex = 36; this.ck_PrintHandler.Text = "æå°æå¡çº¿ç¨"; this.ck_PrintHandler.UseVisualStyleBackColor = true; this.ck_PrintHandler.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); this.ck_DataProcess_ValidateQiTao.AutoSize = true; this.ck_DataProcess_ValidateQiTao.Location = new System.Drawing.Point(4, 492); this.ck_DataProcess_ValidateQiTao.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ck_DataProcess_ValidateQiTao.Name = "ck_DataProcess_ValidateQiTao"; this.ck_DataProcess_ValidateQiTao.Size = new System.Drawing.Size(161, 19); this.ck_DataProcess_ValidateQiTao.TabIndex = 36; this.ck_DataProcess_ValidateQiTao.Text = "BZ30é½å¥éªè¯çº¿ç¨"; this.ck_DataProcess_ValidateQiTao.UseVisualStyleBackColor = true; this.ck_DataProcess_ValidateQiTao.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // lbl_MainTaskDecompose // @@ -6152,8 +6152,8 @@ private System.Windows.Forms.CheckBox ckDeleteData; private System.Windows.Forms.Label lbl_MainTaskDecompose; private System.Windows.Forms.CheckBox ckMainTaskDecompose; private System.Windows.Forms.Label lbl_Alert_PrintHandler; private System.Windows.Forms.CheckBox ck_PrintHandler; private System.Windows.Forms.Label lbl_DataProcess_ValidateQiTao; private System.Windows.Forms.CheckBox ck_DataProcess_ValidateQiTao; private System.Windows.Forms.Label lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask; private System.Windows.Forms.CheckBox ck_DataProcess_RobotBuffer_IssueOutboundTask; private System.Windows.Forms.Button btn_1007; CC/iWareCC_ASRS/FormCC.cs
@@ -1549,7 +1549,7 @@ DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange, ck_DataProcess_RobotBuffer_ModeChange); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_PrintHandler, ck_PrintHandler); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_ValidateQiTao, ck_DataProcess_ValidateQiTao); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_FinishTaskForOutbound, checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound); CC/iWareCC_ASRS/ThreadService/05_BZ30(ÆëÌ×ÑéÖ¤)/DataProcess_ValidateQiTao.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,109 @@ using Admin.NET.Application; using iWareCC.Common.Helper; using iWareCC.StationService; using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; using iWareSql.DataAccess; using iWareSql.DBModel; using iWareSql.WmsDBModel; using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel.Configuration; using System.Text; using System.Threading; using System.Threading.Tasks; using WZ.Useful.Commons; using XiGang.Core.Model; namespace iWareCC.ThreadService { /// <summary> /// BZ30é½å¥éªè¯ /// </summary> public static class DataProcess_ValidateQiTao { public static async void Handler() { var alertMsg = ""; LogType logType = LogType.DataProcess_ValidateQiTao; while (true) { Thread.Sleep(2000);//ä¼ç 2ç§ï¼å°ä¼ç åå°åé¢ï¼æ¯ä¸ºäºä¸é¢çcontinueæ¹æ³æ§è¡å䏿¾ç¤ºé误信æ¯çæç¤ºï¼ï¼ï¼ãEditBy shaocx,2022-05-24ã SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = string.Empty; try { if (SystemValue.isAllowRuning_DataProcess_ValidateQiTao && SystemValue.isStartedModel) { var rgvLocation = StationLocationEnum.BZ39.ToString(); if (FormCC.IsAllowRunOutMode) { using (WmsDBModel wmsDB = new WmsDBModel()) { var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault(); if (TaskHandler.ValidateNoFinishOutTaskForRobotBuffer(wmsDB)) {//ä¸åå¨ rbRunMode.LineRunMode = (int)RbRunModeEnum.å ¥åºæ¨¡å¼; rbRunMode.LineRunModeName = RbRunModeEnum.å ¥åºæ¨¡å¼.ToString(); rbRunMode.UpdateTime = DateTime.Now; //æ¨éç»PLCåæ¢æ¨¡å¼ using (StationServiceClient client = new StationServiceClient()) { var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.å ¥åºæ¨¡å¼, rgvLocation); if (!res.result) { SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"{rgvLocation.ToString()}-æ¨éç»PLCåæ¢æ¨¡å¼ å¤±è´¥,ChangeModeAsync è¿å:{res.resMsg}"; continue; } else { Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-æ¨éç»PLCåæ¢æ¨¡å¼ æå,ChangeModeAsyncï¼åæ°: ç«ç¹{rgvLocation}"); } } FormCC.IsAllowRunOutMode = false; } else {//åå¨ if (rbRunMode.LineRunMode == (int)RbRunModeEnum.åºåºæ¨¡å¼) { SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"å·²ç»æ¯åºåºæ¨¡å¼äº,æ¤æ¬¡å¾ªç¯ç»æ"; continue; } rbRunMode.LineRunMode = (int)RbRunModeEnum.åºåºæ¨¡å¼; rbRunMode.LineRunModeName = RbRunModeEnum.åºåºæ¨¡å¼.ToString(); rbRunMode.UpdateTime = DateTime.Now; //æ¨éç»PLCåæ¢æ¨¡å¼ using (StationServiceClient client = new StationServiceClient()) { var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.åºåºæ¨¡å¼, rgvLocation); if (!res.result) { SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"{rgvLocation.ToString()}-æ¨éç»PLCåæ¢æ¨¡å¼ å¤±è´¥,ChangeModeAsync è¿å:{res.resMsg}"; continue; } else { Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-æ¨éç»PLCåæ¢æ¨¡å¼ æå,ChangeModeAsyncï¼åæ°: ç«ç¹{rgvLocation}"); } } } wmsDB.SaveChanges(); } } } } catch (Exception ex) { SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao += " åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; Log4NetHelper.WriteErrorLog(logType, " åºç°å¼å¸¸ï¼" + ex.Message, ex); } } } } } CC/iWareCC_ASRS/iWareCC.csproj
@@ -171,6 +171,7 @@ <Compile Include="ThreadService\03_BZ12%28æºå¨äººç å å·¥ä½%29\DataProcess_BZ12_FinishTask.cs" /> <Compile Include="ThreadService\04_BZ21ï¼æ¬è¿æ´åæºå¨äººï¼\DataProcess_BZ21.cs" /> <Compile Include="ThreadService\04_BZ21ï¼æ¬è¿æ´åæºå¨äººï¼\DataProcess_BZ21_FinishTask.cs" /> <Compile Include="ThreadService\05_BZ30%28é½å¥éªè¯%29\DataProcess_ValidateQiTao.cs" /> <Compile Include="WCF\CCWcfService.cs" /> <Compile Include="WCF\ICCWcfService.cs" /> <Compile Include="WmsTask\AutoUpdateEngineInfoTask.cs" /> CC/iWareCommon/Utils/Log4Net/LogType.cs
@@ -62,7 +62,7 @@ /// <summary> /// åºåºè®¡å /// </summary> PrintHandler = 300, DataProcess_ValidateQiTao = 300, /// <summary> /// MESæå¡ CC/iWareCommon/log4net_iWare.config
@@ -262,8 +262,8 @@ <filter type="log4net.Filter.DenyAllFilter" /> </appender> <!--åºåºè®¡åãä¿¡æ¯ãæ¥å¿--> <appender name="PrintHandler_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWareCC\\PrintHandler_Info\\" /> <appender name="DataProcess_ValidateQiTao_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_ValidateQiTao_Info\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -273,13 +273,13 @@ <param name="ConversionPattern" value="%næ¶æ¯æ¶é´ï¼%d [%t] %næ¶æ¯çº§å«ï¼%-5p %næ¶ æ¯ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="PrintHandler_Info" /> <loggerToMatch value="DataProcess_ValidateQiTao_Info" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> <!--åºåºè®¡åãéè¯¯ãæ¥å¿--> <appender name="PrintHandler_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWareCC\\PrintHandler_Error\\" /> <appender name="DataProcess_ValidateQiTao_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_ValidateQiTao_Error\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -289,7 +289,7 @@ <param name="ConversionPattern" value="%nå¼å¸¸æ¶é´ï¼%d [%t] %nå¼å¸¸çº§å«ï¼%-5p %nå¼ å¸¸ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="PrintHandler_Error" /> <loggerToMatch value="DataProcess_ValidateQiTao_Error" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> @@ -640,8 +640,8 @@ <appender-ref ref="DataProcess_RobotBuffer_AutoQiTaoOutbound_Error"/> <appender-ref ref="DataProcess_RobotBuffer_ModeChange_Info"/> <appender-ref ref="DataProcess_RobotBuffer_ModeChange_Error"/> <appender-ref ref="PrintHandler_Info"/> <appender-ref ref="PrintHandler_Error"/> <appender-ref ref="DataProcess_ValidateQiTao_Info"/> <appender-ref ref="DataProcess_ValidateQiTao_Error"/> <!--å åæºä»»å¡çº¿ç¨æ¥å¿--> <appender-ref ref="SrmTheadService_Info"/> <appender-ref ref="SrmTheadService_Error"/>