国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

flowable流程節(jié)點狀態(tài)構造

這篇具有很好參考價值的文章主要介紹了flowable流程節(jié)點狀態(tài)構造。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

    public Result<List<TaskDetailVO>> record(@PathVariable("processInstanceId") String processInstanceId){
        List<Comment> processInstanceComments = taskService.getProcessInstanceComments(processInstanceId);
        Map<String, List<Comment>> commentsMap = processInstanceComments.stream()
                .collect(Collectors.groupingBy(Comment::getTaskId));
        List<Attachment> processInstanceAttachments = taskService.getProcessInstanceAttachments(processInstanceId);
        Map<String, List<Attachment>> attachmentMap = processInstanceAttachments.stream()
                .collect(Collectors.groupingBy(Attachment::getTaskId));
        List<HistoricActivityInstance> list = historyService.createHistoricActivityInstanceQuery().processInstanceId(processInstanceId).orderByHistoricActivityInstanceStartTime().asc().list();
        List<TaskDetailVO> taskDetailVOS= new ArrayList<>();
        for (HistoricActivityInstance historicActivityInstance : list) {
            if("userTask".equals(historicActivityInstance.getActivityType())){
                List<Comment> comments = commentsMap.get(historicActivityInstance.getTaskId());
                if(CollUtil.isNotEmpty(comments)){
                    for (Comment comment : comments) {
                        if(OPINION_COMMENT.equals(comment.getType())){
                            TaskDetailVO taskDetailVO= new TaskDetailVO();
                            taskDetailVO.setTaskId(historicActivityInstance.getTaskId());
                            taskDetailVO.setActivityId(historicActivityInstance.getActivityId());
                            taskDetailVO.setName(historicActivityInstance.getActivityName());
                            taskDetailVO.setCreateTime(historicActivityInstance.getStartTime());
                            taskDetailVO.setEndTime(historicActivityInstance.getEndTime());
                            taskDetailVO.setComment(comment.getFullMessage());
                            taskDetailVO.setUser(getUserInfoVo(historicActivityInstance.getAssignee()));
                            taskDetailVO.setStatus(Objects.equals(historicActivityInstance.getDeleteReason(), "拒絕")?2:1);
                            List<Attachment> attachments = attachmentMap.get(historicActivityInstance.getTaskId());
                            List<AttachmentVO> attachmentVOList = new ArrayList<>();
                            if(attachments!=null){
                                for (Attachment attachment : attachments) {
                                    AttachmentVO attachmentVO = new AttachmentVO();
                                    attachmentVO.setId(attachment.getId());
                                    attachmentVO.setName(attachment.getName());
                                    attachmentVO.setUrl(attachment.getUrl());
                                    attachmentVOList.add(attachmentVO);
                                }
                            }
                            for (Comment comment1 : comments) {
                                if(SIGN_COMMENT.equals(comment1.getType())){
                                    taskDetailVO.setSignImage(comment1.getFullMessage());
                                }
                            }

                            taskDetailVO.setAttachmentVOList(attachmentVOList);
                            taskDetailVOS.add(taskDetailVO);
                        }
                    }
                }else{
                    TaskDetailVO taskDetailVO= new TaskDetailVO();
                    taskDetailVO.setTaskId(historicActivityInstance.getTaskId());
                    taskDetailVO.setActivityId(historicActivityInstance.getActivityId());
                    taskDetailVO.setName(historicActivityInstance.getActivityName());
                    taskDetailVO.setCreateTime(historicActivityInstance.getStartTime());
                    taskDetailVO.setEndTime(historicActivityInstance.getEndTime());
                    if(Objects.equals(historicActivityInstance.getActivityName(), "發(fā)起人")){
                        // 查發(fā)起人的信息
                        HistoricProcessInstance historyProcessInstance  = historyService.createHistoricProcessInstanceQuery().processInstanceId(historicActivityInstance.getProcessInstanceId()).singleResult();
                        taskDetailVO.setUser(getUserInfoVo(historyProcessInstance.getStartUserId()));
                        taskDetailVO.setStatus(-1);
                    }else{
                        taskDetailVO.setUser(getUserInfoVo(historicActivityInstance.getAssignee()));
                        taskDetailVO.setStatus(0);
                    }
                    taskDetailVO.setComment("");
                    taskDetailVOS.add(taskDetailVO);
                }
            }
        }
        return Result.OK(taskDetailVOS);
    }

