河北pms接口慢问题解决

This commit is contained in:
2023-09-14 09:00:02 +08:00
parent 28de2aa63d
commit 84e3825bbc
46 changed files with 686 additions and 248 deletions

View File

@@ -5,9 +5,12 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.pms.api.fallback.PmsGeneralDeviceInfoClientFallbackFactory;
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@@ -39,4 +42,8 @@ public interface PmsGeneralDeviceInfoClient {
*/
@PostMapping("/getPwPmsDeviceInfoWithOrgId")
HttpResult<List<PmsGeneralDeviceDTO>> getPwPmsDeviceInfoWithOrgId(@RequestBody PmsDeviceInfoParam pmsDeviceInfoParam);
@PostMapping("/getPwPmsMonitorIds")
HttpResult<List<String>> getPwPmsMonitorIds(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
}

View File

@@ -7,10 +7,12 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
import com.njcn.device.pms.utils.PmsDeviceEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@@ -46,6 +48,12 @@ public class PmsGeneralDeviceInfoClientFallbackFactory implements FallbackFactor
log.error("{}异常,降级处理,异常为:{}", "获取指定组织下配网台账综合信息", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<String>> getPwPmsMonitorIds(PwPmsMonitorParam pwPmsMonitorParam) {
log.error("{}异常,降级处理,异常为:{}", "获取指定组织下配网监测点索引", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -1,9 +1,12 @@
package com.njcn.device.pms.pojo.param;
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Title RMpMonitorAlarmCountMParam
* @Package com.njcn.device.pms.pojo.param
@@ -12,7 +15,7 @@ import lombok.Data;
* @Version V1.0
*/
@Data
public class RMpMonitorAlarmCountMParam extends StatisticsBizBaseParam {
public class RMpMonitorAlarmCountMParam extends BaseParam {
@ApiModelProperty(name = "voltage_Level", value = "电压等级id")
private String voltageLevel; //电压等级
@@ -23,4 +26,33 @@ public class RMpMonitorAlarmCountMParam extends StatisticsBizBaseParam {
@ApiModelProperty(name = "measurementPointName", value = "监测点名称")
private String measurementPointName;
private List<String> monitorSort;
/**
* 按台账统计id为台账索引
* 按单位统计id为单位索引
*/
@ApiModelProperty(name="id",value="按台账统计id为台账索引按单位统计id为单位索引")
private String id;
/**
* 统计类型
*/
@ApiModelProperty(name="type",value="类型1年 2季度 3月份 4周 5日")
private Integer type;
/**
* 统计起始日期
*/
@ApiModelProperty(name="startTime",value="统计起始日期yyyy-MM-dd")
private String startTime;
/**
* 统计截止日期
*/
@ApiModelProperty(name="endTime",value="统计截止日期yyyy-MM-dd")
private String endTime;
}

View File

@@ -36,6 +36,8 @@ public class DistributionMonitor extends BaseEntity {
@MppMultiId
private String monitorId;
private String orgId;
/**
* 电压等级(字典)
*/