diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java index 48bb4d3..e052349 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java @@ -490,6 +490,10 @@ public class AssetTaskController extends BaseController { @PostMapping("/export") public void export(HttpServletResponse response, AssetdwHcRequest req) { List list = assetTaskService.export(req); + list.forEach(x -> { + String formattedRatio = x.getCheckedRatio() + "%"; + x.setCheckedRatio(formattedRatio); + }); ExcelUtil util = new ExcelUtil(AssetdwHcResponse.class); util.exportExcel(response, list, "单位完成情况"); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java index 2bea316..bd72fd7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java @@ -27,7 +27,7 @@ public class AssetdwHcResponse { /** * 核查资产数量 */ - @Excel(name = "单位名称") + @Excel(name = "核查资产数量") @ApiModelProperty("核查资产数量") private Integer total; @@ -42,7 +42,7 @@ public class AssetdwHcResponse { /** * 完成状态 */ - @Excel(name = "完成状态",readConverterExp = "1=进行中,2=正常完成,3=超期完成") + @Excel(name = "完成状态",readConverterExp = "1=进行中,2=正常完成,3=超期完成") private Integer taskStatus; @@ -58,8 +58,8 @@ public class AssetdwHcResponse { /** * 百分比 */ - @Excel(name = "百分比") - @ApiModelProperty("百分比") - private double checkedRatio; + @Excel(name = "完成比例") + @ApiModelProperty("完成比例") + private String checkedRatio; } diff --git a/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml index 434ac29..92dc225 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml @@ -234,7 +234,13 @@ and b.xtlx = #{req.xtlx} - order by b.current_id desc + ORDER BY + CASE + + WHEN b.STATUS = 1 THEN + 0 ELSE 1 + END, + b.STATUS ASC