diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java index 7eec751..645f899 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java @@ -122,6 +122,13 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl measureVOList = standardTicketMeasureService.list(req); standardTicketInfoVO.setStandardTicketMeasureVOList(measureVOList); + List collect = measureVOList.stream().filter(s -> Func.isNotEmpty(s.getExecuteTime())).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(collect)){ + standardTicketInfoVO.setStartTime(collect.stream().map(StandardTicketMeasureVO::getExecuteTime) + .min(Comparator.comparing(LocalDateTime::toString)) + .orElse(null)); + } + standardTicketInfoVO.setEndTime(standardTicketInfoVO.getPrincipalTime()); return R.data(standardTicketInfoVO); } @@ -906,6 +913,11 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl params = com.hnac.hzims.ticket.utils.ObjectUtils.obj2Map(detail); params.put("measureMapList", this.convert(detail.getStandardTicketMeasureVOList())); + //操作票的开始时间取安全措施完成明细中最早的时间-2024.04.26 + LocalDateTime startTime = detail.getStandardTicketMeasureVOList() + .stream().map(StandardTicketMeasureVO::getExecuteTime).min(Comparator.comparing(LocalDateTime::toString)) + .orElse(null); + params.put("measureTimeLast", startTime.format(DateUtil.DATETIME_FORMATTER)); XWPFDocument xwpfDocument = null; String fileName = "template/电气操作票.docx"; try { @@ -942,7 +954,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl