湿度机

dep
我叫锄头 11 months ago
parent f705fda6f6
commit d1e8ceacdb

@ -291,6 +291,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report
} }
private static void InsertD(int no) private static void InsertD(int no)
{ {
DB2106Helper dB2106 = new DB2106Helper(); DB2106Helper dB2106 = new DB2106Helper();
@ -545,8 +546,9 @@ namespace Mesnac.Action.ChemicalWeighing.Report
report.planCode = 0; report.planCode = 0;
report.planName = ""; report.planName = "";
report.recordTime = DateTime.Now; report.recordTime = DateTime.Now;
report.reportTime = DateTime.Now;
report.WetNo = no; report.WetNo = no;
report.Batch = 0; report.Batch = report.Batch;
List<Report_WetMixer_Detail> lde = new List<Report_WetMixer_Detail>(); List<Report_WetMixer_Detail> lde = new List<Report_WetMixer_Detail>();
foreach (var item in ls) foreach (var item in ls)
@ -576,6 +578,8 @@ namespace Mesnac.Action.ChemicalWeighing.Report
if(lde.Count > 0) if(lde.Count > 0)
{ {
report.Batch=lde.Select(x=>x.mixBatch).First();
FreeSqlUnit.Instance.Insert(report).ExecuteAffrows(); FreeSqlUnit.Instance.Insert(report).ExecuteAffrows();
FreeSqlUnit.Instance.Insert(lde).ExecuteAffrows(); FreeSqlUnit.Instance.Insert(lde).ExecuteAffrows();
} }

@ -3,6 +3,7 @@ using Mesnac.Controls.Base;
using Mesnac.Controls.Default; using Mesnac.Controls.Default;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -34,6 +35,31 @@ namespace Mesnac.Action.ChemicalWeighing.Report.WetMixer
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;
startdate.MCValue = DateTime.Now.AddDays(-3); startdate.MCValue = DateTime.Now.AddDays(-3);
var MCCombobox1=GetAllControls().FirstOrDefault(x=>x.Name== "MCCombobox1") as MCCombobox;
DataTable dataTable = new DataTable();
dataTable.Columns.Add("CmbValue", typeof(string));
dataTable.Columns.Add("CmbDisplay", typeof(string));
for (int i = 1; i <9; i++)
{
var dr = dataTable.NewRow();
dr[0] = i;
dr[1] = i;
dataTable.Rows.Add(dr);
}
MCCombobox1.DataSource = dataTable;
//MCCombobox1
} }
} }
} }

@ -1,6 +1,8 @@
using Mesnac.Action.Base; using Mesnac.Action.Base;
using Mesnac.Codd.Session; using Mesnac.Codd.Session;
using Mesnac.Controls.Base; using Mesnac.Controls.Base;
using Mesnac.Controls.Default;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@ -59,6 +61,11 @@ namespace Mesnac.Action.ChemicalWeighing.Report.WetMixer
ICSharpCode.Core.LoggingService<SelectAction>.Debug("{湿混机报表-查询} 缺少key值为enddate或者enddate的时间查询条件..."); ICSharpCode.Core.LoggingService<SelectAction>.Debug("{湿混机报表-查询} 缺少key值为enddate或者enddate的时间查询条件...");
return; return;
} }
var MCCombobox1 = GetAllControls().FirstOrDefault(x => x.Name == "MCCombobox1") as MCCombobox;
sbSql.Append(" and WetNo=" + MCCombobox1.MCValue);
sbSql.Append(" ORDER BY recordTime desc"); sbSql.Append(" ORDER BY recordTime desc");
dbHelper.CommandText = sbSql.ToString(); dbHelper.CommandText = sbSql.ToString();

@ -9,7 +9,10 @@ using DataBlockHelper.DBHelpers;
using DevExpress.Utils.Extensions; using DevExpress.Utils.Extensions;
using ICSharpCode.Core;
using Mesnac.Action.Base; using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.Report;
using Mesnac.Action.ChemicalWeighing.SetValueInfo; using Mesnac.Action.ChemicalWeighing.SetValueInfo;
using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.ChemicalWeighing;
using Mesnac.Controls.Default; using Mesnac.Controls.Default;
@ -30,7 +33,8 @@ namespace Mesnac.Action.ChemicalWeighing.Test
public void theout(object source, EventArgs e) public void theout(object source, EventArgs e)
{ {
LoggingService<TestAction>.InfoFormatted("定时器运行");
ReportReadDb.ReadReport();
} }
public void Run(RuntimeParameter runtime) public void Run(RuntimeParameter runtime)
@ -45,7 +49,7 @@ namespace Mesnac.Action.ChemicalWeighing.Test
mCButton.Click += MCButton_Click; mCButton.Click += MCButton_Click;
System.Timers.Timer t = new System.Timers.Timer(1000);//实例化Timer类设置间隔时间为10000毫秒 System.Timers.Timer t = new System.Timers.Timer(1000*5);//实例化Timer类设置间隔时间为10000毫秒
t.Elapsed += new System.Timers.ElapsedEventHandler(theout);//到达时间的时候执行事件; t.Elapsed += new System.Timers.ElapsedEventHandler(theout);//到达时间的时候执行事件;
t.AutoReset = true;//设置是执行一次false还是一直执行(true) t.AutoReset = true;//设置是执行一次false还是一直执行(true)
t.Enabled = true;//是否执行System.Timers.Timer.Elapsed事件 t.Enabled = true;//是否执行System.Timers.Timer.Elapsed事件
@ -54,12 +58,7 @@ namespace Mesnac.Action.ChemicalWeighing.Test
private void MCButton_Click(object sender, EventArgs e) private void MCButton_Click(object sender, EventArgs e)
{ {
DB2114Helper dB = new DB2114Helper();
var a = dB.Dry;
var b = dB.Gel;
var c = dB.CW;
var d = dB.HW;
var e1 = dB.PD;
} }
} }
} }

