云前置改造-暂态数据补召功能
This commit is contained in:
@@ -19,6 +19,7 @@ import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -111,6 +112,16 @@ public class CsEventController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryById")
|
||||
@ApiOperation("根据事件id查询数据")
|
||||
public HttpResult<CsEventPO> queryById(String eventId) {
|
||||
String methodDescribe = getMethodDescribe("queryById");
|
||||
CsEventPO po = csEventPOService.lambdaQuery().eq(CsEventPO::getId,eventId).one();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryByModelId")
|
||||
@ApiOperation("获取各模块事件")
|
||||
@@ -130,4 +141,18 @@ public class CsEventController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEventByTime")
|
||||
@ApiOperation("根据时间获取无波形的暂态事件")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "lineList", value = "监测点id"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间")
|
||||
})
|
||||
public HttpResult<List<CsEventPO>> getEventByTime(@RequestParam(required = false) List<String> lineList,@RequestParam String startTime,@RequestParam String endTime) {
|
||||
String methodDescribe = getMethodDescribe("getEventByTime");
|
||||
List<CsEventPO> list = csEventPOService.getEventByTime(lineList,startTime,endTime);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.njcn.csharmonic.pojo.po.CsEventPO;
|
||||
import com.njcn.csharmonic.pojo.vo.CsEventVO;
|
||||
import com.njcn.csharmonic.pojo.vo.EventDetailVO;
|
||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -59,4 +60,6 @@ public interface CsEventPOService extends IService<CsEventPO>{
|
||||
|
||||
void addCldEvent(CldEventParam param);
|
||||
|
||||
List<CsEventPO> getEventByTime(List<String> lineList, String startTime, String endTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ import com.njcn.influx.utils.InfluxDbUtils;
|
||||
import com.njcn.minioss.config.MinIossProperties;
|
||||
import com.njcn.minioss.util.MinIoUtils;
|
||||
import com.njcn.oss.constant.GeneralConstant;
|
||||
import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.system.api.EleEvtFeignClient;
|
||||
import com.njcn.system.api.EpdFeignClient;
|
||||
@@ -62,7 +61,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLEncoder;
|
||||
@@ -306,6 +304,18 @@ public class CsEventPOServiceImpl extends ServiceImpl<CsEventPOMapper, CsEventPO
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CsEventPO> getEventByTime(List<String> lineList, String startTime, String endTime) {
|
||||
LambdaQueryWrapper<CsEventPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.between(CsEventPO::getStartTime,startTime,endTime)
|
||||
.eq(CsEventPO::getType,0)
|
||||
.isNull(CsEventPO::getWavePath);
|
||||
if (CollUtil.isNotEmpty(lineList)) {
|
||||
lambdaQueryWrapper.in(CsEventPO::getLineId,lineList);
|
||||
}
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public String getTag(Integer type) {
|
||||
String tag;
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user