接口调整
This commit is contained in:
@@ -17,4 +17,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
fallbackFactory = CommTerminalGeneralClientFallbackFactory.class)
|
||||
public interface CommLineClient {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.device.biz.pojo.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/9/18
|
||||
*/
|
||||
@Data
|
||||
public class CommLineDetailDTO {
|
||||
|
||||
@ApiModelProperty(value = "监测点id")
|
||||
private String monitorId;
|
||||
|
||||
@ApiModelProperty(value = "监测点数据统计间隔")
|
||||
private Integer interval;
|
||||
|
||||
}
|
||||
@@ -230,6 +230,20 @@ public class CommTerminalController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取实际,投运,谐波系统 的监测点
|
||||
* @author cdf
|
||||
* @date 2023/9/18
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getRunMonitorList")
|
||||
@ApiOperation("获取实际,投运,谐波系统 的监测点")
|
||||
public HttpResult<List<String>> getRunMonitorList() {
|
||||
String methodDescribe = getMethodDescribe("getRunMonitorList");
|
||||
List<String> result = commTerminalService.getOneMonitorIds();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于返回pq 还是pms系统
|
||||
* @author cdf
|
||||
|
||||
@@ -87,6 +87,9 @@ public interface CommTerminalService {
|
||||
List<String> getOneMonitorIds();
|
||||
|
||||
|
||||
List<CommLineDetailDTO> getRunMonitorList();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -510,4 +510,13 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
||||
return monitorList.stream().map(Monitor::getId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommLineDetailDTO> getRunMonitorList() {
|
||||
DictData dictData = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_STATE.getName(),DicDataEnum.RUN.getName()).getData();
|
||||
if(Objects.isNull(dictData)){
|
||||
throw new BusinessException("监测点状态字典为空");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,12 +28,6 @@
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
|
||||
@@ -5,6 +5,8 @@ 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.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.DayDataService;
|
||||
@@ -45,6 +47,8 @@ public class DayDataController extends BaseController {
|
||||
|
||||
private final DayDataService dayDataService;
|
||||
|
||||
private final CommTerminalGeneralClient commTerminalGeneralClient;
|
||||
|
||||
@Deprecated
|
||||
@ApiOperation("day表定时任务")
|
||||
@ApiImplicitParam(value = "jobParam",name = "jobParam",required = true)
|
||||
@@ -81,7 +85,7 @@ public class DayDataController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("dataToDayHandler");
|
||||
List<String> indexLists = new ArrayList<> ();
|
||||
if(CollectionUtils.isEmpty (jobParam.getLineIds())){
|
||||
indexLists = lineFeignClient.getLineList().getData();
|
||||
indexLists = commTerminalGeneralClient.getRunMonitorIds().getData();
|
||||
} else{
|
||||
indexLists = jobParam.getLineIds();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class IntegrityController extends BaseController {
|
||||
|
||||
private final IntegrityService integrityService;
|
||||
|
||||
@Deprecated
|
||||
/* @Deprecated
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/computeDataIntegrity")
|
||||
@ApiOperation("数据完整性统计")
|
||||
@@ -47,7 +47,7 @@ public class IntegrityController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("computeDataIntegrity");
|
||||
String out = integrityService.computeDataIntegrity(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
}*/
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/dataIntegrity")
|
||||
|
||||
@@ -5,6 +5,7 @@ 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.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.Impl.line.LimitRateService;
|
||||
@@ -45,7 +46,9 @@ public class LimitrateController extends BaseController {
|
||||
|
||||
private final LineFeignClient lineFeignClient;
|
||||
|
||||
@Deprecated
|
||||
private final CommTerminalGeneralClient commTerminalGeneralClient;
|
||||
|
||||
/* @Deprecated
|
||||
@ApiOperation("limitrate表定时任务")
|
||||
@ApiImplicitParam(value = "limitRateHanlderParam",name = "limitRateHanlderParam",required = true)
|
||||
@PostMapping("LimitRateHanlder")
|
||||
@@ -68,7 +71,7 @@ public class LimitrateController extends BaseController {
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@ApiOperation("生成limitRate表(MySQL入库)")
|
||||
@ApiImplicitParam(value = "limitRateHanlderParam",name = "limitRateHanlderParam",required = true)
|
||||
@@ -80,7 +83,7 @@ public class LimitrateController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("limitRate");
|
||||
List<String> indexLists = new ArrayList<> ();
|
||||
if(CollectionUtils.isEmpty (limitRateHanlderParam.getLineIds ())){
|
||||
indexLists = lineFeignClient.getLineList ( ).getData ( );
|
||||
indexLists = commTerminalGeneralClient.getRunMonitorIds ().getData ( );
|
||||
}else{
|
||||
indexLists = limitRateHanlderParam.getLineIds ();
|
||||
}
|
||||
|
||||
@@ -564,6 +564,7 @@ public class DayDataServiceImpl implements DayDataService {
|
||||
List<RStatDataPltDPO> dataPltPOList = new ArrayList<> ();
|
||||
|
||||
for (String lineIndex : indexLists) {
|
||||
|
||||
/*生成dayV表*/
|
||||
List<DataVPO> dataV = getDataV(lineIndex, startTime, endTime);
|
||||
if (!CollectionUtils.isEmpty(dataV)) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class IntegrityServiceImpl extends MppServiceImpl<RStatIntegrityDMapper,
|
||||
|
||||
private final LineFeignClient lineFeignClient;
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
@Async("asyncExecutor")
|
||||
public String computeDataIntegrity(LineParam lineParam) {
|
||||
List<LineDetail> lineDetailList;
|
||||
@@ -80,7 +80,7 @@ public class IntegrityServiceImpl extends MppServiceImpl<RStatIntegrityDMapper,
|
||||
influxDbUtils.batchInsert(influxDbUtils.getDbName(),"", InfluxDB.ConsistencyLevel.ALL, records);
|
||||
return "成功!";
|
||||
}
|
||||
|
||||
*/
|
||||
@Override
|
||||
@Async("asyncExecutor")
|
||||
public void dataIntegrity(LineParam lineParam,String time) {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @Author: clam
|
||||
* @Date: 2022/10/18
|
||||
*/
|
||||
@Transactional(
|
||||
/* @Transactional(
|
||||
rollbackFor = {Exception.class}
|
||||
)
|
||||
@SneakyThrows
|
||||
@@ -101,12 +101,12 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
limitRates.addAll (collect);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(limitRateList)){
|
||||
/*插入influxdb*/
|
||||
*//*插入influxdb*//*
|
||||
insert(limitRateList,time);
|
||||
/*插入mysql*/
|
||||
*//*插入mysql*//*
|
||||
this.saveOrUpdateBatchByMultiId (limitRates,50);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
@SneakyThrows
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
*/
|
||||
public interface IntegrityService {
|
||||
|
||||
String computeDataIntegrity(LineParam lineParam);
|
||||
//String computeDataIntegrity(LineParam lineParam);
|
||||
|
||||
void dataIntegrity(LineParam lineParam,String time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user