@ -64,29 +64,27 @@
<Object type="Mesnac.Controls.Default.MCCombobox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCCombobox1" children="Controls"> <Object type="Mesnac.Controls.Default.MCCombobox, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCCombobox1" children="Controls">
<Property name="AllowTypeAllSymbols">True</Property> <Property name="AllowTypeAllSymbols">True</Property>
<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uPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAJ01lc25hYy5Db250cm9scy5EZWZhdWx0LkNvbWJvYm94SXRlbXNbXQIAAAAICAkDAAAAAAAAAAAAAAAHAwAAAAABAAAAAAAAAAQlTWVzbmFjLkNvbnRyb2xzLkRlZmF1bHQuQ29tYm9ib3hJdGVtcwIAAAAL</Binary>
</Property> </Property>
<Property name="IsEmpty">True</Property> <Property name="IsEmpty">True</Property>
<Property name="DisplayFiled">Name</Property> <Property name="DisplayFiled" />
<Property name="ValueFiled">Id</Property> <Property name="ValueFiled" />
<Property name="SelectedChanged"> <Property name="SelectedChanged">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary> <Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary>
</Property> </Property>
<Property name="MCKey">[DataSource1].[Device].[Id]</Property> <Property name="MCKey" />
<Property name="MCDataSourceID">MCDataSource1</Property> <Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property> <Property name="IsDbControl">False</Property>
<Property name="InitDataSource">select * from Device where Name LIKE '干混%'</Property> <Property name="InitDataSource" />
<Property name="ActionDataSource" /> <Property name="ActionDataSource" />
<Property name="BindDataSource"> <Property name="BindDataSource" />
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAABVTeXN0ZW0uRGF0YS5EYXRhVGFibGUDAAAAGURhdGFUYWJsZS5SZW1vdGluZ1ZlcnNpb24JWG1sU2NoZW1hC1htbERpZmZHcmFtAwEBDlN5c3RlbS5WZXJzaW9uAgAAAAkDAAAABgQAAAD1Azw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi0xNiI/Pg0KPHhzOnNjaGVtYSB4bWxucz0iIiB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOm1zZGF0YT0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp4bWwtbXNkYXRhIj4NCiAgPHhzOmVsZW1lbnQgbmFtZT0iVGFibGUxIj4NCiAgICA8eHM6Y29tcGxleFR5cGU+DQogICAgPC94czpjb21wbGV4VHlwZT4NCiAgPC94czplbGVtZW50Pg0KICA8eHM6ZWxlbWVudCBuYW1lPSJ0bXBEYXRhU2V0IiBtc2RhdGE6SXNEYXRhU2V0PSJ0cnVlIiBtc2RhdGE6TWFpbkRhdGFUYWJsZT0iVGFibGUxIiBtc2RhdGE6VXNlQ3VycmVudExvY2FsZT0idHJ1ZSI+DQogICAgPHhzOmNvbXBsZXhUeXBlPg0KICAgICAgPHhzOmNob2ljZSBtaW5PY2N1cnM9IjAiIG1heE9jY3Vycz0idW5ib3VuZGVkIiAvPg0KICAgIDwveHM6Y29tcGxleFR5cGU+DQogIDwveHM6ZWxlbWVudD4NCjwveHM6c2NoZW1hPgYFAAAAgAE8ZGlmZmdyOmRpZmZncmFtIHhtbG5zOm1zZGF0YT0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp4bWwtbXNkYXRhIiB4bWxuczpkaWZmZ3I9InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206eG1sLWRpZmZncmFtLXYxIiAvPgQDAAAADlN5c3RlbS5WZXJzaW9uBAAAAAZfTWFqb3IGX01pbm9yBl9CdWlsZAlfUmV2aXNpb24AAAAACAgICAIAAAAAAAAA//////////8L</Binary> <Property name="DbOptionType">None</Property>
</Property>
<Property name="DbOptionType">Query</Property>
<Property name="MCVisible">True</Property> <Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property> <Property name="MCEnabled">True</Property>
<Property name="Location">779, 28</Property> <Property name="Location">780, 26</Property>
<Property name="Name">MCCombobox1</Property> <Property name="Name">MCCombobox1</Property>
<Property name="Size">69, 24</Property> <Property name="Size">74, 24</Property>
<Property name="TabIndex">59</Property> <Property name="TabIndex">63</Property>
</Object> </Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel3" children="Controls"> <Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel3" children="Controls">
<Property name="Format" /> <Property name="Format" />

Loading…
Cancel
Save