feat(data): 新增文件路径查询版本信息功能并完善设备升级流程
- 在CsEdDataController中新增findByPath接口用于根据文件路径获取版本信息 - 在CsEdDataFeignClient中添加findByPath远程调用方法 - 为CsEdDataFeignClientFallbackFactory增加降级处理逻辑 - 扩展CsEdDataService接口和服务实现类,添加findByPath业务方法 - 在addEdData和auditEdData方法中增加版本冲突检查机制 - 实现uploadUpgradeFile功能支持设备升级文件上传 - 完善CsEquipmentDeliveryServiceImpl中的文件分片传输逻辑 - 修复CsEventUserPOServiceImpl中的空指针安全检查 - 优化CsLinePOServiceImpl中PT类型处理的空值判断 - 改进CsUpgradeLogsController中按设备ID查询的排序功能 - 补充CustomReportServiceImpl中接线方式的空值验证 - 在EquipmentDeliveryController中暴露uploadUpgradeFile控制器接口 - 增强WordExportModelController中电压等级数据的完整性校验
This commit is contained in:
@@ -1,20 +1,14 @@
|
||||
package com.njcn.csdevice.api;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.csdevice.api.fallback.CsEdDataFeignClientFallbackFactory;
|
||||
import com.njcn.csdevice.pojo.param.CsEdDataAddParm;
|
||||
import com.njcn.csdevice.pojo.param.CsEdDataQueryParm;
|
||||
import com.njcn.csdevice.pojo.po.CsEdDataPO;
|
||||
import com.njcn.csdevice.pojo.vo.CsEdDataVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -44,4 +38,7 @@ public interface CsEdDataFeignClient {
|
||||
@GetMapping("/findByCondition")
|
||||
@ApiOperation("根据条件查询是否存在数据")
|
||||
HttpResult<CsEdDataPO> findByCondition(@RequestBody CsEdDataQueryParm param);
|
||||
|
||||
@GetMapping("/findByPath")
|
||||
HttpResult<CsEdDataPO> findByPath(@RequestParam("filePath") String filePath);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,12 @@ public class CsEdDataFeignClientFallbackFactory implements FallbackFactory<CsEdD
|
||||
log.error("{}异常,降级处理,异常为:{}","根据条件查询是否存在数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<CsEdDataPO> findByPath(String filePath) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据文件路径获取版本信息",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user