接口返回示例

{
    "success": true,
    "message": "操作成功!",
    "code": 200,
    "result": [
        {
            "taskId": "1747191729082482688",
            "activityId": "root",
            "name": "發(fā)起人",
            "createTime": "2024-01-16T17:39:04.117+08:00",
            "endTime": "2024-01-16T17:39:04.385+08:00",
            "signImage": null,
            "attachmentVOList": null,
            "optionVOList": null,
            "commentVOList": null,
            "comment": "",
            "user": {
                "id": "1",
                "name": "張三",
                "type": "user",
                "sex": "1",
                "selected": true
            },
            "status": null
        },
        {
            "taskId": "1747191730344968192",
            "activityId": "node_417233798091",
            "name": "審批人",
            "createTime": "2024-01-16T17:39:04.422+08:00",
            "endTime": "2024-01-16T19:31:09.651+08:00",
            "signImage": null,
            "attachmentVOList": [],
            "optionVOList": null,
            "commentVOList": null,
            "comment": "同意",
            "user": {
                "id": "2",
                "name": "張四",
                "type": "user",
                "sex": "1",
                "selected": true
            },
            "status": true
        },
        {
            "taskId": "1747219938314448896",
            "activityId": "node_223911503301",
            "name": "審批人",
            "createTime": "2024-01-16T19:31:09.725+08:00",
            "endTime": null,
            "signImage": null,
            "attachmentVOList": null,
            "optionVOList": null,
            "commentVOList": null,
            "comment": "待審批",
            "user": {
                "id": "5",
                "name": "曉華",
                "type": "user",
                "sex": "1",
                "selected": true
            },
            "status": null
        }
    ],
    "data": null,
    "timestamp": 1705406600461
}

前端展示效果
flowable流程節(jié)點狀態(tài)構造,flowable文章來源地址http://www.zghlxwxcb.cn/news/detail-809304.html

