From ccc198352ad12698a78e1fd6fdeb1c7ea5bb24d4 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Sat, 11 May 2024 14:16:44 +0800 Subject: [PATCH] =?UTF-8?q?rev=EF=BC=9A=E6=9B=B4=E6=96=B0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../execution/ExecutionController.java | 6 ++ .../service/execution/dao/ActRuExecution.java | 3 + .../impl/ActRuExecutionServiceImpl.java | 16 +++++ .../resources/config/application-dev3.yml | 2 +- .../act/execution/curdExecution.js | 21 +++++- .../wms/flow_manage/act/execution/index.vue | 69 ++++++++++++++----- 6 files changed, 97 insertions(+), 20 deletions(-) diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java index 7a60b716..f757c5b8 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java @@ -93,4 +93,10 @@ public class ExecutionController { public ResponseEntity getDeploymentById(@PathVariable String id) { return new ResponseEntity<>(procdefService.getById(id), HttpStatus.OK); } + + @PostMapping("/changePdfActive") + public ResponseEntity changePdfActive(@Validated @RequestBody ActRuExecution dto) { + executionService.updateById(dto); + return new ResponseEntity<>(HttpStatus.OK); + } } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dao/ActRuExecution.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dao/ActRuExecution.java index ca8baf89..b83113ea 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dao/ActRuExecution.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dao/ActRuExecution.java @@ -45,6 +45,9 @@ public class ActRuExecution implements Serializable { */ private String deployment_id; + @TableField(exist = false) + private String deployment_name; + /** * 当前实例执行节点id */ diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java index 00b8b7ce..db80d692 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java @@ -1,11 +1,14 @@ package org.nl.wms.flow_manage.flow.service.execution.impl; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.nl.common.TableDataInfo; import org.nl.common.domain.entity.PageQuery; +import org.nl.wms.flow_manage.flow.service.deployment.IActReProcdefService; +import org.nl.wms.flow_manage.flow.service.deployment.dao.ActReProcdef; import org.nl.wms.flow_manage.flow.service.execution.dao.ActRuExecution; import org.nl.wms.flow_manage.flow.service.execution.dao.mapper.ActRuExecutionMapper; import org.nl.wms.flow_manage.flow.service.execution.IActRuExecutionService; @@ -27,6 +30,9 @@ import java.util.List; @Service public class ActRuExecutionServiceImpl extends ServiceImpl implements IActRuExecutionService { + @Autowired + private IActReProcdefService procdefService; + @Override public Object getAll(ExecutionQuery query, PageQuery page) { //判断是否存在子实例 @@ -38,7 +44,17 @@ public class ActRuExecutionServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.eq(ActRuExecution::getParent_id, record.getProc_inst_id()); List list = this.list(lambdaQueryWrapper); + ActReProcdef procdef = procdefService.getById(record.getDeployment_id()); + if (ObjectUtil.isNotEmpty(procdef)){ + record.setDeployment_name(procdef.getName()); + } if (CollectionUtil.isNotEmpty(list)) { + for (ActRuExecution execution : list) { + ActReProcdef procdefChildren = procdefService.getById(execution.getDeployment_id()); + if (ObjectUtil.isNotEmpty(procdefChildren)){ + execution.setDeployment_name(procdefChildren.getName()); + } + } record.setHasChildren(true); record.setChildren(list); } diff --git a/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml b/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml index 11ee79f3..6fe761a9 100644 --- a/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml +++ b/wms_pro/hd/nladmin-system/src/main/resources/config/application-dev3.yml @@ -9,7 +9,7 @@ spring: driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false username: ${DB_USER:root} - password: ${DB_PWD:123456} + password: ${DB_PWD:password} # 初始连接数 initial-size: 5 diff --git a/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js b/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js index bc61d9ff..6b8b1a72 100644 --- a/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js +++ b/wms_pro/qd/src/views/wms/flow_manage/act/execution/curdExecution.js @@ -68,4 +68,23 @@ export function getDeploymentById(id) { }) } -export default {add, edit, del, getTypes, getTaskTypes, getStrategyList, publish, queryByParentId, getDeploymentById} +export function changeActive(data) { + return request({ + url: 'api/bpmnExecution/changePdfActive', + method: 'post', + data + }) +} + +export default { + add, + edit, + del, + getTypes, + getTaskTypes, + getStrategyList, + publish, + queryByParentId, + getDeploymentById, + changeActive +} diff --git a/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue b/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue index bc356d70..faa208ad 100644 --- a/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue +++ b/wms_pro/qd/src/views/wms/flow_manage/act/execution/index.vue @@ -64,17 +64,43 @@ style="width: 100%;" > - - - - - - - + + + + + + + + + + + + - - - + + + @@ -149,6 +175,16 @@ export default { formTypes: [], permission: {}, modelJson: '', + statusList: [ + { + value: "30", + label: "未知" + }, + { + value: "20", + label: "未知" + } + ], rules: { name: [ {required: true, message: '不能为空', trigger: 'blur'} @@ -165,20 +201,17 @@ export default { }, viewClick(row) { curdExecution.getDeploymentById(row.deployment_id).then(res => { - this.$refs.viewCurrentFlowDesigner.showLogicFlowDesigner(res.model_editor_json,row); + this.$refs.viewCurrentFlowDesigner.showLogicFlowDesigner(res.model_editor_json, row); }) }, - //logicflow怎么设置当前节点的颜色 load(tree, treeNode, resolve) { - console.log(tree) - console.log(treeNode) setTimeout(() => { - curdExecution.queryByParentId(tree.proc_inst_id).then(res => { - console.log(res) - resolve(res) - }) + resolve(tree.children) }, 100) }, + changeActive(row) { + curdExecution.changeActive(row) + } } }