| | |
| | | using iWareModel.Entity.AGV; |
| | | using iWareSql.DataAccess; |
| | | using iWareSql.DBModel; |
| | | using iWareSql.WmsDBModel; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | public partial class FormCC : Form |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 全局—是否可以运行执行出库模式 |
| | | /// </summary> |
| | | public static bool IsAllowRunOutMode = false; |
| | | |
| | | /// <summary> |
| | | /// 1号堆垛机入库口扫码强制验证通过 |
| | | /// </summary> |
| | |
| | | } |
| | | else |
| | | {//正式模式 |
| | | rgvServiceClient = new RgvServiceClient(); |
| | | stationServiceClient = new StationServiceClient(); |
| | | } |
| | | |
| | | this.lbl_IsSimulationPLC.BackColor = IsSimulationPLC ? Color.Red : Color.Green; |
| | |
| | | |
| | | this.lbl_Alert_DeleteData.Text = showNowTime + SystemWarningMsg._lbl_Alert_DeleteData; |
| | | |
| | | this.lbl_Alert_EmptySalverTransfer.Text = showNowTime + SystemWarningMsg._lbl_Alert_EmptySalverTransfer; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound; |
| | | |
| | | this.lbl_alert_DataProcess_BZ39.Text = showNowTime + SystemWarningMsg._lbl_alert_DataProcess_BZ39; |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | if (SystemValue.isAllowRuning_Agv && SystemValue.isStartedModel) |
| | | if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && SystemValue.isStartedModel) |
| | | { |
| | | AGVRetModel list = AgvRequestHelper.GetVehicles(); |
| | | AgvHandler.SaveAgvData(list); |
| | |
| | | { |
| | | for (int i = 0; i < waringList.Count; i++) |
| | | { |
| | | DeviceWarningHandler.SaveWarning(EDevice.AGV, iWareCommon.Utils.LogType.AGVTheadService, |
| | | DeviceWarningHandler.SaveWarning(EDevice.AGV, iWareCommon.Utils.LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound, |
| | | waringList[i].code, waringList[i].code, waringList[i].desc);//新增报警 |
| | | warningAddressList.Add(waringList[i].code); |
| | | } |
| | | } |
| | | } |
| | | DeviceWarningHandler.AutoCloseWarning(EDevice.AGV, iWareCommon.Utils.LogType.AGVTheadService, warningAddressList);//自动关闭报警 |
| | | this.lbl_Alert_Agv.Text = "获取AGV车辆信息成功"; |
| | | DeviceWarningHandler.AutoCloseWarning(EDevice.AGV, iWareCommon.Utils.LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound, warningAddressList);//自动关闭报警 |
| | | this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "获取AGV车辆信息成功"; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "获取AGV车辆列表 出现异常:" + ex.Message, ex); |
| | | this.lbl_Alert_Agv.Text = "获取AGV车辆信息异常:" + ex.Message; |
| | | this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "获取AGV车辆信息异常:" + ex.Message; |
| | | } |
| | | finally |
| | | { |
| | |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DeleteData, ckDeleteData); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_Agv, ckAgv); |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound, ckDataProcess_RobotBuffer_AutoQiTaoOutbound); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_EmptySalverTransfer, ckEmptySalverTransfer); |
| | | |
| | |
| | | DialogResult dr = MessageBox.Show("确定要启动【" + currentCheckModelText + "】模式吗?", "启动模式", messButton); |
| | | if (dr == DialogResult.OK)//如果点击“确定”按钮 |
| | | { |
| | | using (DbModel edm = new DbModel()) |
| | | using (WmsDBModel edm = new WmsDBModel()) |
| | | { |
| | | var ccSystem = BasicDataSetHandler.GetCCSystem(edm); |
| | | if (ccSystem == null) |
| | |
| | | /// <returns></returns> |
| | | private bool CommonStopService() |
| | | { |
| | | using (DbModel edm = new DbModel()) |
| | | using (WmsDBModel edm = new WmsDBModel()) |
| | | { |
| | | var ccSystem = BasicDataSetHandler.GetCCSystem(edm); |
| | | if (ccSystem == null) |
| | |
| | | ccSystem.Machine = string.Empty; |
| | | ccSystem.LastMachine = Dns.GetHostName(); |
| | | ccSystem.LastUnLineTime = DateTime.Now; |
| | | ccSystem.ModifyTime = DateTime.Now; |
| | | ccSystem.UpdateTime = DateTime.Now; |
| | | |
| | | int i = edm.SaveChanges(); |
| | | if (i <= 0) |