特性点顺序问题
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -18,15 +18,6 @@ public interface IPqFreqConverterTestResService extends IService<PqFreqConverter
|
||||
*/
|
||||
void clearAllData(Integer suffix);
|
||||
|
||||
/**
|
||||
* 保存结果记录
|
||||
*
|
||||
* @param suffix 表后缀
|
||||
* @param testResList 结果数据
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean saveOrUpdateTestRes(Integer suffix, List<PqFreqConverterTestRes> testResList);
|
||||
|
||||
/**
|
||||
* 新增结果记录
|
||||
*
|
||||
|
||||
@@ -83,6 +83,7 @@ public class FreqConverterServiceImpl extends ServiceImpl<FreqConverterStatusMap
|
||||
tolerantPointVO.setDurationMs(item.getDurationMs());
|
||||
tolerantPointVO.setResidualVoltage(item.getResidualVoltage());
|
||||
tolerantPointVO.setTolerant(item.getTolerant());
|
||||
tolerantPointVO.setTime(item.getTime());
|
||||
return tolerantPointVO;
|
||||
})
|
||||
.sorted(Comparator.comparingInt(TolerantPointVO::getDurationMs))
|
||||
|
||||
@@ -84,6 +84,7 @@ public class PqFreqConverterConfigServiceImpl extends ServiceImpl<PqFreqConverte
|
||||
" `residual_voltage` decimal(6,2) NOT NULL COMMENT '残余电压(%Ur)'," +
|
||||
" `duration_ms` int(11) NOT NULL COMMENT '持续时间(ms)'," +
|
||||
" `tolerant` tinyInt(1) NOT NULL COMMENT '0为不耐受,1为耐受,2为特征点'," +
|
||||
" `time` datetime(3) DEFAULT NULL COMMENT '时间',"+
|
||||
" PRIMARY KEY (`id`)" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='变频器耐受实验结果';";
|
||||
tableGenMapper.genTable(tableSql);
|
||||
|
||||
@@ -28,10 +28,6 @@ public class PqFreqConverterTestResServiceImpl extends ServiceImpl<PqFreqConvert
|
||||
DynamicTableNameHandler.remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveOrUpdateTestRes(Integer suffix, List<PqFreqConverterTestRes> testResList) {
|
||||
return this.updateTestRes(suffix, testResList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveTestRes(Integer suffix, List<PqFreqConverterTestRes> testResList) {
|
||||
|
||||
Reference in New Issue
Block a user