|
@@ -107,9 +107,9 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
|
|
|
FlowExample flowExample = new FlowExample();
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if (!NodeTypeEnum.END.equals(nextNodeType)) {
|
|
|
-
|
|
|
+
|
|
|
if (dto.getHandleUserId() == null) {
|
|
|
FlowResult handleUser = getHandleUser(nextUserNode);
|
|
|
|
|
@@ -121,7 +121,7 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
return handleUser;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
else {
|
|
|
|
|
|
flowExample.setHandleUserId(dto.getHandleUserId());
|
|
@@ -249,13 +249,13 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
|
|
|
flowExample.setDefinitionNodeId(nextUserNode.getId());
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if (NodeTypeEnum.END.equals(NodeTypeEnum.getEnum(nextUserNode.getNodeType()))) {
|
|
|
|
|
|
flowExample.setStatus(FlowStatusEnum.HAVE_PASSED.getKey());
|
|
|
} else {
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if (dto.getHandleUserId() == null) {
|
|
|
FlowResult handleUser = getHandleUser(nextUserNode);
|
|
|
|
|
@@ -267,7 +267,7 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
return handleUser;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
else {
|
|
|
|
|
|
flowExample.setHandleUserId(dto.getHandleUserId());
|
|
@@ -345,6 +345,7 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
}
|
|
|
|
|
|
flowExample.setVersion(dto.getVersion());
|
|
|
+
|
|
|
boolean b = flowExampleService.updateById(flowExample);
|
|
|
if (!b) {
|
|
|
throw new ServiceException("流程已被处理");
|
|
@@ -458,22 +459,6 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- * 校验el表达式
|
|
|
- */
|
|
|
- public boolean expressionResult(Map<String, Object> map, String expression) {
|
|
|
- boolean result;
|
|
|
- try {
|
|
|
- Expression exp = AviatorEvaluator.compile(expression);
|
|
|
- Object execute = exp.execute(map);
|
|
|
- result = Boolean.parseBoolean(String.valueOf(execute));
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("el表达式校验错误", e);
|
|
|
- throw new ServiceException("el表达式校验错误:" + e.getMessage());
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
* 获取处理用户
|
|
|
*
|
|
|
* @param node 处理节点
|
|
@@ -531,4 +516,20 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
return flowResult;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * 校验el表达式
|
|
|
+ */
|
|
|
+ public boolean expressionResult(Map<String, Object> map, String expression) {
|
|
|
+ boolean result;
|
|
|
+ try {
|
|
|
+ Expression exp = AviatorEvaluator.compile(expression);
|
|
|
+ Object execute = exp.execute(map);
|
|
|
+ result = Boolean.parseBoolean(String.valueOf(execute));
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("el表达式校验错误", e);
|
|
|
+ throw new ServiceException("el表达式校验错误:" + e.getMessage());
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
}
|