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
66b8c680
Commit
66b8c680
authored
Dec 06, 2017
by
胡斌
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/moly'
parents
618b4b67
e3191b72
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
52 deletions
+55
-52
AssociateDiagosisConfigurationService.java
...nitoroperation/AssociateDiagosisConfigurationService.java
+9
-7
AssociateDiagosisConfigurationController.java
...oroperation/AssociateDiagosisConfigurationController.java
+43
-42
UpdateAnaInfo.jsp
...n/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
+3
-0
associatediagosisconfiguration.js
src/main/webapp/static/js/associatediagosisconfiguration.js
+0
-3
No files found.
src/main/java/com/hp/cmsz/service/monitoroperation/AssociateDiagosisConfigurationService.java
View file @
66b8c680
...
...
@@ -39,8 +39,6 @@ public class AssociateDiagosisConfigurationService {
DimKpiAssociationRelInfo
d
=
dimKpiAssociationRelInfoDao
.
findOne
(
1L
);
System
.
out
.
println
(
d
.
getDimAssociationAnaInfo
().
getAssociationType
());
DimAssociationAnaInfo
info
=
dimAssociationAnaInfoDao
.
findOne
(
1
l
);
System
.
out
.
println
(
d
.
toString
());
System
.
out
.
println
(
info
.
toString
());
}
...
...
@@ -131,22 +129,30 @@ public class AssociateDiagosisConfigurationService {
List
<
Object
>
objList
=
businessDao
.
findBusinessIdListBychannelDataSourceMapId
(
channelDataSourceMapId
);
List
<
Long
>
longList
=
new
ArrayList
<
Long
>();
System
.
out
.
println
(
objList
==
null
?
"null"
:
"size "
+
objList
.
size
());
if
(
objList
==
null
||
objList
.
size
()
<
1
)
{
return
longList
;
}
else
{
for
(
Object
o
:
objList
)
{
longList
.
add
((
Long
)
o
);
}
return
longList
;
}
}
public
List
<
Long
>
findBusinessIdListBychannelDataSourceMapIdList
(
List
<
Long
>
channelDataSourceMapIdList
)
{
List
<
Object
>
objList
=
businessDao
.
findBusinessIdListBychannelDataSourceMapIdList
(
channelDataSourceMapIdList
);
List
<
Long
>
longList
=
new
ArrayList
<
Long
>();
if
(
objList
==
null
||
objList
.
size
()
<
1
)
{
return
longList
;
}
else
{
for
(
Object
o
:
objList
)
{
longList
.
add
((
Long
)
o
);
}
return
longList
;
}
}
//
public
List
<
DimKpi
>
findDimKpiListBybusnameIdList
(
List
<
Long
>
busnameIdList
)
{
return
dimKpiDao
.
findDimKpiListBybusnameIdList
(
busnameIdList
);
...
...
@@ -162,10 +168,8 @@ public class AssociateDiagosisConfigurationService {
//1 删除 指标表 数据
int
n
=
dimKpiAssociationRelInfoDao
.
deleteByAssociationId
(
associationIdL
);
System
.
out
.
println
(
"n=="
+
n
);
//更新 指标表和 配置表
List
<
DimKpiAssociationRelInfo
>
relInfos
=
(
List
<
DimKpiAssociationRelInfo
>)
dimKpiAssociationRelInfoDao
.
save
(
dimKpiAssociationRelInfoList
);
System
.
out
.
println
(
"*** "
+
relInfos
.
size
());
}
...
...
@@ -177,13 +181,11 @@ public class AssociateDiagosisConfigurationService {
// System.out.println("n===="+n);
//更新 指标表和 配置表
DimAssociationAnaInfo
info
=
dimAssociationAnaInfoDao
.
save
(
dimAssociationAnaInfo
);
System
.
out
.
println
(
"_-_ "
+
info
.
getAssociationId
());
}
public
void
deleteAssociDigConfig
(
Long
associationId
)
{
dimAssociationAnaInfoDao
.
delete
(
associationId
);
System
.
out
.
println
(
"delete---"
);
}
...
...
src/main/java/com/hp/cmsz/web/monitoroperation/AssociateDiagosisConfigurationController.java
View file @
66b8c680
...
...
@@ -149,12 +149,11 @@ public class AssociateDiagosisConfigurationController {
model
.
put
(
"proviceList"
,
listProvice
);
model
.
put
(
"dimensionList"
,
dimensionList
);
//数据源
List
<
DataSource
>
dataSourceList
=
new
ArrayList
<
DataSource
>
();
dataSourceList
=
associateDiagosisConfigurationService
.
findAllDataSource
();
List
<
DataSource
>
dataSourceList
=
associateDiagosisConfigurationService
.
findAllDataSource
();
model
.
put
(
"dataSourceList"
,
dataSourceList
);
//频道
List
<
Channel
>
channelList
=
new
ArrayList
<
Channel
>();
channelList
=
associateDiagosisConfigurationService
.
findAllChannel
();
List
<
Channel
>
channelList
=
associateDiagosisConfigurationService
.
findAllChannel
();
model
.
put
(
"channelList"
,
channelList
);
return
PageURLController
.
CreateDiagosis
;
...
...
@@ -168,15 +167,15 @@ public class AssociateDiagosisConfigurationController {
anaInfo
=
dimAssociationAnaInfoDao
.
findDimassociationAnaInfoByAssociationId
(
associationIdL
);
}
List
<
Province
>
listProvice
=
new
ArrayList
<
Province
>();
List
<
Map
<
String
,
String
>>
dimensionList
=
new
ArrayList
<
Map
<
String
,
String
>>();
List
<
Map
<
String
,
String
>>
dimensionList
=
new
ArrayList
<
Map
<
String
,
String
>>();
listProvice
=
(
List
<
Province
>)
provinceDao
.
findProvince
();
Map
<
String
,
String
>
mapC
=
new
HashMap
<
String
,
String
>();
mapC
.
put
(
"name"
,
"渠道"
);
mapC
.
put
(
"value"
,
"c"
);
Map
<
String
,
String
>
mapY
=
new
HashMap
<
String
,
String
>();
mapY
.
put
(
"name"
,
"业务"
);
mapY
.
put
(
"value"
,
"y"
);
Map
<
String
,
String
>
mapC
=
new
HashMap
<
String
,
String
>();
mapC
.
put
(
"name"
,
"渠道"
);
mapC
.
put
(
"value"
,
"c"
);
Map
<
String
,
String
>
mapY
=
new
HashMap
<
String
,
String
>();
mapY
.
put
(
"name"
,
"业务"
);
mapY
.
put
(
"value"
,
"y"
);
dimensionList
.
add
(
mapC
);
dimensionList
.
add
(
mapY
);
/*dimensionList.add("c");
...
...
@@ -195,12 +194,11 @@ public class AssociateDiagosisConfigurationController {
for
(
DimKpiAssociationRelInfo
relInfo
:
anaInfo
.
getItems
())
{
kpiIdList
.
add
(
relInfo
.
getKpiId
());
}
if
(
kpiIdList
.
size
()>
0
)
{
if
(
kpiIdList
.
size
()
>
0
)
{
dimKpiSelectedList
=
dimKpiDao
.
findDimKpiListBykpiIdList
(
kpiIdList
);
}
model
.
put
(
"proviceList"
,
listProvice
);
model
.
put
(
"dimensionList"
,
dimensionList
);
model
.
put
(
"channelList"
,
channelList
);
...
...
@@ -321,7 +319,7 @@ public class AssociateDiagosisConfigurationController {
return
str
;
}
List
<
Long
>
businessIdList
=
associateDiagosisConfigurationService
.
findBusinessIdListBychannelDataSourceMapIdList
(
channelDataSourceMapIdList
);
if
(
businessIdList
==
null
||
businessIdList
.
size
()
==
0
)
{
if
(
businessIdList
==
null
||
businessIdList
.
size
()
<
0
)
{
return
str
;
}
List
<
DimKpi
>
dimKpiList
=
associateDiagosisConfigurationService
.
findDimKpiListBybusnameIdList
(
businessIdList
);
...
...
@@ -440,7 +438,7 @@ public class AssociateDiagosisConfigurationController {
dimKpiSelSelectedList.add(Long.parseLong(s));
}*/
Long
associationIdL
=
Long
.
parseLong
(
associationId
);
//associationId
Long
associationIdL
=
Long
.
parseLong
(
associationId
);
//associationId
Long
proviceTdSelectedL
=
Long
.
valueOf
(
proviceTdSelected
);
//省份ID
// Double kpiWeightTdVL = Double.parseDouble(kpiWeightTdV);//权重
...
...
@@ -453,13 +451,13 @@ public class AssociateDiagosisConfigurationController {
dimAssociationAnaInfo
.
setAssociationId
(
associationIdL
);
// 指标表对象
List
<
DimKpiAssociationRelInfo
>
dimKpiAssociationRelInfoList
=
new
ArrayList
<
DimKpiAssociationRelInfo
>();
String
[]
strIdAndWeightDimKpiChecked
=
kpiId_weight
.
split
(
","
);
List
<
Map
<
String
,
String
>>
idAndWeight
=
new
ArrayList
<
Map
<
String
,
String
>>();
String
[]
strIdAndWeightDimKpiChecked
=
kpiId_weight
.
split
(
","
);
List
<
Map
<
String
,
String
>>
idAndWeight
=
new
ArrayList
<
Map
<
String
,
String
>>();
for
(
String
s
:
strIdAndWeightDimKpiChecked
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"kpiId"
,
s
.
split
(
"_"
)[
0
]);
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"kpiId"
,
s
.
split
(
"_"
)[
0
]);
map
.
put
(
"weight"
,
s
.
split
(
"_"
)[
1
]);
map
.
put
(
"weight"
,
s
.
split
(
"_"
)[
1
]);
idAndWeight
.
add
(
map
);
}
for
(
Map
<
String
,
String
>
stringLongMap
:
idAndWeight
)
{
...
...
@@ -481,11 +479,12 @@ public class AssociateDiagosisConfigurationController {
}*/
// dimAssociationAnaInfo.setItems(dimKpiAssociationRelInfoList);
associateDiagosisConfigurationService
.
updateAssociDigConfig
(
associationIdL
,
dimKpiAssociationRelInfoList
);
associateDiagosisConfigurationService
.
updateAssociDigConfig
(
associationIdL
,
dimKpiAssociationRelInfoList
);
strR
=
"更新成功"
;
}
catch
(
Exception
e
)
{
strR
=
"更新失败"
;
e
.
printStackTrace
();
}
...
...
@@ -517,9 +516,8 @@ public class AssociateDiagosisConfigurationController {
String
strR
=
"创建失败"
;
if
(
/*"".equalsIgnoreCase(proviceTdSelected) */
""
.
equalsIgnoreCase
(
proviceSelectedarr
)||
(
""
.
equalsIgnoreCase
(
dimensionTdSelected
))
||
(
""
.
equalsIgnoreCase
(
anainfoShallSaveArr
))
||
(
""
.
equalsIgnoreCase
(
descTdV
))
)
{
if
(
/*"".equalsIgnoreCase(proviceTdSelected) */
""
.
equalsIgnoreCase
(
proviceSelectedarr
)
||
(
""
.
equalsIgnoreCase
(
dimensionTdSelected
))
||
(
""
.
equalsIgnoreCase
(
anainfoShallSaveArr
))
||
(
""
.
equalsIgnoreCase
(
descTdV
)))
{
return
strR
;
}
else
{
try
{
...
...
@@ -527,19 +525,19 @@ public class AssociateDiagosisConfigurationController {
String
[]
anainfoShallSavearr
=
anainfoShallSaveArr
.
split
(
","
);
//指标 参数 数组
List
<
Map
<
String
,
String
>>
kpiIdAndKpiWeight
=
new
ArrayList
<
Map
<
String
,
String
>>();
List
<
Map
<
String
,
String
>>
kpiIdAndKpiWeight
=
new
ArrayList
<
Map
<
String
,
String
>>();
for
(
String
str
:
anainfoShallSavearr
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
String
[]
id_weight
=
str
.
split
(
"_"
);
for
(
String
str
:
anainfoShallSavearr
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
String
[]
id_weight
=
str
.
split
(
"_"
);
/*map.put("id",Double.valueOf(id_weight[0]).longValue());
map.put("weight",Double.valueOf(id_weight[1]).longValue());*/
map
.
put
(
"id"
,
id_weight
[
0
]);
map
.
put
(
"weight"
,
id_weight
[
1
]);
map
.
put
(
"id"
,
id_weight
[
0
]);
map
.
put
(
"weight"
,
id_weight
[
1
]);
kpiIdAndKpiWeight
.
add
(
map
);
}
long
ll
=
1
l
;
long
ll
=
1
l
;
// 指标表对象 指标对象 多对一 配置对象
List
<
DimKpiAssociationRelInfo
>
dimKpiAssociationRelInfoList
=
new
ArrayList
<
DimKpiAssociationRelInfo
>();
for
(
Map
<
String
,
String
>
stringLongMap
:
kpiIdAndKpiWeight
)
{
...
...
@@ -553,15 +551,14 @@ public class AssociateDiagosisConfigurationController {
}
List
<
Long
>
proviceSelectedList
=
new
ArrayList
<
Long
>();
//省份 参数 列表
String
[]
proviceSelectedArr
=
proviceSelectedarr
.
split
(
","
);
List
<
Long
>
proviceSelectedList
=
new
ArrayList
<
Long
>();
//省份 参数 列表
String
[]
proviceSelectedArr
=
proviceSelectedarr
.
split
(
","
);
for
(
String
s
:
proviceSelectedArr
)
{
proviceSelectedList
.
add
(
Long
.
parseLong
(
s
));
}
//配置表对象
List
<
DimAssociationAnaInfo
>
anaInfoList
=
new
ArrayList
<
DimAssociationAnaInfo
>();
List
<
DimAssociationAnaInfo
>
anaInfoList
=
new
ArrayList
<
DimAssociationAnaInfo
>();
for
(
Long
aLong
:
proviceSelectedList
)
{
DimAssociationAnaInfo
dimAssociationAnaInfo
=
new
DimAssociationAnaInfo
();
dimAssociationAnaInfo
.
setProvinceId
(
aLong
);
...
...
@@ -570,10 +567,11 @@ public class AssociateDiagosisConfigurationController {
anaInfoList
.
add
(
dimAssociationAnaInfo
);
}
associateDiagosisConfigurationService
.
pathSave
(
anaInfoList
,
dimKpiAssociationRelInfoList
);
associateDiagosisConfigurationService
.
pathSave
(
anaInfoList
,
dimKpiAssociationRelInfoList
);
strR
=
"创建成功"
;
}
catch
(
Exception
e
)
{
strR
=
"创建失败"
;
e
.
printStackTrace
();
}
...
...
@@ -581,19 +579,22 @@ public class AssociateDiagosisConfigurationController {
return
strR
;
}
@RequestMapping
(
value
=
"/deleteAssociDigConfig"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/deleteAssociDigConfig"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
String
deleteAssociDigConfig
(
@RequestParam
(
value
=
"associationId"
,
defaultValue
=
""
)
String
associationId
)
{
String
strR
=
"删除失败"
;
public
String
deleteAssociDigConfig
(
@RequestParam
(
value
=
"associationId"
,
defaultValue
=
""
)
String
associationId
)
{
String
strR
=
"删除失败"
;
try
{
Long
associationIdL
=
Long
.
parseLong
(
associationId
);
//associationId
Long
associationIdL
=
Long
.
parseLong
(
associationId
);
//associationId
associateDiagosisConfigurationService
.
deleteAssociDigConfig
(
associationIdL
);
strR
=
"删除成功"
;
}
catch
(
Exception
e
)
{
strR
=
"删除成功"
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
strR
;
}
}
src/main/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
View file @
66b8c680
...
...
@@ -374,6 +374,8 @@
return
;
}
$
(
"#updateAnaInfo"
).
attr
(
"disabled"
,
"disabled"
);
$
.
ajax
({
type
:
'GET'
,
async
:
true
,
...
...
@@ -396,6 +398,7 @@
}
});
//$("#updateAnaInfo").removeAttr("disabled");
/*$.ajax({
type: 'GET',
...
...
src/main/webapp/static/js/associatediagosisconfiguration.js
View file @
66b8c680
...
...
@@ -25,7 +25,6 @@ function failureDelete(){
function
radioChoose
(
e
){
$
(
"#updateIndicatorsBtn"
).
removeAttr
(
"disabled"
);
$
(
"#anaInfoSelected"
).
val
(
e
.
id
);
console
.
log
(
e
.
id
);
}
...
...
@@ -205,7 +204,6 @@ table_pagging.prototype={
tdContext
=
context
;
}
else
{
console
.
log
(
this
.
objectlist
);
if
(
k
==
1
){
tdContext
=
this
.
getProviceData
(
this
.
objectlist
[
i
],
this
.
header
[
k
][
1
]);
...
...
@@ -227,7 +225,6 @@ table_pagging.prototype={
}
if
(
k
==
0
)
{
tdContext
=
"<input type='radio' name='update'id='"
+
this
.
getData
(
this
.
objectlist
[
i
],
this
.
header
[
0
][
1
])
+
"' onclick='radioChoose(this);'/>"
;
console
.
log
(
tdContext
)
}
if
(
k
==
4
){
...
...
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