Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
f670d693
Commit
f670d693
authored
Apr 30, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-30 优化设备管理日志和异常显示数据显示
parent
a92aa82a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
16 deletions
+61
-16
ServiceHPTCP001.java
...java/com/baosight/hpjx/hp/tc/service/ServiceHPTCP001.java
+54
-8
HPSB001.jsp
src/main/webapp/HP/SB/HPSB001.jsp
+6
-6
HPSB002.jsp
src/main/webapp/HP/SB/HPSB002.jsp
+1
-2
No files found.
src/main/java/com/baosight/hpjx/hp/tc/service/ServiceHPTCP001.java
View file @
f670d693
...
...
@@ -21,6 +21,7 @@ import org.apache.commons.collections.CollectionUtils;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.StringJoiner
;
public
class
ServiceHPTCP001
extends
ServiceBase
{
public
EiInfo
logAnalysis
(
EiInfo
inInfo
)
{
...
...
@@ -92,15 +93,37 @@ public class ServiceHPTCP001 extends ServiceBase {
hpsb001
.
setEquipmentType
(
hpsb00A
.
getEquipmentType
());
Integer
errorCode
=
Integer
.
parseInt
(
cutterbarWarning
.
getErrorCode
());
if
(
errorCode
.
compareTo
(
new
Integer
(
200
))>=
0
&&
errorCode
.
compareTo
(
new
Integer
(
299
))<=
0
){
hpsb001
.
setErrorText
(
String
.
format
(
"(程序号:%s,行号 %s)goto 跳转行%s 不存在"
,
cutterbarWarning
.
getProgramNo
(),
cutterbarWarning
.
getRowNo
(),
cutterbarWarning
.
getGotoRowNone
()));
hpsb002
.
setLogInivalue
(
String
.
format
(
"(程序号:%s,行号 %s)goto 跳转行%s 不存在"
,
cutterbarWarning
.
getProgramNo
(),
cutterbarWarning
.
getRowNo
(),
cutterbarWarning
.
getGotoRowNone
()));
hpsb001
.
setErrorText
(
stringConcat
(
cutterbarWarning
));
hpsb002
.
setLogInivalue
(
stringConcat
(
cutterbarWarning
));
/*String.format("异常编码:%s 异常等级:%s 程序号:%s 文件:%s 行号:%s 跳转行:%s 不存在",
cutterbarWarning.getErrorCode()==null?"":cutterbarWarning.getErrorCode(),
cutterbarWarning.getPrio()==null?"":cutterbarWarning.getPrio(),
cutterbarWarning.getProgramNo()==null?"":cutterbarWarning.getProgramNo(),
cutterbarWarning.getFileName()==null?"":cutterbarWarning.getFileName(),
cutterbarWarning.getRowNo()==null?"":cutterbarWarning.getRowNo(),
cutterbarWarning.getGotoRowNone()==null?"":cutterbarWarning.getGotoRowNone());*/
/*hpsb002.setLogInivalue(String.format("异常编码:%s 异常等级:%s 程序号:%s 文件:%s 行号:%s 跳转行:%s 不存在",
cutterbarWarning.getErrorCode()==null?"":cutterbarWarning.getErrorCode(),
cutterbarWarning.getPrio()==null?"":cutterbarWarning.getPrio(),
cutterbarWarning.getProgramNo()==null?"":cutterbarWarning.getProgramNo(),
cutterbarWarning.getFileName()==null?"":cutterbarWarning.getFileName(),
cutterbarWarning.getRowNo()==null?"":cutterbarWarning.getRowNo(),
cutterbarWarning.getGotoRowNone()==null?"":cutterbarWarning.getGotoRowNone()));*/
}
else
if
(
errorCode
.
compareTo
(
new
Integer
(
300
))>=
0
&&
errorCode
.
compareTo
(
new
Integer
(
399
))<=
0
){
hpsb001
.
setErrorText
(
String
.
format
(
" (文件:%s,行号 %s)括号不匹配"
,
cutterbarWarning
.
getFileName
(),
cutterbarWarning
.
getRowNo
()));
hpsb002
.
setLogInivalue
(
String
.
format
(
" (文件:%s,行号 %s)括号不匹配"
,
cutterbarWarning
.
getFileName
(),
cutterbarWarning
.
getRowNo
()));
hpsb001
.
setErrorText
(
stringConcat
(
cutterbarWarning
));
hpsb002
.
setLogInivalue
(
stringConcat
(
cutterbarWarning
));
/*hpsb001.setErrorText(String.format("异常编码:%s 异常等级:%s 程序号:%s 文件:%s 行号:%s 不匹配",
cutterbarWarning.getErrorCode()==null?"":cutterbarWarning.getErrorCode(),
cutterbarWarning.getPrio()==null?"":cutterbarWarning.getPrio(),
cutterbarWarning.getProgramNo()==null?"":cutterbarWarning.getProgramNo(),
cutterbarWarning.getFileName()==null?"":cutterbarWarning.getFileName(),
cutterbarWarning.getRowNo()==null?"":cutterbarWarning.getRowNo()));
hpsb002.setLogInivalue(String.format("异常编码:%s 异常等级:%s 程序号:%s 文件:%s,行号:%s 不匹配",
cutterbarWarning.getErrorCode()==null?"":cutterbarWarning.getErrorCode(),
cutterbarWarning.getPrio()==null?"":cutterbarWarning.getPrio(),
cutterbarWarning.getProgramNo()==null?"":cutterbarWarning.getProgramNo(),
cutterbarWarning.getFileName()==null?"":cutterbarWarning.getFileName(),
cutterbarWarning.getRowNo()==null?"":cutterbarWarning.getRowNo()));*/
}
hpsb001
.
setCreatedBy
(
"自动化中转程序"
);
...
...
@@ -141,4 +164,27 @@ public class ServiceHPTCP001 extends ServiceBase {
}
return
str
;
}
public
String
stringConcat
(
CutterbarWarning
cutterbarWarning
){
StringJoiner
sj
=
new
StringJoiner
(
";"
);
if
(
StringUtils
.
isNotEmpty
(
cutterbarWarning
.
getErrorCode
())){
sj
.
add
(
"异常编码:"
+
cutterbarWarning
.
getErrorCode
());
}
if
(
StringUtils
.
isNotEmpty
(
cutterbarWarning
.
getPrio
()))
{
sj
.
add
(
" 异常等级:"
+
cutterbarWarning
.
getPrio
());
}
if
(
StringUtils
.
isNotEmpty
(
cutterbarWarning
.
getProgramNo
())){
sj
.
add
(
" 程序号:"
+
cutterbarWarning
.
getProgramNo
());
}
if
(
StringUtils
.
isNotEmpty
(
cutterbarWarning
.
getFileName
()))
{
sj
.
add
(
" 文件:"
+
cutterbarWarning
.
getFileName
());
}
if
(
StringUtils
.
isNotEmpty
(
cutterbarWarning
.
getRowNo
()))
{
sj
.
add
(
" 行号:"
+
cutterbarWarning
.
getRowNo
());
}
if
(
StringUtils
.
isNotEmpty
(
cutterbarWarning
.
getGotoRowNone
())){
sj
.
add
(
" 跳转行:"
+
cutterbarWarning
.
getGotoRowNone
());
}
return
sj
.
toString
();
}
}
src/main/webapp/HP/SB/HPSB001.jsp
View file @
f670d693
...
...
@@ -24,14 +24,14 @@
<EF:EFComboColumn
ename=
"equipmentCode"
cname=
"设备编码"
blockName=
"deviceCode_block_id"
columnTemplate=
"#=valueField#-#=textField#"
itemTemplate=
"#=valueField#-#=textField#"
textField=
"#=textField#"
valueField=
"valueField"
enable=
"false"
readonly=
"true"
width=
"
10
0"
align=
"center"
>
enable=
"false"
readonly=
"true"
width=
"
8
0"
align=
"center"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"errorCode"
cname=
"异常编码"
enable=
"false"
readonly=
"true"
width=
"40"
align=
"center"
/>
<EF:EFColumn
ename=
"programNo"
cname=
"程序号"
enable=
"false"
readonly=
"true"
width=
"40"
align=
"center"
/>
<EF:EFColumn
ename=
"prio"
cname=
"数据内容"
enable=
"false"
readonly=
"true"
width=
"40"
align=
"center"
/>
<EF:EFColumn
ename=
"rowno"
cname=
"行号"
enable=
"false"
readonly=
"true"
width=
"30"
align=
"center"
/>
<EF:EFColumn
ename=
"gotoRowNone"
cname=
"不存在跳转行"
enable=
"false"
readonly=
"true"
width=
"50"
align=
"center"
/>
<EF:EFColumn
ename=
"errorCode"
cname=
"异常编码"
enable=
"false"
readonly=
"true"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"programNo"
cname=
"程序号"
enable=
"false"
readonly=
"true"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"prio"
cname=
"异常等级"
enable=
"false"
readonly=
"true"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"fileName"
cname=
"文件名"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"rowno"
cname=
"行号"
enable=
"false"
readonly=
"true"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"gotoRowNone"
cname=
"不存在跳转行"
enable=
"false"
readonly=
"true"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"errorText"
cname=
"异常文本"
width=
"150"
readonly=
"true"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
...
...
src/main/webapp/HP/SB/HPSB002.jsp
View file @
f670d693
...
...
@@ -17,7 +17,6 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键id"
hidden=
"true"
/>
<
%
--
<
EF:EFColumn
ename=
"createdBy"
cname=
"操作人"
enable=
"false"
readonly=
"true"
width=
"150"
align=
"center"
/>
--%>
<EF:EFColumn
ename=
"equipmentType"
cname=
"日志类型"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
/>
<EF:EFComboColumn
ename=
"equipmentType"
cname=
"日志类型"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hppz.equipmentType"
/>
</EF:EFComboColumn>
...
...
@@ -26,7 +25,7 @@
textField=
"#=textField#"
valueField=
"valueField"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"logInivalue"
cname=
"
数据内容"
enable=
"false"
readonly=
"true"
width=
"1
00"
align=
"center"
/>
<EF:EFColumn
ename=
"logInivalue"
cname=
"
日志内容"
enable=
"false"
readonly=
"true"
width=
"2
00"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
readonly=
"true"
width=
"120"
align=
"center"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
</EF:EFGrid>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment