代码优化

1.公共方法提取
2.装置类型判断
This commit is contained in:
xy
2024-11-01 11:20:09 +08:00
parent c3d87eca34
commit 35d44dcc08
6 changed files with 38 additions and 0 deletions

View File

@@ -58,4 +58,7 @@ public interface EquipmentFeignClient {
@PostMapping("/getAll")
HttpResult<List<CsEquipmentDeliveryPO>> getAll();
@PostMapping("/judgeDevModel")
HttpResult<Boolean> judgeDevModel(@RequestParam("nDid") String nDid);
}

View File

@@ -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);
}
};
}
}

View File

@@ -47,6 +47,7 @@ public enum AlgorithmResponseEnum {
FILE_BUSY("A00516","正在进行其他文件操作,请稍后重试"),
RECORD_FILE_LOST("A00516","record.bin文件缺失请检查上传文件夹"),
LINE_NUM_MISMATCH("A00516","上传文件的监测点序号和选择的监测点不匹配,请检查"),
DEV_OFFLINE("A00516","装置未连接MQTT服务器"),
;