From aac849b8cd343895dea76e4e98e5628b039dca9a Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Fri, 8 Mar 2024 19:31:16 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/biutag/lan/controller/HomeController.java | 2 +- .../src/main/java/com/biutag/lan/domain/MailCategory.java | 2 +- .../src/main/java/com/biutag/lan/enums/MailCategory.java | 2 +- .../main/java/com/biutag/lan/service/DataScreenService.java | 4 ++-- .../main/java/com/biutag/lan/service/MailCategoryService.java | 4 +++- sql/0308.sql | 0 6 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 sql/0308.sql diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java index 52662cd..fa86ed4 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java @@ -104,7 +104,7 @@ public class HomeController { // 累计办结 long completedTotal = mailMarkService.countByCompleted(); // 累计办结 - long thankTotal = mailService.countByMailCategory("感谢信"); + long thankTotal = mailService.countByMailCategory("感谢信类"); return AjaxResult.success(JSONObject.of("mailToday", mailToday, "completedToday", completedToday, "mailTotal", mailTotal, diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/MailCategory.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/MailCategory.java index f0ba071..aa505ee 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/MailCategory.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/MailCategory.java @@ -26,7 +26,7 @@ public class MailCategory { /** * 序号 */ - private String orderNo; + private Integer orderNo; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/enums/MailCategory.java b/mailbox-lan/src/main/java/com/biutag/lan/enums/MailCategory.java index 94d96bf..53813b6 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/enums/MailCategory.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/enums/MailCategory.java @@ -12,7 +12,7 @@ public enum MailCategory { WORK_SUGGESTIONS("工作建议类"), INVALID("无效类"), TERMINATION("终止类"), - THANK_MAIL("感谢信"); + THANK_MAIL("感谢信类"); private String name; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java index cb6a48d..f2b80b2 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java @@ -125,7 +125,7 @@ public class DataScreenService extends ServiceImpl { Map mapSatisfied = baseMapper.getAllSatisfiedRate(null);//获取长沙市局 满意率 // Integer allSum = baseMapper.getAllMailCount(null); Long allSum = mailMapper.selectCount(new LambdaQueryWrapper().ne(Mail::getMailFirstCategory, "无效类").ne(Mail::getMailFirstCategory, "终止类") - .ne(Mail::getMailFirstCategory, "感谢信")); + .ne(Mail::getMailFirstCategory, "感谢信类")); Integer toDayCount = baseMapper.getTodayMailCount(null); mapCompleted.putAll(mapResolved); @@ -140,7 +140,7 @@ public class DataScreenService extends ServiceImpl { Map mapSatisfied = baseMapper.getAllSatisfiedRate(deptId);//获取长沙市局 满意率 // Integer allSum = baseMapper.getAllMailCount(deptId); Long allSum = mailMapper.selectCount(new LambdaQueryWrapper().ne(Mail::getMailFirstCategory, "无效类").ne(Mail::getMailFirstCategory, "终止类") - .ne(Mail::getMailFirstCategory, "感谢信")); + .ne(Mail::getMailFirstCategory, "感谢信类")); Integer toDayCount = baseMapper.getTodayMailCount(deptId); mapCompleted.putAll(mapResolved); diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/MailCategoryService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/MailCategoryService.java index da51e31..4708911 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/MailCategoryService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/MailCategoryService.java @@ -1,5 +1,6 @@ package com.biutag.lan.service; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.lan.domain.MailCategory; import com.biutag.lan.domain.vo.MailCategoryTreeNode; @@ -13,7 +14,8 @@ import java.util.stream.Collectors; public class MailCategoryService extends ServiceImpl { public List tree() { - List list = list(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper().orderByAsc(MailCategory::getOrderNo); + List list = list(queryWrapper); return buildTree(list); } diff --git a/sql/0308.sql b/sql/0308.sql new file mode 100644 index 0000000..e69de29