From 7e6fb2d981ac4e9673a97fdf74ad506028390df5 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 7 May 2026 19:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E6=80=A7=E7=82=B9=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detection/handler/SocketFreqConverterDevService.java | 1 + .../detection/handler/SocketFreqConverterService.java | 4 ++++ .../freqConverter/pojo/po/PqFreqConverterTestRes.java | 7 +++++++ .../gather/freqConverter/pojo/vo/TolerantPointVO.java | 9 +++++++++ .../service/IPqFreqConverterTestResService.java | 9 --------- .../service/impl/FreqConverterServiceImpl.java | 1 + .../service/impl/PqFreqConverterConfigServiceImpl.java | 1 + .../service/impl/PqFreqConverterTestResServiceImpl.java | 4 ---- 8 files changed, 23 insertions(+), 13 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java index 2da4db57..ed25f754 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java @@ -314,6 +314,7 @@ public class SocketFreqConverterDevService { : 0); testRes.setDurationMs(pqDipData.getDurationMs()); testRes.setResidualVoltage(pqDipData.getResidualVoltage()); + testRes.setTime(LocalDateTime.now()); FormalTestManager.pendingDipTaskMap.put(testRes.getId(), new FormalTestManager.PendingDipTask( pqDipData, diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java index 0caab4af..9f281359 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java @@ -29,6 +29,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executors; @@ -357,6 +358,7 @@ public class SocketFreqConverterService { featureTestRes.setDurationMs(featurePointVO.getDurationMs()); featureTestRes.setResidualVoltage(featurePointVO.getResidualVoltage()); featureTestRes.setTolerant(2); + featureTestRes.setTime(LocalDateTime.now()); saveTestResList.add(featureTestRes); } @@ -377,6 +379,7 @@ public class SocketFreqConverterService { featureTestRes.setDurationMs(featurePointVO.getDurationMs()); featureTestRes.setResidualVoltage(featurePointVO.getResidualVoltage()); featureTestRes.setTolerant(2); + featureTestRes.setTime(LocalDateTime.now()); saveTestResList.add(featureTestRes); } } @@ -397,6 +400,7 @@ public class SocketFreqConverterService { featureTestRes.setDurationMs(featurePointVO.getDurationMs()); featureTestRes.setResidualVoltage(featurePointVO.getResidualVoltage()); featureTestRes.setTolerant(2); + featureTestRes.setTime(LocalDateTime.now()); saveTestResList.add(featureTestRes); } } diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java b/detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java index 48a5cdea..74f98730 100644 --- a/detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java +++ b/detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java @@ -1,6 +1,7 @@ package com.njcn.gather.freqConverter.pojo.po; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.LocalDateTime; @@ -31,4 +32,10 @@ public class PqFreqConverterTestRes { * 0为不耐受,1为耐受,2为特性曲线点 */ private Integer tolerant; + + /** + * 时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8") + private LocalDateTime time; } diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/pojo/vo/TolerantPointVO.java b/detection/src/main/java/com/njcn/gather/freqConverter/pojo/vo/TolerantPointVO.java index 8fb6dfd1..8bbda67c 100644 --- a/detection/src/main/java/com/njcn/gather/freqConverter/pojo/vo/TolerantPointVO.java +++ b/detection/src/main/java/com/njcn/gather/freqConverter/pojo/vo/TolerantPointVO.java @@ -1,7 +1,10 @@ package com.njcn.gather.freqConverter.pojo.vo; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import java.time.LocalDateTime; + /** * @author caozehui * @data 2026-04-13 @@ -22,4 +25,10 @@ public class TolerantPointVO { * 是否耐受。0-否,1-是,2-表示特性曲线点 */ private Integer tolerant; + + /** + * 时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8") + private LocalDateTime time; } diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java b/detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java index 4e7a622e..3fac9a08 100644 --- a/detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java +++ b/detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java @@ -18,15 +18,6 @@ public interface IPqFreqConverterTestResService extends IService testResList); - /** * 新增结果记录 * diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/FreqConverterServiceImpl.java b/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/FreqConverterServiceImpl.java index e5799256..da966a3a 100644 --- a/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/FreqConverterServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/FreqConverterServiceImpl.java @@ -83,6 +83,7 @@ public class FreqConverterServiceImpl extends ServiceImpl testResList) { - return this.updateTestRes(suffix, testResList); - } @Override public boolean saveTestRes(Integer suffix, List testResList) {