mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
add 增加条件表达式示例
fix 修复提交修改变量参数没有覆盖变量问题
This commit is contained in:
@ -374,6 +374,7 @@ public class FlwInstanceServiceImpl implements IFlwInstanceService {
|
||||
Instance instance = insService.getById(instanceId);
|
||||
if (instance != null) {
|
||||
taskService.mergeVariable(instance, variable);
|
||||
insService.updateById(instance);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,8 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
||||
if (ObjectUtil.isNotNull(flowInstance)) {
|
||||
BusinessStatusEnum.checkStartStatus(flowInstance.getFlowStatus());
|
||||
List<Task> taskList = taskService.list(new FlowTask().setInstanceId(flowInstance.getId()));
|
||||
taskService.mergeVariable(flowInstance, variables);
|
||||
insService.updateById(flowInstance);
|
||||
StartProcessReturnDTO dto = new StartProcessReturnDTO();
|
||||
dto.setProcessInstanceId(taskList.get(0).getInstanceId());
|
||||
dto.setTaskId(taskList.get(0).getId());
|
||||
|
@ -47,6 +47,19 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
||||
private final TestLeaveMapper baseMapper;
|
||||
private final WorkflowService workflowService;
|
||||
|
||||
/**
|
||||
* spel条件表达:判断小于2
|
||||
*
|
||||
* @param leaveDays 待判断的变量(可不传自行返回true或false)
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean eval(Integer leaveDays) {
|
||||
if (leaveDays < 2) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询请假
|
||||
*/
|
||||
|
Reference in New Issue
Block a user