|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.diagbot.common.push.bean.CrisisDetail;
|
|
import org.diagbot.common.push.bean.FeatureRate;
|
|
import org.diagbot.common.push.bean.FeatureRate;
|
|
import org.diagbot.common.push.bean.SearchData;
|
|
import org.diagbot.common.push.bean.SearchData;
|
|
import org.diagbot.common.push.bean.neo4j.*;
|
|
import org.diagbot.common.push.bean.neo4j.*;
|
|
@@ -1545,7 +1546,7 @@ public class Neo4jAPI {
|
|
* @param webDiagList
|
|
* @param webDiagList
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public MangementEvaluation pushMe_new(String[] webDiagList) {
|
|
|
|
|
|
+ public MangementEvaluation pushMe_new(String[] webDiagList,Map<String, List<CrisisDetail>> crisisDetails) {
|
|
MangementEvaluation mangementEvaluation = new MangementEvaluation();
|
|
MangementEvaluation mangementEvaluation = new MangementEvaluation();
|
|
Map<String, JSONObject> mangementMap = new HashMap<>();
|
|
Map<String, JSONObject> mangementMap = new HashMap<>();
|
|
Map<String, Map<String, List<String>>> zong = new LinkedHashMap<>();
|
|
Map<String, Map<String, List<String>>> zong = new LinkedHashMap<>();
|
|
@@ -1577,15 +1578,15 @@ public class Neo4jAPI {
|
|
types.add(type);
|
|
types.add(type);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- mangementMap = this.procrssMange(zong, types);
|
|
|
|
|
|
+ mangementMap = this.procrssMange(zong, types,crisisDetails);
|
|
mangementEvaluation.setMangementEvaluation(mangementMap);
|
|
mangementEvaluation.setMangementEvaluation(mangementMap);
|
|
}
|
|
}
|
|
return mangementEvaluation;
|
|
return mangementEvaluation;
|
|
}
|
|
}
|
|
|
|
|
|
- public Map<String, JSONObject> procrssMange(Map<String, Map<String, List<String>>> zong, List<String> types) {
|
|
|
|
|
|
+ public Map<String, JSONObject> procrssMange(Map<String, Map<String, List<String>>> zong, List<String> types,Map<String, List<CrisisDetail>> crisisDetails) {
|
|
Map<String, JSONObject> llo = new HashMap<>();
|
|
Map<String, JSONObject> llo = new HashMap<>();
|
|
-// Map<String,List<JSONObject>> ll = new HashMap<>();
|
|
|
|
|
|
+ Map<String, String> crisisDetailsMap = this.processCrisisDetails(crisisDetails);
|
|
if (types != null && types.size() > 0) {
|
|
if (types != null && types.size() > 0) {
|
|
for (String type : types) {
|
|
for (String type : types) {
|
|
JSONObject big = new JSONObject();
|
|
JSONObject big = new JSONObject();
|
|
@@ -1607,7 +1608,11 @@ public class Neo4jAPI {
|
|
) {
|
|
) {
|
|
JSONObject ds = new JSONObject();
|
|
JSONObject ds = new JSONObject();
|
|
ds.put("detailName", value);
|
|
ds.put("detailName", value);
|
|
- ds.put("state", 0);
|
|
|
|
|
|
+ if(crisisDetailsMap.containsKey(key) && value.equals(crisisDetailsMap.get(key))){
|
|
|
|
+ ds.put("state", 1);
|
|
|
|
+ }else {
|
|
|
|
+ ds.put("state", 0);
|
|
|
|
+ }
|
|
hList.add(ds);
|
|
hList.add(ds);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1622,6 +1627,29 @@ public class Neo4jAPI {
|
|
return llo;
|
|
return llo;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 处理风险因素评估
|
|
|
|
+ * @param crisisDetails
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Map<String,String> processCrisisDetails(Map<String, List<CrisisDetail>> crisisDetails){
|
|
|
|
+ Map<String,String> crisisMap = new HashMap<>();
|
|
|
|
+ if(crisisDetails != null && crisisDetails.size()>0 ){
|
|
|
|
+ for (Map.Entry<String, List<CrisisDetail>> crisis:crisisDetails.entrySet()
|
|
|
|
+ ) {
|
|
|
|
+ List<CrisisDetail> value = crisis.getValue();
|
|
|
|
+ if(value!=null && value.size()>0){
|
|
|
|
+ for (CrisisDetail crisisDetail:value) {
|
|
|
|
+ if("1".equals(crisisDetail.getTypeId())){
|
|
|
|
+ String[] crisisSplits = crisisDetail.getRemindText().split(":");
|
|
|
|
+ crisisMap.put(crisisSplits[0],crisisSplits[1]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return crisisMap;
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 旧结构管理评估
|
|
* 旧结构管理评估
|
|
*
|
|
*
|