Browse Source

修正:统计月报两票统计合格率

zhongwei
ty 4 months ago
parent
commit
a5bc7b52e5
  1. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java
  2. 5
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
  3. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java

@ -74,7 +74,7 @@ public class TicketInfoAllClient implements ITicketInfoAllClient {
int completeNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoCompleteNum).sum();
int invalidatedNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoInvalidatedNum).sum();
int qualifiedNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoQualifiedNum).sum();
Double proportion = new BigDecimal(qualifiedNum).divide(new BigDecimal(sum),2, RoundingMode.UP)
Double proportion = new BigDecimal(qualifiedNum).divide(new BigDecimal(sum),4, RoundingMode.UP)
.multiply(new BigDecimal(100)).setScale(2, RoundingMode.UP).doubleValue();
ticketInfoStatisticVO.setTicketInfoNumber(sum);
ticketInfoStatisticVO.setTicketInfoCompleteNum(completeNum);

5
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java

@ -705,7 +705,10 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
//废票数量
int ticketInfoInvalidatedNum = typeOperateTicket.getValue().stream().filter(item -> "作废".equals(item.getFlowTaskName())).collect(Collectors.toList()).size();
//计算合格率
double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum / (double) operateTicketReportStatistic.size() * 100).setScale(2, RoundingMode.HALF_DOWN).doubleValue();
Double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum)
.divide(new BigDecimal(typeOperateTicket.getValue().size()),4, RoundingMode.HALF_UP)
.multiply(new BigDecimal(100))
.setScale(2, RoundingMode.HALF_UP).doubleValue();
TicketInfoStatisticVO ticketInfoStatisticVO = TicketInfoStatisticVO.builder().ticketInfoType(type)
.ticketInfoNumber(typeOperateTicket.getValue().size())
.ticketInfoCompleteNum(ticketInfoCompleteNum)

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

@ -1149,7 +1149,9 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
int ticketInfoQualifiedNum = typeWorkTicket.getValue().stream().filter(ticket -> Func.isNotEmpty(ticket.getEvaluation()) && ticket.getEvaluation().intValue() == 1)
.collect(Collectors.toList()).size();
//计算合格率
Double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum / (double) workTicketReportStatistic.size() *100)
Double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum)
.divide(new BigDecimal(typeWorkTicket.getValue().size()),4, RoundingMode.HALF_UP)
.multiply(new BigDecimal(100))
.setScale(2, RoundingMode.HALF_UP).doubleValue();
TicketInfoStatisticVO workTicketStatistic = TicketInfoStatisticVO.builder()
.ticketInfoType(ticketInfoType)

Loading…
Cancel
Save