Merge branch 'dep_yw0907' of http://175.27.215.92:3000/yangw/lj_plc into dep_yw0907

# Conflicts:
#	Main/MCEdit/Data/MCProject/nodeDevice.xml
master
wangsr 1 year ago
commit ab7419f990

@ -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; }

@ -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<LjFormulaDetail> 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,

@ -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";

@ -607,7 +607,6 @@
<Compile Include="ProjectDebug\SelectAction.cs" />
<Compile Include="ProjectDebug\ModifyAction.cs" />
<Compile Include="ProjectDebug\UpdateValueAction.cs" />
<Compile Include="Report\BarcodeReport\SelectBarcodeAction.cs" />
<Compile Include="Report\DryMixer\ExportAction.cs" />
<Compile Include="Report\DryMixer\InitFormAction.cs" />
<Compile Include="Report\DryMixer\SelectAction.cs" />
@ -921,6 +920,7 @@
<ItemGroup>
<Folder Include="LjPlanning\Manager\" />
<Folder Include="Product\PptShift\" />
<Folder Include="Report\BarcodeReport\" />
</ItemGroup>
<ItemGroup>
<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();
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<DbMCControl> 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<SelectAction>.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;

@ -13,7 +13,7 @@
</Connection>
</Main>
<Group>
<Group name="B1" block="2107" start="0" len="1030" access="ReadWrite" remark="ParametersWithPc" isautoread="True">
<Group name="B1" block="2107" start="0" len="1032" access="ReadWrite" remark="ParametersWithPc" isautoread="True">
<Data>
<Data name="FirstWord" runname="FirstWord" start="0" len="1" method="Default_Bit(0,1)" max="" issave="False" subtractor="" remark="FirstWord" />
<Data name="WatchDog" runname="WatchDog" start="1" len="1" method="Default_ShortDiv()" max="" issave="False" subtractor="" remark="系统通用参数" />
@ -772,7 +772,35 @@
<Data name="AS7GET02" runname="AS1GET02" start="1029" len="1" method="Default_Bit(1,1)" max="" issave="False" subtractor="" remark="" />
<Data name="AS8GET01" runname="AS1GET01" start="1029" len="1" method="Default_Bit(2,1)" max="" issave="False" subtractor="" remark="" />
<Data name="AS8GET02" runname="AS8GET02" start="1029" len="1" method="Default_Bit(3,1)" max="" issave="False" subtractor="" remark="" />
</Data>
<Data name="lowLevel_D1" runname="lowLevel_D1" start="1030" len="1" method="Default_Bit(0,1)" max="" issave="False" subtractor="" remark="日罐 A 低料位" />
<Data name="highLevel_D1" runname="highLevel_D1" start="1030" len="1" method="Default_Bit(1,1)" max="" issave="False" subtractor="" remark="日罐 A 高料位" />
<Data name="lowLevel_D2" runname="lowLevel_D2" start="1030" len="1" method="Default_Bit(2,1)" max="" issave="False" subtractor="" remark="日罐 B 低料位" />
<Data name="highLevel_D2" runname="highLevel_D2" start="1030" len="1" method="Default_Bit(3,1)" max="" issave="False" subtractor="" remark="日罐 B 高料位" />
<Data name="lowLevel_D3" runname="lowLevel_D3" start="1030" len="1" method="Default_Bit(4,1)" max="" issave="False" subtractor="" remark="日罐 C 低料位" />
<Data name="highLevel_D3" runname="highLevel_D3" start="1030" len="1" method="Default_Bit(5,1)" max="" issave="False" subtractor="" remark="日罐 C 高料位" />
<Data name="lowLevel_D4" runname="lowLevel_D4" start="1030" len="1" method="Default_Bit(6,1)" max="" issave="False" subtractor="" remark="日罐 D 低料位" />
<Data name="highLevel_D4" runname="highLevel_D4" start="1030" len="1" method="Default_Bit(7,1)" max="" issave="False" subtractor="" remark="日罐 D 高料位" />
<Data name="lowLevel_D5" runname="lowLevel_D5" start="1030" len="1" method="Default_Bit(8,1)" max="" issave="False" subtractor="" remark="日罐 E 低料位" />
<Data name="highLevel_D5" runname="highLevel_D5" start="1030" len="1" method="Default_Bit(9,1)" max="" issave="False" subtractor="" remark="日罐 E 高料位" />
<Data name="lowLevel_D6" runname="lowLevel_D6" start="1030" len="1" method="Default_Bit(10,1)" max="" issave="False" subtractor="" remark="日罐 F 低料位" />
<Data name="highLevel_D6" runname="highLevel_D6" start="1030" len="1" method="Default_Bit(11,1)" max="" issave="False" subtractor="" remark="日罐 F 高料位" />
<Data name="lowLevel_D7" runname="lowLevel_D7" start="1030" len="1" method="Default_Bit(12,1)" max="" issave="False" subtractor="" remark="日罐 G 低料位" />
<Data name="highLevel_D7" runname="highLevel_D7" start="1030" len="1" method="Default_Bit(13,1)" max="" issave="False" subtractor="" remark="日罐 G 高料位" />
<Data name="lowLevel_D8" runname="lowLevel_D8" start="1030" len="1" method="Default_Bit(14,1)" max="" issave="False" subtractor="" remark="日罐 H 低料位" />
<Data name="highLevel_D8" runname="highLevel_D8" start="1030" len="1" method="Default_Bit(15,1)" max="" issave="False" subtractor="" remark="日罐 H 高料位" />
<Data name="lowLevel_D9" runname="lowLevel_D9" start="1031" len="1" method="Default_Bit(0,1)" max="" issave="False" subtractor="" remark="日罐 I 低料位" />
<Data name="highLevel_D9" runname="highLevel_D9" start="1031" len="1" method="Default_Bit(1,1)" max="" issave="False" subtractor="" remark="日罐 I 高料位" />
<Data name="lowLevel_D10" runname="lowLevel_D10" start="1031" len="1" method="Default_Bit(2,1)" max="" issave="False" subtractor="" remark="日罐 J 低料位" />
<Data name="highLevel_D10" runname="highLevel_D10" start="1031" len="1" method="Default_Bit(3,1)" max="" issave="False" subtractor="" remark="日罐 J 高料位" />
<Data name="lowLevel_D11" runname="lowLevel_D11" start="1031" len="1" method="Default_Bit(4,1)" max="" issave="False" subtractor="" remark="日罐 K 低料位" />
<Data name="highLevel_D11" runname="highLevel_D11" start="1031" len="1" method="Default_Bit(5,1)" max="" issave="False" subtractor="" remark="日罐 K 高料位" />
<Data name="lowLevel_D12" runname="lowLevel_D12" start="1031" len="1" method="Default_Bit(6,1)" max="" issave="False" subtractor="" remark="日罐 L 低料位" />
<Data name="highLevel_D12" runname="highLevel_D12" start="1031" len="1" method="Default_Bit(7,1)" max="" issave="False" subtractor="" remark="日罐 L 高料位" />
</Data>
</Group>
<Group name="reportDataToPC" block="2106" start="0" len="2824" access="ReadWrite" remark="reportDataToPC" isautoread="False">
<Data>

@ -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="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">
<Property name="Dock">Fill</Property>
<Property name="Location">3, 22</Property>
<Property name="Name">MultiColHeaderDgv1</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">
<Property name="DisplayAllColumn">False</Property>
<Property name="DgvColumn">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJoBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EYXRhR3JpZFZpZXdDb2x1bW5zLCBNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAKk1lc25hYy5Db250cm9scy5CYXNlLkRhdGFHcmlkVmlld0NvbHVtbnNbXQIAAAAICAkDAAAACgAAAO0AAAAHAwAAAAABAAAAEAAAAAQoTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGF0YUdyaWRWaWV3Q29sdW1ucwIAAAAJBAAAAAkFAAAACQYAAAAJBwAAAAkIAAAACQkAAAAJCgAAAAkLAAAACQwAAAAJDQAAAA0GBQQAAAAoTWVzbmFjLkNvbnRyb2x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