From 0cd35e06601e53df9198b96525fa82f14ba8d052 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Fri, 1 Mar 2024 16:59:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=B8=B8=E7=BB=B4=E6=8A=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=AF=BC=E5=87=BA=E4=BB=A3=E7=A0=81=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hnac/hzims/vo/VoteChartVo.java | 12 ++++++++++++ .../access/service/impl/OperAccessTaskServiceImpl.java | 8 ++++++++ .../controller/OperMaintenanceTaskController.java | 16 ++++++++-------- .../service/impl/OperMaintenanceTaskServiceImpl.java | 8 ++++++++ 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java index 4b96c6a..dcb909b 100644 --- a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java @@ -2,6 +2,7 @@ package com.hnac.hzims.vo; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -15,28 +16,39 @@ import java.util.List; @ApiModel("各个票种统计表") public class VoteChartVo { @ApiModelProperty(value = "站点名称") + @ColumnWidth(value = 20) @ExcelProperty(value = "站点名称", index = 0) private String name; @ApiModelProperty(value = "总数量") @ExcelProperty(value = "总数量", index = 1) + @ColumnWidth(value = 20) private int sumNum; + @ApiModelProperty(value = "总数量id") @ExcelIgnore private List sumIds; + @ApiModelProperty(value = "未完成数量") @ExcelProperty(value = "未完成数量", index = 2) + @ColumnWidth(value = 20) private int undoneNum; + @ApiModelProperty(value = "未完成id") @ExcelIgnore private List undoneIds; + @ApiModelProperty(value = "完成数量") + @ColumnWidth(value = 20) @ExcelProperty(value = "完成数量", index = 3) private int finishNum; + @ApiModelProperty(value = "完成id") @ExcelIgnore private List finishIds; + @ApiModelProperty(value = "完成率") @ExcelProperty(value = "完成率", index = 4) + @ColumnWidth(value = 20) private Double finishRate; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java index dc2d35e..4f7861f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java @@ -72,6 +72,8 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.text.DecimalFormat; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -573,6 +575,12 @@ public class OperAccessTaskServiceImpl extends BaseServiceImpl