From a4478902ddc3e76d6639825c223f74dd8febeb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E4=BF=8A=E6=9D=B0?= <9463626+zhou-junjiezjj@user.noreply.gitee.com> Date: Wed, 29 May 2024 13:37:42 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=B5=81=E7=A8=8B=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../execution/ExecutionController.java | 26 ++++ .../resources/config/application-dev3.yml | 4 +- .../flow_manage/act/execution/ViewDialog.vue | 131 +++++++++++++++++ .../act/execution/curdExecution.js | 12 +- .../wms/flow_manage/act/execution/index.vue | 132 +++++++++++------- 5 files changed, 250 insertions(+), 55 deletions(-) create mode 100644 wms_pro/qd/src/views/wms/flow_manage/act/execution/ViewDialog.vue 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 ab8a47ff..a11c695d 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 @@ -2,17 +2,22 @@ package org.nl.wms.flow_manage.flow.controller.execution; import cn.dev33.satoken.annotation.SaIgnore; import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.nl.common.domain.entity.PageQuery; import org.nl.common.utils.IdUtil; import org.nl.common.utils.SecurityUtils; +import org.nl.wms.base_manage.material.service.dao.MdMeMaterialbase; +import org.nl.wms.early_manage.service.early_dtl.dao.AlmEarlyDtl; import org.nl.wms.flow_manage.flow.service.deployment.IActReProcdefService; import org.nl.wms.flow_manage.flow.service.execution.IActRuExecutionService; import org.nl.wms.flow_manage.flow.service.execution.IFlowOperationService; import org.nl.wms.flow_manage.flow.service.execution.dao.ActRuExecution; import org.nl.wms.flow_manage.flow.service.execution.dto.ExecutionQuery; import org.nl.wms.flow_manage.flow.service.execution.dto.StartProcessInstanceVo; +import org.nl.wms.flow_manage.flow.service.history.IActHiExecutionService; +import org.nl.wms.flow_manage.flow.service.history.dao.ActHiExecution; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -20,6 +25,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.Arrays; +import java.util.List; /* * @author ZZQ @@ -36,8 +42,11 @@ public class ExecutionController { @Autowired private IActRuExecutionService executionService; @Autowired + private IActHiExecutionService iActHiExecutionService; + @Autowired private IActReProcdefService procdefService; + @GetMapping public ResponseEntity getAll(ExecutionQuery query, PageQuery page) { return new ResponseEntity<>(executionService.getAll(query, page), HttpStatus.OK); @@ -67,6 +76,23 @@ public class ExecutionController { } return new ResponseEntity<>(HttpStatus.OK); } + @GetMapping("/dtl/{id}") + public ResponseEntity getDtl(@PathVariable String proc_inst_id) { + List list = iActHiExecutionService.list(new LambdaQueryWrapper().eq(ActHiExecution::getProc_inst_id, proc_inst_id)); + JSONArray array = new JSONArray(); + for (ActHiExecution actHiExecution : list) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("proc_inst_id", actHiExecution.getProc_inst_id()); + jsonObject.put("activity_name", actHiExecution.getActivity_name()); + jsonObject.put("update_time", actHiExecution.getUpdate_time()); + jsonObject.put("form_id", actHiExecution.getForm_id()); + jsonObject.put("form_type", actHiExecution.getForm_type()); + jsonObject.put("form_data", actHiExecution.getForm_data()); + array.add(jsonObject); + } + return new ResponseEntity<>(array, HttpStatus.OK); + } + @PostMapping(value = "/open") public ResponseEntity getBpmnByModelId(JSONObject form) { 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..968365c6 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 @@ -7,7 +7,7 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource 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 + url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3307}/${DB_NAME:zjhs_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false username: ${DB_USER:root} password: ${DB_PWD:123456} @@ -155,4 +155,4 @@ sa-token: schedulerFile: /Users/mima0000/Desktop/scheduler.xml lucene: index: - path: E:\lms\lucene\index + path: D:\lms\lucene\index diff --git a/wms_pro/qd/src/views/wms/flow_manage/act/execution/ViewDialog.vue b/wms_pro/qd/src/views/wms/flow_manage/act/execution/ViewDialog.vue new file mode 100644 index 00000000..d0bc71b2 --- /dev/null +++ b/wms_pro/qd/src/views/wms/flow_manage/act/execution/ViewDialog.vue @@ -0,0 +1,131 @@ + + + + + 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 14671bd7..c60174ad 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 @@ -8,6 +8,13 @@ export function add(data) { }) } +export function getDtl(proc_inst_id) { + return request({ + url: 'api/bpmnExecution/dtl/' + proc_inst_id, + method: 'get' + }) +} + export function del(ids) { return request({ url: 'api/flow', @@ -77,8 +84,8 @@ export function changeActive(data) { } export function flowConfirm(inst_id) { return request({ - url: 'api/bpmnExecution/confirm/'+inst_id, - method: 'get', + url: 'api/bpmnExecution/confirm/' + inst_id, + method: 'get' }) } @@ -92,6 +99,7 @@ export default { publish, queryByParentId, getDeploymentById, + getDtl, changeActive, flowConfirm } 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 3c79a59b..016c194a 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 @@ -31,10 +31,10 @@ class="filter-item" /> - + - + - + - + - + - + - + - + - + - + - + +