2107 add 新增数据库2107

master
nodyang 1 year ago
parent a5e0b1e767
commit 7e71fd990b

@ -4894,8 +4894,6 @@ namespace Mesnac.Action.ChemicalWeighing
public DataKeyValue End3 { get; set; } public DataKeyValue End3 { get; set; }
#endregion #endregion
#region 2102 新增 #region 2102 新增
public DataKeyValue BUWeter1_ManualMode { get; set; } public DataKeyValue BUWeter1_ManualMode { get; set; }
public DataKeyValue BUWeter1_AutoMode { get; set; } public DataKeyValue BUWeter1_AutoMode { get; set; }
@ -5003,9 +5001,6 @@ namespace Mesnac.Action.ChemicalWeighing
public DataKeyValue BUWeter8_P { get; set; } public DataKeyValue BUWeter8_P { get; set; }
#endregion #endregion
#region 2103 #region 2103
public DataKeyValue DM1ASI01_ManualMode { get; set; } public DataKeyValue DM1ASI01_ManualMode { get; set; }

@ -97,9 +97,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
if (dataDry1.H1 != null && dataDry1.H1.Count>0) if (dataDry1.H1 != null && dataDry1.H1.Count>0)
{ {
plc.PlcRead(plc.EnableDryD1, out int[] ss);
WriteEnbale(plc.EnableDryD1); WriteEnbale(plc.EnableDryD1);
} }
else else
@ -390,7 +387,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public void WriteCanel(DataKeyValue key) public void WriteCanel(DataKeyValue key)
{ {
var plc = BasePlcHelper.Instance; var plc = BasePlcHelper.Instance;
plc.PlcWriteByDataKey(key, new object[] {1}); plc.PlcWriteByDataKey(key, new object[] {0});
} }
public UnitView GetUnitDryView(List<LjFormulaDetail> formulDetail) public UnitView GetUnitDryView(List<LjFormulaDetail> formulDetail)
@ -429,6 +426,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// 糊化1 水 称量 称量 // 糊化1 水 称量 称量
var dataSilo1C = formulDetail.Where(x => x.MachineType == "Silo" && x.FormulaType == 1 && x.Machine == machine).ToList(); var dataSilo1C = formulDetail.Where(x => x.MachineType == "Silo" && x.FormulaType == 1 && x.Machine == machine).ToList();
var dataSilo1CPlcView = dataSilo1C.Select(x => new RecipePlcView() var dataSilo1CPlcView = dataSilo1C.Select(x => new RecipePlcView()
{ {
Bin = x.BinNo, Bin = x.BinNo,

@ -374,7 +374,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
DataGridViewComboBoxColumn combox = dataGridDryer.Columns["ComBoxDryer1Bin"] as DataGridViewComboBoxColumn; DataGridViewComboBoxColumn combox = dataGridDryer.Columns["ComBoxDryer1Bin"] as DataGridViewComboBoxColumn;
var list = GetStockMaterrial(1); 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.DataSource = list;
combox.DisplayMember = "Name"; combox.DisplayMember = "Name";
combox.ValueMember = "Id"; combox.ValueMember = "Id";
@ -390,9 +396,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
DataGridViewComboBoxColumn combox1 = dataGridSilo1.Columns["ComBoxSilo1Bin"] as DataGridViewComboBoxColumn; DataGridViewComboBoxColumn combox1 = dataGridSilo1.Columns["ComBoxSilo1Bin"] as DataGridViewComboBoxColumn;
var list1 = GetStockMaterrial(1); var list1 = GetStockMaterrial(1);
list1.RemoveAll(x => x.Id == 5); list1 = list1.Where(x => x.Id == 5 || x.Id == 6).ToList();
list1.RemoveAll(x => x.Id == 6);
combox1.DataSource = list1; combox1.DataSource = list1;
combox1.DisplayMember = "Name"; combox1.DisplayMember = "Name";
@ -402,8 +406,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
DataGridViewComboBoxColumn combox2 = dataGridSilo2.Columns["ComBoxSilo2Bin"] as DataGridViewComboBoxColumn; DataGridViewComboBoxColumn combox2 = dataGridSilo2.Columns["ComBoxSilo2Bin"] as DataGridViewComboBoxColumn;
var list2 = GetStockMaterrial(1); var list2 = GetStockMaterrial(1);
list2.RemoveAll(x => x.Id == 5); list2 = list2.Where(x => x.Id == 5 || x.Id == 6).ToList();
list2.RemoveAll(x => x.Id == 6);
combox2.DataSource = list2; combox2.DataSource = list2;
combox2.DisplayMember = "Name"; combox2.DisplayMember = "Name";

@ -607,7 +607,6 @@
<Compile Include="ProjectDebug\SelectAction.cs" /> <Compile Include="ProjectDebug\SelectAction.cs" />
<Compile Include="ProjectDebug\ModifyAction.cs" /> <Compile Include="ProjectDebug\ModifyAction.cs" />
<Compile Include="ProjectDebug\UpdateValueAction.cs" /> <Compile Include="ProjectDebug\UpdateValueAction.cs" />
<Compile Include="Report\BarcodeReport\SelectBarcodeAction.cs" />
<Compile Include="Report\DryMixer\ExportAction.cs" /> <Compile Include="Report\DryMixer\ExportAction.cs" />
<Compile Include="Report\DryMixer\InitFormAction.cs" /> <Compile Include="Report\DryMixer\InitFormAction.cs" />
<Compile Include="Report\DryMixer\SelectAction.cs" /> <Compile Include="Report\DryMixer\SelectAction.cs" />
@ -921,6 +920,7 @@
<ItemGroup> <ItemGroup>
<Folder Include="LjPlanning\Manager\" /> <Folder Include="LjPlanning\Manager\" />
<Folder Include="Product\PptShift\" /> <Folder Include="Product\PptShift\" />
<Folder Include="Report\BarcodeReport\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<COMReference Include="Microsoft.Office.Interop.Excel"> <COMReference Include="Microsoft.Office.Interop.Excel">

@ -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
{
/// <summary>
/// 查询条码扫描信息
/// </summary>
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<SelectBarcodeAction>.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<DbMCControl> 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<SelectBarcodeAction>.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<SelectBarcodeAction>.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<SelectBarcodeAction>.Warn("{条码扫描信息报表-查询} 缺少DataGridView控件...");
runtime.IsReturn = false;
return;
}
_clientDGV.BaseControl.BindDataSource = null;
_clientDGV.BaseControl.BindDataSource = table;
}
}
}

@ -31,11 +31,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer
} }
dbHelper.ClearParameter(); dbHelper.ClearParameter();
StringBuilder sbSql = new StringBuilder(@"select t1.objId,t1.reportId,t2.Name as eqNo,t1.batch,t1.matCode, StringBuilder sbSql = new StringBuilder(@" select objId, reportId, recipeCode, recipeName, planCode, planName, recordTime, dryNo, Batch from Report_Dry where 1=1 ");
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");
List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件 List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
IBaseControl startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl; 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) if (startdate != null && starttime != null)
{ {
//Append //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 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; IBaseControl endtime = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "endtime").FirstOrDefault().BaseControl;
if (enddate != null && endtime != null) 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 else
{ {
ICSharpCode.Core.LoggingService<SelectAction>.Debug("{干混机报表-查询} 缺少key值为enddate或者enddate的时间查询条件..."); ICSharpCode.Core.LoggingService<SelectAction>.Debug("{干混机报表-查询} 缺少key值为enddate或者enddate的时间查询条件...");
return; return;
} }
sbSql.Append(" ORDER BY t1.recordTime desc"); sbSql.Append(" ORDER BY recordTime desc");
dbHelper.CommandText = sbSql.ToString(); dbHelper.CommandText = sbSql.ToString();
dbHelper.CommandType = System.Data.CommandType.Text; dbHelper.CommandType = System.Data.CommandType.Text;

File diff suppressed because it is too large Load Diff

@ -2,7 +2,6 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Report_DryMixer" children="Controls"> <Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Report_DryMixer" children="Controls">
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox3" children="Controls"> <Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox3" children="Controls">
<Object type="Mesnac.Controls.Default.MultiColHeaderDgv, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MultiColHeaderDgv1" children="Controls"> <Object type="Mesnac.Controls.Default.MultiColHeaderDgv, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MultiColHeaderDgv1" children="Controls">
<Property name="Dock">Fill</Property>
<Property name="Location">3, 22</Property> <Property name="Location">3, 22</Property>
<Property name="Name">MultiColHeaderDgv1</Property> <Property name="Name">MultiColHeaderDgv1</Property>
<Property name="Size">1446, 331</Property> <Property name="Size">1446, 331</Property>
@ -20,7 +19,7 @@
<Object type="Mesnac.Controls.Default.MCDataGridView, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCDataGridView1" children="Controls"> <Object type="Mesnac.Controls.Default.MCDataGridView, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCDataGridView1" children="Controls">
<Property name="DisplayAllColumn">False</Property> <Property name="DisplayAllColumn">False</Property>
<Property name="DgvColumn"> <Property name="DgvColumn">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJoBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EYXRhR3JpZFZpZXdDb2x1bW5zLCBNZXNuYWMuQ29udHJvbHMuQmFzZSwg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