Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 48d97930
由
LN
编写于
2024-10-22 13:24:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
数量转换出错修改
1 个父辈
2c70a0b0
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
56 行增加
和
31 行删除
DeviceLibrary/csvLoad/CSVBomManager.cs
DeviceLibrary/csvLoad/position/ComponetInfo.cs
DeviceLibrary/deviceLibrary/ledLabel/LedLabelController.cs
DeviceLibrary/manager/work/TSAVBean.cs
TSA-V/FrmComponentList.cs
TSA-V/workForm/FrmTSAV.cs
DeviceLibrary/csvLoad/CSVBomManager.cs
查看文件 @
48d9793
...
@@ -845,8 +845,8 @@ namespace TSA_V.LoadCSVLibrary
...
@@ -845,8 +845,8 @@ namespace TSA_V.LoadCSVLibrary
List
<
ComponetInfo
>
list
=
(
from
m
in
useComponets
where
m
.
Id
.
Equals
(
obj
.
Id
)
select
m
).
ToList
();
List
<
ComponetInfo
>
list
=
(
from
m
in
useComponets
where
m
.
Id
.
Equals
(
obj
.
Id
)
select
m
).
ToList
();
if
(
list
.
Count
>
0
)
if
(
list
.
Count
>
0
)
{
{
obj
.
ComCount
=
(
int
.
Parse
(
obj
.
ComCount
)
-
list
.
Count
).
ToString
();
obj
.
ComCount
=
(
obj
.
GetCount
(
)
-
list
.
Count
).
ToString
();
if
(
int
.
Parse
(
obj
.
ComCount
)
<
0
)
if
(
obj
.
GetCount
(
)
<
0
)
{
{
obj
.
ComCount
=
"0"
;
obj
.
ComCount
=
"0"
;
}
}
...
...
DeviceLibrary/csvLoad/position/ComponetInfo.cs
查看文件 @
48d9793
...
@@ -158,5 +158,16 @@ namespace TSA_V.LoadCSVLibrary
...
@@ -158,5 +158,16 @@ namespace TSA_V.LoadCSVLibrary
{
{
return
$
"ID:{Id},Pn:{PN},TagNo:{TagNo},X:{PositionX},Y:{PositionY},Des:{ComponentDes},Count:{ComCount},PositionNum:{PositionNum}"
;
return
$
"ID:{Id},Pn:{PN},TagNo:{TagNo},X:{PositionX},Y:{PositionY},Des:{ComponentDes},Count:{ComCount},PositionNum:{PositionNum}"
;
}
}
public
int
GetCount
()
{
try
{
return
int
.
Parse
(
this
.
ComCount
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
ex
.
ToString
());
}
return
0
;
}
}
}
}
}
DeviceLibrary/deviceLibrary/ledLabel/LedLabelController.cs
查看文件 @
48d9793
...
@@ -57,7 +57,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -57,7 +57,7 @@ namespace TSA_V.DeviceLibrary
}
}
LabelInfo
label
=
new
LabelInfo
(
position
.
PositionNum
,
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
);
if
(
int
.
Parse
(
com
.
ComCount
)
<=
0
)
if
(
com
.
GetCount
(
)
<=
0
)
{
{
label
.
notes
=
ResourceControl
.
GetString
(
"元器件数量不足"
,
"元器件数量不足"
);
label
.
notes
=
ResourceControl
.
GetString
(
"元器件数量不足"
,
"元器件数量不足"
);
}
}
...
...
DeviceLibrary/manager/work/TSAVBean.cs
查看文件 @
48d9793
...
@@ -151,6 +151,12 @@ namespace TSA_V.DeviceLibrary
...
@@ -151,6 +151,12 @@ namespace TSA_V.DeviceLibrary
public
static
string
startRunMsg
=
""
;
public
static
string
startRunMsg
=
""
;
public
static
string
StartRun
()
public
static
string
StartRun
()
{
{
if
(
Setting_NInit
.
Device_SoftMode
)
{
ToRunning
(
"简洁模式,无硬件需要复位"
);
}
if
(!
IOManager
.
ShuddenOK
())
if
(!
IOManager
.
ShuddenOK
())
{
{
WarnMsg
=
GetTime
()
+
ResourceControl
.
GetString
(
"FrmBoardInfo_lblMsg_Text"
,
"急停未开"
);
WarnMsg
=
GetTime
()
+
ResourceControl
.
GetString
(
"FrmBoardInfo_lblMsg_Text"
,
"急停未开"
);
...
@@ -1019,39 +1025,47 @@ namespace TSA_V.DeviceLibrary
...
@@ -1019,39 +1025,47 @@ namespace TSA_V.DeviceLibrary
public
static
string
GetShowMsg
()
public
static
string
GetShowMsg
()
{
{
string
ShowMsg
=
""
;
string
ShowMsg
=
""
;
if
(
TSAVBean
.
IsInSuddenDown
)
if
(
Setting_NInit
.
Device_SoftMode
)
{
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInSuddenStop
,
"设备急停中"
);
}
else
if
(
TSAVBean
.
NoAirAlarm
)
{
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
NoAirAlarm
,
"未检测到气压信号"
);
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Wait
))
{
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceNotStart
,
"设备未启动"
)
+
" "
+
startRunMsg
;
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Reset
))
{
{
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInGohome
,
"设备正在原点返回中"
);
}
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Runing
))
else
{
{
string
msg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInWork
,
"设备工作中"
);
if
(
TSAVBean
.
IsInSuddenDown
)
string
lineMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
LineTurn
,
"流水线转动中"
);
if
(
TSAVBean
.
Work
.
IsWorking
)
{
{
TimeSpan
span
=
DateTime
.
Now
-
TSAVBean
.
Work
.
beginWorkTime
;
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInSuddenStop
,
"设备急停中"
);
int
count
=
TSAVBean
.
Work
.
BoardCount
;
string
time
=
span
.
Hours
.
ToString
().
PadLeft
(
2
,
'0'
)
+
":"
+
span
.
Minutes
.
ToString
().
PadLeft
(
2
,
'0'
)
+
":"
+
span
.
Seconds
.
ToString
().
PadLeft
(
2
,
'0'
);
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
WorkInfoMsg
,
"已工作{0},{1}块电路板"
,
time
,
count
)
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
}
}
else
if
(
TSAVBean
.
LineStep
.
moveType
.
Equals
(
1
)
)
else
if
(
TSAVBean
.
NoAirAlarm
)
{
{
ShowMsg
=
lineMsg
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
NoAirAlarm
,
"未检测到气压信号"
)
;
}
}
else
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Wait
))
{
{
ShowMsg
=
msg
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceNotStart
,
"设备未启动"
)
+
" "
+
startRunMsg
;
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Reset
))
{
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInGohome
,
"设备正在原点返回中"
);
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Runing
))
{
string
msg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInWork
,
"设备工作中"
);
string
lineMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
LineTurn
,
"流水线转动中"
);
if
(
TSAVBean
.
Work
.
IsWorking
)
{
TimeSpan
span
=
DateTime
.
Now
-
TSAVBean
.
Work
.
beginWorkTime
;
int
count
=
TSAVBean
.
Work
.
BoardCount
;
string
time
=
span
.
Hours
.
ToString
().
PadLeft
(
2
,
'0'
)
+
":"
+
span
.
Minutes
.
ToString
().
PadLeft
(
2
,
'0'
)
+
":"
+
span
.
Seconds
.
ToString
().
PadLeft
(
2
,
'0'
);
ShowMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
WorkInfoMsg
,
"已工作{0},{1}块电路板"
,
time
,
count
)
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
}
else
if
(
TSAVBean
.
LineStep
.
moveType
.
Equals
(
1
))
{
ShowMsg
=
lineMsg
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
}
else
{
ShowMsg
=
msg
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
}
}
}
}
}
return
ShowMsg
;
return
ShowMsg
;
...
...
TSA-V/FrmComponentList.cs
查看文件 @
48d9793
...
@@ -174,7 +174,7 @@ namespace TSA_V
...
@@ -174,7 +174,7 @@ namespace TSA_V
return
;
return
;
}
}
if
(
int
.
Parse
(
obj
.
ComCount
)
<=
0
)
if
(
obj
.
GetCount
(
)
<=
0
)
{
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WriteComNum
,
"请输入元器件数量!"
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WriteComNum
,
"请输入元器件数量!"
));
txtCount
.
Focus
();
txtCount
.
Focus
();
...
@@ -259,7 +259,7 @@ namespace TSA_V
...
@@ -259,7 +259,7 @@ namespace TSA_V
return
;
return
;
}
}
if
(
int
.
Parse
(
obj
.
ComCount
)
<=
0
)
if
(
obj
.
GetCount
(
)
<=
0
)
{
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WriteComNum
,
"请输入元器件数量!"
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WriteComNum
,
"请输入元器件数量!"
));
txtCount
.
Focus
();
txtCount
.
Focus
();
...
...
TSA-V/workForm/FrmTSAV.cs
查看文件 @
48d9793
...
@@ -654,7 +654,7 @@ namespace TSA_V
...
@@ -654,7 +654,7 @@ namespace TSA_V
lblCount
.
Text
=
com
.
ComCount
.
ToString
();
lblCount
.
Text
=
com
.
ComCount
.
ToString
();
txtCount
.
Text
=
com
.
ComCount
.
ToString
();
txtCount
.
Text
=
com
.
ComCount
.
ToString
();
lblComNotices
.
Text
=
com
.
Notes
.
ToString
();
lblComNotices
.
Text
=
com
.
Notes
.
ToString
();
if
(
int
.
Parse
(
com
.
ComCount
)
<=
0
)
if
(
com
.
GetCount
(
)
<=
0
)
{
{
lblComNotices
.
Text
=
ResourceCulture
.
GetString
(
"元器件数量不足,请及时补充"
,
"元器件数量不足,请及时补充"
);
lblComNotices
.
Text
=
ResourceCulture
.
GetString
(
"元器件数量不足,请及时补充"
,
"元器件数量不足,请及时补充"
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论