| | |
| | | /// <summary> |
| | | /// å åæº2ä¸åçè¦åæ¶æ¯ |
| | | /// </summary> |
| | | public static string _lbl_Alert_Srm2Release = string.Empty; |
| | | public static string _lbl_Alert_DataProcess_RobotBuffer_ForceOutbound = string.Empty; |
| | | |
| | | |
| | | |
| | |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteInStoreTaskInfoAsync(int deviceId, string stationCode, string toPlaceNo, short length, short width, short height, int inbound_TaskID); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteOutStoreTaskInfo", ReplyAction="http://tempuri.org/IStationService/WriteOutStoreTaskInfoResponse")] |
| | | iWareCC.StationService.SdaResEntity WriteOutStoreTaskInfo(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID); |
| | | iWareCC.StationService.SdaResEntity WriteOutStoreTaskInfo(bool isResetData, int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteOutStoreTaskInfo", ReplyAction="http://tempuri.org/IStationService/WriteOutStoreTaskInfoResponse")] |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteOutStoreTaskInfoAsync(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID); |
| | | System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteOutStoreTaskInfoAsync(bool isResetData, int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID); |
| | | |
| | | [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WritePalletizingTaskInfo", ReplyAction="http://tempuri.org/IStationService/WritePalletizingTaskInfoResponse")] |
| | | iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum); |
| | |
| | | return base.Channel.WriteInStoreTaskInfoAsync(deviceId, stationCode, toPlaceNo, length, width, height, inbound_TaskID); |
| | | } |
| | | |
| | | public iWareCC.StationService.SdaResEntity WriteOutStoreTaskInfo(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) { |
| | | return base.Channel.WriteOutStoreTaskInfo(deviceId, stationCode, sourcePlaceNo, outbound_TaskID); |
| | | public iWareCC.StationService.SdaResEntity WriteOutStoreTaskInfo(bool isResetData, int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) { |
| | | return base.Channel.WriteOutStoreTaskInfo(isResetData, deviceId, stationCode, sourcePlaceNo, outbound_TaskID); |
| | | } |
| | | |
| | | public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteOutStoreTaskInfoAsync(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) { |
| | | return base.Channel.WriteOutStoreTaskInfoAsync(deviceId, stationCode, sourcePlaceNo, outbound_TaskID); |
| | | public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteOutStoreTaskInfoAsync(bool isResetData, int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) { |
| | | return base.Channel.WriteOutStoreTaskInfoAsync(isResetData, deviceId, stationCode, sourcePlaceNo, outbound_TaskID); |
| | | } |
| | | |
| | | public iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum) { |
| | |
| | | <xs:element name="WriteOutStoreTaskInfo"> |
| | | <xs:complexType> |
| | | <xs:sequence> |
| | | <xs:element minOccurs="0" name="isResetData" type="xs:boolean" /> |
| | | <xs:element minOccurs="0" name="deviceId" type="xs:int" /> |
| | | <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" /> |
| | | <xs:element minOccurs="0" name="sourcePlaceNo" nillable="true" type="xs:string" /> |
| | |
| | | IssueTaskHandle(i_deviceId, out errMsg4); |
| | | } |
| | | SystemWarningMsg._lbl_Alert_DataProcess_BZ39_IssueInboundTask = errMsg1; |
| | | SystemWarningMsg._lbl_Alert_Srm2Release = errMsg2; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ForceOutbound = errMsg2; |
| | | |
| | | SystemWarningMsg._lbl_Alert_Srm4Release = errMsg4; |
| | | Thread.Sleep(2000);//2ç§ä¸æ¬¡ |
| | |
| | | this.lbl_Alert_DataProcess_BZ12_FinishTask = 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_RobotBuffer_ForceOutbound = 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.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(); |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound = new System.Windows.Forms.CheckBox(); |
| | | this.ckBDataProcess_BZ12_FinishTask = new System.Windows.Forms.CheckBox(); |
| | | this.tabPage1 = new System.Windows.Forms.TabPage(); |
| | | this.panel_Srm4 = new System.Windows.Forms.Panel(); |
| | |
| | | this.Qty = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
| | | this.InStoreTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
| | | this.tabPage3 = new System.Windows.Forms.TabPage(); |
| | | this.button25 = new System.Windows.Forms.Button(); |
| | | this.button24 = new System.Windows.Forms.Button(); |
| | | this.tb_PackageCode = new System.Windows.Forms.TextBox(); |
| | | this.label23 = new System.Windows.Forms.Label(); |
| | |
| | | this.dataGridViewTextBoxColumn62 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
| | | this.dataGridViewTextBoxColumn63 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
| | | this.btn_Find_OutTaskRetryToMes = new System.Windows.Forms.Button(); |
| | | this.button25 = new System.Windows.Forms.Button(); |
| | | this.tPTransAsrs.SuspendLayout(); |
| | | this.panel14.SuspendLayout(); |
| | | this.panel15.SuspendLayout(); |
| | |
| | | this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_BZ12_FinishTask); |
| | | 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_RobotBuffer_ForceOutbound); |
| | | this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_BZ39_IssueInboundTask); |
| | | this.groupBox1.Controls.Add(this.ckB_DataProcess_BZ39_IssueInboundTask); |
| | | 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); |
| | | this.groupBox1.Controls.Add(this.ckBDataProcess_RobotBuffer_ForceOutbound); |
| | | this.groupBox1.Controls.Add(this.ckBDataProcess_BZ12_FinishTask); |
| | | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.groupBox1.ForeColor = System.Drawing.Color.Maroon; |
| | |
| | | this.lbl_Alert_RgvRelease.TabIndex = 15; |
| | | this.lbl_Alert_RgvRelease.Text = "label11"; |
| | | // |
| | | // lbl_Alert_Srm2Release |
| | | // lbl_Alert_DataProcess_RobotBuffer_ForceOutbound |
| | | // |
| | | this.lbl_Alert_Srm2Release.AutoSize = true; |
| | | this.lbl_Alert_Srm2Release.BackColor = System.Drawing.Color.White; |
| | | this.lbl_Alert_Srm2Release.ForeColor = System.Drawing.Color.Red; |
| | | this.lbl_Alert_Srm2Release.Location = new System.Drawing.Point(936, 80); |
| | | this.lbl_Alert_Srm2Release.Name = "lbl_Alert_Srm2Release"; |
| | | this.lbl_Alert_Srm2Release.Size = new System.Drawing.Size(70, 15); |
| | | this.lbl_Alert_Srm2Release.TabIndex = 13; |
| | | this.lbl_Alert_Srm2Release.Text = "label11"; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.AutoSize = true; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.BackColor = System.Drawing.Color.White; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.ForeColor = System.Drawing.Color.Red; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.Location = new System.Drawing.Point(252, 134); |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.Name = "lbl_Alert_DataProcess_RobotBuffer_ForceOutbound"; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.Size = new System.Drawing.Size(70, 15); |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.TabIndex = 13; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.Text = "label11"; |
| | | // |
| | | // lbl_Alert_DataProcess_BZ39_IssueInboundTask |
| | | // |
| | |
| | | // ckBSrm1FinishedHandle |
| | | // |
| | | this.ckBSrm1FinishedHandle.AutoSize = true; |
| | | this.ckBSrm1FinishedHandle.Location = new System.Drawing.Point(728, 54); |
| | | this.ckBSrm1FinishedHandle.Location = new System.Drawing.Point(728, 50); |
| | | this.ckBSrm1FinishedHandle.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.ckBSrm1FinishedHandle.Name = "ckBSrm1FinishedHandle"; |
| | | this.ckBSrm1FinishedHandle.Size = new System.Drawing.Size(182, 19); |
| | |
| | | this.ckBRgvRelease.UseVisualStyleBackColor = true; |
| | | this.ckBRgvRelease.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); |
| | | // |
| | | // ckBSrm2Release |
| | | // ckBDataProcess_RobotBuffer_ForceOutbound |
| | | // |
| | | this.ckBSrm2Release.AutoSize = true; |
| | | this.ckBSrm2Release.Location = new System.Drawing.Point(728, 80); |
| | | this.ckBSrm2Release.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.ckBSrm2Release.Name = "ckBSrm2Release"; |
| | | this.ckBSrm2Release.Size = new System.Drawing.Size(150, 19); |
| | | this.ckBSrm2Release.TabIndex = 2; |
| | | this.ckBSrm2Release.Text = "å åæº2ä»»å¡ä¸å"; |
| | | this.ckBSrm2Release.UseVisualStyleBackColor = true; |
| | | this.ckBSrm2Release.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.AutoSize = true; |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.Location = new System.Drawing.Point(5, 134); |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.Name = "ckBDataProcess_RobotBuffer_ForceOutbound"; |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.Size = new System.Drawing.Size(246, 19); |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.TabIndex = 2; |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.Text = "ç¼åå²äººå·¥å¼ºå¶åºåº å¤ç线ç¨"; |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.UseVisualStyleBackColor = true; |
| | | this.ckBDataProcess_RobotBuffer_ForceOutbound.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged); |
| | | // |
| | | // ckBDataProcess_BZ12_FinishTask |
| | | // |
| | |
| | | this.tabPage3.Text = "æ°æ®ç»´æ¤&ç»è®¡"; |
| | | this.tabPage3.UseVisualStyleBackColor = true; |
| | | // |
| | | // button25 |
| | | // |
| | | this.button25.BackColor = System.Drawing.Color.Red; |
| | | this.button25.Location = new System.Drawing.Point(1006, 489); |
| | | this.button25.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.button25.Name = "button25"; |
| | | this.button25.Size = new System.Drawing.Size(155, 48); |
| | | this.button25.TabIndex = 156; |
| | | this.button25.Text = "ä¸é®åå§åæ´å
æ¿ä»¶"; |
| | | this.button25.UseVisualStyleBackColor = false; |
| | | this.button25.Click += new System.EventHandler(this.button25_Click); |
| | | // |
| | | // button24 |
| | | // |
| | | this.button24.BackColor = System.Drawing.Color.Aqua; |
| | |
| | | this.btn_Find_OutTaskRetryToMes.UseVisualStyleBackColor = true; |
| | | this.btn_Find_OutTaskRetryToMes.Click += new System.EventHandler(this.btn_Find_OutTaskRetryToMes_Click); |
| | | // |
| | | // button25 |
| | | // |
| | | this.button25.BackColor = System.Drawing.Color.Red; |
| | | this.button25.Location = new System.Drawing.Point(1006, 489); |
| | | this.button25.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.button25.Name = "button25"; |
| | | this.button25.Size = new System.Drawing.Size(155, 48); |
| | | this.button25.TabIndex = 156; |
| | | this.button25.Text = "ä¸é®åå§åæ´å
æ¿ä»¶"; |
| | | this.button25.UseVisualStyleBackColor = false; |
| | | this.button25.Click += new System.EventHandler(this.button25_Click); |
| | | // |
| | | // FormCC |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); |
| | |
| | | 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; |
| | | private System.Windows.Forms.CheckBox ckBDataProcess_RobotBuffer_ForceOutbound; |
| | | private System.Windows.Forms.CheckBox ckBDataProcess_BZ12_FinishTask; |
| | | private System.Windows.Forms.Button btn_Change1; |
| | | private System.Windows.Forms.Button btn_Change2; |
| | | private System.Windows.Forms.Label lbl_SrmConveyorAlarm_2; |
| | | private System.Windows.Forms.Label lbl_Alert_DataProcess_BZ39_IssueInboundTask; |
| | | private System.Windows.Forms.Label lbl_Alert_Srm2Release; |
| | | private System.Windows.Forms.Label lbl_Alert_DataProcess_RobotBuffer_ForceOutbound; |
| | | private System.Windows.Forms.Label lbl_Alert_RgvRelease; |
| | | private System.Windows.Forms.Label lbl_Alert_DataProcess_BZ12_FinishTask; |
| | | private System.Windows.Forms.Label lbl_Alter_Srm1ReleaseFinish; |
| | |
| | | |
| | | new Thread(DataProcess_RobotBuffer_FinishTaskForOutbound.Handler).Start(); |
| | | |
| | | new Thread(DataProcess_RobotBuffer_ForceOutbound.Handler).Start(); |
| | | |
| | | new Thread(DataProcess_RobotBuffer_FinishTask.Handler).Start(); |
| | | |
| | |
| | | var showNowTime = "(" + DateTimeHelper.ConvertToStringForOnlyShowTime(DateTime.Now) + ")"; |
| | | //设置å åæºä»»å¡ä¸ååä»»å¡ç¡®è®¤çº¿ç¨æ¶æ¯ |
| | | this.lbl_Alert_DataProcess_BZ39_IssueInboundTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_BZ39_IssueInboundTask; |
| | | this.lbl_Alert_Srm2Release.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm2Release; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_ForceOutbound.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ForceOutbound; |
| | | this.lbl_Alert_DataProcess_BZ12.Text = showNowTime + SystemWarningMsg._lbl_alert_DataProcess_BZ12; |
| | | this.lbl_Alert_Srm4Release.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm4Release; |
| | | //设置å åæºä»»å¡ä¸ååä»»å¡å®æç¡®è®¤çº¿ç¨æ¶æ¯ |
| | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_SrmTaskThreadService_1_Finish, ckBSrm1FinishedHandle); |
| | | |
| | | //å åæº2ä»»å¡ä¸å |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_SrmTaskThreadService_2, ckBSrm2Release); |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_SrmTaskThreadService_2, ckBDataProcess_RobotBuffer_ForceOutbound); |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_SrmTaskThreadService_2_Finish, ckBDataProcess_BZ12_FinishTask); |
| | | |
| | | //å åæº3ä»»å¡ä¸å |
| | |
| | | var packageCode = this.tb_PackageCode.Text.Trim(); |
| | | |
| | | var alertMsg = ""; |
| | | DataProcess_RobotBuffer_ForceOutbound.Handler(packageCode, ref alertMsg); |
| | | CC_DataProcess_RobotBuffer_ForceOutbound.Handler(packageCode, ref alertMsg); |
| | | if (!string.IsNullOrEmpty(alertMsg)) |
| | | { |
| | | MessageBox.Show("é误:" + alertMsg); |
| | |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = string.Empty; |
| | | try |
| | | {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask && |
| | | if ( SystemValue.isStartedModel) |
| | | if (SystemValue.isStartedModel) |
| | | { |
| | | var rgvLocation = StationLocationEnum.BZ39.ToString(); |
| | | /* |
| | |
| | | |
| | | using (WmsDBModel wmsDB = new WmsDBModel()) |
| | | { |
| | | var noFinishOutTask = TaskHandler.ValidateIssueTaskForNoFinishTaskByOutStore(wmsDB); |
| | | if (noFinishOutTask == true) |
| | | {//è¡¨ç¤ºæ²¡ææªç»æçåºåºä»»å¡ï¼é£ä¹å°± åå§å请æ±åºåºæä»¤ |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = await client.WriteOutStoreTaskInfoAsync(true, (int)EDevice.Station, rgvLocation, "", 0); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()}-åå§å请æ±åºåºæä»¤ 失败,WriteOutStoreTaskInfoAsync è¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | //Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-åå§å请æ±åºåºæä»¤ æå,WriteOutStoreTaskInfoAsyncï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //è¦æ¯æå·²ä¸åçä»»å¡ï¼å°±ä¸è¦æ§è¡ |
| | | var isValidate = TaskHandler.ValidateIssueOutTaskForRobotBuffer(wmsDB); |
| | | if (!isValidate) |
| | |
| | | // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-ä¸ååºåºä»»å¡ æå,OutboundFinishConfirmAsyncï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | //} |
| | | |
| | | var res = await client.WriteOutStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo)); |
| | | var res = await client.WriteOutStoreTaskInfoAsync(false, (int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo)); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-ä¸ååºåºä»»å¡ 失败,WriteOutStoreTaskInfoAsync è¿å:{res.resMsg}"; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()}-ä¸ååºåºä»»å¡ 失败,WriteOutStoreTaskInfoAsync è¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | |
| | | namespace iWareCC.ThreadService |
| | | { |
| | | /// <summary> |
| | | /// æºå¨äººç¼åå² äººå·¥å¼ºå¶åºåº å¤ç |
| | | /// æºå¨äººç¼åå² äººå·¥å¼ºå¶å¾
åºåº å¤ç |
| | | /// </summary> |
| | | public static class DataProcess_RobotBuffer_ForceOutbound |
| | | { |
| | | public static bool Handler(string packageCode, ref string alertMsg) |
| | | public static async void Handler() |
| | | { |
| | | alertMsg = ""; |
| | | LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound; |
| | | |
| | | try |
| | | var alertMsg = ""; |
| | | LogType logType = LogType.DataProcess_RobotBuffer_ForceOutbound; |
| | | while (true) |
| | | { |
| | | |
| | | 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) |
| | | Thread.Sleep(2000);//ä¼ç 2ç§ï¼å°ä¼ç åå°åé¢ï¼æ¯ä¸ºäºä¸é¢çcontinueæ¹æ³æ§è¡å䏿¾ç¤ºé误信æ¯çæç¤ºï¼ï¼ï¼ãEditBy shaocx,2022-05-24ã |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ForceOutbound = string.Empty; |
| | | try |
| | | {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && |
| | | if (SystemValue.isStartedModel) |
| | | { |
| | | x.StockStatus = (int)StockStatusEnum.人工强å¶å¾
åºåº; |
| | | |
| | | //çæåºåºä»»å¡ |
| | | //è®°å½ä»»å¡ |
| | | var _id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | var plcTaskNo = BusinessHelper.CreatePlcTaskIdForSrmTask(); |
| | | var new_task = new wms_rbline_task() |
| | | var rgvLocation = StationLocationEnum.BZ39.ToString(); |
| | | var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); |
| | | if (obj.R_ForceOutboundMode == false) |
| | | { |
| | | Id = _id, |
| | | TaskNo = plcTaskNo, |
| | | alertMsg = "PLC䏿¯å¼ºå¶åºåºæ¨¡å¼"; |
| | | continue; |
| | | } |
| | | using (WmsDBModel wmsDB = new WmsDBModel()) |
| | | { |
| | | List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.人工强å¶å¾
åºåº |
| | | ).OrderBy(x => x.PackageCode).ToList(); |
| | | |
| | | UPI = x.Upi, |
| | | Length = x.Length, |
| | | Width = x.Width, |
| | | Thk = x.Thk, |
| | | |
| | | 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 = "人工强å¶å¾
åºåº", |
| | | foreach (var x in qunList) |
| | | { |
| | | x.StockStatus = (int)StockStatusEnum.人工强å¶ä»»å¡å·²å建; |
| | | x.StockStatusName = StockStatusEnum.人工强å¶ä»»å¡å·²å建.ToString(); |
| | | |
| | | //çæåºåºä»»å¡ |
| | | //è®°å½ä»»å¡ |
| | | 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, |
| | | |
| | | 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", |
| | | }; |
| | | CreateTime = DateTime.Now, |
| | | CreateUserName = "CC", |
| | | UpdateTime = DateTime.Now, |
| | | UpdateUserName = "CC", |
| | | }; |
| | | |
| | | wmsDB.wms_rbline_task.Add(new_task); |
| | | wmsDB.wms_rbline_task.Add(new_task); |
| | | |
| | | var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB); |
| | | place.PlaceStatus = (int)PlaceStatusEnum.éå®; |
| | | var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB); |
| | | place.PlaceStatus = (int)PlaceStatusEnum.éå®; |
| | | |
| | | Thread.Sleep(100); |
| | | Thread.Sleep(100); |
| | | } |
| | | |
| | | |
| | | |
| | | wmsDB.SaveChanges(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | 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; |
| | | catch (Exception ex) |
| | | { |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ForceOutbound += " åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; |
| | | Log4NetHelper.WriteErrorLog(logType, " åºç°å¼å¸¸ï¼" + ex.Message, ex); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 CC_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, |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\DataProcess_RobotBuffer_ModeChange.cs" /> |
| | | <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\Inbound\2ãDataProcess_BZ39_IssueInboundTask.cs" /> |
| | | <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\Outbound\4ãDataProcess_RobotBuffer_ForceOutbound.cs" /> |
| | | <Compile Include="ThreadService\02_BZ39å·¥ä½ï¼è¡¥æ¿åå·¥ä½ï¼\Outbound\5ãCC_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" /> |
| | |
| | | #region SDAç¸å
³ |
| | | |
| | | SS7 = 200, |
| | | HslCommunicationService = 201, |
| | | DataProcess_RobotBuffer_ForceOutbound = 201, |
| | | |
| | | /// <summary> |
| | | /// PLCæ°æ®è®¿é®æå¡æ¥å¿ |
| | |
| | | </appSettings> |
| | | <log4net> |
| | | <!-- éæ°è·åå卿ºä¿¡æ¯ãä¿¡æ¯ãæ¥å¿--> |
| | | <appender name="AutoUpdateEngineInfoTask_Info" type="log4net.Appender.RollingFileAppender"> |
| | | <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\AutoUpdateEngineInfoTask_Info\\" /> |
| | | <appender name="DataProcess_RobotBuffer_ForceOutbound_Info" type="log4net.Appender.RollingFileAppender"> |
| | | <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\DataProcess_RobotBuffer_ForceOutbound_Info\\" /> |
| | | <appendToFile value="true" /> |
| | | <rollingStyle value="Date" /> |
| | | <staticLogFileName value="false" /> |
| | |
| | | <param name="ConversionPattern" value="%næ¶æ¯æ¶é´ï¼%d [%t] %næ¶æ¯çº§å«ï¼%-5p %næ¶ æ¯ ç±»ï¼%c [%x] %n%m %n "/> |
| | | </layout> |
| | | <filter type="log4net.Filter.LoggerMatchFilter"> |
| | | <loggerToMatch value="AutoUpdateEngineInfoTask_Info" /> |
| | | <loggerToMatch value="DataProcess_RobotBuffer_ForceOutbound_Info" /> |
| | | </filter> |
| | | <filter type="log4net.Filter.DenyAllFilter" /> |
| | | </appender> |
| | | <!--éæ°è·åå卿ºä¿¡æ¯ãéè¯¯ãæ¥å¿--> |
| | | <appender name="AutoUpdateEngineInfoTask_Error" type="log4net.Appender.RollingFileAppender"> |
| | | <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\AutoUpdateEngineInfoTask_Error\\" /> |
| | | <appender name="DataProcess_RobotBuffer_ForceOutbound_Error" type="log4net.Appender.RollingFileAppender"> |
| | | <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\DataProcess_RobotBuffer_ForceOutbound_Error\\" /> |
| | | <appendToFile value="true" /> |
| | | <rollingStyle value="Date" /> |
| | | <staticLogFileName value="false" /> |
| | |
| | | <param name="ConversionPattern" value="%nå¼å¸¸æ¶é´ï¼%d [%t] %nå¼å¸¸çº§å«ï¼%-5p %nå¼ å¸¸ ç±»ï¼%c [%x] %n%m %n "/> |
| | | </layout> |
| | | <filter type="log4net.Filter.LoggerMatchFilter"> |
| | | <loggerToMatch value="AutoUpdateEngineInfoTask_Error" /> |
| | | <loggerToMatch value="DataProcess_RobotBuffer_ForceOutbound_Error" /> |
| | | </filter> |
| | | <filter type="log4net.Filter.DenyAllFilter" /> |
| | | </appender> |
| | | <root> |
| | | <level value="ALL"/> |
| | | <appender-ref ref="AutoUpdateEngineInfoTask_Info"/> |
| | | <appender-ref ref="AutoUpdateEngineInfoTask_Error"/> |
| | | <appender-ref ref="DataProcess_RobotBuffer_ForceOutbound_Info"/> |
| | | <appender-ref ref="DataProcess_RobotBuffer_ForceOutbound_Error"/> |
| | | </root> |
| | | </log4net> |
| | | </configuration> |
| | |
| | | </filter> |
| | | <filter type="log4net.Filter.DenyAllFilter" /> |
| | | </appender> |
| | | <appender name="DataProcess_RobotBuffer_ForceOutbound_Info" type="log4net.Appender.RollingFileAppender"> |
| | | <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\DataProcess_RobotBuffer_ForceOutbound_Info\\" /> |
| | | <appendToFile value="true" /> |
| | | <rollingStyle value="Date" /> |
| | | <staticLogFileName value="false" /> |
| | | <datePattern value="yyyy-MM-dd.LOG" /> |
| | | <layout type="log4net.Layout.PatternLayout"> |
| | | <!--è¾åºæ ¼å¼--> |
| | | <param name="ConversionPattern" value="%næ¶æ¯æ¶é´ï¼%d [%t] %næ¶æ¯çº§å«ï¼%-5p %næ¶ æ¯ ç±»ï¼%c [%x] %n%m %n "/> |
| | | </layout> |
| | | <filter type="log4net.Filter.LoggerMatchFilter"> |
| | | <loggerToMatch value="DataProcess_RobotBuffer_ForceOutbound_Info" /> |
| | | </filter> |
| | | <filter type="log4net.Filter.DenyAllFilter" /> |
| | | </appender> |
| | | <!--éæ°è·åå卿ºä¿¡æ¯ãéè¯¯ãæ¥å¿--> |
| | | <appender name="DataProcess_RobotBuffer_ForceOutbound_Error" type="log4net.Appender.RollingFileAppender"> |
| | | <file value="d:\\Log\\LuLiMuYe\\iWare_CC\\DataProcess_RobotBuffer_ForceOutbound_Error\\" /> |
| | | <appendToFile value="true" /> |
| | | <rollingStyle value="Date" /> |
| | | <staticLogFileName value="false" /> |
| | | <datePattern value="yyyy-MM-dd.LOG" /> |
| | | <layout type="log4net.Layout.PatternLayout"> |
| | | <!--è¾åºæ ¼å¼--> |
| | | <param name="ConversionPattern" value="%nå¼å¸¸æ¶é´ï¼%d [%t] %nå¼å¸¸çº§å«ï¼%-5p %nå¼ å¸¸ ç±»ï¼%c [%x] %n%m %n "/> |
| | | </layout> |
| | | <filter type="log4net.Filter.LoggerMatchFilter"> |
| | | <loggerToMatch value="DataProcess_RobotBuffer_ForceOutbound_Error" /> |
| | | </filter> |
| | | <filter type="log4net.Filter.DenyAllFilter" /> |
| | | </appender> |
| | | <root> |
| | | <level value="ALL"/> |
| | | <appender-ref ref="DataProcess_RobotBuffer_ForceOutbound_Info"/> |
| | | <appender-ref ref="DataProcess_RobotBuffer_ForceOutbound_Error"/> |
| | | <appender-ref ref="DataProcess_269_Info"/> |
| | | <appender-ref ref="DataProcess_269_Error"/> |
| | | <appender-ref ref="DataProcess_BZ01_Info"/> |
| | |
| | | /// 人工强å¶å¾
åºåº |
| | | /// </summary> |
| | | [Description("人工强å¶å¾
åºåº")] |
| | | 人工强å¶å¾
åºåº = 4 |
| | | 人工强å¶å¾
åºåº = 4, |
| | | |
| | | |
| | | /// <summary> |
| | | /// 人工强å¶ä»»å¡å·²å建 |
| | | /// </summary> |
| | | [Description("人工强å¶ä»»å¡å·²å建")] |
| | | 人工强å¶ä»»å¡å·²å建 = 5 |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éªè¯ æ¯å¦å卿ªç»æç åºåº ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="wmsDB"></param> |
| | | /// <returns></returns> |
| | | public static bool ValidateIssueTaskForNoFinishTaskByOutStore(WmsDBModel.WmsDBModel wmsDB) |
| | | { |
| | | var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus != (int)TaskStatusEnum.已宿 |
| | | && x.TaskStatus != (int)TaskStatusEnum.已忶 |
| | | && ( |
| | | (x.RbTaskType == (int)RbTaskTypeEnum.é½å
åºåºä»»å¡ || x.RbTaskType == (int)RbTaskTypeEnum.强å¶åºåºä»»å¡) |
| | | ) |
| | | ).ToList(); |
| | | |
| | | if (isExist?.Count() > 0) |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éªè¯ ç æ¿æ¯å¦ææ§è¡ä¸ä»»å¡ |
| | | /// </summary> |
| | |
| | | /// 人工强å¶å¾
åºåº |
| | | /// </summary> |
| | | [Description("人工强å¶å¾
åºåº")] |
| | | 人工强å¶å¾
åºåº = 4 |
| | | 人工强å¶å¾
åºåº = 4, |
| | | |
| | | /// <summary> |
| | | /// 人工强å¶ä»»å¡å·²å建 |
| | | /// </summary> |
| | | [Description("人工强å¶ä»»å¡å·²å建")] |
| | | 人工强å¶ä»»å¡å·²å建 = 5 |
| | | |
| | | |
| | | } |
| | |
| | | foreach (var quan in quanList) |
| | | { |
| | | quan.StockStatus = StockStatusEnum.人工强å¶å¾
åºåº; |
| | | quan.StockStatusName = StockStatusEnum.人工强å¶å¾
åºåº.ToString(); |
| | | quan.UpdateTime = DateTime.Now; |
| | | quan.OperReason = "人工强å¶å¾
åºåº"; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | } |
| | | public bool WriteOutStoreTaskInfo(string stationCode, string sourcePlaceNo, out string msg, int outbound_TaskID) |
| | | public bool WriteOutStoreTaskInfo(bool isResetData, string stationCode, string sourcePlaceNo, out string msg, int outbound_TaskID) |
| | | { |
| | | try |
| | | { |
| | |
| | | var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | |
| | | var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, outbound_TaskID, view_stationObj.W_Outbound_TaskID); |
| | | if (!b2.result) |
| | | if (isResetData == false) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å åºåºä»»å¡å· " + outbound_TaskID + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Outbound_TaskID); |
| | | return false; |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, outbound_TaskID, view_stationObj.W_Outbound_TaskID); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å åºåºä»»å¡å· " + outbound_TaskID + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Outbound_TaskID); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_Destination_Out, Convert.ToInt32(sourcePlaceNo), view_stationObj.W_Destination_Out); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å åºä½å· " + sourcePlaceNo + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Destination_Out); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, true, view_stationObj.W_ReqOut); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å 请æ±åºåº " + true + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_ReqOut); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | MessageModel b2 = null; |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, false, view_stationObj.W_ReqOut); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å 请æ±åºåº " + false + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_ReqOut); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_Destination_Out, Convert.ToInt32(sourcePlaceNo), view_stationObj.W_Destination_Out); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å åºä½å· " + sourcePlaceNo + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_Destination_Out); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, true, view_stationObj.W_ReqOut); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("åStationå°å{0} å 请æ±åºåº " + true + "失败,è¿åç»æ:" + b2.resMsg, |
| | | stationObj.W_ReqOut); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// <param name="outbound_TaskID"></param> |
| | | /// <returns></returns> |
| | | [OperationContract] |
| | | SdaResEntity WriteOutStoreTaskInfo(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID); |
| | | SdaResEntity WriteOutStoreTaskInfo(bool isResetData, int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID); |
| | | |
| | | /// <summary> |
| | | /// åå
¥ç æ¿ä»»å¡ä¿¡æ¯ |
| | |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | [OperationContract] |
| | | SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ,short lastnum); |
| | | SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum); |
| | | |
| | | /// <summary> |
| | | /// ç åå®æå·²ç¡®è®¤ |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns |
| | | [OperationContract] |
| | | /// <summary> |
| | | /// ç åå®æå·²ç¡®è®¤ |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns |
| | | [OperationContract] |
| | | SdaResEntity SetPalletizingTaskFinishAck(int deviceId, bool value, string stationCode); |
| | | |
| | | [OperationContract] |
| | | SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, short taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey); |
| | | |
| | | |
| | | [OperationContract] |
| | | SdaResEntity SetSurroundTaskFinishAck(int deviceId, bool value, string stationCode); |
| | | |
| | |
| | | var Station = StationResult.resData as StationEntity; |
| | | |
| | | string msg = ""; |
| | | var result = Station.OutboundFinishConfirm(stationCode, value, out msg,isClearData); |
| | | var result = Station.OutboundFinishConfirm(stationCode, value, out msg, isClearData); |
| | | _SdaResEntity.result = result; |
| | | _SdaResEntity.resMsg = msg; |
| | | return _SdaResEntity; |
| | |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, short length, short width, short height,short rotate,short toplace,short placeX,short placeY, short placeZ,short lastnum) |
| | | public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum) |
| | | { |
| | | SdaResEntity _SdaResEntity = new SdaResEntity(); |
| | | try |
| | |
| | | var Station = StationResult.resData as StationEntity; |
| | | |
| | | string msg = ""; |
| | | var result = Station.WritePalletizingTaskInfo(stationCode, taskID, length, width, height,rotate,toplace,placeX,placeY,placeZ,lastnum ,out msg); |
| | | var result = Station.WritePalletizingTaskInfo(stationCode, taskID, length, width, height, rotate, toplace, placeX, placeY, placeZ, lastnum, out msg); |
| | | _SdaResEntity.result = result; |
| | | _SdaResEntity.resMsg = msg; |
| | | return _SdaResEntity; |
| | |
| | | return _SdaResEntity; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå
¥åå
ä»»å¡ä¿¡æ¯ |
| | | /// </summary> |
| | |
| | | var Station = StationResult.resData as StationEntity; |
| | | |
| | | string msg = ""; |
| | | var result = Station.WriteSurroundTaskInfo(stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey, out msg); |
| | | var result = Station.WriteSurroundTaskInfo(stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey, out msg); |
| | | _SdaResEntity.result = result; |
| | | _SdaResEntity.resMsg = msg; |
| | | return _SdaResEntity; |
| | |
| | | /// <param name="sourcePlaceNo"></param> |
| | | /// <param name="outbound_TaskID"></param> |
| | | /// <returns></returns> |
| | | public SdaResEntity WriteOutStoreTaskInfo(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) |
| | | public SdaResEntity WriteOutStoreTaskInfo(bool isResetData, int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) |
| | | { |
| | | SdaResEntity _SdaResEntity = new SdaResEntity(); |
| | | try |
| | |
| | | var Station = StationResult.resData as StationEntity; |
| | | |
| | | string msg = ""; |
| | | var result = Station.WriteOutStoreTaskInfo(stationCode, sourcePlaceNo, out msg, outbound_TaskID); |
| | | var result = Station.WriteOutStoreTaskInfo(isResetData, stationCode, sourcePlaceNo, out msg, outbound_TaskID); |
| | | _SdaResEntity.result = result; |
| | | _SdaResEntity.resMsg = msg; |
| | | return _SdaResEntity; |