到了這里,關于flowable流程節(jié)點狀態(tài)構造的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉載,請注明出處: 如若內(nèi)容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • Activiti,F(xiàn)lowable,Camunda流程引擎對比

    Activiti,F(xiàn)lowable,Camunda流程引擎對比

    ? ? ? ? 市場上比較有名的開源流程引擎有osworkflow、jbpm、activiti、flowable、camunda。其中:Jbpm4、Activiti、Flowable、camunda四個框架同宗同源,祖先都是Jbpm4,開發(fā)者只要用過其中一個框架,基本上就會用其它三個。osworkflow目前功能簡單,目前已處于不活躍狀態(tài),此處就不展開描

    2024年02月03日
    瀏覽(18)
  • 工作流程引擎之flowable(集成springboot)

    工作流程引擎之flowable(集成springboot)

    現(xiàn)狀:公司各部門業(yè)務系統(tǒng)有各自的工作流引擎,也有cross function的業(yè)務在不同系統(tǒng)或OA系統(tǒng)流轉,沒有統(tǒng)一的去規(guī)劃布局統(tǒng)一的BPM解決方案,近期由于一個項目引發(fā)朝著整合統(tǒng)一的BPM方案,特了解一下市面上比較主流的開源和收費的工作流引擎。本文主要介紹開源的工作流引

    2024年02月08日
    瀏覽(16)
  • flowable流程移植新項目前端問題匯總

    flowable流程移植到新項目時,出現(xiàn)一些前端問題,匯總如下: PS F:khxmNBCIO_VUE yarn run serve yarn run v1.21.1 $ vue-cli-service serve ?INFO ?Starting development server... ?ERROR ?Error:? Vue packages version mismatch: - vue@2.6.11 (F:khxmNBCIO_VUEnode_modulesvuedistvue.runtime.common.js) - vue-template-compiler@2.7.14 (F:

    2024年02月12日
    瀏覽(24)
  • ruoyi-nbcio-plus基于vue3的flowable增加開始節(jié)點的表單綁定修改

    ruoyi-nbcio-plus基于vue3的flowable增加開始節(jié)點的表單綁定修改

    更多ruoyi-nbcio功能請看演示系統(tǒng) gitee源代碼地址 前后端代碼: https://gitee.com/nbacheng/ruoyi-nbcio 演示地址:RuoYi-Nbcio后臺管理系統(tǒng) http://122.227.135.243:9666/ 更多nbcio-boot功能請看演示系統(tǒng)? gitee源代碼地址 后端代碼: https://gitee.com/nbacheng/nbcio-boot 前端代碼:https://gitee.com/nbacheng/nbcio

    2024年03月23日
    瀏覽(20)
  • Springboot +Flowable,詳細解釋啥叫流程實例(二)

    Springboot +Flowable,詳細解釋啥叫流程實例(二)

    上一篇中學習了Flowable 中的流程模板(流程定義)的部署問題,這一篇來學習什么叫流程實例。 部署之后的流程模板,還不能直接運行,例如我們部署了一個請假流程,現(xiàn)在 張三想要請假,他就需要開啟一個請假流程,李四 想請假,他也需要開啟一個請假流程,這開啟的請

    2024年02月02日
    瀏覽(19)
  • springboot,F(xiàn)lowable 流程實例的激活與掛起(一)

    要實現(xiàn)流程實例的掛起和激活,首先要知道什么是流程實例的掛起和激活。 掛起: ①一個定義好的 流程模板(流程定義) ,如果掛起了,那么就無法據(jù)此創(chuàng)建新的流程實例。 ② 一個 流程實例 如果掛起了,那么就無法執(zhí)行流程中的任務。 激活: 就跟掛起是相反的。 1.查詢

    2024年02月05日
    瀏覽(17)
  • Springboot +Flowable,詳細解釋啥叫流程實例(一)

    上一篇中學習了Flowable 中的流程模板(流程定義)的部署問題,這一篇來學習什么叫流程實例。 部署之后的流程模板,還不能直接運行,例如我們部署了一個請假流程,現(xiàn)在 張三想要請假,他就需要開啟一個請假流程,李四 想請假,他也需要開啟一個請假流程,這開啟的請

    2024年02月01日
    瀏覽(20)
  • Spring Boot 整合流程引擎 Flowable,so easy

    Spring Boot 整合流程引擎 Flowable,so easy

    為啥想寫 flowable 呢?原因很簡單,因為最近在錄的 tienchin 項目視頻會用到,先寫一篇文章和大家打打預防針,后面視頻再細講。 流程引擎,也算是一個比較常見的工具了,我們在日常的很多開發(fā)中都會用到,當然用的最多的就是 OA 系統(tǒng)了,但是在一些非 OA 系統(tǒng)中,我們也

    2024年02月07日
    瀏覽(15)
  • Springboot +Flowable,通過代碼繪制流程圖并設置高亮

    Springboot +Flowable,通過代碼繪制流程圖并設置高亮

    通過代碼繪制一張流程圖,并設置成高亮。 首先先來看一下繪制出來的效果圖,截圖如下: 已經(jīng)執(zhí)行的節(jié)點和連線用紅色標記出來,大致上就是這么一個效果。 將一個流程圖繪制成圖片,相關的 API 在 flowable 中其實都是有提供的,流程圖片的繪制,是根據(jù)流程的定義來繪制

    2024年02月02日
    瀏覽(23)
  • 基于jeecg-boot的flowable流程加簽功能實現(xiàn)

    基于jeecg-boot的flowable流程加簽功能實現(xiàn)

    ? ? 更多nbcio-boot功能請看演示系統(tǒng) gitee源代碼地址 后端代碼: https://gitee.com/nbacheng/nbcio-boot 前端代碼:https://gitee.com/nbacheng/nbcio-vue.git 在線演示(包括H5) : http://122.227.135.243:9888 ? ? ? 今天我們實現(xiàn)nbcio-boot的flowable的流程加簽功能。 一、加簽的幾個概念 1、向前加簽 任務在

    2024年02月11日
    瀏覽(96)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包