Commit 33c97c81 authored by 莫林毅's avatar 莫林毅

增加 ‘全国’,修改 对话框

parent ad141bc5
......@@ -3,10 +3,7 @@ package com.hp.cmsz.web.monitoroperation;
import com.google.gson.Gson;
import com.hp.cmsz.entity.*;
import com.hp.cmsz.repository.DimAssociationAnaInfoDao;
import com.hp.cmsz.repository.DimKpiAssociationRelInfoDao;
import com.hp.cmsz.repository.DimKpiDao;
import com.hp.cmsz.repository.ProvinceDao;
import com.hp.cmsz.repository.*;
import com.hp.cmsz.service.monitoroperation.AssociateDiagosisConfigurationService;
import com.hp.cmsz.web.PageURLController;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -44,6 +41,9 @@ public class AssociateDiagosisConfigurationController {
@Autowired
private DimKpiDao dimKpiDao;
@Autowired
private ProvinceAllDao provinceAllDao;
@RequestMapping("")
public String list(Map model,
@RequestParam(defaultValue = "", value = "detailProvince") String detailProvince,
......@@ -85,8 +85,8 @@ public class AssociateDiagosisConfigurationController {
Gson gson = 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("gzfxDetailInfos", gson.toJson(listDim));
model.put("provinces", gsonP.toJson(provinceList));
......@@ -139,11 +139,13 @@ public class AssociateDiagosisConfigurationController {
@RequestMapping("/createDiagosis")
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>();
dimensionList.add("c");
dimensionList.add("y");
listProvice = (List<Province>) provinceDao.findProvince();
// listProvice = (List<Province>) provinceDao.findProvince();
listProvice = (List<ProvinceAll>) provinceAllDao.findProvince();
model.put("proviceList", listProvice);
model.put("dimensionList", dimensionList);
//数据源
......@@ -164,9 +166,11 @@ public class AssociateDiagosisConfigurationController {
Long associationIdL = Long.parseLong(associationId);
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>>();
listProvice = (List<Province>) provinceDao.findProvince();
// listProvice = (List<Province>) provinceDao.findProvince();
listProvice = (List<ProvinceAll>) provinceAllDao.findProvince();
Map<String, String> mapC = new HashMap<String, String>();
mapC.put("name", "渠道");
......@@ -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)
@ResponseBody
......@@ -481,13 +404,6 @@ public class AssociateDiagosisConfigurationController {
@RequestMapping(value = "/createAssociDigConfig", method = RequestMethod.GET)
@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(
@RequestParam(value = "proviceSelected", defaultValue = "") String proviceSelectedarr,
@RequestParam(value = "dimensionTdSelected", defaultValue = "") String dimensionTdSelected,
......@@ -600,7 +516,8 @@ public class AssociateDiagosisConfigurationController {
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("gzfxDetailInfos", gson.toJson(listDim));
......
......@@ -87,17 +87,19 @@
<tr>
<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:if test="${provice.provinceId ==32}">
<c:choose>
<c:when test="${provice.provinceId == anaInfo.provinceId}">
<option value="${provice.provinceId}"
selected>${provice.provinceName}</option>
selected disabled>${provice.provinceName}</option>
</c:when>
<c:otherwise>
<option value="${provice.provinceId}">${provice.provinceName}</option>
</c:otherwise>
</c:choose>
</c:if>
</c:forEach>
</select>
</td>
......@@ -246,7 +248,7 @@
<%--${anaInfo}--%>
<script type="text/javascript">
sumkpiWeightTdVal=1.00;
$(document).ready(function () {
$("#tr_id_dimkpi").hide();
......@@ -267,6 +269,7 @@
kpiWeightTdInitValue = $("#kpiWeightTd").val();
//描述 初始值
descTdInitValue = $("#descTd").val();
if($("#addTr").find("tr").length ==0){sumkpiWeightTdVal=0.00;}
});
......@@ -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 @@
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
$(e).parent().parent().remove();
}
sumkpiWeightTdVal=1.00;
// sumkpiWeightTdVal=1.00;
function updateRow(e){
var initK=Number($(e).parent().prev()[0].innerHTML).toFixed(2);
var pro=prompt("请输入",$(e).parent().prev()[0].innerHTML);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment