diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java index 87ced23..66f6b0a 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java @@ -95,6 +95,7 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl workTicketPrincipalChangeVOList = workTicketPrincipalChangeService.list(workTicketPrincipalChangeDto); + if(CollectionUtil.isNotEmpty(workTicketPrincipalChangeVOList)){ + params.put("initialPrincipalName",workTicketPrincipalChangeVOList.get(0).getInitialPrincipalName()); + params.put("changePrincipalName",workTicketPrincipalChangeVOList.get(0).getChangePrincipalName()); + params.put("principalChangeTime", DateUtil.format(workTicketPrincipalChangeVOList.get(0).getCreateTime(),TicketConstants.TICKET_DATE_PATTERN)); + params.put("signerName2", Optional.ofNullable(workTicketInfoEntity.getSigner()).map(UserCache::getUser).map(User::getName).orElse(null)); + params.put("licensorName3", params.get("licensorName")); + + } + else { + params.put("initialPrincipalName", ""); + params.put("changePrincipalName", ""); + params.put("principalChangeTime", ""); + params.put("signerName2",""); + params.put("licensorName3",""); + } + /**获取工作票延期列表**/ + List workTicketDelayVOList = workDelayNoScopeMapper.selectList(new LambdaQueryWrapper() {{ + eq(WorkTicketDelayEntity::getTicketId, workTicketInfoEntity.getId()); + eq(WorkTicketDelayEntity::getIsDeleted, 0L); + }}); + if(CollectionUtil.isNotEmpty(workTicketDelayVOList)){ + WorkTicketDelayEntity workTicketDelayVO = workTicketDelayVOList.get(0); + params.put("changeTime",DateUtil.format(workTicketDelayVO.getChangeTime(),TicketConstants.TICKET_DATE_PATTERN)); + params.put("principalName2",params.get("principalName")); + } + else { + params.put("changeTime", ""); + params.put("principalName2",""); + } + } } //第一种工作票 params.put("one", "6".equals(workTicketInfoEntity.getType()) ? "☑" : "□"); diff --git a/hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx b/hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx index e19e428..aba3a04 100644 Binary files a/hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx and b/hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx differ diff --git a/hzims-service/ticket/src/main/resources/template/电气第一种工作票模版.docx b/hzims-service/ticket/src/main/resources/template/电气第一种工作票模版.docx index 6c836e1..07b8b4e 100644 Binary files a/hzims-service/ticket/src/main/resources/template/电气第一种工作票模版.docx and b/hzims-service/ticket/src/main/resources/template/电气第一种工作票模版.docx differ diff --git a/hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx b/hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx index adf483f..719fd87 100644 Binary files a/hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx and b/hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx differ