From 4701f4030e879b167290fba0c8e125cd68a0929e Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Thu, 23 May 2024 17:34:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=BB=E6=8A=A4=E8=BF=90?= =?UTF-8?q?=E8=90=A5-=E6=99=BA=E6=85=A7=E5=85=BB=E6=8A=A4-=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=88=86=E6=9E=90-=E8=AE=BE=E5=A4=87=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/StatusController.java | 3 +- .../java/com/zc/business/domain/Status.java | 9 +++++ .../com/zc/business/mapper/StatusMapper.java | 1 + .../business/service/impl/StatusService.java | 4 +++ .../mapper/business/StatusMapper.xml | 35 +++++++++++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/StatusController.java b/zc-business/src/main/java/com/zc/business/controller/StatusController.java index 6a1ddcc2..72758157 100644 --- a/zc-business/src/main/java/com/zc/business/controller/StatusController.java +++ b/zc-business/src/main/java/com/zc/business/controller/StatusController.java @@ -57,7 +57,8 @@ public class StatusController extends BaseController { LocalDateTime currentTime = status.getTime().truncatedTo(ChronoUnit.DAYS).plusDays(1); status.setStartTime(todayStart); status.setTime(currentTime); - List listStatus = statusService.list(status); + status.setTypes(status.getType().split(",")); + List listStatus = statusService.listStatusByTypes(status); return getDataTable(listStatus); } diff --git a/zc-business/src/main/java/com/zc/business/domain/Status.java b/zc-business/src/main/java/com/zc/business/domain/Status.java index f2f788f2..01e6fd81 100644 --- a/zc-business/src/main/java/com/zc/business/domain/Status.java +++ b/zc-business/src/main/java/com/zc/business/domain/Status.java @@ -232,6 +232,7 @@ public class Status { //@Excel(name = "类型") private String type; + private String[] types; private String orderByField; private String orderDirection; @@ -267,4 +268,12 @@ public class Status { public void setOrderByField(String orderByField) { this.orderByField = orderByField; } + + public String[] getTypes() { + return types; + } + + public void setTypes(String[] types) { + this.types = types; + } } diff --git a/zc-business/src/main/java/com/zc/business/mapper/StatusMapper.java b/zc-business/src/main/java/com/zc/business/mapper/StatusMapper.java index 0c7838e1..69ecce04 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/StatusMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/StatusMapper.java @@ -20,5 +20,6 @@ public interface StatusMapper { List listStatusBySection(@Param("status")Status status); List export(@Param("status")Status status); List deviceStatusListById(@Param("status")Status status); + List listStatusByTypes(@Param("status")Status status); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/StatusService.java b/zc-business/src/main/java/com/zc/business/service/impl/StatusService.java index 41b01bf9..312687f9 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/StatusService.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/StatusService.java @@ -41,4 +41,8 @@ public class StatusService { public List deviceStatusListById(Status status) { return statusMapper.deviceStatusListById(status); } + public List listStatusByTypes(Status status) { + List list = statusMapper.listStatusByTypes(status); + return list; + } } diff --git a/zc-business/src/main/resources/mapper/business/StatusMapper.xml b/zc-business/src/main/resources/mapper/business/StatusMapper.xml index 2f35802a..e2f7e464 100644 --- a/zc-business/src/main/resources/mapper/business/StatusMapper.xml +++ b/zc-business/src/main/resources/mapper/business/StatusMapper.xml @@ -152,6 +152,41 @@ + + +