1.pms电能质量报表

2.园区功能接口
3.自定义报表(部分)
This commit is contained in:
2024-08-13 10:45:06 +08:00
parent a6f9e30d54
commit 2319895ff4
17 changed files with 1216 additions and 484 deletions

View File

@@ -2,7 +2,7 @@ package com.njcn.prepare.harmonic.api.line;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.prepare.harmonic.api.line.fallback.CoustomReportFeignClientFallbackFactory;
import com.njcn.prepare.harmonic.api.line.fallback.CustomReportFeignClientFallbackFactory;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@@ -16,9 +16,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(
value = ServerInfo.PREPARE_BOOT,//对应模块名
path = "/report",//对应controller请求类
fallbackFactory = CoustomReportFeignClientFallbackFactory.class//服务降级处理类
fallbackFactory = CustomReportFeignClientFallbackFactory.class//服务降级处理类
)
public interface CoustmReportFeignClient {
public interface CustomReportFeignClient {
/**
* 批量处理报表

View File

@@ -3,7 +3,7 @@ package com.njcn.prepare.harmonic.api.line.fallback;
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.prepare.harmonic.api.line.CoustmReportFeignClient;
import com.njcn.prepare.harmonic.api.line.CustomReportFeignClient;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
import feign.hystrix.FallbackFactory;
@@ -20,10 +20,10 @@ import org.springframework.web.bind.annotation.RequestBody;
*/
@Slf4j
@Component
public class CoustomReportFeignClientFallbackFactory implements FallbackFactory<CoustmReportFeignClient> {
public class CustomReportFeignClientFallbackFactory implements FallbackFactory<CustomReportFeignClient> {
@Override
public CoustmReportFeignClient create(Throwable throwable) {
public CustomReportFeignClient create(Throwable throwable) {
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
if (throwable.getCause() instanceof BusinessException) {
BusinessException businessException = (BusinessException)throwable.getCause();
@@ -31,7 +31,7 @@ public class CoustomReportFeignClientFallbackFactory implements FallbackFactory<
}
Enum<?> finalExceptionEnum = exceptionEnum;
return new CoustmReportFeignClient() {
return new CustomReportFeignClient() {
@Override
public HttpResult<Boolean> batchReport(@RequestBody LineParam reportParam){
log.error("{}异常,降级处理,异常为:{}", "生成自定义报表: ", throwable.toString());

View File

@@ -42,7 +42,7 @@ public class ReportController extends BaseController {
@PostMapping("/batchReport")
@ApiOperation("批量处理报表")
@ApiImplicitParam(name = "reportParam", value = "查询体", required = true)
public HttpResult<Boolean> batchReport(@RequestBody @Validated LineParam reportParam){
public HttpResult<Boolean> batchReport(@RequestBody LineParam reportParam){
String methodDescribe = getMethodDescribe("batchReport");
reportService.batchReport(reportParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);

View File

@@ -49,13 +49,14 @@ liteflow:
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
root: error
##mybatis配置信息
mybatis-plus:
#别名扫描
type-aliases-package: com.njcn.prepare.harmonic.pojo
global-config:
enable-sql-runner: true
mqtt:
client-id: @artifactId@${random.value}