Commit b4cfc899 LN

bug修改

1 个父辈 4e6b1b61
...@@ -25,7 +25,7 @@ namespace TSA_V.DeviceLibrary ...@@ -25,7 +25,7 @@ namespace TSA_V.DeviceLibrary
this.des = des; this.des = des;
this.notes = notes; this.notes = notes;
this.ip = ip; this.ip = ip;
this.mac = mac; this.mac = mac.Trim();
this.openLed = led; this.openLed = led;
} }
public string ip=""; public string ip="";
...@@ -40,6 +40,9 @@ namespace TSA_V.DeviceLibrary ...@@ -40,6 +40,9 @@ namespace TSA_V.DeviceLibrary
public Dictionary<string,object> toMap() 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>(); Dictionary<string, object> map = new Dictionary<string, object>();
map.Add("lblPos", ResourceControl.GetString("Label_lblPos", "位置:")); map.Add("lblPos", ResourceControl.GetString("Label_lblPos", "位置:"));
map.Add("lblNum", ResourceControl.GetString("Label_lblNum", "库存数量:")); map.Add("lblNum", ResourceControl.GetString("Label_lblNum", "库存数量:"));
...@@ -52,9 +55,18 @@ namespace TSA_V.DeviceLibrary ...@@ -52,9 +55,18 @@ namespace TSA_V.DeviceLibrary
map.Add("des", des); map.Add("des", des);
map.Add("notes", notes); map.Add("notes", notes);
map.Add("styleid", 47); map.Add("styleid", 47);
string ledrgb = openLed ? "ff00" : "0"; //string ledrgb = openLed ? "ff00" : "0";
map.Add("ledrgb", ledrgb); map.Add("边框", "");
map.Add(mac, mac); 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; return map;
} }
// { // {
......
...@@ -53,7 +53,7 @@ namespace TSA_V.DeviceLibrary ...@@ -53,7 +53,7 @@ namespace TSA_V.DeviceLibrary
{ {
return new LabelInfo(); 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; return label;
...@@ -85,7 +85,7 @@ namespace TSA_V.DeviceLibrary ...@@ -85,7 +85,7 @@ namespace TSA_V.DeviceLibrary
private static Dictionary<string, object> getLedMap(string mac, string ledrgb) private static Dictionary<string, object> getLedMap(string mac, string ledrgb)
{ {
Dictionary<string, object> keyValuePairss = new Dictionary<string, object>{ Dictionary<string, object> keyValuePairss = new Dictionary<string, object>{
{ "mac", mac },//标签地址 { "mac", mac .Trim()},//标签地址
{ "lednum", 255 }, { "lednum", 255 },
{ "timeout", 0 }, { "timeout", 0 },
{ "ledrgb", ledrgb }, { "ledrgb", ledrgb },
...@@ -120,10 +120,10 @@ namespace TSA_V.DeviceLibrary ...@@ -120,10 +120,10 @@ namespace TSA_V.DeviceLibrary
Dictionary<string, object> dic = new Dictionary<string, object>(); 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("mappingtype", "868");
dic.Add("styleid", 47); dic.Add("styleid", 47);
dic.Add("ledrgb", "0"); dic.Add("ledrgb", "ff00");
dic.Add("ledstate", "0"); dic.Add("ledstate", "0");
dic.Add("outtime", "0"); dic.Add("outtime", "0");
...@@ -158,12 +158,12 @@ namespace TSA_V.DeviceLibrary ...@@ -158,12 +158,12 @@ namespace TSA_V.DeviceLibrary
if (response.IsSuccessStatusCode) if (response.IsSuccessStatusCode)
{ {
string jsonResponse = response.Content.ReadAsStringAsync().Result; string jsonResponse = response.Content.ReadAsStringAsync().Result;
LogUtil.info($"电子屏 {url} 发送{json} 结果 {response.IsSuccessStatusCode}: " + jsonResponse); LogUtil.info($"电子屏 发送{json} 结果 {response.IsSuccessStatusCode}: " + jsonResponse);
} }
else else
{ {
string jsonResponse = response.Content.ReadAsStringAsync().Result; 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 ...@@ -994,13 +994,13 @@ namespace TSA_V.DeviceLibrary
if (TSAVBean.IsInSuddenDown) if (TSAVBean.IsInSuddenDown)
{ {
ShowMsg = ResourceControl.GetString(ResourceControl.DeviceInSuddenStop, "设备急停中"); ShowMsg = ResourceControl.GetString(ResourceControl.DeviceInSuddenStop, "设备急停中");
}else if (TSAVBean.NoAirAlarm) } else if (TSAVBean.NoAirAlarm)
{ {
ShowMsg = ResourceControl.GetString(ResourceControl.NoAirAlarm, "未检测到气压信号"); ShowMsg = ResourceControl.GetString(ResourceControl.NoAirAlarm, "未检测到气压信号");
} }
else if (TSAVBean.Status.Equals(TSAVStatus.Wait)) 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)) else if (TSAVBean.Status.Equals(TSAVStatus.Reset))
{ {
...@@ -1009,7 +1009,7 @@ namespace TSA_V.DeviceLibrary ...@@ -1009,7 +1009,7 @@ namespace TSA_V.DeviceLibrary
else if (TSAVBean.Status.Equals(TSAVStatus.Runing)) else if (TSAVBean.Status.Equals(TSAVStatus.Runing))
{ {
string msg = ResourceControl.GetString(ResourceControl.DeviceInWork, "设备工作中"); string msg = ResourceControl.GetString(ResourceControl.DeviceInWork, "设备工作中");
string lineMsg = ResourceControl.GetString(ResourceControl.LineTurn, "流水线转动中"); string lineMsg = ResourceControl.GetString(ResourceControl.LineTurn, "流水线转动中");
if (TSAVBean.Work.IsWorking) if (TSAVBean.Work.IsWorking)
{ {
TimeSpan span = DateTime.Now - TSAVBean.Work.beginWorkTime; TimeSpan span = DateTime.Now - TSAVBean.Work.beginWorkTime;
...@@ -1024,7 +1024,7 @@ namespace TSA_V.DeviceLibrary ...@@ -1024,7 +1024,7 @@ namespace TSA_V.DeviceLibrary
else else
{ {
ShowMsg = msg + "\r\n" + TSAVBean.WarnMsg; ShowMsg = msg + "\r\n" + TSAVBean.WarnMsg;
} }
} }
return ShowMsg; return ShowMsg;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!