Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cmszMonitorAnalysis
Project
Project
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
liuna
cmszMonitorAnalysis
Commits
308bcc9d
Commit
308bcc9d
authored
Dec 19, 2017
by
莫林毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监控运营->告警监控 ->预警和隐患维护 界面
1 增加 ‘关联诊断’ 按钮 2 删除部分 废代码
parent
8f5dfe95
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
35 deletions
+75
-35
DimAssociationAnaInfoDao.java
...java/com/hp/cmsz/repository/DimAssociationAnaInfoDao.java
+0
-0
XcdWarningInfoViewDao.java
...in/java/com/hp/cmsz/repository/XcdWarningInfoViewDao.java
+0
-0
AssociateDiagosisDetailService.java
...vice/monitoroperation/AssociateDiagosisDetailService.java
+21
-0
AssociateDiagosisDetailController.java
...b/monitoroperation/AssociateDiagosisDetailController.java
+50
-24
AssociateDiagosisDetail.jsp
...EB-INF/views/MonitorOperation/AssociateDiagosisDetail.jsp
+0
-7
WorkingOrderManage.jsp
...app/WEB-INF/views/MonitorOperation/WorkingOrderManage.jsp
+4
-3
associatediagosisdetail.js
src/main/webapp/static/js/associatediagosisdetail.js
+0
-1
No files found.
src/main/java/com/hp/cmsz/repository/DimAssociationAnaInfoDao.java
View file @
308bcc9d
This diff is collapsed.
Click to expand it.
src/main/java/com/hp/cmsz/repository/XcdWarningInfoViewDao.java
View file @
308bcc9d
This diff is collapsed.
Click to expand it.
src/main/java/com/hp/cmsz/service/monitoroperation/AssociateDiagosisDetailService.java
View file @
308bcc9d
...
...
@@ -14,6 +14,7 @@ import com.hp.cmsz.repository.AssociateDiagosisDetailDao;
import
javax.persistence.EntityManager
;
import
javax.persistence.EntityManagerFactory
;
import
java.math.BigInteger
;
import
java.sql.Timestamp
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
...
...
@@ -63,6 +64,26 @@ public class AssociateDiagosisDetailService {
return
dimAssociationAnaInfoDao
.
findAssociateDiagosisDetailByWarnTimeBeginAndEnd
(
warnBeginTime
,
warnEndTime
);
}
public
AssociateDiagosisDetail
findObjByProvinceIdAndKpiIdAndoccurTimeAndCloseTime
(
Long
provinceId
,
Long
kpiId
,
String
occurTime
,
String
closeTime
){
Object
[]
objects
=
dimAssociationAnaInfoDao
.
findObjByProvinceIdAndKpiIdAndoccurTimeAndCloseTime
(
provinceId
,
kpiId
,
occurTime
,
closeTime
);
AssociateDiagosisDetail
detail
=
new
AssociateDiagosisDetail
();
if
(
objects
==
null
||
objects
.
length
<
1
){
return
null
;
}
else
{
detail
.
setAssociationId
((
BigInteger
)
objects
[
0
]);
detail
.
setProvinceId
((
BigInteger
)
objects
[
1
]);
detail
.
setAssociationType
(
objects
[
2
].
toString
().
toCharArray
()[
0
]);
detail
.
setAssociationDesc
((
String
)
objects
[
3
]);
detail
.
setProvinceName
((
String
)
objects
[
4
]);
detail
.
setWarnBeginTime
((
Timestamp
)
objects
[
5
]);
detail
.
setWarnEndTime
((
Timestamp
)
objects
[
6
]);
detail
.
setWarningNum
((
BigInteger
)
objects
[
7
]);
return
detail
;
}
}
public
List
<
Object
[]>
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
String
warnBeginTime
,
String
warnEndTime
,
char
dimension
,
List
<
Long
>
provincelist
){
return
dimAssociationAnaInfoDao
.
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
warnBeginTime
,
warnEndTime
,
dimension
,
provincelist
);
}
...
...
src/main/java/com/hp/cmsz/web/monitoroperation/AssociateDiagosisDetailController.java
View file @
308bcc9d
...
...
@@ -82,6 +82,9 @@ public class AssociateDiagosisDetailController {
@Autowired
private
AssociateDiagosisDetailService
associateDiagosisDetailService
;
@Autowired
private
XcdWarningInfoViewDao
xcdWarningInfoViewDao
;
@RequestMapping
(
""
)
...
...
@@ -200,6 +203,7 @@ public class AssociateDiagosisDetailController {
}
List
<
AssociateDiagosisWarningDetail
>
adwdl
=
new
ArrayList
<
AssociateDiagosisWarningDetail
>();
if
(
WarningDetailList
!=
null
){
for
(
Object
[]
objects
:
WarningDetailList
)
{
AssociateDiagosisWarningDetail
adwd
=
new
AssociateDiagosisWarningDetail
();
adwd
.
setASSOCIATION_ID
(
String
.
valueOf
(
objects
[
0
])
);
...
...
@@ -215,12 +219,7 @@ public class AssociateDiagosisDetailController {
adwd
.
setINFLUENCE_LEVEL
(
String
.
valueOf
(
objects
[
12
]));
adwdl
.
add
(
adwd
);
}
}
map
.
put
(
"warningDetailList"
,
adwdl
);
...
...
@@ -422,30 +421,57 @@ public class AssociateDiagosisDetailController {
}
@RequestMapping
(
"/yinjingyinhuanToguanlianzhenduanmingxi"
)
public
String
yinjingyinhuanToguanlianzhenduanmingxi
(
Map
model
,
ServletRequest
request
,
HttpSession
session
)
public
String
yinjingyinhuanToguanlianzhenduanmingxi
(
@RequestParam
(
value
=
"warningId"
,
defaultValue
=
""
)
String
warningId
,
Map
model
,
ServletRequest
request
,
HttpSession
session
)
throws
UnsupportedEncodingException
,
ParseException
{
List
<
Province
>
provinceList
=(
List
<
Province
>)
provinceDao
.
findProvince
();
String
timestamp1
=
getLastMonth
();
//getOld();
String
timestamp2
=
getNow
();
//getNew();
List
<
Object
[]>
diagosisDetailsObj
=
associateDiagosisDetailService
.
findAssociateDiagosisDetailByWarnTimeBeginAndEnd
(
timestamp1
,
timestamp2
);
List
<
AssociateDiagosisDetail
>
associateDiagosisDetails
=
new
ArrayList
<
AssociateDiagosisDetail
>();
for
(
Object
[]
objects
:
diagosisDetailsObj
)
{
AssociateDiagosisDetail
detail
=
new
AssociateDiagosisDetail
();
detail
.
setAssociationId
((
BigInteger
)
objects
[
0
]);
detail
.
setProvinceId
((
BigInteger
)
objects
[
1
]);
detail
.
setAssociationType
(
objects
[
2
].
toString
().
toCharArray
()[
0
]);
detail
.
setAssociationDesc
((
String
)
objects
[
3
]);
detail
.
setProvinceName
((
String
)
objects
[
4
]);
detail
.
setWarnBeginTime
((
Timestamp
)
objects
[
5
]);
detail
.
setWarnEndTime
((
Timestamp
)
objects
[
6
]);
detail
.
setWarningNum
((
BigInteger
)
objects
[
7
]);
associateDiagosisDetails
.
add
(
detail
);
}
model
.
put
(
"provinceList"
,
provinceList
);
List
<
XcdWarningInfoView
>
list
=
xcdWarningInfoViewDao
.
findByWarningId
(
warningId
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
occurTimes
=
""
;
String
closeTimes
=
""
;
if
(
list
==
null
||
list
.
size
()<
1
){
return
PageURLController
.
AssociateDiagosisDetail
;
}
else
{
XcdWarningInfoView
view
=
list
.
get
(
0
);
Long
provinceId
=
view
.
getProvinceId
();
Long
kpiId
=
view
.
getKpiId
();
Date
occurTime
=
view
.
getOccurTime
();
Date
closeTime
=
view
.
getCloseTime
();
if
(
occurTime
!=
null
){
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
occurTime
);
calendar
.
set
(
Calendar
.
HOUR
,
calendar
.
get
(
Calendar
.
HOUR
)-
2
);
occurTime
=
calendar
.
getTime
();
occurTimes
=
format
.
format
(
calendar
.
getTime
());
}
if
(
closeTime
==
null
){
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
view
.
getOccurTime
());
calendar
.
set
(
Calendar
.
HOUR
,
calendar
.
get
(
Calendar
.
HOUR
)+
2
);
closeTimes
=
format
.
format
(
calendar
.
getTime
());
}
else
{
closeTimes
=
format
.
format
(
closeTime
);
}
AssociateDiagosisDetail
detail
=
associateDiagosisDetailService
.
findObjByProvinceIdAndKpiIdAndoccurTimeAndCloseTime
(
provinceId
,
kpiId
,
occurTimes
,
closeTimes
);
List
<
AssociateDiagosisDetail
>
list1
=
new
ArrayList
();
if
(
detail
!=
null
){
list1
.
add
(
detail
);
}
Gson
gson
=
new
Gson
();
model
.
put
(
"diagosisDetails"
,
gson
.
toJson
(
associateDiagosisDetails
));
model
.
put
(
"diagosisDetails"
,
gson
.
toJson
(
list1
));
return
PageURLController
.
AssociateDiagosisDetail
;
}
}
}
src/main/webapp/WEB-INF/views/MonitorOperation/AssociateDiagosisDetail.jsp
View file @
308bcc9d
...
...
@@ -27,10 +27,6 @@
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
// alert(1);
// failureTable();
// initDateDetail();
//$("#businessSelectAreaDetail").hide();
initDate
();
//初始化界面
initTable
();
...
...
@@ -143,10 +139,7 @@
<!--写故障明细列表处-->
<table
class=
"table table-hover table-striped"
id=
"failureAnalysisDetailTable"
>
</table>
</div>
</div>
</div>
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/WorkingOrderManage.jsp
View file @
308bcc9d
...
...
@@ -710,12 +710,13 @@ th{
*/
$
(
"#guanlian"
).
click
(
function
(){
alert
(
ids
[
0
]);
if
(
ids
.
length
>
1
0
){
//
alert(ids[0]);
if
(
ids
.
length
>
1
){
$
.
alert
(
"最多只能选一个"
);
return
;
}
window
.
location
.
href
=
"${ctx}/MonitorOperation/AssociateDiagosisDetail/yinjingyinhuanToguanlianzhenduanmingxi"
;
//window.location.href="${ctx}/MonitorOperation/AssociateDiagosisDetail/yinjingyinhuanToguanlianzhenduanmingxi?warningId="+ids[0];
window
.
open
(
"${ctx}/MonitorOperation/AssociateDiagosisDetail/yinjingyinhuanToguanlianzhenduanmingxi?warningId="
+
ids
[
0
]);
});
$
(
function
(){
...
...
src/main/webapp/static/js/associatediagosisdetail.js
View file @
308bcc9d
...
...
@@ -4,7 +4,6 @@ function initTable(){
jsonStr
=
document
.
getElementById
(
'gzfxDetail'
).
value
;
// alert("jsonStr" +jsonStr);
var
header
=
new
Array
();
header
[
0
]
=
[
""
,
"1"
,
"1%"
,
""
];
header
[
1
]
=
[
"省份"
,
"provinceName"
,
"5%"
,
""
];
header
[
2
]
=
[
"类型"
,
"associationType"
,
"8%"
,
""
];
...
...
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