CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/FormCC.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/FormCC.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/2、DataProcess_RobotBuffer_IssueOutboundTask.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/4、DataProcess_RobotBuffer_ForceOutbound.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
CC/iWareCC_ASRS/iWareCC.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SDA/iWareSda/App.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
@@ -194,6 +194,9 @@ private short R_DestinationField; [System.Runtime.Serialization.OptionalFieldAttribute()] private bool R_ForceOutboundModeField; [System.Runtime.Serialization.OptionalFieldAttribute()] private bool R_InboundFinishField; [System.Runtime.Serialization.OptionalFieldAttribute()] @@ -290,6 +293,19 @@ if ((this.R_DestinationField.Equals(value) != true)) { this.R_DestinationField = value; this.RaisePropertyChanged("R_Destination"); } } } [System.Runtime.Serialization.DataMemberAttribute()] public bool R_ForceOutboundMode { get { return this.R_ForceOutboundModeField; } set { if ((this.R_ForceOutboundModeField.Equals(value) != true)) { this.R_ForceOutboundModeField = value; this.RaisePropertyChanged("R_ForceOutboundMode"); } } } @@ -498,7 +514,7 @@ private int W_Destination_InField; [System.Runtime.Serialization.OptionalFieldAttribute()] private string W_Destination_OutField; private int W_Destination_OutField; [System.Runtime.Serialization.OptionalFieldAttribute()] private short W_HeightField; @@ -621,12 +637,12 @@ } [System.Runtime.Serialization.DataMemberAttribute()] public string W_Destination_Out { public int W_Destination_Out { get { return this.W_Destination_OutField; } set { if ((object.ReferenceEquals(this.W_Destination_OutField, value) != true)) { if ((this.W_Destination_OutField.Equals(value) != true)) { this.W_Destination_OutField = value; this.RaisePropertyChanged("W_Destination_Out"); } CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd
@@ -12,6 +12,7 @@ <xs:element minOccurs="0" name="R_AlarmCode" type="xs:short" /> <xs:element minOccurs="0" name="R_AlarmCodeMsg" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="R_Destination" type="xs:short" /> <xs:element minOccurs="0" name="R_ForceOutboundMode" type="xs:boolean" /> <xs:element minOccurs="0" name="R_InboundFinish" type="xs:boolean" /> <xs:element minOccurs="0" name="R_InboundNumber" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="R_Inbound_TaskID" type="xs:short" /> @@ -41,7 +42,7 @@ <xs:element minOccurs="0" name="W_CartonWidth" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="W_DataFinish" type="xs:boolean" /> <xs:element minOccurs="0" name="W_Destination_In" type="xs:int" /> <xs:element minOccurs="0" name="W_Destination_Out" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="W_Destination_Out" type="xs:int" /> <xs:element minOccurs="0" name="W_Height" type="xs:short" /> <xs:element minOccurs="0" name="W_InboundFinishConfirm" type="xs:boolean" /> <xs:element minOccurs="0" name="W_Inbound_TaskID" type="xs:short" /> CC/iWareCC_ASRS/FormCC.Designer.cs
@@ -470,6 +470,10 @@ this.dataGridViewTextBoxColumn63 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.btn_Find_OutTaskRetryToMes = new System.Windows.Forms.Button(); this.lbl_RobotMode = new System.Windows.Forms.Label(); this.tb_PackageCode = new System.Windows.Forms.TextBox(); this.label23 = new System.Windows.Forms.Label(); this.button24 = new System.Windows.Forms.Button(); this.lbl_currHandlerPackageCodeForIssueOutboundTask = new System.Windows.Forms.Label(); this.tPTransAsrs.SuspendLayout(); this.panel14.SuspendLayout(); this.panel15.SuspendLayout(); @@ -2801,6 +2805,7 @@ // // panel_Model // this.panel_Model.Controls.Add(this.lbl_currHandlerPackageCodeForIssueOutboundTask); this.panel_Model.Controls.Add(this.lbl_RobotMode); this.panel_Model.Controls.Add(this.rBOnlyIn); this.panel_Model.Controls.Add(this.lbl_IsSimulationPLC); @@ -5474,6 +5479,9 @@ // // tabPage3 // this.tabPage3.Controls.Add(this.button24); this.tabPage3.Controls.Add(this.tb_PackageCode); this.tabPage3.Controls.Add(this.label23); this.tabPage3.Controls.Add(this.button23); this.tabPage3.Controls.Add(this.tb_wlm); this.tabPage3.Controls.Add(this.label22); @@ -5833,6 +5841,44 @@ this.lbl_RobotMode.Size = new System.Drawing.Size(127, 15); this.lbl_RobotMode.TabIndex = 12; this.lbl_RobotMode.Text = "ç¼å岿ºå¨äººæ¨¡å¼"; // // tb_PackageCode // this.tb_PackageCode.Location = new System.Drawing.Point(856, 427); this.tb_PackageCode.Name = "tb_PackageCode"; this.tb_PackageCode.Size = new System.Drawing.Size(339, 25); this.tb_PackageCode.TabIndex = 154; // // label23 // this.label23.AutoSize = true; this.label23.Location = new System.Drawing.Point(794, 437); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(45, 15); this.label23.TabIndex = 153; this.label23.Text = "å å·:"; // // button24 // this.button24.BackColor = System.Drawing.Color.Aqua; this.button24.Location = new System.Drawing.Point(817, 489); this.button24.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.button24.Name = "button24"; this.button24.Size = new System.Drawing.Size(155, 48); this.button24.TabIndex = 155; this.button24.Text = "强å¶è¯¥å å·åºåº"; this.button24.UseVisualStyleBackColor = false; this.button24.Click += new System.EventHandler(this.button24_Click); // // lbl_currHandlerPackageCodeForIssueOutboundTask // this.lbl_currHandlerPackageCodeForIssueOutboundTask.AutoSize = true; this.lbl_currHandlerPackageCodeForIssueOutboundTask.Location = new System.Drawing.Point(275, 693); this.lbl_currHandlerPackageCodeForIssueOutboundTask.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbl_currHandlerPackageCodeForIssueOutboundTask.Name = "lbl_currHandlerPackageCodeForIssueOutboundTask"; this.lbl_currHandlerPackageCodeForIssueOutboundTask.Size = new System.Drawing.Size(172, 15); this.lbl_currHandlerPackageCodeForIssueOutboundTask.TabIndex = 14; this.lbl_currHandlerPackageCodeForIssueOutboundTask.Text = "å½åä¸ååºåºä»»å¡çå å·"; // // FormCC // @@ -6347,6 +6393,10 @@ private System.Windows.Forms.Label label22; private System.Windows.Forms.Button button23; private System.Windows.Forms.Label lbl_RobotMode; private System.Windows.Forms.Button button24; private System.Windows.Forms.TextBox tb_PackageCode; private System.Windows.Forms.Label label23; private System.Windows.Forms.Label lbl_currHandlerPackageCodeForIssueOutboundTask; } } CC/iWareCC_ASRS/FormCC.cs
@@ -38,6 +38,11 @@ public static bool IsAllowRunOutMode = false; /// <summary> /// å½åä¸ååºåºä»»å¡çå å· /// </summary> public static string currHandlerPackageCodeForIssueOutboundTask = ""; /// <summary> /// 1å·å åæºå ¥åºå£æ«ç 强å¶éªè¯éè¿ /// </summary> public static bool Srm1_IN_SMQZYZTG = false; @@ -1831,6 +1836,7 @@ } this.lbl_RobotMode.Text = "ç¼å岿ºå¨äººæ¨¡å¼:" + (IsAllowRunOutMode ? "åºåºæ¨¡å¼" : "å ¥åºæ¨¡å¼"); this.lbl_currHandlerPackageCodeForIssueOutboundTask.Text = "å½åä¸ååºåºä»»å¡çå å·:" + currHandlerPackageCodeForIssueOutboundTask; } } @@ -3535,5 +3541,22 @@ { } private void button24_Click(object sender, EventArgs e) { //强å¶è¯¥å å·åºåº var packageCode = this.tb_PackageCode.Text.Trim(); var alertMsg = ""; DataProcess_RobotBuffer_ForceOutbound.Handler(packageCode, ref alertMsg); if (!string.IsNullOrEmpty(alertMsg)) { MessageBox.Show("é误:" + alertMsg); } else { MessageBox.Show("å·²å¤ç"); } } } } CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/2¡¢DataProcess_RobotBuffer_IssueOutboundTask.cs
@@ -24,6 +24,7 @@ /// </summary> public static class DataProcess_RobotBuffer_IssueOutboundTask { public static async void Handler() { var alertMsg = ""; @@ -53,18 +54,37 @@ } //åå建æ¶é´ææ©çé£ä¸ªè¦åºåºçå if (string.IsNullOrEmpty(FormCC.currHandlerPackageCodeForIssueOutboundTask)) { var firstTask = wmsDB.wms_rbline_task.Where(x => x.RbTaskType == (int)RbTaskTypeEnum.åºåºä»»å¡ && x.TaskStatus == (int)TaskStatusEnum.æ°å»º).OrderBy(x => x.CreateTime).FirstOrDefault(); if (firstTask == null) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},æ ¹æ® æ²¡ææ¾å° æ°å»º çä»»å¡ "; FormCC.currHandlerPackageCodeForIssueOutboundTask = ""; continue; } FormCC.currHandlerPackageCodeForIssueOutboundTask = firstTask.PackageCode; } else { var firstTask = wmsDB.wms_rbline_task.Where(x => x.RbTaskType == (int)RbTaskTypeEnum.åºåºä»»å¡ && x.TaskStatus == (int)TaskStatusEnum.æ°å»º && x.PackageCode == FormCC.currHandlerPackageCodeForIssueOutboundTask ).OrderBy(x => x.CreateTime).FirstOrDefault(); if (firstTask == null) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},æ ¹æ® æ²¡ææ¾å° æ°å»º çä»»å¡ "; FormCC.currHandlerPackageCodeForIssueOutboundTask = ""; continue; } } var taskList = wmsDB.wms_rbline_task.Where(x => x.RbTaskType == (int)RbTaskTypeEnum.åºåºä»»å¡ && x.TaskStatus == (int)TaskStatusEnum.æ°å»º).Where(x => x.PackageCode == firstTask.PackageCode).OrderBy(x => x.CreateTime).ToList(); && x.TaskStatus == (int)TaskStatusEnum.æ°å»º).Where(x => x.PackageCode == FormCC.currHandlerPackageCodeForIssueOutboundTask).OrderBy(x => x.CreateTime).ToList(); if (taskList == null) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},æ ¹æ® æ²¡ææ¾å° æ°å»º çä»»å¡ "; CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/4¡¢DataProcess_RobotBuffer_ForceOutbound.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,102 @@ using Admin.NET.Application; using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; using iWareSql.DataAccess; using iWareSql.WmsDBModel; using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace iWareCC.ThreadService { /// <summary> /// æºå¨äººç¼åå² äººå·¥å¼ºå¶åºåº å¤ç /// </summary> public static class DataProcess_RobotBuffer_ForceOutbound { public static bool Handler(string packageCode, ref string alertMsg) { alertMsg = ""; LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound; try { var rgvLocation = StationLocationEnum.BZ39.ToString(); var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); if (obj.R_ForceOutboundMode == false) { alertMsg = "PLC䏿¯å¼ºå¶åºåºæ¨¡å¼"; return false; } using (WmsDBModel wmsDB = new WmsDBModel()) { List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.å¨åº && x.PackageCode == packageCode ).ToList(); foreach (var x in qunList) { x.StockStatus = (int)StockStatusEnum.人工强å¶å¾ åºåº; //çæåºåºä»»å¡ //è®°å½ä»»å¡ var _id = Yitter.IdGenerator.YitIdHelper.NextId(); var plcTaskNo = BusinessHelper.CreatePlcTaskIdForSrmTask(); var new_task = new wms_rbline_task() { Id = _id, TaskNo = plcTaskNo, UPI = x.Upi, Length = x.Length, Width = x.Width, Thk = x.Thk, IssueTime = DateTime.Now, PlanNo = x.PlanNo, OrderId = x.OrderId, PackageCode = x.PackageCode, PlaceCode = x.PlaceCode, RbTaskType = (int)RbTaskTypeEnum.åºåºä»»å¡, RbTaskTypeEnumName = RbTaskTypeEnum.åºåºä»»å¡.ToString(), TaskStatus = (int)TaskStatusEnum.æ°å»º, TaskStatusName = TaskStatusEnum.æ°å»º.ToString(), TaskMsg = "人工强å¶å¾ åºåº", CreateTime = DateTime.Now, CreateUserName = "CC", UpdateTime = DateTime.Now, UpdateUserName = "CC", }; wmsDB.wms_rbline_task.Add(new_task); var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB); place.PlaceStatus = (int)PlaceStatusEnum.éå®; Thread.Sleep(100); } wmsDB.SaveChanges(); } return true; } catch (Exception ex) { alertMsg = " åºç°å¼å¸¸:" + ex.Message; SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += " åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; Log4NetHelper.WriteErrorLog(logType, " åºç°å¼å¸¸ï¼" + ex.Message, ex); return false; } } } } CC/iWareCC_ASRS/iWareCC.csproj
@@ -156,6 +156,7 @@ <Compile Include="ThreadService\00_269å·¥ä½\DataProcess_269.cs" /> <Compile Include="ThreadService\01_BZ01å·¥ä½ï¼æ¸ ç°ï¼æ´æ¿åå·¥ä½ï¼\DataProcess_BZ01.cs" /> <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\DataProcess_RobotBuffer_ModeChange.cs" /> <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\Outbound\4ãDataProcess_RobotBuffer_ForceOutbound.cs" /> <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\Outbound\2ãDataProcess_RobotBuffer_IssueOutboundTask.cs" /> <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\Outbound\1ãDataProcess_RobotBuffer_AutoQiTaoOutbound.cs" /> <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\Outbound\3ãDataProcess_RobotBuffer_FinishTaskForOutbound.cs" /> SDA/iWareSda/App.config
@@ -4,8 +4,8 @@ <!-- è¯è¨é ç½® é ç½® 0 䏿 1 è±æ --> <add key="LanguageFlg" value="0"/> <!-- ç«ç¹çPLC é ç½® --> <!-- <add key="Station_Address" value="172.17.51.202"/> --> <add key="Station_Address" value="192.168.10.100"/> <add key="Station_Address" value="172.17.51.202"/> <!-- <add key="Station_Address" value="192.168.10.100"/> --> <add key="Station_Rack" value="0"/> <add key="Station_Slot" value="1"/> <add key="Station_Port" value="102"/> SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs
@@ -407,6 +407,12 @@ /// </summary> [Description("åºåºä»»å¡å·")] public short R_Outbound_TaskID { get; set; } /// <summary> /// 强å¶åºåºæ¨¡å¼ /// </summary> [Description("强å¶åºåºæ¨¡å¼")] public bool R_ForceOutboundMode { get; set; } } public class StationDBForReadComm @@ -467,5 +473,12 @@ [Description("åºåºä»»å¡å·")] public string R_Outbound_TaskID { get; set; } /// <summary> /// 强å¶åºåºæ¨¡å¼ /// </summary> [Description("强å¶åºåºæ¨¡å¼")] public string R_ForceOutboundMode { get; set; } } } SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
@@ -176,7 +176,8 @@ W_ReqOut = W_DBHeaderWithSeparate_BZ39 + "12.0", W_Destination_Out = W_DBHeaderWithSeparate_BZ39 + "14.0", W_Mode = W_DBHeaderWithSeparate_BZ39 + "18.0", W_OutboundFinishConfirm = W_DBHeaderWithSeparate_BZ39 + "0.2" W_OutboundFinishConfirm = W_DBHeaderWithSeparate_BZ39 + "0.2", }); @@ -223,6 +224,8 @@ R_Inbound_TaskID = W_DBHeaderWithSeparate_BZ39 + "112.0", R_Outbound_TaskID = W_DBHeaderWithSeparate_BZ39 + "114.0", R_ForceOutboundMode = W_DBHeaderWithSeparate_BZ39 + "50.3", });