合并qr_branch分支代码
This commit is contained in:
@@ -61,6 +61,7 @@ import com.njcn.gather.report.service.IPqReportService;
|
||||
import com.njcn.gather.result.service.IResultService;
|
||||
import com.njcn.gather.script.pojo.vo.PqScriptDtlDataVO;
|
||||
import com.njcn.gather.script.service.IPqScriptDtlsService;
|
||||
import com.njcn.gather.storage.pojo.param.SingleNonHarmParam;
|
||||
import com.njcn.gather.storage.pojo.po.SimAndDigHarmonicResult;
|
||||
import com.njcn.gather.storage.pojo.po.SimAndDigNonHarmonicResult;
|
||||
import com.njcn.gather.storage.service.SimAndDigHarmonicService;
|
||||
@@ -88,6 +89,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.net.ftp.FTPClient;
|
||||
import org.apache.commons.net.ftp.FTPReply;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.docx4j.jaxb.Context;
|
||||
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
|
||||
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;
|
||||
@@ -115,6 +117,7 @@ import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -164,6 +167,8 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
@Value("${qr.gcDev.path}")
|
||||
private String gcDevPath;
|
||||
|
||||
@Value("${report.dateFormat}")
|
||||
private String dateFormat;
|
||||
|
||||
private final IPqDevService iPqDevService;
|
||||
private final PqDevMapper pqDevMapper;
|
||||
@@ -2020,6 +2025,12 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
baseModelMap.put(BaseReportKeyEnum.DEV_TYPE.getKey(), devType.getName());
|
||||
// 检测员
|
||||
baseModelMap.put(BaseReportKeyEnum.INSPECTOR.getKey(), pqDevVO.getCheckBy() + "");
|
||||
baseModelMap.put(BaseReportKeyEnum.INSPECTOR.getKey(), pqDevVO.getCheckBy() + "");
|
||||
String datePattern = DatePattern.NORM_DATE_PATTERN;
|
||||
if (DatePattern.CHINESE_DATE_PATTERN.equals(dateFormat)) {
|
||||
datePattern = DatePattern.CHINESE_DATE_PATTERN;
|
||||
}
|
||||
|
||||
// 出厂日期
|
||||
baseModelMap.put(BaseReportKeyEnum.CREATEDATE.getKey(), pqDevVO.getCreateDate().format(DateTimeFormatter.ofPattern(datePattern)));
|
||||
// 硬件版本
|
||||
@@ -2065,7 +2076,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
// 实验室温度
|
||||
baseModelMap.put(BaseReportKeyEnum.TEMPERATURE.getKey(), Objects.isNull(pqDevVO.getTemperature()) ? StrPool.TAB : pqDevVO.getTemperature().toString());
|
||||
// 实验室湿度
|
||||
baseModelMap.put(prefix + BaseReportKeyEnum.HUMIDITY.getKey() + suffix, Objects.isNull(pqDevVO.getHumidity()) ? StrPool.TAB : pqDevVO.getHumidity().toString());
|
||||
baseModelMap.put(BaseReportKeyEnum.HUMIDITY.getKey(), Objects.isNull(pqDevVO.getHumidity()) ? StrPool.TAB : pqDevVO.getHumidity().toString());
|
||||
|
||||
// 样品编号
|
||||
baseModelMap.put(BaseReportKeyEnum.SAMPLE_ID.getKey(), StrUtil.isEmpty(pqDevVO.getSampleId()) ? StrPool.TAB : pqDevVO.getSampleId());
|
||||
@@ -2203,8 +2214,8 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
if (DetectionCodeEnum.V2_50.getCode().equals(s1) || DetectionCodeEnum.I2_50.getCode().equals(s1) || DetectionCodeEnum.SV_1_49.getCode().equals(s1) || DetectionCodeEnum.SI_1_49.getCode().equals(s1)) {
|
||||
// 查找一下U1
|
||||
double u1 = 57.74;
|
||||
List<AdHarmonicResult> rawData = adHarmonicService.listAllRawData(devReportParam.getScriptId(), devReportParam.getPlanCode(), devReportParam.getDevId() + "_" + finalI);
|
||||
AdHarmonicResult adHarmonicResult = rawData.stream().filter(obj -> obj.getAdType().equals(DetectionCodeEnum.V2_50.getCode())).sorted((obj1, obj2) -> obj2.getTimeId().compareTo(obj1.getTimeId())).findFirst().orElse(null);
|
||||
List<SimAndDigHarmonicResult> rawData = adHarmonicService.listAllRawData(devReportParam.getScriptId(), devReportParam.getPlanCode(), devReportParam.getDevId() + "_" + finalI);
|
||||
SimAndDigHarmonicResult adHarmonicResult = rawData.stream().filter(obj -> obj.getAdType().equals(DetectionCodeEnum.V2_50.getCode())).sorted((obj1, obj2) -> obj2.getTimeId().compareTo(obj1.getTimeId())).findFirst().orElse(null);
|
||||
if (ObjectUtil.isNotNull(adHarmonicResult)) {
|
||||
String aValue1 = adHarmonicResult.getAValue1();
|
||||
u1 = Double.parseDouble(aValue1);
|
||||
|
||||
Reference in New Issue
Block a user