diff --git a/detection/src/main/java/com/njcn/gather/device/pojo/po/PqDevSub.java b/detection/src/main/java/com/njcn/gather/device/pojo/po/PqDevSub.java index 08124e64..6512a122 100644 --- a/detection/src/main/java/com/njcn/gather/device/pojo/po/PqDevSub.java +++ b/detection/src/main/java/com/njcn/gather/device/pojo/po/PqDevSub.java @@ -62,7 +62,7 @@ public class PqDevSub { private LocalDateTime checkStartTime; /** - * 检测开始时间 + * 检测结束时间 */ @TableField("Check_End_Time") private LocalDateTime checkEndTime; diff --git a/detection/src/main/java/com/njcn/gather/device/pojo/vo/PqDevVO.java b/detection/src/main/java/com/njcn/gather/device/pojo/vo/PqDevVO.java index 42d3383d..3ceb374e 100644 --- a/detection/src/main/java/com/njcn/gather/device/pojo/vo/PqDevVO.java +++ b/detection/src/main/java/com/njcn/gather/device/pojo/vo/PqDevVO.java @@ -1,5 +1,6 @@ package com.njcn.gather.device.pojo.vo; +import com.baomidou.mybatisplus.annotation.TableField; import com.njcn.gather.device.pojo.po.PqDev; import com.njcn.gather.monitor.pojo.po.PqMonitor; import lombok.Data; @@ -73,9 +74,14 @@ public class PqDevVO extends PqDev { private String checkBy; /** - * 检测时间 + * 检测开始时间 */ - private LocalDateTime checkTime; + private LocalDateTime checkStartTime; + + /** + * 检测结束时间 + */ + private LocalDateTime checkEndTime; /** * 预检测耗时 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 2f4c949d..8d0eb91c 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 @@ -660,7 +660,7 @@ public class PqDevServiceImpl extends ServiceImpl implements } pqDevVo.setRecheckNum(recheckNum); pqDevVo.setCheckBy(userId); - pqDevVo.setCheckTime(LocalDateTime.now()); + pqDevVo.setCheckEndTime(LocalDateTime.now()); pqDevCheckHistoryService.saveOrUpdateDeviceHistory(plan, pqDevVo); } diff --git a/detection/src/main/java/com/njcn/gather/plan/pojo/po/PqDevCheckHistory.java b/detection/src/main/java/com/njcn/gather/plan/pojo/po/PqDevCheckHistory.java index 909241f5..456ba783 100644 --- a/detection/src/main/java/com/njcn/gather/plan/pojo/po/PqDevCheckHistory.java +++ b/detection/src/main/java/com/njcn/gather/plan/pojo/po/PqDevCheckHistory.java @@ -40,6 +40,9 @@ public class PqDevCheckHistory { @TableField("Result") private Integer result; + /** + * 检测结束时间 + */ @TableField("Check_Time") private LocalDateTime checkTime; diff --git a/detection/src/main/java/com/njcn/gather/plan/service/impl/PqDevCheckHistoryServiceImpl.java b/detection/src/main/java/com/njcn/gather/plan/service/impl/PqDevCheckHistoryServiceImpl.java index 2cf58931..8924c31c 100644 --- a/detection/src/main/java/com/njcn/gather/plan/service/impl/PqDevCheckHistoryServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/plan/service/impl/PqDevCheckHistoryServiceImpl.java @@ -108,7 +108,7 @@ public class PqDevCheckHistoryServiceImpl extends ServiceImpl i // 软件版本 baseModelMap.put(BaseReportKeyEnum.SW_VERSION.getKey(), StrUtil.isNotBlank(pqDevVO.getSoftwareVersion()) ? pqDevVO.getSoftwareVersion() : StrUtil.EMPTY); // 调试日期 - if (pqDevVO.getCheckTime() != null) { - baseModelMap.put(BaseReportKeyEnum.TEST_DATE.getKey(), DateUtil.format(pqDevVO.getCheckTime(), DatePattern.CHINESE_DATE_PATTERN)); + if (pqDevVO.getCheckEndTime() != null) { + baseModelMap.put(BaseReportKeyEnum.TEST_DATE.getKey(), DateUtil.format(pqDevVO.getCheckEndTime(), DatePattern.CHINESE_DATE_PATTERN)); } else { baseModelMap.put(BaseReportKeyEnum.TEST_DATE.getKey(), DateUtil.format(new Date(), DatePattern.CHINESE_DATE_PATTERN)); } @@ -2161,7 +2161,7 @@ public class PqReportServiceImpl extends ServiceImpl i // 收样日期 baseModelMap.put(BaseReportKeyEnum.ARRIVED_DATE.getKey(), Objects.isNull(pqDevVO.getArrivedDate()) ? StrPool.TAB : String.valueOf(pqDevVO.getArrivedDate())); // 检测日期 - baseModelMap.put(BaseReportKeyEnum.TEST_DATE.getKey(), Objects.isNull(pqDevVO.getCheckTime()) ? StrPool.TAB : String.valueOf(pqDevVO.getCheckTime()).substring(0, 10)); + baseModelMap.put(BaseReportKeyEnum.TEST_DATE.getKey(), Objects.isNull(pqDevVO.getCheckEndTime()) ? StrPool.TAB : String.valueOf(pqDevVO.getCheckEndTime()).substring(0, 10)); baseModelMap.put(BaseReportKeyEnum.TEMPERATURE.getKey(), Objects.isNull(pqDevVO.getTemperature()) ? StrPool.TAB : pqDevVO.getTemperature().toString()); baseModelMap.put(BaseReportKeyEnum.HUMIDITY.getKey(), Objects.isNull(pqDevVO.getHumidity()) ? StrPool.TAB : pqDevVO.getHumidity().toString()); baseModelMap.put(BaseReportKeyEnum.YEAR.getKey(), DateUtil.format(new Date(), DatePattern.NORM_YEAR_PATTERN));