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
7cb2b4dc
Commit
7cb2b4dc
authored
Apr 18, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
e7881cc8
a46c445a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
17 deletions
+34
-17
LogInformationController.java
...om/baosight/hpjx/controller/LogInformationController.java
+31
-15
ServiceHPSB002.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
+1
-0
HPSB001.jsp
src/main/webapp/HP/SB/HPSB001.jsp
+1
-1
HPSB002.jsp
src/main/webapp/HP/SB/HPSB002.jsp
+1
-1
No files found.
src/main/java/com/baosight/hpjx/controller/LogInformationController.java
View file @
7cb2b4dc
...
...
@@ -11,33 +11,37 @@ import com.baosight.hpjx.hp.sb.domain.HPSB002;
import
com.baosight.hpjx.hp.sb.domain.HPSB00A
;
import
com.baosight.hpjx.util.StringUtils
;
import
com.baosight.hpjx.xml.XmlUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
@Controller
@CrossOrigin
@RequestMapping
({
"/log
/information
"
})
public
class
LogInformationController
extends
ServiceBase
{
@RequestMapping
({
"/log"
})
public
class
LogInformationController
{
@RequestMapping
(
{
"/analysis"
}
)
public
String
logAnalysis
(
@
PathVariable
HPSB00A
hpsb00A
)
{
@RequestMapping
(
value
=
"/information"
,
method
=
RequestMethod
.
POST
)
public
String
logAnalysis
(
@
RequestBody
HPSB00A
hpsb00A
)
{
HPSB002
hpsb002
=
new
HPSB002
();
HPSB001
hpsb001
=
new
HPSB001
();
List
<
HPSB002
>
hpsb002List
=
new
ArrayList
<>();
List
<
HPSB001
>
hpsb001List
=
new
ArrayList
<>();
EiInfo
outInfo
=
new
EiInfo
();
//TODO 根据TYPE来判断内容属于哪一种,然后再进行解析
//TODO TYPE = STARUS_TYPE --- 设备状态
//TODO TYPE = TIME_TYPE --- 开机时间
//TODO TYPE = WARNING_TYPE --- 报警内容
String
equipmentType
=
hpsb00A
.
getEquipmentType
();
if
(
StringUtils
.
isEmpty
(
equipmentType
))
{
if
(
StringUtils
.
is
Not
Empty
(
equipmentType
))
{
if
(
equipmentType
.
equals
(
HPConstants
.
STARUS_TYPE
))
{
//解析设备状态
List
<
CutterbarStatus
>
cutterbarStatusList
=
XmlUtils
.
readXml
(
hpsb00A
.
getDataContent
(),
CutterbarStatus
.
class
);
...
...
@@ -45,8 +49,12 @@ public class LogInformationController extends ServiceBase {
hpsb002
.
setEquipmentCode
(
hpsb00A
.
getEquipmentCode
());
hpsb002
.
setEquipmentType
(
hpsb00A
.
getEquipmentType
());
hpsb002
.
setLogValue
(
cutterbarStatusList
.
get
(
0
).
getStatus
().
toString
());
DaoUtils
.
insert
(
"HPSB002.insert"
,
hpsb002
);
return
"设备日志记录成功"
;
hpsb002List
.
add
(
hpsb002
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
setRows
(
hpsb002List
);
outInfo
.
set
(
EiConstant
.
serviceName
,
"HPSB002"
);
outInfo
.
set
(
EiConstant
.
methodName
,
"insert"
);
outInfo
=
XLocalManager
.
call
(
outInfo
);
return
outInfo
.
getMsg
();
}
if
(
equipmentType
.
equals
(
HPConstants
.
TIME_TYPE
))
{
//解析开机时间
...
...
@@ -55,8 +63,12 @@ public class LogInformationController extends ServiceBase {
hpsb002
.
setEquipmentCode
(
hpsb00A
.
getEquipmentCode
());
hpsb002
.
setEquipmentType
(
hpsb00A
.
getEquipmentType
());
hpsb002
.
setLogValue
(
cutterbarTimeList
.
get
(
0
).
getTime
());
DaoUtils
.
insert
(
"HPSB002.insert"
,
hpsb002
);
return
"设备日志记录成功"
;
hpsb002List
.
add
(
hpsb002
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
setRows
(
hpsb002List
);
outInfo
.
set
(
EiConstant
.
serviceName
,
"HPSB002"
);
outInfo
.
set
(
EiConstant
.
methodName
,
"insert"
);
outInfo
=
XLocalManager
.
call
(
outInfo
);
return
outInfo
.
getMsg
();
}
if
(
equipmentType
.
equals
(
HPConstants
.
WARNING_TYPE
))
{
//解析报警内容
...
...
@@ -74,8 +86,12 @@ public class LogInformationController extends ServiceBase {
hpsb001
.
setFileName
(
cutterbarWarning
.
getFileName
());
hpsb001
.
setEquipmentCode
(
hpsb00A
.
getEquipmentCode
());
hpsb001
.
setEquipmentType
(
hpsb00A
.
getEquipmentType
());
DaoUtils
.
insert
(
"HPSB001.insert"
,
hpsb001
);
return
"设备异常日志记录成功"
;
hpsb001List
.
add
(
hpsb001
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
setRows
(
hpsb001List
);
outInfo
.
set
(
EiConstant
.
serviceName
,
"HPSB001"
);
outInfo
.
set
(
EiConstant
.
methodName
,
"insert"
);
outInfo
=
XLocalManager
.
call
(
outInfo
);
return
outInfo
.
getMsg
();
}
}
return
"未解析到日志类型"
;
...
...
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
View file @
7cb2b4dc
...
...
@@ -78,6 +78,7 @@ public class ServiceHPSB002 extends ServiceBase {
return
query
(
inInfo
);
}
/**
* 修改操作.
*/
...
...
src/main/webapp/HP/SB/HPSB001.jsp
View file @
7cb2b4dc
...
...
@@ -17,7 +17,7 @@
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"created
Name
"
cname=
"操作人"
enable=
"false"
readonly=
"true"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"created
By
"
cname=
"操作人"
enable=
"false"
readonly=
"true"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"errorCode"
cname=
"异常编码"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"programNo"
cname=
"程序号"
enable=
"false"
readonly=
"true"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"equipmentType"
cname=
"设备状态"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
/>
...
...
src/main/webapp/HP/SB/HPSB002.jsp
View file @
7cb2b4dc
...
...
@@ -16,7 +16,7 @@
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"created
Name
"
cname=
"操作人"
enable=
"false"
readonly=
"true"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"created
By
"
cname=
"操作人"
enable=
"false"
readonly=
"true"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"equipmentType"
cname=
"设备状态"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"equipmentCode"
cname=
"设备编码"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"logValue"
cname=
"数据内容"
enable=
"false"
readonly=
"true"
width=
"100"
align=
"center"
/>
...
...
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