diff --git a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/homepage/service/impl/HomePageServiceImpl.java b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/homepage/service/impl/HomePageServiceImpl.java index 5c4a3e9..c152485 100644 --- a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/homepage/service/impl/HomePageServiceImpl.java +++ b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/homepage/service/impl/HomePageServiceImpl.java @@ -289,7 +289,8 @@ public class HomePageServiceImpl implements IHomePageService { Map.Entry 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); } diff --git a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/core/constant/WfProcessConstant.java b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/core/constant/WfProcessConstant.java index 6327c5e..2535105 100644 --- a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/core/constant/WfProcessConstant.java +++ b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/core/constant/WfProcessConstant.java @@ -71,6 +71,10 @@ public interface WfProcessConstant { String COMMENT_TYPE_COMMENT = "comment"; + String COMMENT_ROLE_NAME = "技术员"; + + String COMMENT_TASK_LEVEL = "一般任务"; + /** * 同意标识 */ diff --git a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/process/service/impl/WfProcessService.java b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/process/service/impl/WfProcessService.java index 770d2ec..ca0787f 100644 --- a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/process/service/impl/WfProcessService.java +++ b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workflow/process/service/impl/WfProcessService.java @@ -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); }