代码优化
1.公共方法提取 2.装置类型判断
This commit is contained in:
@@ -58,4 +58,7 @@ public interface EquipmentFeignClient {
|
||||
|
||||
@PostMapping("/getAll")
|
||||
HttpResult<List<CsEquipmentDeliveryPO>> getAll();
|
||||
|
||||
@PostMapping("/judgeDevModel")
|
||||
HttpResult<Boolean> judgeDevModel(@RequestParam("nDid") String nDid);
|
||||
}
|
||||
|
||||
@@ -77,6 +77,12 @@ public class EquipmentFeignClientFallbackFactory implements FallbackFactory<Equi
|
||||
log.error("{}异常,降级处理,异常为:{}","获取所有装置",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Boolean> judgeDevModel(String nDid) {
|
||||
log.error("{}异常,降级处理,异常为:{}","判断设备型号",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ public enum AlgorithmResponseEnum {
|
||||
FILE_BUSY("A00516","正在进行其他文件操作,请稍后重试"),
|
||||
RECORD_FILE_LOST("A00516","record.bin文件缺失,请检查上传文件夹"),
|
||||
LINE_NUM_MISMATCH("A00516","上传文件的监测点序号和选择的监测点不匹配,请检查"),
|
||||
DEV_OFFLINE("A00516","装置未连接MQTT服务器"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user