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