Commit 14c8b591d342f0ce764204c71c8a8d36a43924d9
1 parent
3a433e82
【代码评审】工作流:抄送的实现逻辑
Showing
3 changed files
with
11 additions
and
14 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/simple/BpmSimpleModelNodeVO.java
| ... | ... | @@ -31,8 +31,7 @@ public class BpmSimpleModelNodeVO { |
| 31 | 31 | @Schema(description = "模型节点名称", example = "领导审批") |
| 32 | 32 | private String name; |
| 33 | 33 | |
| 34 | - // TODO @jason:要不改成 placeholder 和一般 Element-Plus 组件一致。占位符,用于展示。@芋艿。这个不是 placeholder 占位符的含义。节点配置后。节点展示的内容,不知道取什么名字好??? | |
| 35 | - // TODO @jason:【回复】占位文本(showText)是指当一个文本框没有被 focus 的时候显示的是提示文字,当他被点击之后就显示空白。。。虽然不是完全精准,但是 placeholder 相对正式点~ | |
| 34 | + // TODO @jason:和 gpt 大模型对了下这个字段的命名,貌似叫 displayText 合适点。可以等最后我们全局替换下。(优先级:低) | |
| 36 | 35 | @Schema(description = "节点展示内容", example = "指定成员: 芋道源码") |
| 37 | 36 | private String showText; |
| 38 | 37 | |
| ... | ... | @@ -43,7 +42,7 @@ public class BpmSimpleModelNodeVO { |
| 43 | 42 | private List<BpmSimpleModelNodeVO> conditionNodes; // 补充说明:有且仅有条件、并行、包容等分支会使用 |
| 44 | 43 | |
| 45 | 44 | @Schema(description = "节点的属性") |
| 46 | - private Map<String, Object> attributes; // TODO @jason:建议是字段分拆下;类似说: | |
| 45 | + private Map<String, Object> attributes; // TODO @jason:这个字段,目前只有条件表达式使用;是不是搞的更巨像。TODO @芋艿 | |
| 47 | 46 | |
| 48 | 47 | // TODO @jason:看看是不是可以简化;@芋艿: 暂时先放着。不知道后面是否会用到 |
| 49 | 48 | /** |
| ... | ... | @@ -95,8 +94,8 @@ public class BpmSimpleModelNodeVO { |
| 95 | 94 | */ |
| 96 | 95 | private AssignEmptyHandler assignEmptyHandler; |
| 97 | 96 | |
| 98 | - @Data | |
| 99 | 97 | @Schema(description = "审批节点拒绝处理策略") |
| 98 | + @Data | |
| 100 | 99 | public static class RejectHandler { |
| 101 | 100 | |
| 102 | 101 | @Schema(description = "拒绝处理类型", example = "1") |
| ... | ... | @@ -107,9 +106,9 @@ public class BpmSimpleModelNodeVO { |
| 107 | 106 | private String returnNodeId; |
| 108 | 107 | } |
| 109 | 108 | |
| 110 | - @Data | |
| 111 | 109 | @Schema(description = "审批节点超时处理策略") |
| 112 | 110 | @Valid |
| 111 | + @Data | |
| 113 | 112 | public static class TimeoutHandler { |
| 114 | 113 | |
| 115 | 114 | @Schema(description = "是否开启超时处理", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") |
| ... | ... | @@ -130,8 +129,8 @@ public class BpmSimpleModelNodeVO { |
| 130 | 129 | |
| 131 | 130 | } |
| 132 | 131 | |
| 133 | - @Data | |
| 134 | 132 | @Schema(description = "空处理策略") |
| 133 | + @Data | |
| 135 | 134 | @Valid |
| 136 | 135 | public static class AssignEmptyHandler { |
| 137 | 136 | |
| ... | ... | @@ -145,12 +144,14 @@ public class BpmSimpleModelNodeVO { |
| 145 | 144 | |
| 146 | 145 | } |
| 147 | 146 | |
| 148 | - @Data | |
| 149 | 147 | @Schema(description = "操作按钮设置") |
| 148 | + @Data | |
| 149 | + @Valid | |
| 150 | 150 | public static class OperationButtonSetting { |
| 151 | 151 | |
| 152 | + // TODO @jason:是不是按钮的标识?id 会和数据库的 id 自增有点模糊,key 标识会更合理一点点哈。 | |
| 152 | 153 | @Schema(description = "按钮 Id", example = "1") |
| 153 | - private Integer id; | |
| 154 | + private Integer id; | |
| 154 | 155 | |
| 155 | 156 | @Schema(description = "显示名称", example = "审批") |
| 156 | 157 | private String displayName; | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/BpmTaskCandidateDeptLeaderMultiStrategy.java
| 1 | 1 | package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.collection.CollUtil; | |
| 4 | 3 | import cn.hutool.core.lang.Assert; |
| 5 | 4 | import cn.iocoder.yudao.framework.common.util.string.StrUtils; |
| 6 | 5 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; |
| ... | ... | @@ -9,7 +8,6 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi; |
| 9 | 8 | import org.flowable.engine.delegate.DelegateExecution; |
| 10 | 9 | import org.springframework.stereotype.Component; |
| 11 | 10 | |
| 12 | -import java.util.List; | |
| 13 | 11 | import java.util.Set; |
| 14 | 12 | |
| 15 | 13 | /** |
| ... | ... | @@ -31,7 +29,7 @@ public class BpmTaskCandidateDeptLeaderMultiStrategy extends BpmTaskCandidateAbs |
| 31 | 29 | |
| 32 | 30 | @Override |
| 33 | 31 | public void validateParam(String param) { |
| 34 | - // 参数格式: | 分隔 。左边为部门(多个部门用 , 分隔)。 右边为部门层级 | |
| 32 | + // 参数格式: | 分隔:1)左边为部门(多个部门用 , 分隔)。2)右边为部门层级 | |
| 35 | 33 | String[] params = param.split("\\|"); |
| 36 | 34 | Assert.isTrue(params.length == 2, "参数格式不匹配"); |
| 37 | 35 | deptApi.validateDeptList(StrUtils.splitToLong(params[0], ",")); |
| ... | ... | @@ -40,8 +38,6 @@ public class BpmTaskCandidateDeptLeaderMultiStrategy extends BpmTaskCandidateAbs |
| 40 | 38 | |
| 41 | 39 | @Override |
| 42 | 40 | public Set<Long> calculateUsers(DelegateExecution execution, String param) { |
| 43 | - // 参数格式: | 分隔 。左边为部门(多个部门用 , 分隔)。 右边为部门层级 | |
| 44 | - // 参数格式: ,分割。前面的部门Id. 可以为多个。 最后一个为部门层级 | |
| 45 | 41 | String[] params = param.split("\\|"); |
| 46 | 42 | return getMultiLevelDeptLeaderIds(StrUtils.splitToLong(params[0], ","), Integer.valueOf(params[1])); |
| 47 | 43 | } | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/util/SimpleModelUtils.java
| ... | ... | @@ -454,7 +454,7 @@ public class SimpleModelUtils { |
| 454 | 454 | addFormFieldsPermission(node.getFieldsPermission(), userTask); |
| 455 | 455 | // 添加操作按钮配置属性元素 |
| 456 | 456 | addButtonsSetting(node.getButtonsSetting(), userTask); |
| 457 | - // 处理多实例 | |
| 457 | + // 处理多实例(审批方式) | |
| 458 | 458 | processMultiInstanceLoopCharacteristics(node.getApproveMethod(), node.getApproveRatio(), userTask); |
| 459 | 459 | // 添加任务被拒绝的处理元素 |
| 460 | 460 | addTaskRejectElements(node.getRejectHandler(), userTask); | ... | ... |