1
This commit is contained in:
@@ -121,8 +121,7 @@ namespace Tnb.ProductionMgr
|
||||
private void CheckGet(object state)
|
||||
{
|
||||
Dictionary<string, string[]> getdic = new Dictionary<string, string[]>();
|
||||
getdic.Add("SSX-021-005", new string[] { "CS05", "FullBoxAllowGet", "Code" });
|
||||
getdic.Add("SSX-021-006", new string[] { "CS06", "FullBoxAllowGet", "Code" });
|
||||
getdic.Add("SSX-021-005", new string[] { "YTCS", "AllowFullOut_CS05", "LiftCode" });
|
||||
foreach (var key in getdic.Keys)
|
||||
{
|
||||
try
|
||||
@@ -138,14 +137,16 @@ namespace Tnb.ProductionMgr
|
||||
JObject? coderes = JsonConvert.DeserializeObject<JObject>(codedata);
|
||||
string coderesult = coderes != null && coderes["Value"] != null ? coderes.Value<string>("Value")! : "";
|
||||
var DistaskH = _repository.AsSugarClient().Queryable<WmsDistaskH>().Where(p => p.carry_code == coderesult && p.status == WmsWareHouseConst.TASK_BILL_STATUS_RUNING_ID).First();
|
||||
dynamic reqBody = new ExpandoObject();
|
||||
reqBody.taskCode = DistaskH.bill_code;
|
||||
reqBody.slotCode = key;
|
||||
reqBody.containerCode = coderesult;
|
||||
CancellationTokenSource Ctu = new();
|
||||
//{"code":500,"msg":"成功!"}
|
||||
dynamic respBody = HttpClientHelper.PostStreamAsync("http://192.168.11.104:1880/wcs/notify/cargo", reqBody, Ctu.Token).Result;
|
||||
Ctu.Dispose();
|
||||
if (DistaskH != null)
|
||||
{
|
||||
dynamic reqBody = new ExpandoObject();
|
||||
reqBody.taskCode = DistaskH.bill_code;
|
||||
reqBody.slotCode = key;
|
||||
reqBody.containerCode = coderesult;
|
||||
CancellationTokenSource Ctu = new();
|
||||
dynamic respBody = HttpClientHelper.PostStreamAsync("http://192.168.11.104:1880/wcs/notify/cargo", reqBody, Ctu.Token).Result;
|
||||
Ctu.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -190,7 +191,7 @@ namespace Tnb.ProductionMgr
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
// Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromSeconds(300));
|
||||
// CheckGettimer = new Timer(CheckGet, null, TimeSpan.Zero, TimeSpan.FromSeconds(300));
|
||||
CheckGettimer = new Timer(CheckGet, null, TimeSpan.Zero, TimeSpan.FromSeconds(60));
|
||||
// Scantimer = new Timer(ScanInStock, null, TimeSpan.Zero, TimeSpan.FromSeconds(300));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user