|
|
|
@ -122,6 +122,13 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
|
|
|
|
|
req.setTicketId(id); |
|
|
|
|
List<StandardTicketMeasureVO> measureVOList = standardTicketMeasureService.list(req); |
|
|
|
|
standardTicketInfoVO.setStandardTicketMeasureVOList(measureVOList); |
|
|
|
|
List<StandardTicketMeasureVO> 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<StandardTicke
|
|
|
|
|
StandardTicketInfoVO detail = this.detail(ticketId).getData(); |
|
|
|
|
Map<String, Object> 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<StandardTicke
|
|
|
|
|
if ("linux".equals(os)) { |
|
|
|
|
return pdfSavePath; |
|
|
|
|
} else { |
|
|
|
|
return "E://template/"; |
|
|
|
|
return "D://template/"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|