1.开启工作流程时,如果是技术员发起的一般任务,直接使用选定的运维公司作为下一节点负责人

2.修改首页“种类统计”返回的数据格式
main
yitonglei 3 years ago
parent 3beae4cbf2
commit 85e31bb6ec
  1. 3
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/homepage/service/impl/HomePageServiceImpl.java
  2. 4
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/core/constant/WfProcessConstant.java
  3. 6
      lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/process/service/impl/WfProcessService.java

@ -289,7 +289,8 @@ public class HomePageServiceImpl implements IHomePageService {
Map.Entry<String, Integer> next = iterator.next();
JSONObject jsonByDict = new JSONObject();
jsonByDict.put(next.getKey(),next.getValue());
jsonByDict.put("name",next.getKey());
jsonByDict.put("value",next.getValue());
result.add(jsonByDict);
}

@ -71,6 +71,10 @@ public interface WfProcessConstant {
String COMMENT_TYPE_COMMENT = "comment";
String COMMENT_ROLE_NAME = "技术员";
String COMMENT_TASK_LEVEL = "一般任务";
/**
* 同意标识
*/

@ -99,8 +99,14 @@ public class WfProcessService implements IWfProcessService {
String userId = WfTaskUtil.getTaskUser();
variables.put(WfProcessConstant.TASK_VARIABLE_APPLY_USER, userId);
variables.put(WfProcessConstant.TASK_CREATE_ROLE, createRoleName);
//如果是技术员发起的一般任务,直接指定assign = 公司
if(Func.equals(createRoleName, WfProcessConstant.COMMENT_ROLE_NAME) && Func.equals(variables.get("$renwudengji"), WfProcessConstant.COMMENT_TASK_LEVEL)){
variables.put("assign",variables.get("yunweigongsi"));
}
// 启动流程
identityService.setAuthenticatedUserId(userId);
ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefId, definition.getKey(), variables);
return handleProcessInstance(processInstance, variables);
}

Loading…
Cancel
Save