diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java index 93810fc..16f31e5 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java @@ -4,7 +4,7 @@ import lombok.Getter; public class OperationalConstants { - public final static String APP_NAME = "hzims-operational"; + public final static String APP_NAME = "hzims-operational-ty"; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java index 592fae1..f09e610 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java @@ -491,10 +491,12 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { ticketChartCell.setTicketName(value.getFileName()); if (value.getTicketType() == 2) { List yearTicketCollect = Optional.ofNullable(yearTicket.getData()).orElse(new ArrayList<>()).stream() + .filter(s -> s.getSignageCode() != null) .filter(s -> stationId.equals(s.getSignageCode())) .filter(s -> s.getType().equals(value.getType())).collect(Collectors.toList()); List monthTicketCollect = Optional.ofNullable(monthTicket.getData()).orElse(new ArrayList<>()).stream() - .filter(s -> s.getSignageCode().equals(stationId)) + .filter(s -> s.getSignageCode() != null) + .filter(s -> stationId.equals(s.getSignageCode())) .filter(s -> s.getType().equals(value.getType())).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(yearTicketCollect)) { //年合格率和数量 @@ -521,10 +523,12 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { } if (value.getTicketType() == 1) { List yearOperateCollect = Optional.ofNullable(yearOperateTicket.getData()).orElse(new ArrayList<>()).stream() + .filter(s -> s.getSignageCode() != null) .filter(s -> stationId.equals(s.getSignageCode())) .filter(s -> s.getTicketType().equals(value.getType())).collect(Collectors.toList()); List monthOperateCollect = Optional.ofNullable(monthOperateTicket.getData()).orElse(new ArrayList<>()).stream() - .filter(s -> s.getSignageCode().equals(stationId)) + .filter(s -> s.getSignageCode() != null) + .filter(s -> stationId.equals(s.getSignageCode())) .filter(s -> s.getTicketType().equals(value.getType())).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(yearOperateCollect)) { //年合格率和数量 @@ -590,8 +594,8 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { ticketMap2.put("info", "合格率"); ticketMap.put("ticketMon" + ticketType, String.valueOf(chartCell.getTicketMon())); ticketMap.put("ticketYear" + ticketType, String.valueOf(chartCell.getTicketYear())); - ticketMap2.put("ticketMon" + ticketType, chartCell.getTicketMonPerc()* 100 + "%"); - ticketMap2.put("ticketYear" + ticketType, chartCell.getTicketYeaPercr()* 100 + "%"); + ticketMap2.put("ticketMon" + ticketType, new BigDecimal(chartCell.getTicketMonPerc()).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue() + "%"); + ticketMap2.put("ticketYear" + ticketType,new BigDecimal(chartCell.getTicketYeaPercr()).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()+ "%"); } ticketListRes.add(ticketMap); ticketListRes.add(ticketMap2);