预处理模块:工单问题生成,主网有效监测时长计算,

过程监督模块:工单模块功能,其他模块的审核
This commit is contained in:
huangzj
2023-02-27 11:24:58 +08:00
parent 5915ed87ac
commit 338b659d94
58 changed files with 2932 additions and 57 deletions

View File

@@ -3,6 +3,7 @@ package com.njcn.harmonic.utils;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.EnumUtils;
import com.njcn.harmonic.enums.HarmonicResponseEnum;
@@ -32,7 +33,14 @@ public class HarmonicEnumUtil {
throw new BusinessException(CommonResponseEnum.INTERNAL_ERROR);
}
}
public static Enum<?> getExceptionEnum(HttpResult<Object> result){
//如果返回错误,且为内部错误,则直接抛出异常
CommonResponseEnum commonResponseEnum = EnumUtils.getCommonResponseEnumByCode(result.getCode());
if (commonResponseEnum == CommonResponseEnum.DEVICE_RESPONSE_ENUM) {
return getHarmonicEnumResponseEnumByMessage(result.getMessage());
}
return commonResponseEnum;
}
}