|
|
|
@ -8,12 +8,15 @@ using SlnMesnac.Common;
|
|
|
|
using SlnMesnac.Config;
|
|
|
|
using SlnMesnac.Config;
|
|
|
|
using SlnMesnac.Model.domain;
|
|
|
|
using SlnMesnac.Model.domain;
|
|
|
|
using SlnMesnac.Plc;
|
|
|
|
using SlnMesnac.Plc;
|
|
|
|
|
|
|
|
using SlnMesnac.Repository;
|
|
|
|
using SlnMesnac.Serilog;
|
|
|
|
using SlnMesnac.Serilog;
|
|
|
|
using SqlSugar;
|
|
|
|
using SqlSugar;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections;
|
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text.Json;
|
|
|
|
using System.Text.Json;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using System.Xml.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ConsoleApp
|
|
|
|
namespace ConsoleApp
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -65,7 +68,7 @@ namespace ConsoleApp
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 初始化加载PLC地址,不同工位PLC提供的地址不同
|
|
|
|
/// 初始化加载PLC地址,不同工位PLC提供的地址不同
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
private void init()
|
|
|
|
private async void init()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -440,12 +443,10 @@ namespace ConsoleApp
|
|
|
|
List<Datastationparam> AllDatastationparamList = await SqlSugarClient.Queryable<Datastationparam>().Where(x => x.Dsid == zzdata.Id).ToListAsync();
|
|
|
|
List<Datastationparam> AllDatastationparamList = await SqlSugarClient.Queryable<Datastationparam>().Where(x => x.Dsid == zzdata.Id).ToListAsync();
|
|
|
|
if (AllDatastationparamList != null)
|
|
|
|
if (AllDatastationparamList != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var param in AllDatastationparamList)
|
|
|
|
AllDatastationparamList.ForEach(x => {
|
|
|
|
{
|
|
|
|
string sql = "UPDATE datastationparam SET productid = '" + zzdata.Productid + " ' WHERE id = " + x.Id;
|
|
|
|
param.Productid = zzdata.Productid;
|
|
|
|
int updateflag = SqlSugarClient.Ado.ExecuteCommand(sql);
|
|
|
|
int UpdateDatastationparamFlag = SqlSugarClient.Updateable(param).ExecuteCommand();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|