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
554e11c2
Commit
554e11c2
authored
Apr 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-23 设备日志和设备异常优化
parent
ad6bc893
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
3 deletions
+44
-3
ServiceHPDS001.java
.../java/com/baosight/hpjx/hp/ds/service/ServiceHPDS001.java
+17
-1
ServiceHPSB001.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB001.java
+13
-1
ServiceHPSB002.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
+14
-1
No files found.
src/main/java/com/baosight/hpjx/hp/ds/service/ServiceHPDS001.java
View file @
554e11c2
...
@@ -2,10 +2,16 @@ package com.baosight.hpjx.hp.ds.service;
...
@@ -2,10 +2,16 @@ package com.baosight.hpjx.hp.ds.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.hp.ds.domain.HPDS001
;
import
com.baosight.hpjx.hp.ds.domain.HPDS001
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.util.HashMap
;
/**
/**
* Title: 历史数据清理 <br>
* Title: 历史数据清理 <br>
* @author LiuYang
* @author LiuYang
...
@@ -21,6 +27,16 @@ public class ServiceHPDS001 extends ServiceEPBase {
...
@@ -21,6 +27,16 @@ public class ServiceHPDS001 extends ServiceEPBase {
@OperationLogAnnotation
(
operModul
=
"系统操作日志"
,
operType
=
"删除"
,
operDesc
=
"删除6个月之前的历史数据"
)
@OperationLogAnnotation
(
operModul
=
"系统操作日志"
,
operType
=
"删除"
,
operDesc
=
"删除6个月之前的历史数据"
)
public
EiInfo
deleteHistory
(
EiInfo
inInfo
)
{
public
EiInfo
deleteHistory
(
EiInfo
inInfo
)
{
return
super
.
delete
(
inInfo
,
"HPDS001.deleteHistory"
);
try
{
this
.
dao
.
delete
(
"HPDS001.deleteHistory"
,
new
HashMap
<>());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
0
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
){
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
0
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
}
return
inInfo
;
}
}
}
}
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB001.java
View file @
554e11c2
...
@@ -7,11 +7,13 @@ import com.baosight.hpjx.core.security.UserSessionUtils;
...
@@ -7,11 +7,13 @@ import com.baosight.hpjx.core.security.UserSessionUtils;
import
com.baosight.hpjx.hp.sb.domain.HPSB001
;
import
com.baosight.hpjx.hp.sb.domain.HPSB001
;
import
com.baosight.hpjx.hp.sc.domain.HPSC001
;
import
com.baosight.hpjx.hp.sc.domain.HPSC001
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
...
@@ -145,7 +147,17 @@ public class ServiceHPSB001 extends ServiceBase {
...
@@ -145,7 +147,17 @@ public class ServiceHPSB001 extends ServiceBase {
*/
*/
@OperationLogAnnotation
(
operModul
=
"设备异常日志"
,
operType
=
"删除"
,
operDesc
=
"删除30天之前的历史数据"
)
@OperationLogAnnotation
(
operModul
=
"设备异常日志"
,
operType
=
"删除"
,
operDesc
=
"删除30天之前的历史数据"
)
public
EiInfo
deleteHistory
(
EiInfo
inInfo
)
{
public
EiInfo
deleteHistory
(
EiInfo
inInfo
)
{
return
super
.
delete
(
inInfo
,
"HPSB001.deleteByCreatedTime"
);
try
{
this
.
dao
.
delete
(
"HPSB001.deleteByCreatedTime"
,
new
HashMap
<>());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
0
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
){
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
0
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
}
return
inInfo
;
}
}
}
}
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
View file @
554e11c2
...
@@ -3,15 +3,18 @@ package com.baosight.hpjx.hp.sb.service;
...
@@ -3,15 +3,18 @@ package com.baosight.hpjx.hp.sb.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.sb.domain.HPSB002
;
import
com.baosight.hpjx.hp.sb.domain.HPSB002
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -140,7 +143,17 @@ public class ServiceHPSB002 extends ServiceBase {
...
@@ -140,7 +143,17 @@ public class ServiceHPSB002 extends ServiceBase {
*/
*/
@OperationLogAnnotation
(
operModul
=
"设备日志"
,
operType
=
"删除"
,
operDesc
=
"删除30天之前的历史数据"
)
@OperationLogAnnotation
(
operModul
=
"设备日志"
,
operType
=
"删除"
,
operDesc
=
"删除30天之前的历史数据"
)
public
EiInfo
deleteHistory
(
EiInfo
inInfo
)
{
public
EiInfo
deleteHistory
(
EiInfo
inInfo
)
{
return
super
.
delete
(
inInfo
,
"HPSB002.deleteByCreatedTime"
);
try
{
this
.
dao
.
delete
(
"HPSB002.deleteByCreatedTime"
,
new
HashMap
<>());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
0
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
){
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
0
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
}
return
inInfo
;
}
}
}
}
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