CC/iWareCC_ASRS/App.config
@@ -19,20 +19,12 @@ <add key="IsSimulationPLC" value="false"/> <!-- æ¯å¦æ¯éæºå¯»æ¾åºä½ï¼å»ºè®®æ¯false--> <add key="IsRandomFindPlace" value="false"/> <!-- 西港WMSçAPI--> <add key="XiGang_WMSApi" value="http://localhost:8084/api/"/> <!-- 西港WMSçå卿ºåºåº--> <add key="XiGang_WMSApi_OutStoreToMes" value="MES/OutStoreToMes"/> <!-- 西港WMSçç»ç--> <add key="XiGang_WMSApi_SalverMaterialBind" value="Task_Main/SalverMaterialBind"/> <!-- 西港WMSçç»çä¸å--> <add key="XiGang_WMSApi_IssueInStoreTask" value="Task_Main/IssueInStoreTaskForCC"/> <!--AGVç主æºhost--> <add key="AgvHost" value="http://192.168.10.120:8088/"/> <!--AGV-è·åæºå¨äººä¿¡æ¯--> <add key="RobotsStatus" value="robotsStatus"/> <!-- æ¯å¦å¯ç¨æ°å ¥åºå£ --> <add key="IsEnableNewInStorePlace" value="false"/> <!-- MES API--> <add key="Mes_Api" value="http://172.17.1.22:44374/api/LuLi/"/> <!-- MESå è£ å®ææ¥å£--> <add key="Mes_Api_packagecompleted" value="packagecompleted"/> <!-- MESåºçº¸æºæ¥å£--> <add key="Mes_Api_papercut" value="cartons-machine"/> </appSettings> <connectionStrings> <add name="WmsDBModel" connectionString="data source=172.17.1.111;initial catalog=LA24030_LuLiPackageLine;persist security info=True;user id=sa;password=admin@123;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> CC/iWareCC_ASRS/Common/SystemWarningMsg.cs
@@ -58,7 +58,7 @@ /// <summary> /// RGVä¸åçè¦åæ¶æ¯ /// </summary> public static string _lbl_Alert_RgvRelease = string.Empty; public static string _lbl_Alert_PushPaperCutToMes = string.Empty; /// <summary> /// RGVä»»å¡å®æç¡®è®¤çè¦åæ¶æ¯ @@ -83,7 +83,7 @@ /// <summary> /// ä»»å¡å解线ç¨çæ¶æ¯ /// </summary> public static string _lbl_Alert_MainTaskDecompose = string.Empty; public static string _lbl_Alert_DataProcess_BZ21_IssueTask = string.Empty; /// <summary> /// ä»»å¡å解线ç¨-ç»çå ¥åºçæ¶æ¯ @@ -145,7 +145,7 @@ /// <summary> /// åºåºä»»å¡éç¥MES çè¦åæ¶æ¯ /// </summary> public static string _lbl_Alert_OutTaskRetryToMes = string.Empty; public static string _lbl_Alert_PushPackageCodeToMes = string.Empty; } } CC/iWareCC_ASRS/DeviceThreadFactory/DeviceThreadService/RgvThreadService/RgvTaskThreadService.cs
@@ -76,7 +76,7 @@ { IssueTaskHandle(i_deviceId, out errMsg); } SystemWarningMsg._lbl_Alert_RgvRelease = errMsg; SystemWarningMsg._lbl_Alert_PushPaperCutToMes = errMsg; Thread.Sleep(2000);//2ç§ä¸æ¬¡ } CC/iWareCC_ASRS/FormCC.Designer.cs
@@ -230,8 +230,8 @@ this.ck_AutoIssueInStoreTask = new System.Windows.Forms.CheckBox(); this.lbl_alert_DataProcess_BZ39 = new System.Windows.Forms.Label(); this.ck_DataProcess_BZ39 = new System.Windows.Forms.CheckBox(); this.lbl_Alert_RgvReleaseFinish_BuChang = new System.Windows.Forms.Label(); this.ckBRgvFinishedHandle_BuChang = new System.Windows.Forms.CheckBox(); this.lbl_Alert_PushPackageCodeToMes = new System.Windows.Forms.Label(); this.ck_PushPackageCodeToMes = new System.Windows.Forms.CheckBox(); this.lbl_Alert_DataProcess_RobotBuffer_FinishTask = new System.Windows.Forms.Label(); this.ck_DataProcess_RobotBuffer_FinishTask = new System.Windows.Forms.CheckBox(); this.lbl_Alter_OutTaskRetryToMes = new System.Windows.Forms.Label(); @@ -246,8 +246,8 @@ this.ck_DataProcess_RobotBuffer_IssueOutboundTask = 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_DataProcess_BZ21_IssueTask = new System.Windows.Forms.Label(); this.ck_DataProcess_BZ21_IssueTask = new System.Windows.Forms.CheckBox(); this.lbl_Alert_DeleteData = new System.Windows.Forms.Label(); this.ckDeleteData = new System.Windows.Forms.CheckBox(); this.lbl_Alert_DataProcess_BZ12_IssueTask = new System.Windows.Forms.Label(); @@ -260,14 +260,14 @@ this.lbl_Alert_Srm3Release = new System.Windows.Forms.Label(); this.ckBSrm3Release = new System.Windows.Forms.CheckBox(); this.ckBSrm3FinishedHandle = new System.Windows.Forms.CheckBox(); this.lbl_Alert_RgvReleaseFinish = new System.Windows.Forms.Label(); this.lbl_Alert_PushPaperCutToMes = new System.Windows.Forms.Label(); this.lbl_Alert_Srm2ReleaseFinish = new System.Windows.Forms.Label(); this.lbl_Alter_Srm1ReleaseFinish = new System.Windows.Forms.Label(); this.lbl_Alert_RgvRelease = new System.Windows.Forms.Label(); this.lbl_Alert_Srm2Release = new System.Windows.Forms.Label(); this.lbl_Alert_DataProcess_BZ39_IssueInboundTask = new System.Windows.Forms.Label(); this.ckB_DataProcess_BZ39_IssueInboundTask = new System.Windows.Forms.CheckBox(); this.ckBRgvFinishedHandle = new System.Windows.Forms.CheckBox(); this.ckB_PushPaperCutToMes = new System.Windows.Forms.CheckBox(); this.ckBSrm1FinishedHandle = new System.Windows.Forms.CheckBox(); this.ckBRgvRelease = new System.Windows.Forms.CheckBox(); this.ckBSrm2Release = new System.Windows.Forms.CheckBox(); @@ -3002,8 +3002,8 @@ this.groupBox1.Controls.Add(this.ck_AutoIssueInStoreTask); this.groupBox1.Controls.Add(this.lbl_alert_DataProcess_BZ39); this.groupBox1.Controls.Add(this.ck_DataProcess_BZ39); this.groupBox1.Controls.Add(this.lbl_Alert_RgvReleaseFinish_BuChang); this.groupBox1.Controls.Add(this.ckBRgvFinishedHandle_BuChang); this.groupBox1.Controls.Add(this.lbl_Alert_PushPackageCodeToMes); this.groupBox1.Controls.Add(this.ck_PushPackageCodeToMes); this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_RobotBuffer_FinishTask); this.groupBox1.Controls.Add(this.ck_DataProcess_RobotBuffer_FinishTask); this.groupBox1.Controls.Add(this.lbl_Alter_OutTaskRetryToMes); @@ -3018,8 +3018,8 @@ this.groupBox1.Controls.Add(this.ck_DataProcess_RobotBuffer_IssueOutboundTask); 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_DataProcess_BZ21_IssueTask); this.groupBox1.Controls.Add(this.ck_DataProcess_BZ21_IssueTask); this.groupBox1.Controls.Add(this.lbl_Alert_DeleteData); this.groupBox1.Controls.Add(this.ckDeleteData); this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_BZ12_IssueTask); @@ -3032,14 +3032,14 @@ this.groupBox1.Controls.Add(this.lbl_Alert_Srm3Release); this.groupBox1.Controls.Add(this.ckBSrm3Release); this.groupBox1.Controls.Add(this.ckBSrm3FinishedHandle); this.groupBox1.Controls.Add(this.lbl_Alert_RgvReleaseFinish); this.groupBox1.Controls.Add(this.lbl_Alert_PushPaperCutToMes); this.groupBox1.Controls.Add(this.lbl_Alert_Srm2ReleaseFinish); this.groupBox1.Controls.Add(this.lbl_Alter_Srm1ReleaseFinish); this.groupBox1.Controls.Add(this.lbl_Alert_RgvRelease); this.groupBox1.Controls.Add(this.lbl_Alert_Srm2Release); this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_BZ39_IssueInboundTask); this.groupBox1.Controls.Add(this.ckB_DataProcess_BZ39_IssueInboundTask); this.groupBox1.Controls.Add(this.ckBRgvFinishedHandle); this.groupBox1.Controls.Add(this.ckB_PushPaperCutToMes); this.groupBox1.Controls.Add(this.ckBSrm1FinishedHandle); this.groupBox1.Controls.Add(this.ckBRgvRelease); this.groupBox1.Controls.Add(this.ckBSrm2Release); @@ -3124,28 +3124,28 @@ this.ck_DataProcess_BZ39.UseVisualStyleBackColor = true; this.ck_DataProcess_BZ39.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // lbl_Alert_RgvReleaseFinish_BuChang // lbl_Alert_PushPackageCodeToMes // this.lbl_Alert_RgvReleaseFinish_BuChang.AutoSize = true; this.lbl_Alert_RgvReleaseFinish_BuChang.BackColor = System.Drawing.Color.White; this.lbl_Alert_RgvReleaseFinish_BuChang.ForeColor = System.Drawing.Color.Red; this.lbl_Alert_RgvReleaseFinish_BuChang.Location = new System.Drawing.Point(937, 339); this.lbl_Alert_RgvReleaseFinish_BuChang.Name = "lbl_Alert_RgvReleaseFinish_BuChang"; this.lbl_Alert_RgvReleaseFinish_BuChang.Size = new System.Drawing.Size(70, 15); this.lbl_Alert_RgvReleaseFinish_BuChang.TabIndex = 51; this.lbl_Alert_RgvReleaseFinish_BuChang.Text = "label11"; this.lbl_Alert_PushPackageCodeToMes.AutoSize = true; this.lbl_Alert_PushPackageCodeToMes.BackColor = System.Drawing.Color.White; this.lbl_Alert_PushPackageCodeToMes.ForeColor = System.Drawing.Color.Red; this.lbl_Alert_PushPackageCodeToMes.Location = new System.Drawing.Point(236, 221); this.lbl_Alert_PushPackageCodeToMes.Name = "lbl_Alert_PushPackageCodeToMes"; this.lbl_Alert_PushPackageCodeToMes.Size = new System.Drawing.Size(70, 15); this.lbl_Alert_PushPackageCodeToMes.TabIndex = 51; this.lbl_Alert_PushPackageCodeToMes.Text = "label11"; // // ckBRgvFinishedHandle_BuChang // ck_PushPackageCodeToMes // this.ckBRgvFinishedHandle_BuChang.AutoSize = true; this.ckBRgvFinishedHandle_BuChang.Location = new System.Drawing.Point(729, 335); this.ckBRgvFinishedHandle_BuChang.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ckBRgvFinishedHandle_BuChang.Name = "ckBRgvFinishedHandle_BuChang"; this.ckBRgvFinishedHandle_BuChang.Size = new System.Drawing.Size(184, 19); this.ckBRgvFinishedHandle_BuChang.TabIndex = 50; this.ckBRgvFinishedHandle_BuChang.Text = "RGVä»»å¡å®æè¡¥å¿çº¿ç¨"; this.ckBRgvFinishedHandle_BuChang.UseVisualStyleBackColor = true; this.ckBRgvFinishedHandle_BuChang.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); this.ck_PushPackageCodeToMes.AutoSize = true; this.ck_PushPackageCodeToMes.Location = new System.Drawing.Point(3, 221); this.ck_PushPackageCodeToMes.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ck_PushPackageCodeToMes.Name = "ck_PushPackageCodeToMes"; this.ck_PushPackageCodeToMes.Size = new System.Drawing.Size(216, 19); this.ck_PushPackageCodeToMes.TabIndex = 50; this.ck_PushPackageCodeToMes.Text = "æ¨émeså è£ å®ææ¥å£çº¿ç¨"; this.ck_PushPackageCodeToMes.UseVisualStyleBackColor = true; this.ck_PushPackageCodeToMes.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // lbl_Alert_DataProcess_RobotBuffer_FinishTask // @@ -3309,28 +3309,28 @@ this.ck_DataProcess_ValidateQiTao.UseVisualStyleBackColor = true; this.ck_DataProcess_ValidateQiTao.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // lbl_MainTaskDecompose // lbl_DataProcess_BZ21_IssueTask // this.lbl_MainTaskDecompose.AutoSize = true; this.lbl_MainTaskDecompose.BackColor = System.Drawing.Color.White; this.lbl_MainTaskDecompose.ForeColor = System.Drawing.Color.Red; this.lbl_MainTaskDecompose.Location = new System.Drawing.Point(643, 54); this.lbl_MainTaskDecompose.Name = "lbl_MainTaskDecompose"; this.lbl_MainTaskDecompose.Size = new System.Drawing.Size(70, 15); this.lbl_MainTaskDecompose.TabIndex = 35; this.lbl_MainTaskDecompose.Text = "label11"; this.lbl_DataProcess_BZ21_IssueTask.AutoSize = true; this.lbl_DataProcess_BZ21_IssueTask.BackColor = System.Drawing.Color.White; this.lbl_DataProcess_BZ21_IssueTask.ForeColor = System.Drawing.Color.Red; this.lbl_DataProcess_BZ21_IssueTask.Location = new System.Drawing.Point(214, 270); this.lbl_DataProcess_BZ21_IssueTask.Name = "lbl_DataProcess_BZ21_IssueTask"; this.lbl_DataProcess_BZ21_IssueTask.Size = new System.Drawing.Size(70, 15); this.lbl_DataProcess_BZ21_IssueTask.TabIndex = 35; this.lbl_DataProcess_BZ21_IssueTask.Text = "label11"; // // ckMainTaskDecompose // ck_DataProcess_BZ21_IssueTask // this.ckMainTaskDecompose.AutoSize = true; this.ckMainTaskDecompose.Location = new System.Drawing.Point(432, 54); this.ckMainTaskDecompose.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ckMainTaskDecompose.Name = "ckMainTaskDecompose"; this.ckMainTaskDecompose.Size = new System.Drawing.Size(166, 19); this.ckMainTaskDecompose.TabIndex = 34; this.ckMainTaskDecompose.Text = "ä»»å¡å解线ç¨-åºåº"; this.ckMainTaskDecompose.UseVisualStyleBackColor = true; this.ckMainTaskDecompose.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); this.ck_DataProcess_BZ21_IssueTask.AutoSize = true; this.ck_DataProcess_BZ21_IssueTask.Location = new System.Drawing.Point(3, 270); this.ck_DataProcess_BZ21_IssueTask.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ck_DataProcess_BZ21_IssueTask.Name = "ck_DataProcess_BZ21_IssueTask"; this.ck_DataProcess_BZ21_IssueTask.Size = new System.Drawing.Size(125, 19); this.ck_DataProcess_BZ21_IssueTask.TabIndex = 34; this.ck_DataProcess_BZ21_IssueTask.Text = "åå ä»»å¡ä¸å"; this.ck_DataProcess_BZ21_IssueTask.UseVisualStyleBackColor = true; this.ck_DataProcess_BZ21_IssueTask.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // lbl_Alert_DeleteData // @@ -3470,16 +3470,16 @@ this.ckBSrm3FinishedHandle.UseVisualStyleBackColor = true; this.ckBSrm3FinishedHandle.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // lbl_Alert_RgvReleaseFinish // lbl_Alert_PushPaperCutToMes // this.lbl_Alert_RgvReleaseFinish.AutoSize = true; this.lbl_Alert_RgvReleaseFinish.BackColor = System.Drawing.Color.White; this.lbl_Alert_RgvReleaseFinish.ForeColor = System.Drawing.Color.Red; this.lbl_Alert_RgvReleaseFinish.Location = new System.Drawing.Point(935, 303); this.lbl_Alert_RgvReleaseFinish.Name = "lbl_Alert_RgvReleaseFinish"; this.lbl_Alert_RgvReleaseFinish.Size = new System.Drawing.Size(70, 15); this.lbl_Alert_RgvReleaseFinish.TabIndex = 21; this.lbl_Alert_RgvReleaseFinish.Text = "label11"; this.lbl_Alert_PushPaperCutToMes.AutoSize = true; this.lbl_Alert_PushPaperCutToMes.BackColor = System.Drawing.Color.White; this.lbl_Alert_PushPaperCutToMes.ForeColor = System.Drawing.Color.Red; this.lbl_Alert_PushPaperCutToMes.Location = new System.Drawing.Point(212, 186); this.lbl_Alert_PushPaperCutToMes.Name = "lbl_Alert_PushPaperCutToMes"; this.lbl_Alert_PushPaperCutToMes.Size = new System.Drawing.Size(70, 15); this.lbl_Alert_PushPaperCutToMes.TabIndex = 21; this.lbl_Alert_PushPaperCutToMes.Text = "label11"; // // lbl_Alert_Srm2ReleaseFinish // @@ -3548,17 +3548,17 @@ this.ckB_DataProcess_BZ39_IssueInboundTask.UseVisualStyleBackColor = true; this.ckB_DataProcess_BZ39_IssueInboundTask.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // ckBRgvFinishedHandle // ckB_PushPaperCutToMes // this.ckBRgvFinishedHandle.AutoSize = true; this.ckBRgvFinishedHandle.Location = new System.Drawing.Point(727, 299); this.ckBRgvFinishedHandle.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ckBRgvFinishedHandle.Name = "ckBRgvFinishedHandle"; this.ckBRgvFinishedHandle.Size = new System.Drawing.Size(152, 19); this.ckBRgvFinishedHandle.TabIndex = 11; this.ckBRgvFinishedHandle.Text = "RGVä»»å¡å®æå¤ç"; this.ckBRgvFinishedHandle.UseVisualStyleBackColor = true; this.ckBRgvFinishedHandle.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); this.ckB_PushPaperCutToMes.AutoSize = true; this.ckB_PushPaperCutToMes.Location = new System.Drawing.Point(4, 182); this.ckB_PushPaperCutToMes.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ckB_PushPaperCutToMes.Name = "ckB_PushPaperCutToMes"; this.ckB_PushPaperCutToMes.Size = new System.Drawing.Size(168, 19); this.ckB_PushPaperCutToMes.TabIndex = 11; this.ckB_PushPaperCutToMes.Text = "æ¨émesåºçº¸æºæ¥å£"; this.ckB_PushPaperCutToMes.UseVisualStyleBackColor = true; this.ckB_PushPaperCutToMes.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); // // ckBSrm1FinishedHandle // @@ -6060,7 +6060,7 @@ private System.Windows.Forms.GroupBox gBoxThread; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.CheckBox ckB_DataProcess_BZ39_IssueInboundTask; private System.Windows.Forms.CheckBox ckBRgvFinishedHandle; private System.Windows.Forms.CheckBox ckB_PushPaperCutToMes; private System.Windows.Forms.CheckBox ckBSrm1FinishedHandle; private System.Windows.Forms.CheckBox ckBRgvRelease; private System.Windows.Forms.CheckBox ckBSrm2Release; @@ -6073,7 +6073,7 @@ private System.Windows.Forms.Label lbl_Alert_RgvRelease; private System.Windows.Forms.Label lbl_Alert_Srm2ReleaseFinish; private System.Windows.Forms.Label lbl_Alter_Srm1ReleaseFinish; private System.Windows.Forms.Label lbl_Alert_RgvReleaseFinish; private System.Windows.Forms.Label lbl_Alert_PushPaperCutToMes; private System.Windows.Forms.RadioButton rbHand; private System.Windows.Forms.Label lbl_WCFMsg; private System.Windows.Forms.Label lbl_IsSimulationPLC; @@ -6150,8 +6150,8 @@ private System.Windows.Forms.CheckBox ck_DataProcess_BZ12_IssueTask; private System.Windows.Forms.Label lbl_Alert_DeleteData; 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_DataProcess_BZ21_IssueTask; private System.Windows.Forms.CheckBox ck_DataProcess_BZ21_IssueTask; 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; @@ -6376,8 +6376,8 @@ private System.Windows.Forms.Label label18; private System.Windows.Forms.TextBox tb_query_Salver; private System.Windows.Forms.Label label20; private System.Windows.Forms.Label lbl_Alert_RgvReleaseFinish_BuChang; private System.Windows.Forms.CheckBox ckBRgvFinishedHandle_BuChang; private System.Windows.Forms.Label lbl_Alert_PushPackageCodeToMes; private System.Windows.Forms.CheckBox ck_PushPackageCodeToMes; private System.Windows.Forms.Button btn_1019; private System.Windows.Forms.Label lbl_R_1019_Scan; private System.Windows.Forms.Button button21; CC/iWareCC_ASRS/FormCC.cs
@@ -28,7 +28,7 @@ using System.Windows.Forms; using XiGang.Core.Model; using XiGang.Core.Model.ViewModels; using static iWareCC.ThreadService._04_BZ21_æ¬è¿æ´åæºå¨äºº_.DataProcess_BZ21; namespace iWareCC { @@ -250,10 +250,13 @@ new Thread(DataProcess_BZ12_FinishTask.Handler).Start(); new Thread(DataProcess_BZ21.Hander).Start(); new Thread(DataProcess_BZ21_IssueTask.Handler).Start(); new Thread(DataProcess_BZ21_FinishTask.Handler).Start(); new Thread(DeleteData).Start(); //new Thread(PrintHandler.Handler).Start(); new Thread(PushPackageCodeToMes.Handler).Start(); new Thread(PushPaperCutToMes.Handler).Start(); @@ -354,17 +357,17 @@ this.lbl_Alert_Srm3ReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm3ReleaseFinish; this.lbl_Alert_Srm4ReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm4ReleaseFinish; this.lbl_Alert_RgvRelease.Text = showNowTime + SystemWarningMsg._lbl_Alert_RgvRelease; this.lbl_Alert_RgvReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange; this.lbl_Alert_RgvReleaseFinish_BuChang.Text = showNowTime + SystemWarningMsg._lbl_Alert_RgvReleaseFinish_BuChang; this.lbl_Alert_PushPaperCutToMes.Text = showNowTime + SystemWarningMsg._lbl_Alert_PushPaperCutToMes; this.lbl_Alert_PushPackageCodeToMes.Text = showNowTime + SystemWarningMsg._lbl_Alert_PushPackageCodeToMes; this.lbl_Alert_DataProcess_BZ12_IssueTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_BZ12_IssueTask; this.lbl_Alert_DataProcess_RobotBuffer_FinishTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask; this.lbl_MainTaskDecompose.Text = showNowTime + SystemWarningMsg._lbl_Alert_MainTaskDecompose; this.lbl_DataProcess_BZ21_IssueTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask; this.lbl_DataProcess_RobotBuffer_ModeChange.Text = showNowTime + SystemWarningMsg._lbl_Alert_MainTaskDecompose_ZPRK; this.lbl_DataProcess_RobotBuffer_ModeChange.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange; this.lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound; @@ -379,9 +382,6 @@ this.lbl_alert_DataProcess_269.Text = showNowTime + SystemWarningMsg._lbl_alert_DataProcess_269; this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask; this.lbl_Alter_OutTaskRetryToMes.Text = showNowTime + SystemWarningMsg._lbl_Alert_OutTaskRetryToMes; @@ -1489,7 +1489,7 @@ SetAllCheckBoxChecked(true); //å°ç¹æ®çåæ¶ this.ck_DataProcess_BZ12_IssueTask.Checked = false; this.ckMainTaskDecompose.Checked = false; this.ck_DataProcess_BZ21_IssueTask.Checked = false; this.gBoxThread.Enabled = true; } @@ -1543,14 +1543,14 @@ //RGVä»»å¡ä¸å DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService, ckBRgvRelease); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish, ckBRgvFinishedHandle); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish_BuChang, ckBRgvFinishedHandle_BuChang); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish, ckB_PushPaperCutToMes); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_RgvThreadService_Finish_BuChang, ck_PushPackageCodeToMes); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_HandlerIssuingTask, ck_DataProcess_BZ12_IssueTask); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_FinishTask, ck_DataProcess_RobotBuffer_FinishTask); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_MainTaskDecompose, ckMainTaskDecompose); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_MainTaskDecompose, ck_DataProcess_BZ21_IssueTask); DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange, ck_DataProcess_RobotBuffer_ModeChange); CC/iWareCC_ASRS/ThreadService/03_BZ12(»úÆ÷ÈËÂë°ü¹¤Î»)/1¡¢DataProcess_BZ12.cs
@@ -63,10 +63,10 @@ } var upiCode = result.Replace("/r", ""); ; short lastnum = 0;//æ¯å¦æ«æ¿ short isrotate = 0;//æ¯å¦æè½¬ short placeX = 0; short placeY = 0; short placeZ = 0; //short isrotate = 0;//æ¯å¦æè½¬ //short placeX = 0; //short placeY = 0; //short placeZ = 0; string place = ""; using (WmsDBModel wmsDB = new WmsDBModel()) { @@ -83,10 +83,10 @@ SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; continue; } isrotate = short.Parse(upiObj.Info17); placeX = (short)upiObj.MachineXCenter; placeY = (short)upiObj.MachineYCenter; placeZ = (short)upiObj.MachineZCenter; //isrotate = short.Parse(upiObj.Info17); //placeX = (short)upiObj.MachineXCenter; //placeY = (short)upiObj.MachineYCenter; //placeZ = (short)upiObj.MachineZCenter; if (upiObj.UpiStatus == (int)UpiStatusEnum.å·²ç å || upiObj.UpiStatus == (int)UpiStatusEnum.ç åä¸) { continue; CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/1¡¢DataProcess_BZ21.cs
ÎļþÃû´Ó CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/DataProcess_BZ21.cs ÐÞ¸Ä @@ -4,6 +4,8 @@ using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; using iWareModel.Entity.MES; using iWareModel.EnumType.WMS; using iWareSql.DataAccess; using iWareSql.WmsDBModel; using Newtonsoft.Json.Linq; @@ -65,8 +67,8 @@ SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()}-请æ±äºè§£ç ï¼ä½æ¯ç»ææ¯ç©ºç,æ¤æ¬¡å¾ªç¯ç»æ"; continue; } short cartonwidth = 0;//纸箱宽 short cartonhigh = 0;//çº¸ç®±é« //short cartonwidth = 0;//纸箱宽 //short cartonhigh = 0;//çº¸ç®±é« string place = "22"; using (WmsDBModel wmsDB = new WmsDBModel()) { @@ -85,62 +87,14 @@ } //string upi = "LS070700101B0001GS"; //è°ç¨åºçº¸æºæ¥å£ var res = new HTTPService("http://172.17.1.22:44374/api/LuLi/").getContent<Respone>("cartons-machine?PackageCode=" + upiObj.PackageCode, Guid.NewGuid(), 10000); if (res.iState == 0) { /* var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); if (papertable != null) { papertable.PushStatus = (int)PushStatusEnum.PushSuccess; papertable.ApiMessage = res.message; papertable.PushNum++; } else { var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); papercut.ApiMessage = res.message; papercut.ApiMessage = ""; papercut.PushNum = 1; papercut.PushStatus = (int)PushStatusEnum.PushSuccess; papercut.PushStatus = (int)PushStatusEnum.NotPush; papercut.CreateTime = papercut.UpdateTime = DateTime.Now; wmsDB.mes_push_papercut.Add(papercut); } //*/ var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); papercut.ApiMessage = res.message; papercut.PushNum = 1; papercut.PushStatus = (int)PushStatusEnum.PushSuccess; wmsDB.mes_push_papercut.Add(papercut); } else { /* var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); if (papertable != null) { papertable.PushStatus = (int)PushStatusEnum.PushFail; papertable.ApiMessage = res.message; papertable.PushNum++; } else { var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); papercut.ApiMessage = res.message; papercut.PushNum = 1; papercut.PushStatus = (int)PushStatusEnum.PushFail; wmsDB.mes_push_papercut.Add(papercut); } //*/ var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); papercut.ApiMessage = res.message; papercut.PushNum = 1; papercut.PushStatus = (int)PushStatusEnum.PushFail; wmsDB.mes_push_papercut.Add(papercut); continue; } //æ´æ°è¡¨ var mesgather = wmsDB.mes_package_gather.Where(x => x.PackageCode == upiObj.PackageCode).FirstOrDefault(); if (mesgather != null) @@ -148,11 +102,11 @@ mesgather.AreaCode = (int)AreaCodeEnum.åå è£ååº; mesgather.UpiStatus = (int)UpiStatusEnum.å·²åå ; } var upilist = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); var upilength = upilist.Max(x => x.Length); var upiwidth = upilist.Max(x => x.Width); cartonhigh = (short)upiObj.Info3; cartonwidth = (short)upiObj.Info2; //var upilist = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); //var upilength = upilist.Max(x => x.Length); //var upiwidth = upilist.Max(x => x.Width); //cartonhigh = (short)upiObj.Info3; //cartonwidth = (short)upiObj.Info2; upiObj.UpiStatus = (int)UpiStatusEnum.å·²åå ; upiObj.AreaCode = (int)AreaCodeEnum.åå è£ååº; //è®°å½ä»»å¡ @@ -189,10 +143,10 @@ PlanNo = upiObj.PlanNo, OrderId = upiObj.OrderId, PackageCode = upiObj.PackageCode, RbTaskType = (int)RbTaskTypeEnum.夹æ¿ä»»å¡, RbTaskTypeEnumName = RbTaskTypeEnum.夹æ¿ä»»å¡.ToString(), TaskStatus = (int)TaskStatusEnum.å·²ä¸å, TaskStatusName = TaskStatusEnum.å·²ä¸å.ToString(), RbTaskType = (int)RbTaskTypeEnum.åå ä»»å¡, RbTaskTypeEnumName = RbTaskTypeEnum.åå ä»»å¡.ToString(), TaskStatus = (int)TaskStatusEnum.æ°å»º, TaskStatusName = TaskStatusEnum.æ°å»º.ToString(), TaskMsg = "夹æ¿", CreateTime = DateTime.Now, CreateUserName = "CC", @@ -237,6 +191,7 @@ continue; } /* using (StationServiceClient client = new StationServiceClient()) { @@ -252,6 +207,7 @@ Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå ¥åºä»»å¡ æå,WriteInStoreTaskInfoAsyncï¼åæ°: ç«ç¹{rgvLocation}"); } } //*/ WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "BZ21", "åå "); @@ -269,91 +225,7 @@ } } } /// <summary> /// åmesæ¨éå è£ å®æ /// </summary> public static void PushPackageCode() { while (true) { Thread.Sleep(2000); using (WmsDBModel edm = new WmsDBModel()) { var value = edm.mes_push_packagecode.Where(x => x.PushStatus == 0 || x.PushStatus == 1).FirstOrDefault(); if (value != null) { PushPackageCodeInput input = new PushPackageCodeInput(); input.PackageCode = value.PackageCode; var res = HttpHelper.GetHttpResponse<PushPackageCodeInput, Respone>(" ", input, 10000); if (res.iState == 0) { value.PushStatus = (int)PushStatusEnum.PushSuccess; value.ApiMessage = res.message; } else { value.PushStatus = (int)PushStatusEnum.Pushing; value.PushNum++; value.ApiMessage += res.message; if (value.PushNum == 3) { value.PushStatus = (int)PushStatusEnum.PushFail; } } edm.SaveChanges(); } } } } public class PushPackageCodeInput { public string PackageCode { get; set; } } public class Respone { /// <summary> /// è¿åç /// </summary> public int iState { get; set; } /// <summary> /// è¿åæ¶æ¯ /// </summary> public string message { get; set; } /// <summary> /// èªå®ä¹è¿å /// </summary> public string data { get; set; } } /// <summary> /// æ¨éç¶æ /// </summary> public enum PushStatusEnum { /// <summary> /// æªæ¨é /// </summary> [Description("æªæ¨é")] NotPush = 0, /// <summary> /// æ¨éä¸ /// </summary> [Description("æ¨éä¸")] Pushing = 1, /// <summary> /// æ¨éæå /// </summary> [Description("æ¨éæå")] PushSuccess = 2, /// <summary> /// æ¨é失败 /// </summary> [Description("æ¨é失败")] PushFail = 3, } } } CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/2¡¢DataProcess_BZ21_IssueTask.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,115 @@ 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.Reflection.Emit; 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> /// ä¸ååå ä»»å¡ /// </summary> public static class DataProcess_BZ21_IssueTask { public static async void Handler() { var alertMsg = ""; LogType logType = LogType.DataProcess_BZ21_IssueTask; while (true) { Thread.Sleep(1000);//ä¼ç 2ç§ï¼å°ä¼ç åå°åé¢ï¼æ¯ä¸ºäºä¸é¢çcontinueæ¹æ³æ§è¡å䏿¾ç¤ºé误信æ¯çæç¤ºï¼ï¼ï¼ãEditBy shaocx,2022-05-24ã SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = string.Empty; try {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask && if (SystemValue.isStartedModel) { var rgvLocation = StationLocationEnum.BZ21.ToString(); using (WmsDBModel wmsDB = new WmsDBModel()) { //ä¸éè¦éªè¯ï¼æä»»å¡å°±ä¸åï¼æé«æç /* //è¦æ¯æå·²ä¸åçä»»å¡ï¼å°±ä¸è¦æ§è¡ var isValidate = TaskHandler.ValidateIssueOutTaskForRobotBuffer(wmsDB); if (!isValidate) { SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = $"{rgvLocation.ToString()}-æâå·²ä¸åâçä»»å¡ï¼ä¸è½å¤ç,æ¤æ¬¡å¾ªç¯ç»æ"; continue; } //*/ var task = wmsDB.wms_rbline_task.Where(x => x.RbTaskType == (int)RbTaskTypeEnum.åå ä»»å¡ && x.TaskStatus == (int)TaskStatusEnum.æ°å»º).OrderBy(x => x.CreateTime).FirstOrDefault(); if (task == null) { SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = $"{rgvLocation.ToString()},æ ¹æ® æ²¡ææ¾å° æ°å»º çä»»å¡ "; FormCC.currHandlerPackageCodeForIssueOutboundTask = ""; continue; } var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == task.UPI).FirstOrDefault(); if (upiObj == null) { SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = $"{rgvLocation.ToString()},æ ¹æ®UPI:{task.UPI}æ²¡ææ¾å°å¯¹è±¡ "; continue; } short cartonwidth = 0;//纸箱宽 short cartonhigh = 0;//çº¸ç®±é« var upilist = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); var upilength = upilist.Max(x => x.Length); var upiwidth = upilist.Max(x => x.Width); cartonhigh = (short)upiObj.Info3; cartonwidth = (short)upiObj.Info2; //è¿éä¸å ä»»å¡ using (StationServiceClient client = new StationServiceClient()) { var plcres = client.WriteSurroundTaskInfo((int)EDevice.Station, rgvLocation, short.Parse(task.TaskNo), (short)upilength, (short)upiwidth, cartonhigh, cartonwidth, 0, 0); if (!plcres.result) { SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = $"{rgvLocation.ToString()}-ä¸åå ¥åºä»»å¡ 失败,WriteInStoreTaskInfoAsync è¿å:{plcres.resMsg}"; continue; } else { Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸åå ¥åºä»»å¡ æå,WriteInStoreTaskInfoAsyncï¼åæ°: ç«ç¹{rgvLocation}"); } } task.TaskStatus = (int)TaskStatusEnum.å·²ä¸å; task.TaskStatusName = TaskStatusEnum.å·²ä¸å.ToString(); wmsDB.SaveChanges(); } } } catch (Exception ex) { SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += " åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; Log4NetHelper.WriteErrorLog(logType, " åºç°å¼å¸¸ï¼" + ex.Message, ex); } } } } } CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/3¡¢DataProcess_BZ21_FinishTask.cs
ÎļþÃû´Ó CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/DataProcess_BZ21_FinishTask.cs ÐÞ¸Ä @@ -52,7 +52,7 @@ { var task = wmsDB.wms_rbline_task.Where(x => x.TaskNo == obj.R_SurrouondTaskNo.ToString() && x.RbTaskType == (int)RbTaskTypeEnum.夹æ¿ä»»å¡ && x.RbTaskType == (int)RbTaskTypeEnum.åå ä»»å¡ ).OrderByDescending(x=>x.Id).FirstOrDefault(); if (task == null) { CC/iWareCC_ASRS/WmsTask/MainTaskDecompose.cs
@@ -29,7 +29,7 @@ { try { SystemWarningMsg._lbl_Alert_MainTaskDecompose = ""; SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = ""; if (SystemValue.isAllowRuning_MainTaskDecompose && SystemValue.isStartedModel) { using (DbModel context = new DbModel()) @@ -58,7 +58,7 @@ var errMsg = ""; if (!MyExtendHelper.IsNoFinishedOutTaskGroupbyArea(context, ref errMsg)) { SystemWarningMsg._lbl_Alert_MainTaskDecompose += "ä¸å 许åè§£åºåºä»»å¡:" + errMsg + SysGloble.SPLIT_STR; SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "ä¸å 许åè§£åºåºä»»å¡:" + errMsg + SysGloble.SPLIT_STR; isAllowDecomposeOutTask = false; } //var _list = MyExtendHelper.GetHasCatogryStationCodeAreaList(); @@ -66,7 +66,7 @@ var _list = MyExtendHelper.GetHasCatogryAndNoFinishedOutStoreTaskStationCodeAreaList(context, ref dict_hasNoFinishedOutStoreTaskStationCodeAreaList); if (_list != null && _list.Count >= 2) { SystemWarningMsg._lbl_Alert_MainTaskDecompose += "ä¸å 许åè§£åºåºä»»å¡:å个åºåºå£ç®åæ" + _list.Count + "个被å ç¨äº,è¶ è¿äºè®¾å®å¼:" + 2 + SysGloble.SPLIT_STR; SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "ä¸å 许åè§£åºåºä»»å¡:å个åºåºå£ç®åæ" + _list.Count + "个被å ç¨äº,è¶ è¿äºè®¾å®å¼:" + 2 + SysGloble.SPLIT_STR; isAllowDecomposeOutTask = false; } if (isAllowDecomposeOutTask) @@ -82,7 +82,7 @@ } catch (Exception ex) { SystemWarningMsg._lbl_Alert_MainTaskDecompose += "å解线ç¨åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "å解线ç¨åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; Log4NetHelper.WriteErrorLog(LogType.CCWCFService, "HandlerIssuingTaskåºç°å¼å¸¸ï¼" + ex.Message, ex); } Thread.Sleep(2000);//ä¼ç 2ç§ @@ -123,12 +123,12 @@ result = SingleHandlerForOutTask(context, doMain); if (result.result) context.SaveChanges(); SystemWarningMsg._lbl_Alert_MainTaskDecompose = result.resMsg + SysGloble.SPLIT_STR; SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask = result.resMsg + SysGloble.SPLIT_STR; } } else { SystemWarningMsg._lbl_Alert_MainTaskDecompose += "没æè¦åè§£çä»»å¡" + SysGloble.SPLIT_STR; SystemWarningMsg._lbl_Alert_DataProcess_BZ21_IssueTask += "没æè¦åè§£çä»»å¡" + SysGloble.SPLIT_STR; } } CC/iWareCC_ASRS/WmsTask/OutTaskRetryToMes.cs
ÎļþÒÑɾ³ý CC/iWareCC_ASRS/WmsTask/PushPackageCodeToMes.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,81 @@ using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; using iWareModel.Entity.MES; using iWareModel.EnumType.WMS; using iWareSql; using iWareSql.DataAccess; using iWareSql.DBModel; using iWareSql.WmsDBModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using XiGang.Core.Model; namespace iWareCC { /// <summary> /// æ¨éMES- å è£ å®ææ¥å£ /// </summary> public static class PushPackageCodeToMes { public static string Mes_Api = ConfigHelper.GetConfigString("Mes_Api"); public static string Mes_Api_packagecompleted = ConfigHelper.GetConfigString("Mes_Api_packagecompleted"); public static void Handler() { LogType logType = LogType.PushPackageCodeToMes; while (true) { try { var errMsg = ""; //if (SystemValue.isAllowRuning_OutTaskRetryToMes && SystemValue.isStartedModel) if (SystemValue.isStartedModel) { using (WmsDBModel edm = new WmsDBModel()) { var value = edm.mes_push_packagecode.Where(x => x.PushStatus == 0 || x.PushStatus == 1).FirstOrDefault(); if (value != null) { var res = new HTTPService(Mes_Api).getContent<Respone>(Mes_Api_packagecompleted + "?PackageCode=" + value.PackageCode, Guid.NewGuid(), 10000); value.UpdateTime = DateTime.Now; if (res.iState == 0) { value.PushStatus = (int)PushStatusEnum.PushSuccess; value.ApiMessage = res.message; } else { value.PushStatus = (int)PushStatusEnum.Pushing; value.PushNum++; value.ApiMessage += res.message; if (value.PushNum == 3) { value.PushStatus = (int)PushStatusEnum.PushFail; } } edm.SaveChanges(); } else { SystemWarningMsg._lbl_Alert_PushPackageCodeToMes = "没æè¦å¤ççæ°æ®"; } } } } catch (Exception ex) { SystemWarningMsg._lbl_Alert_PushPackageCodeToMes = " æ¨éMES- å è£ å®ææ¥å£ åºç°å¼å¸¸:" + ex.Message; Log4NetHelper.WriteErrorLog(logType, " æ¨éMES- å è£ å®ææ¥å£ åºç°å¼å¸¸ï¼" + ex.Message, ex); } Thread.Sleep(1000); } } } } CC/iWareCC_ASRS/WmsTask/PushPaperCutToMes.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,81 @@ using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; using iWareModel.Entity.MES; using iWareModel.EnumType.WMS; using iWareSql; using iWareSql.DataAccess; using iWareSql.DBModel; using iWareSql.WmsDBModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using XiGang.Core.Model; namespace iWareCC { /// <summary> /// æ¨éMES- åºçº¸æºæ¥å£ /// </summary> public static class PushPaperCutToMes { public static string Mes_Api = ConfigHelper.GetConfigString("Mes_Api"); public static string Mes_Api_papercut = ConfigHelper.GetConfigString("Mes_Api_papercut"); public static void Handler() { LogType logType = LogType.PushPaperCutToMes; while (true) { try { var errMsg = ""; //if (SystemValue.isAllowRuning_OutTaskRetryToMes && SystemValue.isStartedModel) if (SystemValue.isStartedModel) { using (WmsDBModel edm = new WmsDBModel()) { var value = edm.mes_push_papercut.Where(x => x.PushStatus == 0 || x.PushStatus == 1).FirstOrDefault(); if (value != null) { var res = new HTTPService(Mes_Api).getContent<Respone>(Mes_Api_papercut + "?PackageCode=" + value.PackageCode, Guid.NewGuid(), 10000); value.UpdateTime = DateTime.Now; if (res.iState == 0) { value.PushStatus = (int)PushStatusEnum.PushSuccess; value.ApiMessage = res.message; } else { value.PushStatus = (int)PushStatusEnum.Pushing; value.PushNum++; value.ApiMessage += res.message; if (value.PushNum == 3) { value.PushStatus = (int)PushStatusEnum.PushFail; } } edm.SaveChanges(); } else { SystemWarningMsg._lbl_Alert_PushPaperCutToMes = "没æè¦å¤ççæ°æ®"; } } } } catch (Exception ex) { SystemWarningMsg._lbl_Alert_PushPaperCutToMes = " æ¨éMES- å è£ å®ææ¥å£ åºç°å¼å¸¸:" + ex.Message; Log4NetHelper.WriteErrorLog(logType, " æ¨éMES- å è£ å®ææ¥å£ åºç°å¼å¸¸ï¼" + ex.Message, ex); } Thread.Sleep(1000); } } } } CC/iWareCC_ASRS/iWareCC.csproj
@@ -172,15 +172,17 @@ <Compile Include="ThreadService\03_BZ12%28æºå¨äººç å å·¥ä½%29\2ãDataProcess_BZ12_IssueTask.cs" /> <Compile Include="ThreadService\03_BZ12%28æºå¨äººç å å·¥ä½%29\1ãDataProcess_BZ12.cs" /> <Compile Include="ThreadService\03_BZ12%28æºå¨äººç å å·¥ä½%29\3ãDataProcess_BZ12_FinishTask.cs" /> <Compile Include="ThreadService\04_BZ21ï¼æ¬è¿æ´åæºå¨äººï¼\DataProcess_BZ21.cs" /> <Compile Include="ThreadService\04_BZ21ï¼æ¬è¿æ´åæºå¨äººï¼\DataProcess_BZ21_FinishTask.cs" /> <Compile Include="ThreadService\04_BZ21ï¼æ¬è¿æ´åæºå¨äººï¼\2ãDataProcess_BZ21_IssueTask.cs" /> <Compile Include="ThreadService\04_BZ21ï¼æ¬è¿æ´åæºå¨äººï¼\1ãDataProcess_BZ21.cs" /> <Compile Include="ThreadService\04_BZ21ï¼æ¬è¿æ´åæºå¨äººï¼\3ã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" /> <Compile Include="WmsTask\MainTaskDecompose_ZPRK.cs" /> <Compile Include="WmsTask\PrintHandler.cs" /> <Compile Include="WmsTask\OutTaskRetryToMes.cs" /> <Compile Include="WmsTask\PushPaperCutToMes.cs" /> <Compile Include="WmsTask\PushPackageCodeToMes.cs" /> <Compile Include="WmsTask\EmptySalverTransferTask.cs" /> <Compile Include="WmsTask\MainTaskDecompose.cs" /> <EmbeddedResource Include="FormCC.resx"> CC/iWareCommon/Utils/Log4Net/LogType.cs
@@ -46,15 +46,15 @@ /// <summary> /// å åæºçPLCæ°æ®è®¿é®æå¡æ¥å¿ /// </summary> SrmSdaService = 203, PushPaperCutToMes = 203, /// <summary> /// è¾é线çPLCæ°æ®è®¿é®æå¡æ¥å¿ /// </summary> LineSdaService = 204, PushPackageCodeToMes = 204, /// <summary> /// RGVçPLCæ°æ®è®¿é®æå¡æ¥å¿ /// </summary> RgvSdaService = 205, DataProcess_BZ21_IssueTask = 205, #endregion CC/iWareCommon/log4net_iWare.config
@@ -526,8 +526,8 @@ </appender> <!-- å åæºçPLCæ°æ®è®¿é®æå¡æ¥å¿ ãä¿¡æ¯ãæ¥å¿--> <appender name="SrmSdaService_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\SrmSdaService_Info\\" /> <appender name="PushPaperCutToMes_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\PushPaperCutToMes_Info\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -537,13 +537,13 @@ <param name="ConversionPattern" value="%næ¶æ¯æ¶é´ï¼%d [%t] %næ¶æ¯çº§å«ï¼%-5p %næ¶ æ¯ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="SrmSdaService_Info" /> <loggerToMatch value="PushPaperCutToMes_Info" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> <!--å åæºçPLCæ°æ®è®¿é®æå¡æ¥å¿ ãéè¯¯ãæ¥å¿--> <appender name="SrmSdaService_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\SrmSdaService_Error\\" /> <appender name="PushPaperCutToMes_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\PushPaperCutToMes_Error\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -553,14 +553,14 @@ <param name="ConversionPattern" value="%nå¼å¸¸æ¶é´ï¼%d [%t] %nå¼å¸¸çº§å«ï¼%-5p %nå¼ å¸¸ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="SrmSdaService_Error" /> <loggerToMatch value="PushPaperCutToMes_Error" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> <!-- è¾é线çPLCæ°æ®è®¿é®æå¡æ¥å¿ ãä¿¡æ¯ãæ¥å¿--> <appender name="LineSdaService_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\LineSdaService_Info\\" /> <appender name="PushPackageCodeToMes_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\PushPackageCodeToMes_Info\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -570,13 +570,13 @@ <param name="ConversionPattern" value="%næ¶æ¯æ¶é´ï¼%d [%t] %næ¶æ¯çº§å«ï¼%-5p %næ¶ æ¯ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="LineSdaService_Info" /> <loggerToMatch value="PushPackageCodeToMes_Info" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> <!--è¾é线çPLCæ°æ®è®¿é®æå¡æ¥å¿ ãéè¯¯ãæ¥å¿--> <appender name="LineSdaService_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\LineSdaService_Error\\" /> <appender name="PushPackageCodeToMes_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\PushPackageCodeToMes_Error\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -586,13 +586,13 @@ <param name="ConversionPattern" value="%nå¼å¸¸æ¶é´ï¼%d [%t] %nå¼å¸¸çº§å«ï¼%-5p %nå¼ å¸¸ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="LineSdaService_Error" /> <loggerToMatch value="PushPackageCodeToMes_Error" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> <!-- RGVçPLCæ°æ®è®¿é®æå¡æ¥å¿ ãä¿¡æ¯ãæ¥å¿--> <appender name="RgvSdaService_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\RgvSdaService_Info\\" /> <appender name="DataProcess_BZ21_IssueTask_Info" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\DataProcess_BZ21_IssueTask_Info\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -602,13 +602,13 @@ <param name="ConversionPattern" value="%næ¶æ¯æ¶é´ï¼%d [%t] %næ¶æ¯çº§å«ï¼%-5p %næ¶ æ¯ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="RgvSdaService_Info" /> <loggerToMatch value="DataProcess_BZ21_IssueTask_Info" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> <!--RGVçPLCæ°æ®è®¿é®æå¡æ¥å¿ ãéè¯¯ãæ¥å¿--> <appender name="RgvSdaService_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\RgvSdaService_Error\\" /> <appender name="DataProcess_BZ21_IssueTask_Error" type="log4net.Appender.RollingFileAppender"> <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\DataProcess_BZ21_IssueTask_Error\\" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <staticLogFileName value="false" /> @@ -618,7 +618,7 @@ <param name="ConversionPattern" value="%nå¼å¸¸æ¶é´ï¼%d [%t] %nå¼å¸¸çº§å«ï¼%-5p %nå¼ å¸¸ ç±»ï¼%c [%x] %n%m %n "/> </layout> <filter type="log4net.Filter.LoggerMatchFilter"> <loggerToMatch value="RgvSdaService_Error" /> <loggerToMatch value="DataProcess_BZ21_IssueTask_Error" /> </filter> <filter type="log4net.Filter.DenyAllFilter" /> </appender> @@ -664,14 +664,14 @@ <appender-ref ref="SdaService_Info"/> <appender-ref ref="SdaService_Error"/> <!--å åæºçPLCæ°æ®è®¿é®æå¡æ¥å¿--> <appender-ref ref="SrmSdaService_Info"/> <appender-ref ref="SrmSdaService_Error"/> <appender-ref ref="PushPaperCutToMes_Info"/> <appender-ref ref="PushPaperCutToMes_Error"/> <!--è¾é线çPLCæ°æ®è®¿é®æå¡æ¥å¿--> <appender-ref ref="LineSdaService_Info"/> <appender-ref ref="LineSdaService_Error"/> <appender-ref ref="PushPackageCodeToMes_Info"/> <appender-ref ref="PushPackageCodeToMes_Error"/> <!--RGVçPLCæ°æ®è®¿é®æå¡æ¥å¿--> <appender-ref ref="RgvSdaService_Info"/> <appender-ref ref="RgvSdaService_Error"/> <appender-ref ref="DataProcess_BZ21_IssueTask_Info"/> <appender-ref ref="DataProcess_BZ21_IssueTask_Error"/> </root> </log4net> </configuration> CC/iWareModel/Entity/MES/Respone.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,26 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWareModel.Entity.MES { public class Respone { /// <summary> /// è¿åç /// </summary> public int iState { get; set; } /// <summary> /// è¿åæ¶æ¯ /// </summary> public string message { get; set; } /// <summary> /// èªå®ä¹è¿å /// </summary> public string data { get; set; } } } CC/iWareModel/EnumType/WMS/PushStatusEnum.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,39 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWareModel.EnumType.WMS { /// <summary> /// æ¨éç¶æ /// </summary> public enum PushStatusEnum { /// <summary> /// æªæ¨é /// </summary> [Description("æªæ¨é")] NotPush = 0, /// <summary> /// æ¨éä¸ /// </summary> [Description("æ¨éä¸")] Pushing = 1, /// <summary> /// æ¨éæå /// </summary> [Description("æ¨éæå")] PushSuccess = 2, /// <summary> /// æ¨é失败 /// </summary> [Description("æ¨é失败")] PushFail = 3, } } CC/iWareModel/EnumType/WMS/RbTaskTypeEnum.cs
@@ -30,10 +30,10 @@ ç æ¿ä»»å¡ = 3, /// <summary> /// 夹æ¿ä»»å¡ /// åå ä»»å¡ /// </summary> [Description("夹æ¿ä»»å¡")] 夹æ¿ä»»å¡ = 4 [Description("åå ä»»å¡")] åå ä»»å¡ = 4 } } CC/iWareModel/iWareModel.csproj
@@ -60,6 +60,7 @@ <Compile Include="Entity\MES\MesUpdateOnlineStatusParamModel.cs" /> <Compile Include="Entity\MES\MesRetModel.cs" /> <Compile Include="Entity\MES\Mes_BtjReceiveModel.cs" /> <Compile Include="Entity\MES\Respone.cs" /> <Compile Include="Entity\QueryParam.cs" /> <Compile Include="Entity\ResponseListDataEntity.cs" /> <Compile Include="Entity\ResponseListDataPageEntity.cs" /> @@ -114,6 +115,7 @@ <Compile Include="EnumType\WMS\AreaCodeEnum.cs" /> <Compile Include="EnumType\WMS\PrintClassifyEnum.cs" /> <Compile Include="EnumType\WMS\PrintTypeEnum.cs" /> <Compile Include="EnumType\WMS\PushStatusEnum.cs" /> <Compile Include="EnumType\WMS\RbRunModeEnum.cs" /> <Compile Include="EnumType\WMS\RbTaskTypeEnum.cs" /> <Compile Include="EnumType\WMS\StockStatusEnum.cs" /> CC/iWareSql/DataAccess/TaskHandler.cs
@@ -92,7 +92,7 @@ public static bool ValidateIssueTaskForBZ21(WmsDBModel.WmsDBModel wmsDB, string str) { var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus == (int)TaskStatusEnum.å·²ä¸å && x.RbTaskType == (int)RbTaskTypeEnum.夹æ¿ä»»å¡ && x.UPI == str).ToList(); && x.RbTaskType == (int)RbTaskTypeEnum.åå ä»»å¡ && x.UPI == str).ToList(); if (isExist?.Count() > 0) { return false; LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/ReportCenter/RbTaskTypeEnum.cs
@@ -27,9 +27,9 @@ ç æ¿ä»»å¡ = 3, /// <summary> /// 夹æ¿ä»»å¡ /// åå ä»»å¡ /// </summary> [Description("夹æ¿ä»»å¡")] 夹æ¿ä»»å¡ = 4 [Description("åå ä»»å¡")] åå ä»»å¡ = 4 }