diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Entity/Report/Report_WetMixer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Entity/Report/Report_WetMixer.cs new file mode 100644 index 0000000..6302610 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Entity/Report/Report_WetMixer.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mesnac.Action.ChemicalWeighing.Entity.Report +{ + /// + /// 干混机报表 + /// + public class Report_WetMixer + { + /// + /// 构造函数 + /// + /// + public Report_WetMixer(Guid id = default) + { + report_Id = id == default ? Guid.NewGuid() : id; + } + + /// + /// 报表Id + /// + public Guid report_Id { get; set; } + + /// + /// Dos + /// + public List wetmixer { get; set; } + + /// + /// Mix + /// + public List mix { get; set; } + } + + public class WetMixer + { + /// + /// 设备编号 + /// + public int eqNo { get; set; } + /// + /// 记录时间 + /// + public string recordTime { get; set; } + } + + public class WetMixerMix + { + /// + /// 设备编号 + /// + public int eqNo { get; set; } + + /// + /// 批次 + /// + public int mixBatch { get; set; } + /// + /// 步号 + /// + public int mixStep { get; set; } + /// + /// 动作 + /// + public int actCode { get; set; } + /// + /// 时间 + /// + public int mixTime { get; set; } + /// + /// 温度 + /// + public double mixTemp { get; set; } + /// + /// 速度 + /// + public double mixSpeed { get; set; } + /// + /// 混合机编号 + /// + public int mix { get; set; } + + /// + /// 记录时间 + /// + public string recordTime { get; set; } + } +} diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchHelper.cs index f01e98a..1c27a6b 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/FinishBatchHelper.cs @@ -467,17 +467,17 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("物料称量存盘异常:{1}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("物料称量存盘异常:{1}", ex.Message), ex); } #endregion //存盘数据保存完成,写入反馈信号 - ICSharpCode.Core.LoggingService.Debug("数据存盘_PLC物料数据写入数据库处理完毕!"); + ICSharpCode.Core.LoggingService.Debug("数据存盘_PLC物料数据写入数据库处理完毕!"); bool result = BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.ChemicalWeighing_PC_RpSaved, new object[] { 1 }); if (!result) { - ICSharpCode.Core.LoggingService.Debug("数据存盘后写入反馈信号失败!"); + ICSharpCode.Core.LoggingService.Debug("数据存盘后写入反馈信号失败!"); } //将车次与计划表中的数量比对,更新计划数量中的完成数量 if (recordSaveDataInfo.PlanId != "") @@ -508,7 +508,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("生产数据存盘异常:{1}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("生产数据存盘异常:{1}", ex.Message), ex); } } #endregion diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/AlarmSaveHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/AlarmSaveHelper.cs index ee5cfb0..5d93bf8 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/AlarmSaveHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/AlarmSaveHelper.cs @@ -159,7 +159,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("AlarmSaveHelper逻辑异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("AlarmSaveHelper逻辑异常:{0}", ex.Message), ex); } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs index 1d5b934..6a387eb 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/FinishBatch/SaveHelper/ReportSaveHelper.cs @@ -1,15 +1,8 @@ -using DevExpress.DataAccess.Native.Json; -using DevExpress.Office.Utils; -using DevExpress.XtraPrinting.Native.WebClientUIControl; -using Mesnac.Action.ChemicalWeighing.Entity.Report; +using Mesnac.Action.ChemicalWeighing.Entity.Report; using Mesnac.Codd.Session; -using Mesnac.PlcUtils; -using Microsoft.Office.Interop.Excel; using System; using System.Collections.Generic; using System.Data; -using System.Linq; -using System.Text; using System.Threading.Tasks; using System.Web.Script.Serialization; @@ -36,7 +29,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper { try { - ICSharpCode.Core.LoggingService.Debug("干混机报表数据保存开始!!!"); + ICSharpCode.Core.LoggingService.Debug("干混机报表数据保存开始!!!"); //准备信号读取 //if (BasePlcHelper.Instance.RdyRpt_D1.NowValue.ToInt() == 1) //{ @@ -66,7 +59,31 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("干混机报表数据保存异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("干混机报表数据保存异常:{0}", ex.Message), ex); + } + } + + /// + /// 湿混机报表数据保存 + /// + public void SaveWetMixerReport() + { + try + { + ICSharpCode.Core.LoggingService.Debug("湿混机报表数据保存开始!!!"); + + + //准备信号读取 + + + Report_WetMixer WetMixer_dos0 = readWetMixer("A"); //读取报表数据 + SaveReportDb(WetMixer_dos0); //保存报表数据 + + + } + catch (Exception ex) + { + ICSharpCode.Core.LoggingService.Error(String.Format("湿混机报表数据保存异常:{0}", ex.Message), ex); } } @@ -87,12 +104,33 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("通过PLC读取干混机报表数读取异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("通过PLC读取干混机报表数读取异常:{0}", ex.Message), ex); } return _dryMixer; } - + /// + /// 通过PLC读取湿混机报表数据 + /// + /// 湿混机A、湿混机B + /// + private Report_WetMixer readWetMixer(string machineType) + { + Report_WetMixer _wetMixer = null; + try + { + _wetMixer = new Report_WetMixer(); + _wetMixer.wetmixer = readWetMixers(machineType, 4); + _wetMixer.mix = readWetMixerMix(machineType, 10); + } + catch (Exception ex) + { + ICSharpCode.Core.LoggingService.Error(String.Format("通过PLC读取湿混机报表数读取异常:{0}", ex.Message), ex); + } + return _wetMixer; + } + + /// /// 读取干混机Dos数据 /// @@ -170,7 +208,73 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } /// - /// 保存报表数据至数据库 + /// 读取湿混机数据 + /// + /// + /// + /// + private List readWetMixers(string machineType, int amount) + { + List wetMixers = new List(); + for (int mixer = 0; mixer < 10; mixer++) + { + + #region 实例化参数 + BasePlcHelper.Instance.dryer_eqNo = new Entity.DataKeyValue($"wetMixing{machineType}_{mixer}_eqNo"); + + #endregion + + WetMixer wetMixer = new WetMixer() + { + eqNo = BasePlcHelper.Instance.dryer_eqNo.NowValue.ToInt(), + recordTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + }; + wetMixers.Add(wetMixer); + } + + return wetMixers; + } + + /// + /// 读取湿混机Mix数据 + /// + /// + /// + /// + private List readWetMixerMix(string machineType, int amount) + { + List wetMixerMixes = new List(); + for (int mix = 0; mix < 10; mix++) + { + #region 实例化参数 + BasePlcHelper.Instance.dryer_mixBatch = new Entity.DataKeyValue($"wetMixing{machineType}_{mix}_mixBatch"); + BasePlcHelper.Instance.dryer_mixStep = new Entity.DataKeyValue($"wetMixing{machineType}_{mix}_mixStep"); + BasePlcHelper.Instance.dryer_actCode = new Entity.DataKeyValue($"wetMixing{machineType}_{mix}_actCode"); + BasePlcHelper.Instance.dryer_mixTime = new Entity.DataKeyValue($"wetMixing{machineType}_{mix}_mixTime"); + BasePlcHelper.Instance.dryer_mixTemp = new Entity.DataKeyValue($"wetMixing{machineType}_{mix}_mixTemp"); + BasePlcHelper.Instance.dryer_mixSpeed = new Entity.DataKeyValue($"wetMixing{machineType}_{mix}_mixSpeed"); + #endregion + + WetMixerMix wetMixerMix = new WetMixerMix() + { + eqNo = BasePlcHelper.Instance.dryer_eqNo.NowValue.ToInt(), + mixBatch = BasePlcHelper.Instance.dryer_mixBatch.NowValue.ToInt(), + mixStep = BasePlcHelper.Instance.dryer_matCode.NowValue.ToInt(), + actCode = BasePlcHelper.Instance.dryer_actCode.NowValue.ToInt(), + mixTime = BasePlcHelper.Instance.dryer_mixTime.NowValue.ToInt(), + mixTemp = BasePlcHelper.Instance.dryer_mixTemp.NowValue.ToDouble(), + mixSpeed = BasePlcHelper.Instance.dryer_mixSpeed.NowValue.ToDouble(), + mix = mix, + recordTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + }; + wetMixerMixes.Add(wetMixerMix); + } + + return wetMixerMixes; + } + + /// + /// 保存干混机报表数据至数据库 /// /// private void SaveReportDb(Report_DryMixer _dryMixer) @@ -191,11 +295,42 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper } - ICSharpCode.Core.LoggingService.Warn($"报表数据打印:{str}"); + ICSharpCode.Core.LoggingService.Warn($"报表数据打印:{str}"); } catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("保存报表数据至数据库异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("保存报表数据至数据库异常:{0}", ex.Message), ex); + } + } + + /// + /// 保存湿混机报表数据至数据库 + /// + /// + private void SaveReportDb(Report_WetMixer _wetMixer) + { + JavaScriptSerializer serializer = new JavaScriptSerializer(); + try + { + string str = serializer.Serialize(_wetMixer); + if (_wetMixer != null) + { + if (_wetMixer.wetmixer != null) + { + InsertReportWetMixer(_wetMixer.report_Id, _wetMixer.wetmixer); + } + else if (_wetMixer.mix != null) + { + InsertReportWetMixerDetail(_wetMixer.report_Id, _wetMixer.mix); + } + } + + + ICSharpCode.Core.LoggingService.Warn($"报表数据打印:{str}"); + } + catch (Exception ex) + { + ICSharpCode.Core.LoggingService.Error(String.Format("保存报表数据至数据库异常:{0}", ex.Message), ex); } } @@ -243,7 +378,7 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper }); }catch (Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("保存干混机报表数据异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("保存干混机报表数据异常:{0}", ex.Message), ex); } } @@ -288,7 +423,92 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch.SaveHelper }); }catch(Exception ex) { - ICSharpCode.Core.LoggingService.Error(String.Format("保存干混机报表明细数据异常:{0}", ex.Message), ex); + ICSharpCode.Core.LoggingService.Error(String.Format("保存干混机报表明细数据异常:{0}", ex.Message), ex); + } + } + + /// + /// 保存湿混机报表数据 + /// + /// + /// + private void InsertReportWetMixer(Guid reportId, List wetMixers) + { + try + { + + Task.Run(() => + { + DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local); + if (dbHelper == null) + { + throw new Exception(Mesnac.Basic.LanguageHelper.DataBaseConnectError); + } + string sqlStr = @"insert into Report_WetMixer + (reportId, eqNo) + values + (@reportId, @eqNo)"; + + foreach (WetMixer _wetMixer in wetMixers) + { + dbHelper.ClearParameter(); + dbHelper.CommandType = CommandType.Text; + dbHelper.CommandText = sqlStr; + dbHelper.AddParameter("@eqNo", _wetMixer.eqNo); + dbHelper.AddParameter("@reportId", reportId); + dbHelper.ExecuteNonQuery(); + } + }); + } + catch (Exception ex) + { + ICSharpCode.Core.LoggingService.Error(String.Format("保存湿混机报表数据异常:{0}", ex.Message), ex); + } + } + + /// + /// 保存湿混机报表明细数据 + /// + /// + /// + private void InsertReportWetMixerDetail(Guid reportId, List wetMixers) + { + try + { + Task.Run(() => + { + DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local); + if (dbHelper == null) + { + throw new Exception(Mesnac.Basic.LanguageHelper.DataBaseConnectError); + } + string sqlStr = @"insert into Report_WetMixer_Detail + (reportId, eqNo, mixBatch, mixStep, actCode, mixTime, mixTemp, mixSpeed, mix) + values + (@reportId, @eqNo, @mixBatch, @mixStep, @actCode, @mixTime, @mixTemp, @mixSpeed, @mix)"; + foreach (WetMixerMix _wetMixerMix in wetMixers) + { + if (_wetMixerMix.actCode == 0) continue; + + dbHelper.ClearParameter(); + dbHelper.CommandType = CommandType.Text; + dbHelper.CommandText = sqlStr; + dbHelper.AddParameter("@reportId", reportId); + dbHelper.AddParameter("@eqNo", _wetMixerMix.eqNo); + dbHelper.AddParameter("@mixBatch", _wetMixerMix.mixBatch); + dbHelper.AddParameter("@mixStep", _wetMixerMix.mixStep); + dbHelper.AddParameter("@actCode", _wetMixerMix.actCode); + dbHelper.AddParameter("@mixTime", _wetMixerMix.mixTime); + dbHelper.AddParameter("@mixTemp", _wetMixerMix.mixTemp); + dbHelper.AddParameter("@mixSpeed", _wetMixerMix.mixSpeed); + dbHelper.AddParameter("@mix", _wetMixerMix.mix); + dbHelper.ExecuteNonQuery(); + } + }); + } + catch (Exception ex) + { + ICSharpCode.Core.LoggingService.Error(String.Format("保存湿混机报表明细数据异常:{0}", ex.Message), ex); } } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index 4db16b5..652dc5b 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -215,6 +215,7 @@ + diff --git a/Main/MCEdit/Data/MCProject/SCWSProject2.mprj b/Main/MCEdit/Data/MCProject/SCWSProject2.mprj index f209b36..255e2aa 100644 --- a/Main/MCEdit/Data/MCProject/SCWSProject2.mprj +++ b/Main/MCEdit/Data/MCProject/SCWSProject2.mprj @@ -42,8 +42,8 @@ - + diff --git a/Main/MCEdit/Data/MCProject/nodeForm/湿混机报表.xml b/Main/MCEdit/Data/MCProject/nodeForm/湿混机报表.xml new file mode 100644 index 0000000..10d2dc5 --- /dev/null +++ b/Main/MCEdit/Data/MCProject/nodeForm/湿混机报表.xml @@ -0,0 +1,311 @@ + + + + + False + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJoBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EYXRhR3JpZFZpZXdDb2x1bW5zLCBNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAKk1lc25hYy5Db250cm9scy5CYXNlLkRhdGFHcmlkVmlld0NvbHVtbnNbXQIAAAAICAkDAAAACg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Vyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAADAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAANBAs= + + [DataSource1].[Report_DryMixer] + MCDataSource1 + True + select t1.objId,t1.reportId,t2.Name as eqNo,t1.batch,t1.matCode,t1.setValue,t1.setToler,t1.actValue,t1.actToLer,t1.dos,t1.recordTime from Report_DryMixer t1 left join Device t2 on t1.eqNo = t2.Id + + + AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAABVTeXN0ZW0uRGF0YS5EYXRhVGFibGUDAAAAGURhdGFUYWJsZS5SZW1vdGluZ1ZlcnNpb24JWG1sU2NoZW1hC1htbERpZmZHcmFtAwEBDlN5c3RlbS5WZXJzaW9uAgAAAAkDAAAABgQAAACFBDw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi0xNiI/Pg0KPHhzOnNjaGVtYSB4bWxucz0iIiB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOm1zZGF0YT0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp4bWwtbXNkYXRhIj4NCiAgPHhzOmVsZW1lbnQgbmFtZT0iTUNEYXRhR3JpZFZpZXciPg0KICAgIDx4czpjb21wbGV4VHlwZT4NCiAgICA8L3hzOmNvbXBsZXhUeXBlPg0KICA8L3hzOmVsZW1lbnQ+DQogIDx4czplbGVtZW50IG5hbWU9InRtcERhdGFTZXQiIG1zZGF0YTpJc0RhdGFTZXQ9InRydWUiIG1zZGF0YTpNYWluRGF0YVRhYmxlPSJNQ0RhdGFHcmlkVmlldyIgbXNkYXRhOlVzZUN1cnJlbnRMb2NhbGU9InRydWUiPg0KICAgIDx4czpjb21wbGV4VHlwZT4NCiAgICAgIDx4czpjaG9pY2UgbWluT2NjdXJzPSIwIiBtYXhPY2N1cnM9InVuYm91bmRlZCIgLz4NCiAgICA8L3hzOmNvbXBsZXhUeXBlPg0KICA8L3hzOmVsZW1lbnQ+DQo8L3hzOnNjaGVtYT4GBQAAAIABPGRpZmZncjpkaWZmZ3JhbSB4bWxuczptc2RhdGE9InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206eG1sLW1zZGF0YSIgeG1sbnM6ZGlmZmdyPSJ1cm46c2NoZW1hcy1taWNyb3NvZnQtY29tOnhtbC1kaWZmZ3JhbS12MSIgLz4EAwAAAA5TeXN0ZW0uVmVyc2lvbgQAAAAGX01ham9yBl9NaW5vcgZfQnVpbGQJX1JldmlzaW9uAAAAAAgICAgCAAAAAAAAAP//////////Cw== + + Query + True + True + 25 + False + Fill + 3, 22 + MCDataGridView1 + 1262, 335 + 0 + + False + 报表数据 + Top + 宋体, 12pt, style=Bold + 0, 64 + GroupBox2 + 1268, 360 + 7 + + + + Fill + 3, 22 + MultiColHeaderDgv1 + 1262, 685 + + False + 报表明细 + Fill + 宋体, 12pt, style=Bold + 0, 64 + GroupBox3 + 1268, 710 + 8 + + + + True + + AAEAAAD/////AQAAAAAAAAAMAgAAAE5NZXNuYWMuQ29udHJvbHMuRGVmYX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ACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL + + [DataSource1].[Device].[Id] + MCDataSource1 + False + select * from Device where Name LIKE '干混%' + + + Query + True + True + 779, 28 + MCCombobox1 + 69, 24 + 59 + + + + + Red + DarkGray + + + False + + + + None + True + True + 设备编号 + 宋体, 12pt + 701, 31 + MCLabel3 + 72, 16 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIGI3YzYyNDZlNzVhYzQ1NjNhZjk3Y2Y4ZjUwODk2ODk1BgYAAAAG5a+85Ye6BgcAAAAV5a+85Ye65bmy5re35py65oql6KGoCw== + + + + False + + + + None + True + True + True + + + Red + DarkGray + 报表导出 + Right + 1019, 22 + MCButton2 + 121, 39 + 36 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL + + endtime + + False + + + + Query + True + True + Time + True + 551, 26 + MCDateTimePicker4 + 117, 26 + 29 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL + + starttime + + False + + + + Query + True + True + Time + True + 223, 28 + MCDateTimePicker3 + 117, 26 + 28 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL + + enddate + + False + + + + Query + True + True + Short + 442, 26 + MCDateTimePicker2 + 110, 26 + 27 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL + + startdate + + False + + + + Query + True + True + 宋体, 12pt + Short + 114, 28 + MCDateTimePicker1 + 110, 26 + 26 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAATAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDE1ZDFlMWZhMzMwNjRkM2Q5ODZiMTlkNzljYWIyYTEwBgYAAAAG5p+l6K+iBgcAAAAV5p+l6K+i5bmy5re35py65oql6KGoCw== + + + + False + + + + None + True + True + False + + + Red + DarkGray + 查询 + Right + 1140, 22 + MCButton3 + 125, 39 + 25 + + + + + Red + DarkGray + + + False + + + + None + True + True + 结束时间 + 宋体, 12pt + 364, 31 + MCLabel2 + 72, 16 + + + + + Red + DarkGray + + + False + + + + None + True + True + 开始时间 + 宋体, 12pt + 36, 33 + MCLabel1 + 72, 16 + + False + 查询条件 + Top + 宋体, 12pt, style=Bold + 0, 0 + GroupBox1 + 1268, 64 + 6 + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX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bmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL + + False + False + False + Control + 1284, 813 + WindowsDefaultLocation + 湿混机报表 + Normal + + Tile + 宋体, 9pt + ControlText + 湿混机报表 + diff --git a/Main/MCRun/Program.cs b/Main/MCRun/Program.cs index b432696..11cc8c4 100644 --- a/Main/MCRun/Program.cs +++ b/Main/MCRun/Program.cs @@ -1,11 +1,8 @@ using System; -using System.Collections.Generic; using System.Reflection; -using System.Text; using System.IO; using System.Windows.Forms; using ICSharpCode.Core; -using ICSharpCode.Core.Services; using Mesnac.Gui.Run.Global; namespace MCRun { @@ -13,10 +10,7 @@ namespace MCRun using Mesnac.DoUtils; using Mesnac.Gui.Workbench; using Mesnac.PlcUtils; - using Mesnac.PlcUtils.common; using Mesnac.PlcUtils.enumInfo; - using Mesnac.PlcUtils.Impl; - using System.Drawing.Drawing2D; class Program {