Browse Source

..

Branch_PaiNaWeiSJob
xusc 2 months ago
parent
commit
5936031a3f
  1. BIN
      .vs/ICSSoft.FromERP/v16/.suo
  2. 28
      ICSSoft.FromERP/Data/ICSHelper.cs
  3. 27
      ICSSoft.FromERP/SyncCas_Jinyang.cs

BIN
.vs/ICSSoft.FromERP/v16/.suo

Binary file not shown.

28
ICSSoft.FromERP/Data/ICSHelper.cs

@ -126,6 +126,15 @@ namespace ICSSoft.FromERP
log.Warn(name + "-内存占用:" + memoryUsed);
}
/// <summary>
/// BS MES
/// </summary>
/// <param name="Namespace"></param>
/// <param name="ClassName"></param>
/// <param name="TenantId"></param>
/// <param name="sql"></param>
/// <param name="TempTableName"></param>
/// <returns></returns>
public static string Time(string Namespace, string ClassName, string TenantId, string sql, string TempTableName)
{
try
@ -157,6 +166,15 @@ WHERE Namespace='{0}' AND ClassName='{1}' AND TenantId='{2}'
}
}
/// <summary>
/// CS MES
/// </summary>
/// <param name="Namespace"></param>
/// <param name="Class"></param>
/// <param name="WorkPoint"></param>
/// <param name="sql"></param>
/// <param name="TempTableName"></param>
/// <returns></returns>
public static string Time4Old(string Namespace, string Class, string WorkPoint, string sql, string TempTableName)
{
try
@ -399,6 +417,11 @@ WHERE Namespace='{0}' AND ClassName='{1}' AND TenantId='{2}'
}
/// <summary>
/// BS MES
/// </summary>
/// <param name="conStr"></param>
/// <returns></returns>
public static DataTable GetERPDB(string conStr)
{
try
@ -413,6 +436,11 @@ WHERE Namespace='{0}' AND ClassName='{1}' AND TenantId='{2}'
}
}
/// <summary>
/// CS MES
/// </summary>
/// <param name="conStr"></param>
/// <returns></returns>
public static DataTable GetOldERPDB(string conStr)
{
try

27
ICSSoft.FromERP/SyncCas_Jinyang.cs

@ -66,7 +66,7 @@ DROP TABLE #tempSyncCas_Jinyang
select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a with( nolock)
where a.CreateTime>=@LastTime
where a.CreateTime>@LastTime
select
a.*
@ -96,6 +96,7 @@ select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a wi
{
return;
}
var insertSql = "";
foreach (DataRow item in resultDT.Rows)
{
var input = new CapInputDto();
@ -110,9 +111,25 @@ select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a wi
list.Add(input);
insertSql += @"
INSERT INTO [dbo].[ICSDomeAmb_cus]
([CreateTime]
,IPAddress
,UserCode
,[LotNO]
,[InvStd ]
,[EqCode]
,[Free1]
,[Free2]
)
values ('" + item["CreateTime"].ToString() + "','"+ item["IPAddress"].ToString() + "','"+ item["UserCode"].ToStringExt() + "','" + input.LotNo + "','" + input.ProductNo + "','" + input.EquipmentID + "','" + item["Free1"].ToStringExt() + "','"+ item["Free2"].ToStringExt() + "')";
}
if (list.Count == 0)
{
log.Info("没有数据行");
return;
}
var inputObj = JsonConvert.SerializeObject(list);
//string url = ICSHelper.GetConfigString()["JinyangCapUrl"]+ @"?deipaaskeyauth=a5P1RTL4380zd9jpb57qXx63rdynUHN2";
string url = ICSHelper.GetConfigString()["JinyangCapUrl"];
@ -121,8 +138,10 @@ select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a wi
// var result = HttpHelper.HttpClientPost<ResponseInfoDto>(url, inputObj).Result;
if (result.Result == "OK")
{
ICSHelper.ExecuteDate(conStr, insertSql);
}
else
{

Loading…
Cancel
Save