|
|
|
@ -1,4 +1,8 @@
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity;
|
|
|
|
|
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
@ -24,10 +28,39 @@ namespace Mesnac.Action.ChemicalWeighing.InterfaceDocking
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string GetLGInfo()
|
|
|
|
|
public Dictionary<int, string> GetLGInfo()
|
|
|
|
|
{
|
|
|
|
|
string stry = new GetLGInfoEntity().JsonTo();
|
|
|
|
|
return Post("http://192.168.202.34:30000/prod-api/open/openInterface/getLGInfo", stry);
|
|
|
|
|
Dictionary<int, string> dic = new Dictionary<int, string>();
|
|
|
|
|
for (int i = 1; i <= 8; i++)
|
|
|
|
|
{
|
|
|
|
|
dic.Add(i, "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
string stry = new GetLGInfoEntity().JsonTo();
|
|
|
|
|
var str = Post("http://192.168.202.34:30000/prod-api/open/openInterface/getLGInfo", stry);
|
|
|
|
|
var job = JObject.Parse(str);
|
|
|
|
|
if (job["code"].ToString()== "200")
|
|
|
|
|
{
|
|
|
|
|
JArray arr = job["data"] as JArray;
|
|
|
|
|
foreach (JObject item in arr)
|
|
|
|
|
{
|
|
|
|
|
var key = Convert.ToInt32(item["bucketCode"].ToString().Replace("L", ""));
|
|
|
|
|
var value = item["materialCode"].ToString() == "mix01" ? "有烟" : "无烟";
|
|
|
|
|
dic[key] = value;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dic;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return dic;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|