|
@ -66,7 +66,7 @@ DROP TABLE #tempSyncCas_Jinyang |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a with( nolock) |
|
|
select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a with( nolock) |
|
|
where a.CreateTime>=@LastTime |
|
|
|
|
|
|
|
|
where a.CreateTime>@LastTime |
|
|
|
|
|
|
|
|
select |
|
|
select |
|
|
a.* |
|
|
a.* |
|
@ -96,6 +96,7 @@ select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a wi |
|
|
{ |
|
|
{ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
var insertSql = ""; |
|
|
foreach (DataRow item in resultDT.Rows) |
|
|
foreach (DataRow item in resultDT.Rows) |
|
|
{ |
|
|
{ |
|
|
var input = new CapInputDto(); |
|
|
var input = new CapInputDto(); |
|
@ -110,9 +111,25 @@ select * ,a.CreateTime as MTime into #tempSyncCas_Jinyang from [ICSDomeAmb] a wi |
|
|
|
|
|
|
|
|
list.Add(input); |
|
|
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); |
|
|
var inputObj = JsonConvert.SerializeObject(list); |
|
|
//string url = ICSHelper.GetConfigString()["JinyangCapUrl"]+ @"?deipaaskeyauth=a5P1RTL4380zd9jpb57qXx63rdynUHN2";
|
|
|
//string url = ICSHelper.GetConfigString()["JinyangCapUrl"]+ @"?deipaaskeyauth=a5P1RTL4380zd9jpb57qXx63rdynUHN2";
|
|
|
string url = ICSHelper.GetConfigString()["JinyangCapUrl"]; |
|
|
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;
|
|
|
// var result = HttpHelper.HttpClientPost<ResponseInfoDto>(url, inputObj).Result;
|
|
|
if (result.Result == "OK") |
|
|
if (result.Result == "OK") |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ICSHelper.ExecuteDate(conStr, insertSql); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|