From 547d40ce998a4e1965d04e081aa571a463e42dbd Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 16 Jun 2026 13:21:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SocketContrastResponseService.java | 1 - .../device/controller/PqDevController.java | 28 +++++++------------ .../device/pojo/dto/DataCheckResDTO.java | 8 ++++++ .../gather/device/service/IPqDevService.java | 8 ++++++ .../device/service/impl/PqDevServiceImpl.java | 10 +++++++ 5 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 detection/src/main/java/com/njcn/gather/device/pojo/dto/DataCheckResDTO.java diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java index 1f10f954..6ff844ca 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java @@ -555,7 +555,6 @@ public class SocketContrastResponseService { this.sendAlignData(s, requestOperateCode); FormalTestManager.currentStep = SourceOperateCodeEnum.YJC_ALIGN; - // if (FormalTestManager.isWaveCheck) { // System.out.println("(仅有闪变、录波)模型一致性校验成功!》》》》》》》》》》》》》》》》》》》》》》》》》》》》》开始相序校验》》》》》》》》》》》》》》》》"); // this.sendXu(s); diff --git a/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java b/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java index 5d62b18f..a6d673eb 100644 --- a/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java +++ b/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java @@ -9,6 +9,7 @@ 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.common.utils.LogUtil; +import com.njcn.gather.device.pojo.dto.DataCheckResDTO; import com.njcn.gather.device.pojo.param.PqDevParam; import com.njcn.gather.device.pojo.vo.PqDevVO; import com.njcn.gather.device.service.IPqDevService; @@ -170,23 +171,14 @@ public class PqDevController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe); } - @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD) - @PostMapping(value = "/ttt") - @ApiOperation("批量导入被检设备") - @ApiImplicitParams({ - @ApiImplicitParam(name = "file", value = "被检设备数据文件", required = true), - @ApiImplicitParam(name = "patternId", value = "模式id", required = true) - }) - public HttpResult ttt(@RequestParam("file") MultipartFile file, @RequestParam("patternId") String patternId, @RequestParam("planId") String planId, @RequestParam(value = "cover", defaultValue = "0") Integer cover, HttpServletResponse response) { - String methodDescribe = getMethodDescribe("ttt"); - LogUtil.njcnDebug(log, "{},上传文件为:{}", methodDescribe, file.getOriginalFilename()); - boolean fileType = FileUtil.judgeFileIsExcel(file.getOriginalFilename()); - if (!fileType) { - throw new BusinessException(CommonResponseEnum.FILE_XLSX_ERROR); - } - if ("null".equals(planId)) { - planId = null; - } - return pqDevService.importDev(file, patternId, planId, response, cover); + @OperateInfo + @GetMapping("/getDataCheckRes") + @ApiOperation("获取接入测试-数据校验结果") + @ApiImplicitParam(name = "monitorId", value = "监测点id", required = true) + public HttpResult getDataCheckRes(@RequestParam("monitorId") String monitorId) { + String methodDescribe = getMethodDescribe("getDataCheckRes"); + DataCheckResDTO dataCheckRes = pqDevService.getDataCheckRes(monitorId); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, dataCheckRes, methodDescribe); } + } diff --git a/detection/src/main/java/com/njcn/gather/device/pojo/dto/DataCheckResDTO.java b/detection/src/main/java/com/njcn/gather/device/pojo/dto/DataCheckResDTO.java new file mode 100644 index 00000000..a2dc1579 --- /dev/null +++ b/detection/src/main/java/com/njcn/gather/device/pojo/dto/DataCheckResDTO.java @@ -0,0 +1,8 @@ +package com.njcn.gather.device.pojo.dto; + +/** + * @author caozehui + * @data 2026-06-15 + */ +public class DataCheckResDTO { +} diff --git a/detection/src/main/java/com/njcn/gather/device/service/IPqDevService.java b/detection/src/main/java/com/njcn/gather/device/service/IPqDevService.java index 50cdf78f..d39f245c 100644 --- a/detection/src/main/java/com/njcn/gather/device/service/IPqDevService.java +++ b/detection/src/main/java/com/njcn/gather/device/service/IPqDevService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.njcn.common.pojo.poi.PullDown; import com.njcn.common.pojo.response.HttpResult; +import com.njcn.gather.device.pojo.dto.DataCheckResDTO; import com.njcn.gather.device.pojo.enums.TimeCheckResultEnum; import com.njcn.gather.device.pojo.param.PqDevParam; import com.njcn.gather.device.pojo.po.PqDev; @@ -289,4 +290,11 @@ public interface IPqDevService extends IService { * @return */ List getExportContrastDevData(List pqDevVOList); + + /** + * 获取接入测试-数据校验结果 + * @param monitorId + * @return + */ + DataCheckResDTO getDataCheckRes(String monitorId); } diff --git a/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java b/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java index 5653a6d9..2eca27cf 100644 --- a/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java @@ -28,6 +28,7 @@ import com.njcn.common.utils.EncryptionUtil; import com.njcn.db.mybatisplus.constant.DbConstant; import com.njcn.gather.detection.util.socket.FormalTestManager; import com.njcn.gather.device.mapper.PqDevMapper; +import com.njcn.gather.device.pojo.dto.DataCheckResDTO; import com.njcn.gather.device.pojo.enums.*; import com.njcn.gather.device.pojo.param.PqDevParam; import com.njcn.gather.device.pojo.po.PqDev; @@ -55,6 +56,7 @@ import com.njcn.gather.type.pojo.po.DevType; import com.njcn.gather.type.service.IDevTypeService; import com.njcn.gather.user.user.pojo.po.SysUser; import com.njcn.gather.user.user.service.ISysUserService; +import com.njcn.http.util.RestTemplateUtil; import com.njcn.web.factory.PageFactory; import com.njcn.web.utils.ExcelUtil; import com.njcn.web.utils.HttpResultUtil; @@ -93,6 +95,7 @@ public class PqDevServiceImpl extends ServiceImpl implements private final IPqDevSubService pqDevSubService; private final AdPlanMapper adPlanMapper; private final IPqDevCheckHistoryService pqDevCheckHistoryService; + private final RestTemplateUtil restTemplateUtil; @Override public Page listPqDevs(PqDevParam.QueryParam queryParam) { @@ -1679,4 +1682,11 @@ public class PqDevServiceImpl extends ServiceImpl implements } return result; } + + @Override + public DataCheckResDTO getDataCheckRes(String monitorId) { +// restTemplateUtil.postJson(); + DataCheckResDTO dataCheckResDTO = restTemplateUtil.postJson("http://localhost:8080/api/v1/dataCheck/getDataCheckRes", monitorId, DataCheckResDTO.class); + return dataCheckResDTO; + } }