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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
51 deletions
+91
-51
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
+66
-40
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;
...
@@ -14,6 +14,7 @@ import com.hp.cmsz.repository.AssociateDiagosisDetailDao;
import
javax.persistence.EntityManager
;
import
javax.persistence.EntityManager
;
import
javax.persistence.EntityManagerFactory
;
import
javax.persistence.EntityManagerFactory
;
import
java.math.BigInteger
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Calendar
;
...
@@ -63,6 +64,26 @@ public class AssociateDiagosisDetailService {
...
@@ -63,6 +64,26 @@ public class AssociateDiagosisDetailService {
return
dimAssociationAnaInfoDao
.
findAssociateDiagosisDetailByWarnTimeBeginAndEnd
(
warnBeginTime
,
warnEndTime
);
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
){
public
List
<
Object
[]>
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
String
warnBeginTime
,
String
warnEndTime
,
char
dimension
,
List
<
Long
>
provincelist
){
return
dimAssociationAnaInfoDao
.
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
warnBeginTime
,
warnEndTime
,
dimension
,
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 {
...
@@ -82,6 +82,9 @@ public class AssociateDiagosisDetailController {
@Autowired
@Autowired
private
AssociateDiagosisDetailService
associateDiagosisDetailService
;
private
AssociateDiagosisDetailService
associateDiagosisDetailService
;
@Autowired
private
XcdWarningInfoViewDao
xcdWarningInfoViewDao
;
@RequestMapping
(
""
)
@RequestMapping
(
""
)
...
@@ -200,28 +203,24 @@ public class AssociateDiagosisDetailController {
...
@@ -200,28 +203,24 @@ public class AssociateDiagosisDetailController {
}
}
List
<
AssociateDiagosisWarningDetail
>
adwdl
=
new
ArrayList
<
AssociateDiagosisWarningDetail
>();
List
<
AssociateDiagosisWarningDetail
>
adwdl
=
new
ArrayList
<
AssociateDiagosisWarningDetail
>();
for
(
Object
[]
objects
:
WarningDetailList
)
{
if
(
WarningDetailList
!=
null
){
AssociateDiagosisWarningDetail
adwd
=
new
AssociateDiagosisWarningDetail
();
for
(
Object
[]
objects
:
WarningDetailList
)
{
adwd
.
setASSOCIATION_ID
(
String
.
valueOf
(
objects
[
0
])
);
AssociateDiagosisWarningDetail
adwd
=
new
AssociateDiagosisWarningDetail
();
adwd
.
setASSOCIATION_TYPE
(
objects
[
2
]+
""
);
adwd
.
setASSOCIATION_ID
(
String
.
valueOf
(
objects
[
0
])
);
adwd
.
setASSOCIATION_DESC
(
objects
[
3
]+
""
);
adwd
.
setASSOCIATION_TYPE
(
objects
[
2
]+
""
);
adwd
.
setPROVINCE_NAME
(
objects
[
4
]+
""
);
adwd
.
setASSOCIATION_DESC
(
objects
[
3
]+
""
);
adwd
.
setPROVINCE_ID
(
objects
[
1
]+
""
);
adwd
.
setPROVINCE_NAME
(
objects
[
4
]+
""
);
adwd
.
setKPI_CODE
(
objects
[
7
]+
""
);
adwd
.
setPROVINCE_ID
(
objects
[
1
]+
""
);
adwd
.
setKPI_NAME
(
objects
[
8
]+
""
);
adwd
.
setKPI_CODE
(
objects
[
7
]+
""
);
adwd
.
setKPI_ID
(
String
.
valueOf
(
objects
[
9
]));
adwd
.
setKPI_NAME
(
objects
[
8
]+
""
);
adwd
.
setKPI_WEIGHT
(
String
.
valueOf
(
objects
[
10
]));
adwd
.
setKPI_ID
(
String
.
valueOf
(
objects
[
9
]));
adwd
.
setWARNING_NUM
(
String
.
valueOf
(
objects
[
11
]));
adwd
.
setKPI_WEIGHT
(
String
.
valueOf
(
objects
[
10
]));
adwd
.
setINFLUENCE_LEVEL
(
String
.
valueOf
(
objects
[
12
]));
adwd
.
setWARNING_NUM
(
String
.
valueOf
(
objects
[
11
]));
adwdl
.
add
(
adwd
);
adwd
.
setINFLUENCE_LEVEL
(
String
.
valueOf
(
objects
[
12
]));
adwdl
.
add
(
adwd
);
}
}
}
map
.
put
(
"warningDetailList"
,
adwdl
);
map
.
put
(
"warningDetailList"
,
adwdl
);
return
PageURLController
.
AssociateDetails
;
return
PageURLController
.
AssociateDetails
;
...
@@ -422,30 +421,57 @@ public class AssociateDiagosisDetailController {
...
@@ -422,30 +421,57 @@ public class AssociateDiagosisDetailController {
}
}
@RequestMapping
(
"/yinjingyinhuanToguanlianzhenduanmingxi"
)
@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
{
throws
UnsupportedEncodingException
,
ParseException
{
List
<
Province
>
provinceList
=(
List
<
Province
>)
provinceDao
.
findProvince
();
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
);
model
.
put
(
"provinceList"
,
provinceList
);
Gson
gson
=
new
Gson
();
model
.
put
(
"diagosisDetails"
,
gson
.
toJson
(
associateDiagosisDetails
));
return
PageURLController
.
AssociateDiagosisDetail
;
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
(
list1
));
return
PageURLController
.
AssociateDiagosisDetail
;
}
}
}
}
}
src/main/webapp/WEB-INF/views/MonitorOperation/AssociateDiagosisDetail.jsp
View file @
308bcc9d
...
@@ -27,10 +27,6 @@
...
@@ -27,10 +27,6 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
// alert(1);
// failureTable();
// initDateDetail();
//$("#businessSelectAreaDetail").hide();
initDate
();
initDate
();
//初始化界面
//初始化界面
initTable
();
initTable
();
...
@@ -143,10 +139,7 @@
...
@@ -143,10 +139,7 @@
<!--写故障明细列表处-->
<!--写故障明细列表处-->
<table
class=
"table table-hover table-striped"
<table
class=
"table table-hover table-striped"
id=
"failureAnalysisDetailTable"
>
id=
"failureAnalysisDetailTable"
>
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/WorkingOrderManage.jsp
View file @
308bcc9d
...
@@ -710,12 +710,13 @@ th{
...
@@ -710,12 +710,13 @@ th{
*/
*/
$
(
"#guanlian"
).
click
(
function
(){
$
(
"#guanlian"
).
click
(
function
(){
alert
(
ids
[
0
]);
//
alert(ids[0]);
if
(
ids
.
length
>
1
0
){
if
(
ids
.
length
>
1
){
$
.
alert
(
"最多只能选一个"
);
$
.
alert
(
"最多只能选一个"
);
return
;
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
(){
$
(
function
(){
...
...
src/main/webapp/static/js/associatediagosisdetail.js
View file @
308bcc9d
...
@@ -4,7 +4,6 @@ function initTable(){
...
@@ -4,7 +4,6 @@ function initTable(){
jsonStr
=
document
.
getElementById
(
'gzfxDetail'
).
value
;
jsonStr
=
document
.
getElementById
(
'gzfxDetail'
).
value
;
// alert("jsonStr" +jsonStr);
// alert("jsonStr" +jsonStr);
var
header
=
new
Array
();
var
header
=
new
Array
();
header
[
0
]
=
[
""
,
"1"
,
"1%"
,
""
];
header
[
0
]
=
[
""
,
"1"
,
"1%"
,
""
];
header
[
1
]
=
[
"省份"
,
"provinceName"
,
"5%"
,
""
];
header
[
1
]
=
[
"省份"
,
"provinceName"
,
"5%"
,
""
];
header
[
2
]
=
[
"类型"
,
"associationType"
,
"8%"
,
""
];
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