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
33c97c81
Commit
33c97c81
authored
Dec 21, 2017
by
莫林毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 ‘全国’,修改 对话框
parent
ad141bc5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
126 deletions
+23
-126
AssociateDiagosisConfigurationController.java
...oroperation/AssociateDiagosisConfigurationController.java
+16
-99
UpdateAnaInfo.jsp
...n/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
+7
-27
No files found.
src/main/java/com/hp/cmsz/web/monitoroperation/AssociateDiagosisConfigurationController.java
View file @
33c97c81
...
@@ -3,10 +3,7 @@ package com.hp.cmsz.web.monitoroperation;
...
@@ -3,10 +3,7 @@ package com.hp.cmsz.web.monitoroperation;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.hp.cmsz.entity.*
;
import
com.hp.cmsz.entity.*
;
import
com.hp.cmsz.repository.DimAssociationAnaInfoDao
;
import
com.hp.cmsz.repository.*
;
import
com.hp.cmsz.repository.DimKpiAssociationRelInfoDao
;
import
com.hp.cmsz.repository.DimKpiDao
;
import
com.hp.cmsz.repository.ProvinceDao
;
import
com.hp.cmsz.service.monitoroperation.AssociateDiagosisConfigurationService
;
import
com.hp.cmsz.service.monitoroperation.AssociateDiagosisConfigurationService
;
import
com.hp.cmsz.web.PageURLController
;
import
com.hp.cmsz.web.PageURLController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -44,6 +41,9 @@ public class AssociateDiagosisConfigurationController {
...
@@ -44,6 +41,9 @@ public class AssociateDiagosisConfigurationController {
@Autowired
@Autowired
private
DimKpiDao
dimKpiDao
;
private
DimKpiDao
dimKpiDao
;
@Autowired
private
ProvinceAllDao
provinceAllDao
;
@RequestMapping
(
""
)
@RequestMapping
(
""
)
public
String
list
(
Map
model
,
public
String
list
(
Map
model
,
@RequestParam
(
defaultValue
=
""
,
value
=
"detailProvince"
)
String
detailProvince
,
@RequestParam
(
defaultValue
=
""
,
value
=
"detailProvince"
)
String
detailProvince
,
...
@@ -85,8 +85,8 @@ public class AssociateDiagosisConfigurationController {
...
@@ -85,8 +85,8 @@ public class AssociateDiagosisConfigurationController {
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
Gson
gsonP
=
new
Gson
();
Gson
gsonP
=
new
Gson
();
List
<
Province
>
provinceList
=
(
List
<
Province
>)
provinceDao
.
findProvince
();
//
List<Province> provinceList = (List<Province>) provinceDao.findProvince();
List
<
ProvinceAll
>
provinceList
=
(
List
<
ProvinceAll
>)
provinceAllDao
.
findProvince
();
model
.
put
(
"provinceList"
,
provinceList
);
model
.
put
(
"provinceList"
,
provinceList
);
model
.
put
(
"gzfxDetailInfos"
,
gson
.
toJson
(
listDim
));
model
.
put
(
"gzfxDetailInfos"
,
gson
.
toJson
(
listDim
));
model
.
put
(
"provinces"
,
gsonP
.
toJson
(
provinceList
));
model
.
put
(
"provinces"
,
gsonP
.
toJson
(
provinceList
));
...
@@ -139,11 +139,13 @@ public class AssociateDiagosisConfigurationController {
...
@@ -139,11 +139,13 @@ public class AssociateDiagosisConfigurationController {
@RequestMapping
(
"/createDiagosis"
)
@RequestMapping
(
"/createDiagosis"
)
public
String
createDiagosis
(
Map
model
)
{
public
String
createDiagosis
(
Map
model
)
{
List
<
Province
>
listProvice
=
new
ArrayList
<
Province
>();
// List<Province> listProvice = new ArrayList<Province>();
List
<
ProvinceAll
>
listProvice
=
new
ArrayList
<
ProvinceAll
>();
List
<
String
>
dimensionList
=
new
ArrayList
<
String
>();
List
<
String
>
dimensionList
=
new
ArrayList
<
String
>();
dimensionList
.
add
(
"c"
);
dimensionList
.
add
(
"c"
);
dimensionList
.
add
(
"y"
);
dimensionList
.
add
(
"y"
);
listProvice
=
(
List
<
Province
>)
provinceDao
.
findProvince
();
// listProvice = (List<Province>) provinceDao.findProvince();
listProvice
=
(
List
<
ProvinceAll
>)
provinceAllDao
.
findProvince
();
model
.
put
(
"proviceList"
,
listProvice
);
model
.
put
(
"proviceList"
,
listProvice
);
model
.
put
(
"dimensionList"
,
dimensionList
);
model
.
put
(
"dimensionList"
,
dimensionList
);
//数据源
//数据源
...
@@ -164,9 +166,11 @@ public class AssociateDiagosisConfigurationController {
...
@@ -164,9 +166,11 @@ public class AssociateDiagosisConfigurationController {
Long
associationIdL
=
Long
.
parseLong
(
associationId
);
Long
associationIdL
=
Long
.
parseLong
(
associationId
);
anaInfo
=
dimAssociationAnaInfoDao
.
findDimassociationAnaInfoByAssociationId
(
associationIdL
);
anaInfo
=
dimAssociationAnaInfoDao
.
findDimassociationAnaInfoByAssociationId
(
associationIdL
);
}
}
List
<
Province
>
listProvice
=
new
ArrayList
<
Province
>();
// List<Province> listProvice = new ArrayList<Province>();
List
<
ProvinceAll
>
listProvice
=
new
ArrayList
<
ProvinceAll
>();
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
();
// listProvice = (List<Province>) provinceDao.findProvince();
listProvice
=
(
List
<
ProvinceAll
>)
provinceAllDao
.
findProvince
();
Map
<
String
,
String
>
mapC
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
mapC
=
new
HashMap
<
String
,
String
>();
mapC
.
put
(
"name"
,
"渠道"
);
mapC
.
put
(
"name"
,
"渠道"
);
...
@@ -326,88 +330,7 @@ public class AssociateDiagosisConfigurationController {
...
@@ -326,88 +330,7 @@ public class AssociateDiagosisConfigurationController {
}
}
/* @RequestMapping(value = "/updateAssociDigConfig", method = RequestMethod.GET)
@ResponseBody
public String updateAssociDigConfig(
@RequestParam(value = "associationId", defaultValue = "") String associationId,
@RequestParam(value = "proviceTdSelected", defaultValue = "") String proviceTdSelected,
@RequestParam(value = "dimensionTdSelected", defaultValue = "") String dimensionTdSelected,
@RequestParam(value = "descTdV", defaultValue = "") String descTdV,
@RequestParam(value = "arrIdAndWeightDimKpiChecked", defaultValue = "") String arrIdAndWeightDimKpiChecked
*//*@RequestParam(value = "dimKpiSelSelected", defaultValue = "") String dimKpiSelSelectedarr,
@RequestParam(value = "kpiWeightTdV", defaultValue = "") String kpiWeightTdV*//*) {
String strR = "更新失败";
if ("".equalsIgnoreCase(proviceTdSelected) || ("".equalsIgnoreCase(dimensionTdSelected))
|| ("".equalsIgnoreCase(arrIdAndWeightDimKpiChecked)) || ("".equalsIgnoreCase(descTdV)) || ("".equalsIgnoreCase(associationId))) {
return strR;
} else {
try {
*//*String[] dimKpiSelSelectedArr = dimKpiSelSelectedarr.split(",");
List<Long> dimKpiSelSelectedList = new ArrayList<Long>();//指标名称 ID
for (String s : dimKpiSelSelectedArr) {
dimKpiSelSelectedList.add(Long.parseLong(s));
}*//*
Long associationIdL=Long.parseLong(associationId);//associationId
Long proviceTdSelectedL = Long.valueOf(proviceTdSelected);//省份ID
// Double kpiWeightTdVL = Double.parseDouble(kpiWeightTdV);//权重
//配置表对象
DimAssociationAnaInfo dimAssociationAnaInfo = new DimAssociationAnaInfo();
dimAssociationAnaInfo.setProvinceId(proviceTdSelectedL);
dimAssociationAnaInfo.setAssociationType(dimensionTdSelected);
dimAssociationAnaInfo.setAssoicationDesc(descTdV);
dimAssociationAnaInfo.setAssociationId(associationIdL);
// 指标表对象
List<DimKpiAssociationRelInfo> dimKpiAssociationRelInfoList = new ArrayList<DimKpiAssociationRelInfo>();
String[] strIdAndWeightDimKpiChecked=arrIdAndWeightDimKpiChecked.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.put("weight",s.split("_")[1]);
idAndWeight.add(map);
}
for (Map<String, String> stringLongMap : idAndWeight) {
DimKpiAssociationRelInfo relInfo = new DimKpiAssociationRelInfo();
relInfo.setKpiAssociationRelatedId(-1L);
relInfo.setKpiId(Long.parseLong(stringLongMap.get("kpiId")));
relInfo.setKpiWeight(new BigDecimal(stringLongMap.get("weight")));
relInfo.setDimAssociationAnaInfo(dimAssociationAnaInfo);
dimKpiAssociationRelInfoList.add(relInfo);
}
*//*for (Long aLong : dimKpiSelSelectedList) {
DimKpiAssociationRelInfo relInfo = new DimKpiAssociationRelInfo();
relInfo.setKpiAssociationRelatedId(-1L);
relInfo.setKpiId(aLong);
relInfo.setKpiWeight(BigDecimal.valueOf(kpiWeightTdVL));
relInfo.setDimAssociationAnaInfo(dimAssociationAnaInfo);
dimKpiAssociationRelInfoList.add(relInfo);
}*//*
// dimAssociationAnaInfo.setItems(dimKpiAssociationRelInfoList);
associateDiagosisConfigurationService.updateAssociDigConfig(associationIdL,dimKpiAssociationRelInfoList);
strR = "更新成功";
} catch (Exception e) {
e.printStackTrace();
}
}
return strR;
}*/
@RequestMapping
(
value
=
"/updateAssociDigConfig"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/updateAssociDigConfig"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
...
@@ -481,13 +404,6 @@ public class AssociateDiagosisConfigurationController {
...
@@ -481,13 +404,6 @@ public class AssociateDiagosisConfigurationController {
@RequestMapping
(
value
=
"/createAssociDigConfig"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/createAssociDigConfig"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
/*public String createAssociDigConfig(
*//*@RequestParam(value = "proviceTdSelected", defaultValue = "") String proviceTdSelected,*//*
@RequestParam(value = "proviceSelected", defaultValue = "") String proviceSelectedarr,
@RequestParam(value = "dimensionTdSelected", defaultValue = "") String dimensionTdSelected,
@RequestParam(value = "dimKpiSelSelected", defaultValue = "") String dimKpiSelSelectedarr,
@RequestParam(value = "descTdV", defaultValue = "") String descTdV,
@RequestParam(value = "kpiWeightTdV", defaultValue = "") String kpiWeightTdV) {*/
public
String
createAssociDigConfig
(
public
String
createAssociDigConfig
(
@RequestParam
(
value
=
"proviceSelected"
,
defaultValue
=
""
)
String
proviceSelectedarr
,
@RequestParam
(
value
=
"proviceSelected"
,
defaultValue
=
""
)
String
proviceSelectedarr
,
@RequestParam
(
value
=
"dimensionTdSelected"
,
defaultValue
=
""
)
String
dimensionTdSelected
,
@RequestParam
(
value
=
"dimensionTdSelected"
,
defaultValue
=
""
)
String
dimensionTdSelected
,
...
@@ -600,7 +516,8 @@ public class AssociateDiagosisConfigurationController {
...
@@ -600,7 +516,8 @@ public class AssociateDiagosisConfigurationController {
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
List
<
Province
>
provinceList
=
(
List
<
Province
>)
provinceDao
.
findProvince
();
// List<Province> provinceList = (List<Province>) provinceDao.findProvince();
List
<
ProvinceAll
>
provinceList
=
(
List
<
ProvinceAll
>)
provinceAllDao
.
findProvince
();
model
.
put
(
"provinceList"
,
provinceList
);
model
.
put
(
"provinceList"
,
provinceList
);
model
.
put
(
"gzfxDetailInfos"
,
gson
.
toJson
(
listDim
));
model
.
put
(
"gzfxDetailInfos"
,
gson
.
toJson
(
listDim
));
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
View file @
33c97c81
...
@@ -87,17 +87,19 @@
...
@@ -87,17 +87,19 @@
<tr>
<tr>
<td>
省份:
</td>
<td>
省份:
</td>
<td>
<td>
<select
class=
"form-control"
name=
"proviceTd"
id=
"proviceTd"
>
<select
class=
"form-control"
name=
"proviceTd"
id=
"proviceTd"
disabled
>
<c:forEach
var=
"provice"
items=
"${proviceList}"
>
<c:forEach
var=
"provice"
items=
"${proviceList}"
>
<c:if
test=
"${provice.provinceId ==32}"
>
<c:choose>
<c:choose>
<c:when
test=
"${provice.provinceId == anaInfo.provinceId}"
>
<c:when
test=
"${provice.provinceId == anaInfo.provinceId}"
>
<option
value=
"${provice.provinceId}"
<option
value=
"${provice.provinceId}"
select
ed
>
${provice.provinceName}
</option>
selected
disabl
ed
>
${provice.provinceName}
</option>
</c:when>
</c:when>
<c:otherwise>
<c:otherwise>
<option
value=
"${provice.provinceId}"
>
${provice.provinceName}
</option>
<option
value=
"${provice.provinceId}"
>
${provice.provinceName}
</option>
</c:otherwise>
</c:otherwise>
</c:choose>
</c:choose>
</c:if>
</c:forEach>
</c:forEach>
</select>
</select>
</td>
</td>
...
@@ -246,7 +248,7 @@
...
@@ -246,7 +248,7 @@
<
%
--
${
anaInfo
}
--
%
>
<
%
--
${
anaInfo
}
--
%
>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
sumkpiWeightTdVal
=
1.00
;
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
"#tr_id_dimkpi"
).
hide
();
$
(
"#tr_id_dimkpi"
).
hide
();
...
@@ -267,6 +269,7 @@
...
@@ -267,6 +269,7 @@
kpiWeightTdInitValue
=
$
(
"#kpiWeightTd"
).
val
();
kpiWeightTdInitValue
=
$
(
"#kpiWeightTd"
).
val
();
//描述 初始值
//描述 初始值
descTdInitValue
=
$
(
"#descTd"
).
val
();
descTdInitValue
=
$
(
"#descTd"
).
val
();
if
(
$
(
"#addTr"
).
find
(
"tr"
).
length
==
0
){
sumkpiWeightTdVal
=
0.00
;}
});
});
...
@@ -405,30 +408,7 @@
...
@@ -405,30 +408,7 @@
}
}
});
});
//$("#updateAnaInfo").removeAttr("disabled");
/*$.ajax({
type: 'GET',
async: true,
contentType: 'application/json',
data: {
associationId: associationId,
proviceTdSelected: proviceTdSelected,
dimensionTdSelected: dimensionTdSelected,
descTdV: descTdV,
/!* kpiWeightTdV: kpiWeightTdV*!/
},
url: "${ctx}/MonitorOperation/AssociateDiagosisConfiguration/updateAssociDigConfig?arrIdAndWeightDimKpiChecked=" + arrIdAndWeightDimKpiChecked,
dataType: 'text',
success: function (data) {
$.alert(data);
setTimeout(function () {
location.href = "${ctx}/MonitorOperation/AssociateDiagosisConfiguration";
}, 3000);
}
});*/
});
});
...
@@ -709,7 +689,7 @@
...
@@ -709,7 +689,7 @@
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
$
(
e
).
parent
().
parent
().
remove
();
$
(
e
).
parent
().
parent
().
remove
();
}
}
sumkpiWeightTdVal
=
1.00
;
//
sumkpiWeightTdVal=1.00;
function
updateRow
(
e
){
function
updateRow
(
e
){
var
initK
=
Number
(
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
).
toFixed
(
2
);
var
initK
=
Number
(
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
).
toFixed
(
2
);
var
pro
=
prompt
(
"请输入"
,
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
);
var
pro
=
prompt
(
"请输入"
,
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
);
...
...
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