From 672638af8464cdfdda5e3ecffaf07387861161bc Mon Sep 17 00:00:00 2001 From: haha Date: Sun, 1 Oct 2023 19:45:32 +0800 Subject: [PATCH] update code --- .../service/IFlowBusinessKeyService.java | 4 +++ .../impl/FlowBusinessKeyServiceImpl.java | 10 ++++++++ .../ruoyi/system/domain/FlowTaskEntity.java | 19 ++++++++++++++ .../system/mapper/FlowBusinessKeyMapper.java | 4 +++ .../mapper/flowable/FlowBusinessKeyMapper.xml | 25 ++++++++++++++++++- .../web/controller/FloweController.java | 23 ++++++++++++++--- 6 files changed, 80 insertions(+), 5 deletions(-) diff --git a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IFlowBusinessKeyService.java b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IFlowBusinessKeyService.java index 6df95c8a..3904f9fe 100644 --- a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IFlowBusinessKeyService.java +++ b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IFlowBusinessKeyService.java @@ -56,4 +56,8 @@ public interface IFlowBusinessKeyService { public List groupByCategory(FlowTaskEntity where); public List groupByUnit(FlowTaskEntity where); + + public List listByUnit(FlowTaskEntity where); + + public List listByState(FlowTaskEntity where); } diff --git a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowBusinessKeyServiceImpl.java b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowBusinessKeyServiceImpl.java index 162cd1ad..fe3d4d34 100644 --- a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowBusinessKeyServiceImpl.java +++ b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowBusinessKeyServiceImpl.java @@ -108,4 +108,14 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService { public List groupByUnit(FlowTaskEntity where) { return flowBusinessKeyMapper.groupByUnit(where); } + + @Override + public List listByUnit(FlowTaskEntity where) { + return flowBusinessKeyMapper.listByUnit(where); + } + + @Override + public List listByState(FlowTaskEntity where) { + return flowBusinessKeyMapper.listByState(where); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/FlowTaskEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/FlowTaskEntity.java index 8b6edad4..a9acf4e8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/FlowTaskEntity.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/FlowTaskEntity.java @@ -99,6 +99,25 @@ public class FlowTaskEntity extends BaseEntity{ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date finishTime; + private long deptId; + private long projectId; + + public long getDeptId() { + return deptId; + } + + public void setDeptId(long deptId) { + this.deptId = deptId; + } + + public long getProjectId() { + return projectId; + } + + public void setProjectId(long projectId) { + this.projectId = projectId; + } + private List roleIds; public String getBusinessKeyName() { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FlowBusinessKeyMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FlowBusinessKeyMapper.java index f4c02d0d..2a198879 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FlowBusinessKeyMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FlowBusinessKeyMapper.java @@ -48,4 +48,8 @@ public interface FlowBusinessKeyMapper { public List groupByCategory(FlowTaskEntity where); public List groupByUnit(FlowTaskEntity where); + + public List listByUnit(FlowTaskEntity where); + + public List listByState(FlowTaskEntity where); } diff --git a/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml b/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml index b6703fdb..4d0a23b1 100644 --- a/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml @@ -144,5 +144,28 @@ ) a GROUP BY cat - + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/FloweController.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/FloweController.java index d3f4e43f..0fffbd45 100644 --- a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/FloweController.java +++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/FloweController.java @@ -1,21 +1,21 @@ package com.yanzhu.jh.bigscreen.web.controller; import com.ruoyi.common.constant.Constants; +import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.flowable.service.IFlowBusinessKeyService; import com.ruoyi.system.domain.FlowTaskEntity; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.concurrent.TimeUnit; @RestController @RequestMapping("/bgscreen/flow") -public class FloweController { +public class FloweController extends BaseController { @Autowired IFlowBusinessKeyService flowBusinessKeyService; @@ -53,4 +53,19 @@ public class FloweController { return AjaxResult.success(list); } + + @PostMapping("/listByUnit") + public TableDataInfo listByUnit(@RequestBody FlowTaskEntity where){ + startPage(); + List list=flowBusinessKeyService.listByUnit(where); + return getDataTable(list); + } + + @PostMapping("/listByState") + public TableDataInfo listByState(@RequestBody FlowTaskEntity where){ + startPage(); + List list=flowBusinessKeyService.listByState(where); + return getDataTable(list); + } + }