Commit afe94ac5 authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents aa3f8237 22cfe9a5
...@@ -2,7 +2,9 @@ package com.yeejoin.amos.latentdanger.common.enums; ...@@ -2,7 +2,9 @@ package com.yeejoin.amos.latentdanger.common.enums;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -47,7 +49,7 @@ public interface LatentDangerState { ...@@ -47,7 +49,7 @@ public interface LatentDangerState {
/** /**
* 隐患二次审核确认 * 隐患二次审核确认
*/ */
隐患二次审核确认("隐患二次审核确认", "secondConfirm", "taskDispatch","onSiteConfirm", "1", ""), 隐患二次审核确认("隐患二次审核确认", "secondConfirm", "taskDispatch","onSiteConfirm", "1", "auditRecordPage"),
/** /**
* 整改任务分配 * 整改任务分配
*/ */
...@@ -187,15 +189,14 @@ public interface LatentDangerState { ...@@ -187,15 +189,14 @@ public interface LatentDangerState {
return enumName; return enumName;
} }
public static String getEnumUrlByCode(String code) { public static Map<String, String> getEnumMapByCode(String code) {
String enumUrl = ""; Map<String, String> map = new HashMap<>();
for(SupervisionDangerStateEnum type: SupervisionDangerStateEnum.values()) { SupervisionDangerStateEnum dangerEnum = getEnumByCode(code);
if (type.getCode().equals(code)) { if (!ValidationUtil.isEmpty(dangerEnum)){
enumUrl = type.getUrl(); map.put("processState", dangerEnum.getProcessState());
break; map.put("url", dangerEnum.getUrl());
}
} }
return enumUrl; return map;
} }
public static List<Map<String, String>> getEnumList() { public static List<Map<String, String>> getEnumList() {
......
...@@ -55,8 +55,8 @@ public class RuleDangerService { ...@@ -55,8 +55,8 @@ public class RuleDangerService {
LatentDangerRo latentDangerRo = buildLatentDangerRo(latentDanger, ruleType); LatentDangerRo latentDangerRo = buildLatentDangerRo(latentDanger, ruleType);
Map<String, String> extras = !ValidationUtil.isEmpty(latentDangerRo.getExtras()) ? latentDangerRo.getExtras() : new HashMap<>(); Map<String, String> extras = !ValidationUtil.isEmpty(latentDangerRo.getExtras()) ? latentDangerRo.getExtras() : new HashMap<>();
// 跳转url // 跳转url
String url = LatentDangerState.SupervisionDangerStateEnum.getEnumUrlByCode(latentDanger.getDangerState()); Map<String, String> enumMapByCode = LatentDangerState.SupervisionDangerStateEnum.getEnumMapByCode(latentDanger.getDangerState());
extras.put("url", url); extras.putAll(enumMapByCode);
latentDangerRo.setExtras(extras); latentDangerRo.setExtras(extras);
latentDangerRo.setExcuteStateName(excuteStateName); latentDangerRo.setExcuteStateName(excuteStateName);
latentDangerRo.setIsSendWeb(true); latentDangerRo.setIsSendWeb(true);
...@@ -91,6 +91,7 @@ public class RuleDangerService { ...@@ -91,6 +91,7 @@ public class RuleDangerService {
if (!ValidationUtil.isEmpty(type)){ if (!ValidationUtil.isEmpty(type)){
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("type", type); map.put("type", type);
map.put("id", String.valueOf(latentDanger.getId()));
latentDangerRo.setExtras(map); latentDangerRo.setExtras(map);
} }
return latentDangerRo; return latentDangerRo;
......
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