谐波畸变率任务配置

This commit is contained in:
zhuxinyu
2023-04-12 11:09:39 +08:00
parent d32fd417f2
commit 20e4c0cd75
8 changed files with 38 additions and 12 deletions

View File

@@ -18,8 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(
value = ServerInfo.PREPARE_BOOT,
path = "/distortion",
fallbackFactory = DistortionRateFeignClientFallbackFactory.class
)
fallbackFactory = DistortionRateFeignClientFallbackFactory.class)
public interface DistortionRateFeignClient {
@PostMapping("/distortionRate")

View File

@@ -22,15 +22,12 @@ public class LineParam {
private Integer lineType;
@ApiModelProperty(name = "type",value = "时间类型1年2季3月4周5日")
@NotNull(message = "时间类型不可为空")
private Integer type;
@ApiModelProperty(name = "dataDate",value = "时间")
@NotBlank(message = "时间不可为空")
private String dataDate;
@ApiModelProperty(name = "dataSource",value = "数据源0:oracle1:influxdb 2:mysql")
@NotNull(message = "数据源不可为空")
private Integer dataSource;
}

View File

@@ -30,7 +30,7 @@ public class DeviceAbnormalController extends BaseController {
@PostMapping("/statistics")
@ApiOperation("终端异常统计")
@ApiImplicitParam(name = "param", value = "参数", required = true)
public HttpResult<Boolean> dailyDeviceAbnormaStatistics(@RequestBody DeviceAbnormaStatisticsParam param) throws ParseException {
public HttpResult<Boolean> dailyDeviceAbnormaStatistics(@RequestBody DeviceAbnormaStatisticsParam param) {
String methodDescribe = getMethodDescribe("dailyDeviceAbnormaStatistics");
boolean res = deviceAbnormaStatisticsService.dailyDeviceAbnormaStatistics(param);
if(res){

View File

@@ -37,8 +37,8 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
private final InfluxDbUtils influxDbUtils;
@Override
public boolean dailyDeviceAbnormaStatistics(DeviceAbnormaStatisticsParam param) throws ParseException {
Map<String, List<TopMsgPO>> comMap = new HashMap<>();Map<String, List<AlarmPO>> devLineMap = new HashMap<>();
public boolean dailyDeviceAbnormaStatistics(DeviceAbnormaStatisticsParam param) {
Map<String, List<TopMsgPO>> comMap = new HashMap<>();
Map<String, List<AlarmPO>> deviceFlowAndOnlineRateMap = new HashMap<>();
// 获取所有装置以及下属监测点
List<AlarmPO> lines = deviceAbnormaStatisticsMapper.getLines();
@@ -156,7 +156,7 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(instant.toEpochMilli());
return format;
}
public List<TopMsgPO> getCommunicate(List<String> devs, String startTime, String endTime) throws ParseException {
public List<TopMsgPO> getCommunicate(List<String> devs, String startTime, String endTime) {
// startTime ="2023-04-02";
// endTime = "2023-04-02";
//组装sql语句

View File

@@ -59,7 +59,7 @@ public class DistortionRateServiceImpl implements DistortionRateService {
}
LocalDateTime local = LocalDateTimeUtil.parse (lineParam.getDataDate ( ) + "T00:00:00");
for (String lineId : lineIdOutList) {
List<DataVPO> rateOut = getDistortionRateInfluxDb (lineId, lineParam.getDataDate ( ));
List<DataVPO> rateOut = getDistortionRateInfluxDb (lineId, lineParam.getDataDate());
if (rateOut.size ( ) > 0) {
Map<String, Object> inMap = new HashMap<> ( );
inMap.put ("lineId", lineId);

View File

@@ -5,5 +5,6 @@ import com.njcn.prepare.harmonic.pojo.param.DeviceAbnormaStatisticsParam;
import java.text.ParseException;
public interface DeviceAbnormalStatisticsService {
boolean dailyDeviceAbnormaStatistics(DeviceAbnormaStatisticsParam param) throws ParseException;
boolean dailyDeviceAbnormaStatistics(DeviceAbnormaStatisticsParam param);
}