Commit b4cfc899 LN

bug修改

1 个父辈 4e6b1b61
......@@ -25,7 +25,7 @@ namespace TSA_V.DeviceLibrary
this.des = des;
this.notes = notes;
this.ip = ip;
this.mac = mac;
this.mac = mac.Trim();
this.openLed = led;
}
public string ip="";
......@@ -40,6 +40,9 @@ namespace TSA_V.DeviceLibrary
public Dictionary<string,object> toMap()
{
//[{ "mac":"99.96.19.64","mappingtype":868,"styleid":47,"lblPos":"位置:","pos":"1_8","lblNum":"库位数量:","lblPn":"物料编码:","lblDes":"描述:","lblNotes":"注意事项:","num":"234","pn":"R218","des":"描述内容","notes":"注意事项内容","边框":"","边框1":"","边框2":"","边框3":"","边框4":"","边框5":"","边框6":"","边框7":"","边框8":"","边框9":"","ledrgb":"ff00","ledstate":"0","outtime":"0"}]
Dictionary<string, object> map = new Dictionary<string, object>();
map.Add("lblPos", ResourceControl.GetString("Label_lblPos", "位置:"));
map.Add("lblNum", ResourceControl.GetString("Label_lblNum", "库存数量:"));
......@@ -52,9 +55,18 @@ namespace TSA_V.DeviceLibrary
map.Add("des", des);
map.Add("notes", notes);
map.Add("styleid", 47);
string ledrgb = openLed ? "ff00" : "0";
map.Add("ledrgb", ledrgb);
map.Add(mac, mac);
//string ledrgb = openLed ? "ff00" : "0";
map.Add("边框", "");
map.Add("边框1", "");
map.Add("边框2", "");
map.Add("边框3", "");
map.Add("边框4", "");
map.Add("边框5", "");
map.Add("边框6", "");
map.Add("边框7", "");
map.Add("边框8", "");
map.Add("边框9", "");
map.Add("mac", mac);
return map;
}
// {
......
......@@ -53,7 +53,7 @@ namespace TSA_V.DeviceLibrary
{
return new LabelInfo();
}
LabelInfo label = new LabelInfo(position.PositionName, com.ComCount, com.PN, com.ComponentDes, com.Notes, position.DeviceIP, position.Leds, opendLed);
LabelInfo label = new LabelInfo(position.PositionNum, com.ComCount, com.PN, com.ComponentDes, com.Notes, position.DeviceIP, position.Leds, opendLed);
return label;
......@@ -85,7 +85,7 @@ namespace TSA_V.DeviceLibrary
private static Dictionary<string, object> getLedMap(string mac, string ledrgb)
{
Dictionary<string, object> keyValuePairss = new Dictionary<string, object>{
{ "mac", mac },//标签地址
{ "mac", mac .Trim()},//标签地址
{ "lednum", 255 },
{ "timeout", 0 },
{ "ledrgb", ledrgb },
......@@ -120,10 +120,10 @@ namespace TSA_V.DeviceLibrary
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("mac", label.mac);
dic.Add("mac", label.mac.Trim());
dic.Add("mappingtype", "868");
dic.Add("styleid", 47);
dic.Add("ledrgb", "0");
dic.Add("ledrgb", "ff00");
dic.Add("ledstate", "0");
dic.Add("outtime", "0");
......@@ -158,12 +158,12 @@ namespace TSA_V.DeviceLibrary
if (response.IsSuccessStatusCode)
{
string jsonResponse = response.Content.ReadAsStringAsync().Result;
LogUtil.info($"电子屏 {url} 发送{json} 结果 {response.IsSuccessStatusCode}: " + jsonResponse);
LogUtil.info($"电子屏 发送{json} 结果 {response.IsSuccessStatusCode}: " + jsonResponse);
}
else
{
string jsonResponse = response.Content.ReadAsStringAsync().Result;
LogUtil.info($"电子屏{url} 发送{json} 结果 {response.IsSuccessStatusCode}: " + jsonResponse);
LogUtil.info($"电子屏 发送{json} 结果 {response.IsSuccessStatusCode}: " + jsonResponse);
}
......
......@@ -994,13 +994,13 @@ namespace TSA_V.DeviceLibrary
if (TSAVBean.IsInSuddenDown)
{
ShowMsg = ResourceControl.GetString(ResourceControl.DeviceInSuddenStop, "设备急停中");
}else if (TSAVBean.NoAirAlarm)
} else if (TSAVBean.NoAirAlarm)
{
ShowMsg = ResourceControl.GetString(ResourceControl.NoAirAlarm, "未检测到气压信号");
}
else if (TSAVBean.Status.Equals(TSAVStatus.Wait))
{
ShowMsg = ResourceControl.GetString(ResourceControl.DeviceNotStart, "设备未启动")+" "+startRunMsg;
ShowMsg = ResourceControl.GetString(ResourceControl.DeviceNotStart, "设备未启动") + " " + startRunMsg;
}
else if (TSAVBean.Status.Equals(TSAVStatus.Reset))
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!