diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs index eb2dca7..612c7be 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs @@ -4894,8 +4894,6 @@ namespace Mesnac.Action.ChemicalWeighing public DataKeyValue End3 { get; set; } #endregion - - #region 2102 新增 public DataKeyValue BUWeter1_ManualMode { get; set; } public DataKeyValue BUWeter1_AutoMode { get; set; } @@ -5003,9 +5001,6 @@ namespace Mesnac.Action.ChemicalWeighing public DataKeyValue BUWeter8_P { get; set; } #endregion - - - #region 2103 public DataKeyValue DM1ASI01_ManualMode { get; set; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/DownloadAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/DownloadAction.cs index 0032f58..78a0608 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/DownloadAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/DownloadAction.cs @@ -97,9 +97,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning if (dataDry1.H1 != null && dataDry1.H1.Count>0) { - - plc.PlcRead(plc.EnableDryD1, out int[] ss); - WriteEnbale(plc.EnableDryD1); } else @@ -390,7 +387,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning public void WriteCanel(DataKeyValue key) { var plc = BasePlcHelper.Instance; - plc.PlcWriteByDataKey(key, new object[] {1}); + plc.PlcWriteByDataKey(key, new object[] {0}); } public UnitView GetUnitDryView(List formulDetail) @@ -429,6 +426,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning // 糊化1 水 称量 称量 var dataSilo1C = formulDetail.Where(x => x.MachineType == "Silo" && x.FormulaType == 1 && x.Machine == machine).ToList(); + + var dataSilo1CPlcView = dataSilo1C.Select(x => new RecipePlcView() { Bin = x.BinNo, diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/FrmWeiRecipeDataAdd.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/FrmWeiRecipeDataAdd.cs index 6f2a31f..ef2c982 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/FrmWeiRecipeDataAdd.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/FrmWeiRecipeDataAdd.cs @@ -374,7 +374,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning DataGridViewComboBoxColumn combox = dataGridDryer.Columns["ComBoxDryer1Bin"] as DataGridViewComboBoxColumn; var list = GetStockMaterrial(1); - list=list.Where(x => x.Id==5 || x.Id==6).ToList(); + + + list.RemoveAll(x => x.Id == 5); + list.RemoveAll(x => x.Id == 6); + + + combox.DataSource = list; combox.DisplayMember = "Name"; combox.ValueMember = "Id"; @@ -390,9 +396,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning DataGridViewComboBoxColumn combox1 = dataGridSilo1.Columns["ComBoxSilo1Bin"] as DataGridViewComboBoxColumn; var list1 = GetStockMaterrial(1); - list1.RemoveAll(x => x.Id == 5); - list1.RemoveAll(x => x.Id == 6); - + list1 = list1.Where(x => x.Id == 5 || x.Id == 6).ToList(); combox1.DataSource = list1; combox1.DisplayMember = "Name"; @@ -402,8 +406,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning DataGridViewComboBoxColumn combox2 = dataGridSilo2.Columns["ComBoxSilo2Bin"] as DataGridViewComboBoxColumn; var list2 = GetStockMaterrial(1); - list2.RemoveAll(x => x.Id == 5); - list2.RemoveAll(x => x.Id == 6); + list2 = list2.Where(x => x.Id == 5 || x.Id == 6).ToList(); combox2.DataSource = list2; combox2.DisplayMember = "Name"; diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index 2bda25b..dd0c2dc 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -607,7 +607,6 @@ - @@ -921,6 +920,7 @@ + diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/BarcodeReport/SelectBarcodeAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/BarcodeReport/SelectBarcodeAction.cs deleted file mode 100644 index db08d43..0000000 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/BarcodeReport/SelectBarcodeAction.cs +++ /dev/null @@ -1,77 +0,0 @@ -using Mesnac.Action.Base; -using Mesnac.Codd.Session; -using Mesnac.Controls.Base; -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace Mesnac.Action.ChemicalWeighing.Report.BarcodeReport -{ - /// - /// 查询条码扫描信息 - /// - class SelectBarcodeAction : ChemicalWeighingAction, IAction - { - private RuntimeParameter _runtime; - private IBaseControl _startdate = null; //开始日期 - private IBaseControl _enddate = null; //结束日期 - private IBaseControl _starttime = null; //开始时间 - private IBaseControl _endtime = null; //结束时间 - private DbMCControl _clientDGV = null; - public void Run(RuntimeParameter runtime) - { - base.RunIni(runtime); - this._runtime = runtime; - ICSharpCode.Core.LoggingService.Debug("条码扫描信息报表-查询.."); - - DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local); - dbHelper.ClearParameter(); - - StringBuilder sbSql = new StringBuilder(@"SELECT *, CASE Scan_State WHEN '1' THEN '通过' ELSE '不通过' END AS 'state' FROM LR_BarcodeLog WHERE 1=1 "); - - List mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件 - //开始时间条件 - this._startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl; - this._starttime = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "starttime").FirstOrDefault().BaseControl; - if (_startdate != null && _starttime != null) - { - sbSql.AppendLine(@"And Scan_Time >= '" + Convert.ToDateTime(_startdate.MCValue).ToString("yyyy-MM-dd") + " " + Convert.ToDateTime(_starttime.MCValue).ToShortTimeString() + "' "); - } - else - { - ICSharpCode.Core.LoggingService.Debug("{条码扫描信息报表} 缺少key值为startdate或者starttime的时间查询条件..."); - return; - } - //结束时间条件 - this._enddate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "enddate").FirstOrDefault().BaseControl; - this._endtime = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "endtime").FirstOrDefault().BaseControl; - if (_enddate != null && _endtime != null) - { - sbSql.AppendLine(@"And Scan_Time <= '" + Convert.ToDateTime(_enddate.MCValue).ToString("yyyy-MM-dd") + " " + Convert.ToDateTime(_endtime.MCValue).ToShortTimeString() + "' "); - } - else - { - ICSharpCode.Core.LoggingService.Debug("{条码扫描信息报表} 缺少key值为enddate或者enddate的时间查询条件..."); - return; - } - - dbHelper.CommandText = sbSql.ToString(); - dbHelper.CommandType = System.Data.CommandType.Text; - DataTable table = dbHelper.ToDataTable(); - - this._clientDGV = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "LR_BarcodeLog").FirstOrDefault(); - if (_clientDGV == null || !(_clientDGV.BaseControl is DataGridView)) - { - ICSharpCode.Core.LoggingService.Warn("{条码扫描信息报表-查询} 缺少DataGridView控件..."); - runtime.IsReturn = false; - return; - } - _clientDGV.BaseControl.BindDataSource = null; - _clientDGV.BaseControl.BindDataSource = table; - } - } -} diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs index ff266df..b5a5f75 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs @@ -31,11 +31,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer } dbHelper.ClearParameter(); - StringBuilder sbSql = new StringBuilder(@"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 - where 1=1"); + StringBuilder sbSql = new StringBuilder(@" select objId, reportId, recipeCode, recipeName, planCode, planName, recordTime, dryNo, Batch from Report_Dry where 1=1 "); List mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件 IBaseControl startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl; @@ -43,7 +39,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer if (startdate != null && starttime != null) { //Append - sbSql.AppendLine(@"AND t1.recordTime>='" + Convert.ToDateTime(startdate.MCValue).ToString("yyyy-MM-dd") + " " + Convert.ToDateTime(starttime.MCValue).ToShortTimeString() + "' "); + sbSql.AppendLine(@" and recordTime>='" + Convert.ToDateTime(startdate.MCValue).ToString("yyyy-MM-dd") + " " + Convert.ToDateTime(starttime.MCValue).ToShortTimeString() + "' "); } else { @@ -55,14 +51,14 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer IBaseControl endtime = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "endtime").FirstOrDefault().BaseControl; if (enddate != null && endtime != null) { - sbSql.AppendLine(@"AND t1.recordTime<='" + Convert.ToDateTime(enddate.MCValue).ToString("yyyy-MM-dd") + " " + Convert.ToDateTime(endtime.MCValue).ToShortTimeString() + "' "); + sbSql.AppendLine(@"AND recordTime<='" + Convert.ToDateTime(enddate.MCValue).ToString("yyyy-MM-dd") + " " + Convert.ToDateTime(endtime.MCValue).ToShortTimeString() + "' "); } else { ICSharpCode.Core.LoggingService.Debug("{干混机报表-查询} 缺少key值为enddate或者enddate的时间查询条件..."); return; } - sbSql.Append(" ORDER BY t1.recordTime desc"); + sbSql.Append(" ORDER BY recordTime desc"); dbHelper.CommandText = sbSql.ToString(); dbHelper.CommandType = System.Data.CommandType.Text; diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml index 4af2d60..74215d3 100644 --- a/Main/MCEdit/Data/MCProject/nodeDevice.xml +++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml @@ -13,7 +13,7 @@ - + @@ -772,7 +772,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Main/MCEdit/Data/MCProject/nodeForm/Report_DryMixer.xml b/Main/MCEdit/Data/MCProject/nodeForm/Report_DryMixer.xml index fab956a..8fbae49 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/Report_DryMixer.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/Report_DryMixer.xml @@ -2,7 +2,6 @@ - Fill 3, 22 MultiColHeaderDgv1 1446, 331 @@ -20,7 +19,7 @@ False - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJoBU3lzdGVtLk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