Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b4cfc899
由
LN
编写于
2024-01-30 15:15:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
4e6b1b61
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
14 行删除
DeviceLibrary/deviceLibrary/ledLabel/LabelInfo.cs
DeviceLibrary/deviceLibrary/ledLabel/LedLabelController.cs
DeviceLibrary/manager/TSAVBean.cs
TSA-V/workForm/FrmTSAV.Designer.cs
DeviceLibrary/deviceLibrary/ledLabel/LabelInfo.cs
查看文件 @
b4cfc89
...
@@ -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
;
}
}
// {
// {
...
...
DeviceLibrary/deviceLibrary/ledLabel/LedLabelController.cs
查看文件 @
b4cfc89
...
@@ -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
.
PositionN
ame
,
com
.
ComCount
,
com
.
PN
,
com
.
ComponentDes
,
com
.
Notes
,
position
.
DeviceIP
,
position
.
Leds
,
opendLed
);
LabelInfo
label
=
new
LabelInfo
(
position
.
PositionN
um
,
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"
,
"
ff0
0"
);
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
);
}
}
...
...
DeviceLibrary/manager/TSAVBean.cs
查看文件 @
b4cfc89
...
@@ -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
;
}
}
...
...
TSA-V/workForm/FrmTSAV.Designer.cs
查看文件 @
b4cfc89
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论