Commit 8ff3d22c4d8c9a1db1edafb3565fd94049cadf28
Merge remote-tracking branch 'origin/master'
Showing
8 changed files
with
36 additions
and
43 deletions
.gitignore
README.md
| @@ -23,8 +23,8 @@ | @@ -23,8 +23,8 @@ | ||
| 23 | > | 23 | > |
| 24 | > 😜 给项目点点 Star 吧,这对我们真的很重要! | 24 | > 😜 给项目点点 Star 吧,这对我们真的很重要! |
| 25 | 25 | ||
| 26 | -* 前端 vue2 版本采用 [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) | ||
| 27 | -* 前端 vue3 版本采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) | 26 | +* 前端 Vue2 版本采用 [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) |
| 27 | +* 前端 Vue3 版本采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) | ||
| 28 | * 后端采用 Spring Boot、MySQL + MyBatis Plus、Redis + Redisson。 | 28 | * 后端采用 Spring Boot、MySQL + MyBatis Plus、Redis + Redisson。 |
| 29 | * 数据库可使用 MySQL、Oracle、PostgreSQL、SQL Server、MariaDB、国产达梦 DM、TiDB 等 | 29 | * 数据库可使用 MySQL、Oracle、PostgreSQL、SQL Server、MariaDB、国产达梦 DM、TiDB 等 |
| 30 | * 权限认证使用 Spring Security & Token & Redis,支持多终端、多种用户的认证系统。 | 30 | * 权限认证使用 Spring Security & Token & Redis,支持多终端、多种用户的认证系统。 |
| @@ -100,17 +100,6 @@ | @@ -100,17 +100,6 @@ | ||
| 100 | 100 | ||
| 101 | ps:核心功能已经实现,正在对接微信小程序中... | 101 | ps:核心功能已经实现,正在对接微信小程序中... |
| 102 | 102 | ||
| 103 | -### 商城系统 | ||
| 104 | - | ||
| 105 | -正在开发中,大体计划如下: | ||
| 106 | -* 2022 Q2 => 完成对 <https://github.com/YunaiV/onemall> 的迁移,作为 onemall 的 Spring Boot 单体版本。 | ||
| 107 | -* 2022 Q4 => 完成对 <https://github.com/YunaiV/onemall>> 的重构,作为 onemall 的 Spring Cloud 微服务版本。 | ||
| 108 | - | ||
| 109 | -### 会员中心 | ||
| 110 | - | ||
| 111 | -正在开发中,大体计划如下: | ||
| 112 | -* 2021 Q1 =》完成对 <https://github.com/YunaiV/onemall> 的迁移 | ||
| 113 | - | ||
| 114 | ### 基础设施 | 103 | ### 基础设施 |
| 115 | 104 | ||
| 116 | | | 功能 | 描述 | | 105 | | | 功能 | 描述 | |
| @@ -135,6 +124,20 @@ ps:核心功能已经实现,正在对接微信小程序中... | @@ -135,6 +124,20 @@ ps:核心功能已经实现,正在对接微信小程序中... | ||
| 135 | | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | | 124 | | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | |
| 136 | | 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | | 125 | | 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | |
| 137 | 126 | ||
| 127 | +### 商城系统 | ||
| 128 | + | ||
| 129 | +建设中... | ||
| 130 | + | ||
| 131 | + | ||
| 132 | + | ||
| 133 | + | ||
| 134 | + | ||
| 135 | + | ||
| 136 | + | ||
| 137 | +### 会员中心 | ||
| 138 | + | ||
| 139 | +和「商城系统」一起开发 | ||
| 140 | + | ||
| 138 | ## 🐨 技术栈 | 141 | ## 🐨 技术栈 |
| 139 | 142 | ||
| 140 | | 项目 | 说明 | | 143 | | 项目 | 说明 | |
| @@ -177,14 +180,14 @@ ps:核心功能已经实现,正在对接微信小程序中... | @@ -177,14 +180,14 @@ ps:核心功能已经实现,正在对接微信小程序中... | ||
| 177 | | [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.8.2 | - | | 180 | | [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.8.2 | - | |
| 178 | | [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 4.0.0 | - | | 181 | | [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 4.0.0 | - | |
| 179 | 182 | ||
| 180 | -### vue2 前端 | 183 | +### Vue2 前端 |
| 181 | 184 | ||
| 182 | | 框架 | 说明 | 版本 | | 185 | | 框架 | 说明 | 版本 | |
| 183 | |------------------------------------------------------------------------------|---------------|--------| | 186 | |------------------------------------------------------------------------------|---------------|--------| |
| 184 | | [Vue](https://cn.vuejs.org/index.html) | JavaScript 框架 | 2.6.12 | | 187 | | [Vue](https://cn.vuejs.org/index.html) | JavaScript 框架 | 2.6.12 | |
| 185 | | [Vue Element Admin](https://panjiachen.github.io/vue-element-admin-site/zh/) | 后台前端解决方案 | - | | 188 | | [Vue Element Admin](https://panjiachen.github.io/vue-element-admin-site/zh/) | 后台前端解决方案 | - | |
| 186 | 189 | ||
| 187 | -### vue3 前端 | 190 | +### Vue3 前端 |
| 188 | 191 | ||
| 189 | | 框架 | 说明 | 版本 | | 192 | | 框架 | 说明 | 版本 | |
| 190 | |----------------------------------------------------------------------|---------------------|--------| | 193 | |----------------------------------------------------------------------|---------------------|--------| |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmTaskExtDO.java
| @@ -12,7 +12,7 @@ import java.util.Date; | @@ -12,7 +12,7 @@ import java.util.Date; | ||
| 12 | 12 | ||
| 13 | /** | 13 | /** |
| 14 | * Bpm 流程任务的拓展表 | 14 | * Bpm 流程任务的拓展表 |
| 15 | - * 主要解决 Activiti Task 和 HistoricTaskInstance 不支持拓展字段,所以新建拓展表 | 15 | + * 主要解决 Flowable Task 和 HistoricTaskInstance 不支持拓展字段,所以新建拓展表 |
| 16 | * | 16 | * |
| 17 | * @author 芋道源码 | 17 | * @author 芋道源码 |
| 18 | */ | 18 | */ |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmActivityServiceImpl.java
| @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.service.task; | @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.service.task; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO; | 3 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO; |
| 4 | import cn.iocoder.yudao.module.bpm.convert.task.BpmActivityConvert; | 4 | import cn.iocoder.yudao.module.bpm.convert.task.BpmActivityConvert; |
| 5 | -import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmActivityMapper; | ||
| 6 | import lombok.extern.slf4j.Slf4j; | 5 | import lombok.extern.slf4j.Slf4j; |
| 7 | import org.flowable.engine.HistoryService; | 6 | import org.flowable.engine.HistoryService; |
| 8 | import org.flowable.engine.history.HistoricActivityInstance; | 7 | import org.flowable.engine.history.HistoricActivityInstance; |
| @@ -25,8 +24,6 @@ public class BpmActivityServiceImpl implements BpmActivityService { | @@ -25,8 +24,6 @@ public class BpmActivityServiceImpl implements BpmActivityService { | ||
| 25 | 24 | ||
| 26 | @Resource | 25 | @Resource |
| 27 | private HistoryService historyService; | 26 | private HistoryService historyService; |
| 28 | - @Resource | ||
| 29 | - private BpmActivityMapper bpmActivityMapper; | ||
| 30 | 27 | ||
| 31 | @Override | 28 | @Override |
| 32 | public List<BpmActivityRespVO> getActivityListByProcessInstanceId(String processInstanceId) { | 29 | public List<BpmActivityRespVO> getActivityListByProcessInstanceId(String processInstanceId) { |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceService.java
| @@ -144,5 +144,4 @@ public interface BpmProcessInstanceService { | @@ -144,5 +144,4 @@ public interface BpmProcessInstanceService { | ||
| 144 | */ | 144 | */ |
| 145 | void updateProcessInstanceExtReject(String id, String reason); | 145 | void updateProcessInstanceExtReject(String id, String reason); |
| 146 | 146 | ||
| 147 | - | ||
| 148 | } | 147 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
| @@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | @@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils; | ||
| 7 | import cn.iocoder.yudao.framework.common.util.object.PageUtils; | 7 | import cn.iocoder.yudao.framework.common.util.object.PageUtils; |
| 8 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; | 8 | import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; |
| 9 | import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; | 9 | import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; |
| 10 | -import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO; | ||
| 11 | import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; | 10 | import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; |
| 12 | -import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmTaskAssignRuleMapper; | ||
| 13 | -import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmActivityMapper; | ||
| 14 | import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmTaskExtMapper; | 11 | import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmTaskExtMapper; |
| 15 | import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum; | 12 | import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum; |
| 16 | import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; | 13 | import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; |
| @@ -67,10 +64,6 @@ public class BpmTaskServiceImpl implements BpmTaskService { | @@ -67,10 +64,6 @@ public class BpmTaskServiceImpl implements BpmTaskService { | ||
| 67 | private BpmTaskExtMapper taskExtMapper; | 64 | private BpmTaskExtMapper taskExtMapper; |
| 68 | @Resource | 65 | @Resource |
| 69 | private BpmMessageService messageService; | 66 | private BpmMessageService messageService; |
| 70 | - @Resource | ||
| 71 | - private BpmTaskAssignRuleMapper taskAssignRuleMapper; | ||
| 72 | - @Resource | ||
| 73 | - private BpmActivityMapper bpmActivityMapper; | ||
| 74 | 67 | ||
| 75 | @Override | 68 | @Override |
| 76 | public PageResult<BpmTaskTodoPageItemRespVO> getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageVO) { | 69 | public PageResult<BpmTaskTodoPageItemRespVO> getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageVO) { |
| @@ -194,10 +187,6 @@ public class BpmTaskServiceImpl implements BpmTaskService { | @@ -194,10 +187,6 @@ public class BpmTaskServiceImpl implements BpmTaskService { | ||
| 194 | taskExtMapper.updateByTaskId( | 187 | taskExtMapper.updateByTaskId( |
| 195 | new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) | 188 | new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) |
| 196 | .setReason(reqVO.getReason())); | 189 | .setReason(reqVO.getReason())); |
| 197 | - // 判断任务是否为或签,或签时删除其余不用审批的任务 | ||
| 198 | - List<BpmTaskAssignRuleDO> bpmTaskAssignRuleList = | ||
| 199 | - taskAssignRuleMapper.selectListByProcessDefinitionId(task.getProcessDefinitionId(), | ||
| 200 | - task.getTaskDefinitionKey()); | ||
| 201 | } | 190 | } |
| 202 | 191 | ||
| 203 | @Override | 192 | @Override |
| @@ -216,7 +205,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { | @@ -216,7 +205,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { | ||
| 216 | // 更新任务拓展表为不通过 | 205 | // 更新任务拓展表为不通过 |
| 217 | taskExtMapper.updateByTaskId( | 206 | taskExtMapper.updateByTaskId( |
| 218 | new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.REJECT.getResult()) | 207 | new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.REJECT.getResult()) |
| 219 | - .setReason(reqVO.getReason())); | 208 | + .setEndTime(new Date()).setReason(reqVO.getReason())); |
| 220 | } | 209 | } |
| 221 | 210 | ||
| 222 | @Override | 211 | @Override |
yudao-ui-admin/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue
| @@ -120,20 +120,21 @@ export default { | @@ -120,20 +120,21 @@ export default { | ||
| 120 | this.bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach(n => { | 120 | this.bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach(n => { |
| 121 | let activity = activityList.find(m => m.key === n.id) // 找到对应的活动 | 121 | let activity = activityList.find(m => m.key === n.id) // 找到对应的活动 |
| 122 | if (n.$type === 'bpmn:UserTask') { // 用户任务 | 122 | if (n.$type === 'bpmn:UserTask') { // 用户任务 |
| 123 | - debugger | ||
| 124 | if (!activity) { | 123 | if (!activity) { |
| 125 | return; | 124 | return; |
| 126 | } | 125 | } |
| 127 | // 处理用户任务的高亮 | 126 | // 处理用户任务的高亮 |
| 128 | const task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId | 127 | const task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId |
| 129 | - if (task) { | ||
| 130 | - canvas.addMarker(n.id, this.getResultCss(task.result)); | ||
| 131 | - // 如果非通过,就不走后面的线条了 | ||
| 132 | - if (task.result !== 2) { | ||
| 133 | - return; | ||
| 134 | - } | 128 | + if (!task) { |
| 129 | + return; | ||
| 135 | } | 130 | } |
| 131 | + // 高亮任务 | ||
| 132 | + canvas.addMarker(n.id, this.getResultCss(task.result)); | ||
| 136 | 133 | ||
| 134 | + // 如果非通过,就不走后面的线条了 | ||
| 135 | + if (task.result !== 2) { | ||
| 136 | + return; | ||
| 137 | + } | ||
| 137 | // 处理 outgoing 出线 | 138 | // 处理 outgoing 出线 |
| 138 | const outgoing = this.getActivityOutgoing(activity); | 139 | const outgoing = this.getActivityOutgoing(activity); |
| 139 | outgoing?.forEach(nn => { | 140 | outgoing?.forEach(nn => { |
| @@ -219,13 +220,13 @@ export default { | @@ -219,13 +220,13 @@ export default { | ||
| 219 | return activity.endTime ? 'highlight' : 'highlight-todo'; | 220 | return activity.endTime ? 'highlight' : 'highlight-todo'; |
| 220 | }, | 221 | }, |
| 221 | getResultCss(result) { | 222 | getResultCss(result) { |
| 222 | - if (result === 1) { | 223 | + if (result === 1) { // 审批中 |
| 223 | return 'highlight-todo'; | 224 | return 'highlight-todo'; |
| 224 | - } else if (result === 2) { | 225 | + } else if (result === 2) { // 已通过 |
| 225 | return 'highlight'; | 226 | return 'highlight'; |
| 226 | - } else if (result === 3) { | 227 | + } else if (result === 3) { // 不通过 |
| 227 | return 'highlight-reject'; | 228 | return 'highlight-reject'; |
| 228 | - } else if (result === 4) { | 229 | + } else if (result === 4) { // 已取消 |
| 229 | return 'highlight-cancel'; | 230 | return 'highlight-cancel'; |
| 230 | } | 231 | } |
| 231 | return ''; | 232 | return ''; |
yudao-ui-admin/src/views/bpm/processInstance/detail.vue
| @@ -45,6 +45,8 @@ | @@ -45,6 +45,8 @@ | ||
| 45 | </router-link> | 45 | </router-link> |
| 46 | </div> | 46 | </div> |
| 47 | </el-card> | 47 | </el-card> |
| 48 | + | ||
| 49 | + <!-- 审批记录 --> | ||
| 48 | <el-card class="box-card" v-loading="tasksLoad"> | 50 | <el-card class="box-card" v-loading="tasksLoad"> |
| 49 | <div slot="header" class="clearfix"> | 51 | <div slot="header" class="clearfix"> |
| 50 | <span class="el-icon-picture-outline">审批记录</span> | 52 | <span class="el-icon-picture-outline">审批记录</span> |