| | |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.Entity.Core.Metadata.Edm; |
| | | using System.Diagnostics; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Net; |
| | | using System.ServiceModel; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using XiGang.Core.Model; |
| | | using XiGang.Core.Model.ViewModels; |
| | |
| | | { |
| | | public partial class FormCC : Form |
| | | { |
| | | /// <summary> |
| | | /// 全局-269位置最新扫描的板件数据(格式 包号|Upi|时间点) |
| | | /// </summary> |
| | | public static string Globle_269_LastPackageUpi = ""; |
| | | |
| | | /// <summary> |
| | | /// 全局-配置报警信息列表 |
| | |
| | | new Thread(PushPackageCodeToMes.Handler).Start(); |
| | | new Thread(PushPaperCutToMes.Handler).Start(); |
| | | |
| | | new Thread(DataProcess_ValidateQiTao.Handler).Start(); |
| | | //new Thread(DataProcess_ValidateQiTao.Handler).Start(); |
| | | |
| | | //*/ |
| | | #endregion |
| | |
| | | } |
| | | private void FormCC_Load(object sender, EventArgs e) |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | /* |
| | |
| | | |
| | | |
| | | #region 对外发布WCF形式数据访问服务 |
| | | try |
| | | Task.Run(() => |
| | | { |
| | | #region 对外发布WCF形式数据访问服务 |
| | | var lineServiceHost = new ServiceHost(typeof(CCWcfService)); |
| | | lineServiceHost.Open(); |
| | | lbl_WCFMsg.Text = "发布WCF成功," + lineServiceHost.BaseAddresses[0].AbsoluteUri; |
| | | lbl_WCFMsg.ForeColor = Color.Green; |
| | | #endregion |
| | | try |
| | | { |
| | | #region 对外发布WCF形式数据访问服务 |
| | | var lineServiceHost = new ServiceHost(typeof(CCWcfService)); |
| | | lineServiceHost.Open(); |
| | | lbl_WCFMsg.Text = "发布WCF成功," + lineServiceHost.BaseAddresses[0].AbsoluteUri; |
| | | lbl_WCFMsg.ForeColor = Color.Green; |
| | | #endregion |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "发布WCF失败", ex); |
| | | lbl_WCFMsg.Text = "发布WCF失败:" + ex.Message; |
| | | lbl_WCFMsg.ForeColor = Color.Red; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "发布WCF失败", ex); |
| | | lbl_WCFMsg.Text = "发布WCF失败:" + ex.Message; |
| | | lbl_WCFMsg.ForeColor = Color.Red; |
| | | } |
| | | }); |
| | | |
| | | #endregion |
| | | |
| | |
| | | { |
| | | while (true) |
| | | { |
| | | Thread.Sleep(2000);//1秒钟读取一次 |
| | | Thread.Sleep(3000);//1秒钟读取一次 |
| | | try |
| | | { |
| | | if (stationServiceClient == null) |
| | | { |
| | | continue; |
| | | } |
| | | /* |
| | | |
| | | Stopwatch main = new Stopwatch(); |
| | | main.Start(); |
| | | |
| | | iWareCC.StationService.DeviceWarningInfo[] waringList = await stationServiceClient.GetWaringInfoListAsync((int)EDevice.Station, configDeviceWarningList.wmsConfigDeviceWarnings.ToArray()); |
| | | |
| | | main.Stop(); |
| | | var milliseconds = main.ElapsedMilliseconds; //-- 操作时间(毫秒) |
| | | |
| | | //显示报警信息 |
| | | List<String> warningCodeList = new List<string>(); |
| | |
| | | { |
| | | if (SystemValue.isAllowRuning_DeleteData && SystemValue.isStartedModel) |
| | | { |
| | | ClearDataHandler.Delete_Base_SysExceptionInfo(7); |
| | | ClearDataHandler.Delete_Task_RequestLog(7); |
| | | ClearDataHandler.Delete_Task_Part(10); |
| | | ClearDataHandler.Delete_Device_Warning(30); |
| | | ClearDataHandler.Delete_HttpRequestRecord(14); |
| | | ClearDataHandler.Delete_wms_record_print(7); |
| | | ClearDataHandler.Delete_mes_push_papercut(7); |
| | | ClearDataHandler.Delete_mes_push_packagecode(10); |
| | | ClearDataHandler.Delete_wms_rbline_task(10); |
| | | |
| | | ClearDataHandler.Delete_MES_BTJReceiveReq(30); |
| | | ClearDataHandler.Delete_MES_OnLineReq(30); |
| | | //ClearDataHandler.Delete_Device_Warning(30); |
| | | //ClearDataHandler.Delete_HttpRequestRecord(14); |
| | | |
| | | //ClearDataHandler.Delete_MES_BTJReceiveReq(30); |
| | | //ClearDataHandler.Delete_MES_OnLineReq(30); |
| | | |
| | | LogTextHelper.BatchDeleteLog(); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |