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 d9b6459c..6df95c8a 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 @@ -52,4 +52,8 @@ public interface IFlowBusinessKeyService { * @return */ public List> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity); + + public List groupByCategory(FlowTaskEntity where); + + public List groupByUnit(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 de8f5555..162cd1ad 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 @@ -98,4 +98,14 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService { public List> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity) { return flowBusinessKeyMapper.selectMyFinishedFlowTask(flowTaskEntity); } + + @Override + public List groupByCategory(FlowTaskEntity where) { + return flowBusinessKeyMapper.groupByCategory(where); + } + + @Override + public List groupByUnit(FlowTaskEntity where) { + return flowBusinessKeyMapper.groupByUnit(where); + } } 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 55e9d67b..f4c02d0d 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 @@ -45,4 +45,7 @@ public interface FlowBusinessKeyMapper { */ public List> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity); + public List groupByCategory(FlowTaskEntity where); + + public List groupByUnit(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 a83a135f..53b48a74 100644 --- a/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml @@ -108,5 +108,41 @@ and fa.endTime between #{params.beginDate} and #{params.endDate} order by fa.endTime desc + + \ No newline at end of file diff --git a/yanzhu-bigscreen/pom.xml b/yanzhu-bigscreen/pom.xml index 9eed6eb5..a0a48766 100644 --- a/yanzhu-bigscreen/pom.xml +++ b/yanzhu-bigscreen/pom.xml @@ -17,6 +17,10 @@ com.ruoyi ruoyi-framework + + com.ruoyi + ruoyi-flowable + com.yanzhu.jh yanzhu-jh 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 new file mode 100644 index 00000000..5932979e --- /dev/null +++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/FloweController.java @@ -0,0 +1,40 @@ +package com.yanzhu.jh.bigscreen.web.controller; + +import com.ruoyi.common.core.domain.AjaxResult; +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 java.util.List; + +@RestController +@RequestMapping("/bgscreen/flow") +public class FloweController { + @Autowired + IFlowBusinessKeyService flowBusinessKeyService; + + @Autowired + private RedisCache redisCache; + + @GetMapping("/groupByCategory") + public AjaxResult groupByCategory(long deptId,long projectId){ + FlowTaskEntity where=new FlowTaskEntity(); + where.setDeployId(deptId<1?null:""+deptId); + where.setBusinessKey(projectId<1?null:""+projectId); + List list=flowBusinessKeyService.groupByCategory(where); + return AjaxResult.success(list); + } + + @GetMapping("/groupByUnit") + public AjaxResult groupByUnit(long deptId,long projectId){ + FlowTaskEntity where=new FlowTaskEntity(); + where.setDeployId(deptId<1?"":""+deptId); + where.setBusinessKey(projectId<1?"":""+projectId); + List list=flowBusinessKeyService.groupByUnit(where); + return AjaxResult.success(list); + } +} diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectStandardController.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectStandardController.java new file mode 100644 index 00000000..5893efca --- /dev/null +++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/ProjectStandardController.java @@ -0,0 +1,39 @@ +package com.yanzhu.jh.bigscreen.web.controller; + +import com.ruoyi.common.constant.Constants; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.redis.RedisCache; +import com.yanzhu.jh.project.domain.SurProjectStandard; +import com.yanzhu.jh.project.service.ISurProjectStandardService; +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 java.util.List; +import java.util.concurrent.TimeUnit; + +@RestController +@RequestMapping("/bgscreen/standard") +public class ProjectStandardController { + @Autowired + ISurProjectStandardService standardService; + + @Autowired + private RedisCache redisCache; + + @GetMapping("/getList") + public AjaxResult getList(Long deptId,Long projectId){ + SurProjectStandard where=new SurProjectStandard(); + where.setProjectId(projectId); + where.setIsDel(0l); + String key="bgscreen_standard_getList_"+projectId; + Object obj=redisCache.getCacheObject(key); + if(obj!=null){ + return AjaxResult.success(obj); + } + List list=standardService.selectSurProjectStandardList(where); + redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); + return AjaxResult.success(list); + } +}