From af7529a008590eccbae62c3d337293a848cbfaf0 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Fri, 17 May 2024 16:28:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=B7=A5=E4=BD=9C=E7=A5=A8=E9=99=84?= =?UTF-8?q?=E8=A1=A8=E9=A2=84=E8=A7=88=E8=A1=A5=E5=85=85=E5=8D=B1=E9=99=A9?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../twoTicket/service/impl/FirstWorkTicketServiceImpl.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 4ff1b08..ca1e8fb 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 @@ -24,9 +24,12 @@ import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO; import com.hnac.hzims.ticket.constants.TicketConstants; import com.hnac.hzims.ticket.constants.WorkTicketConstants; import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant; +import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger; import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish; +import com.hnac.hzims.ticket.twoTicket.mapper.TicketInfoDangerMapper; import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService; import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService; +import com.hnac.hzims.ticket.twoTicket.service.TicketInfoDangerService; import com.hnac.hzims.ticket.utils.*; import com.hnac.hzims.ticket.workTicket.dto.*; import com.hnac.hzims.ticket.workTicket.entity.*; @@ -103,6 +106,7 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl qw = Wrappers.lambdaQuery().eq(TicketInfoDanger::getTicketId, ticketId); + List ticketInfoDangerList = dangerService.list(qw); + List dangerList = IntStream.iterate(0, index -> index + 1).limit(ticketInfoDangerList.size()).mapToObj(index -> { + Map result = ObjectUtils.obj2Map(ticketInfoDangerList.get(index)); + result.put("index",index + 1); + return result; + }).collect(Collectors.toList()); + params.put("ticketInfoDangers", dangerList); params.put("isSafety",workTicketInfoEntity.getIsSafety() ? "☑" : "□"); params.put("isHazard",workTicketInfoEntity.getIsHazard() ? "☑" : "□"); params.put("isRailway",workTicketInfoEntity.getIsRailway() ? "☑" : "□");