From 287f532189024fbd0ddea0ae8306614984f997ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Wed, 13 Dec 2023 02:35:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/IFlowBusinessKeyService.java | 7 ++++ .../impl/FlowBusinessKeyServiceImpl.java | 10 ++++++ .../system/mapper/FlowBusinessKeyMapper.java | 8 +++++ .../mapper/flowable/FlowBusinessKeyMapper.xml | 34 ++++++++++++++++++ .../task/myProcess/detail/detailDrawer.vue | 2 ++ .../myProcess/detail/detailLeaveDrawer.vue | 2 ++ .../task/myProcess/editLeaveTaskDrawer.vue | 2 ++ .../task/myProcess/editTaskDrawer.vue | 2 ++ .../task/todo/detail/approveDrawer.vue | 2 ++ .../task/todo/detail/approveLeaveDrawer.vue | 2 ++ .../web/controller/FloweController.java | 35 +++++++++++++++++++ .../jh/bigscreen/web/vo/FlowTypeMapper.java | 25 +++++++++++++ .../project/SurProjectMeasureMapper.xml | 2 ++ 13 files changed, 133 insertions(+) create mode 100644 yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/vo/FlowTypeMapper.java 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 6ce8d1e8..d769c8fd 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 @@ -66,4 +66,11 @@ public interface IFlowBusinessKeyService { public List groupByUnitFinish(FlowTaskEntity where); public List groupByProject(long deptId); + + /** + * 根据条件查询安全类作业工作流列表 + * @param flowTaskEntity + * @return + */ + public List findSafetyWorkList(FlowTaskEntity flowTaskEntity); } 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 54300e04..b232b624 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 @@ -133,4 +133,14 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService { public List groupByProject(long deptId) { return flowBusinessKeyMapper.groupByProject(deptId); } + + /** + * 根据条件查询安全类作业工作流列表 + * @param flowTaskEntity + * @return + */ + @Override + public List findSafetyWorkList(FlowTaskEntity flowTaskEntity) { + return flowBusinessKeyMapper.findSafetyWorkList(flowTaskEntity); + } } 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 65491246..aa12fe31 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 @@ -58,4 +58,12 @@ public interface FlowBusinessKeyMapper { public List groupByUnitFinish(FlowTaskEntity where); public List groupByProject(long deptId); + + /** + * 根据条件查询安全类作业工作流列表 + * @param flowTaskEntity + * @return + */ + public List findSafetyWorkList(FlowTaskEntity flowTaskEntity); + } diff --git a/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml b/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml index d791e2c5..4725decc 100644 --- a/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/flowable/FlowBusinessKeyMapper.xml @@ -108,6 +108,7 @@ and fa.endTime between #{params.beginDate} and #{params.endDate} order by fa.endTime desc + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue b/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue index cde077a7..511bb08f 100644 --- a/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue +++ b/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue @@ -402,6 +402,8 @@ export default { } } .containers { + width: 100%; + height: 150px; .canvas { width: 100%; height: 100px; diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailLeaveDrawer.vue b/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailLeaveDrawer.vue index d6b2f6c8..927ea27e 100644 --- a/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailLeaveDrawer.vue +++ b/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailLeaveDrawer.vue @@ -431,6 +431,8 @@ } } .containers { + width: 100%; + height: 150px; .canvas { width: 100%; height: 100px; diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/editLeaveTaskDrawer.vue b/ruoyi-ui/src/views/flowable/task/myProcess/editLeaveTaskDrawer.vue index 2018435a..5c075df2 100644 --- a/ruoyi-ui/src/views/flowable/task/myProcess/editLeaveTaskDrawer.vue +++ b/ruoyi-ui/src/views/flowable/task/myProcess/editLeaveTaskDrawer.vue @@ -380,6 +380,8 @@ export default { } .app-container{ .containers { + width: 100%; + height: 150px; .canvas { width: 100%; height: 150px; diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue b/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue index 0ec7b836..f6049657 100644 --- a/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue +++ b/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue @@ -311,6 +311,8 @@ } .app-container{ .containers { + width: 100%; + height: 150px; .canvas { width: 100%; height: 150px; diff --git a/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue b/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue index da0ff271..136f9d83 100644 --- a/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue +++ b/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue @@ -550,6 +550,8 @@ export default { } } .containers { + width: 100%; + height: 150px; .canvas { width: 100%; height: 100px; diff --git a/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue b/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue index cf8c8c35..1715fdbc 100644 --- a/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue +++ b/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue @@ -582,6 +582,8 @@ export default { } } .containers { + width: 100%; + height: 150px; .canvas { width: 100%; height: 100px; 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 256c24c6..c9f02070 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 @@ -8,6 +8,7 @@ import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.flowable.service.IFlowBusinessKeyService; import com.ruoyi.system.domain.FlowTaskEntity; +import com.yanzhu.jh.bigscreen.web.vo.FlowTypeMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -138,4 +139,38 @@ public class FloweController extends BaseController { return AjaxResult.success(list); } + /** + * 根据条件查询安全类作业工作流列表 + * JiangYuQi + */ + @GetMapping("/findSafetyWorkList") + public AjaxResult findSafetyWorkList(long deptId,long projectId,String flowType){ + String key="bgscreen_flow_findSafetyWorkList_"+deptId+"_"+projectId+"_"+flowType; + Object obj=redisCache.getCacheObject(key); + if(obj!=null){ + return AjaxResult.success(obj); + } + FlowTaskEntity where=new FlowTaskEntity(); + if(deptId<=0){ + if (SecurityUtils.isUserB()) { + where.setPrjIds(getProjectIds()); + } + } + where.setProcDefKey(FlowTypeMapper.getFlowProcdefKey(flowType)); + where.setProjectDeptId(deptId<1?"":""+deptId); + where.setBusinessKey(projectId<1?"":""+projectId); + List list=flowBusinessKeyService.findSafetyWorkList(where); + redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES); + return AjaxResult.success(list); + } + + /** + * 根据条件查询安全类作业工作流列表 + * JiangYuQi + */ + @GetMapping("/findFormDatasByProcInsId/{procInsId}") + public AjaxResult findFormDatasByProcInsId(@PathVariable("procInsId") String procInsId){ + return AjaxResult.success(flowBusinessKeyService.selectFormDatasByProcInsId(procInsId)); + } + } diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/vo/FlowTypeMapper.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/vo/FlowTypeMapper.java new file mode 100644 index 00000000..82d94605 --- /dev/null +++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/vo/FlowTypeMapper.java @@ -0,0 +1,25 @@ +package com.yanzhu.jh.bigscreen.web.vo; + +/** + * 流程定义转换 + */ +public class FlowTypeMapper { + + /** + * 获取流程定义 + */ + public static String getFlowProcdefKey(String type){ + String procdefKey = ""; + switch (type){ + case "sxkj":procdefKey="flow_aql_sxkj";break; + case "ptzy":procdefKey="flow_aql_ptzy";break; + case "lsyd":procdefKey="flow_aql_lsyd";break; + case "gczy":procdefKey="flow_aql_gczy";break; + case "dzzy":procdefKey="flow_aql_dzzy";break; + case "dhzy":procdefKey="flow_aql_dhzy";break; + case "dlzy":procdefKey="flow_aql_dlzy";break; + default:break; + } + return procdefKey; + } +} diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml index c9abf941..ef79b63f 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectMeasureMapper.xml @@ -210,6 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) b ON a.dict_value=b.measure_info + + \ No newline at end of file