Browse Source

转换7

develop
wangsixiang 4 months ago
parent
commit
21987b8857
  1. 10
      zc-business/src/main/java/com/zc/business/enums/ValueConverter.java
  2. 10
      zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java

10
zc-business/src/main/java/com/zc/business/enums/ValueConverter.java

@ -81,6 +81,16 @@ public class ValueConverter {
valueMappingSon.put("6-2", "6-5");
valueMappingSon.put("6-3", "6-5");
valueMappingSon.put("6-4", "6-3");
valueMappingSon.put("7-1", "7-1");
valueMappingSon.put("7-2", "7-2");
valueMappingSon.put("7-3", "7-3");
valueMappingSon.put("7-4", "7-4");
valueMappingSon.put("7-5", "7-5");
valueMappingSon.put("7-6", "7-6");
valueMappingSon.put("7-7", "7-7");
valueMappingSon.put("7-8", "7-8");
valueMappingSon.put("7-9", "7-9");
valueMappingSon.put("7-10", "7-10");
valueMappingSon.put("8-1", "10-1");
valueMappingSon.put("8-2", "10-9");
valueMappingSon.put("8-3", "10-4");

10
zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java

@ -503,12 +503,12 @@ public class DcWarningServiceImpl implements IDcWarningService
if (warningType!=null) {
dcEvent.setEventType((long) ValueConverter.convertValueHost(dcWarning.getWarningType()));//事件主类
}
if (dcWarning.getWarningSubclass()!=null&&warningType!=UniversalEnum.SEVEN.getNumber()) {
dcEvent.setEventSubclass(ValueConverter.convertValueSon(dcWarning.getWarningSubclass()));//事件子类(7不转)
}
if (dcWarning.getWarningSubclass()!=null&&(warningType==UniversalEnum.SEVEN.getNumber())){
dcEvent.setEventSubclass(dcWarning.getWarningSubclass());//事件子类(7主类对应的子类直接set)
if (dcWarning.getWarningSubclass()!=null) {
dcEvent.setEventSubclass(ValueConverter.convertValueSon(dcWarning.getWarningSubclass()));//事件子类
}
// if (dcWarning.getWarningSubclass()!=null&&(warningType==UniversalEnum.SEVEN.getNumber())){
// dcEvent.setEventSubclass(dcWarning.getWarningSubclass());//事件子类(7主类对应的子类直接set)
// }
dcEvent.setOccurrenceTime(dcWarning.getWarningTime());//发生时间
dcEvent.setStartTime(DateUtils.getNowDate());//开始时间
dcEvent.setEstimatedEndTime(DateUtils.getObtainDateAfter(UniversalEnum.ONE_HUNDRED_AND_EIGHT.getNumber()));//预计结束时间,开始时间+3小时

Loading…
Cancel
Save