From 85e31bb6ec851ffbcc6fe808c085ea75f850e6be Mon Sep 17 00:00:00 2001 From: yitonglei Date: Fri, 17 Feb 2023 16:32:09 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=BC=80=E5=90=AF=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=98=AF=E6=8A=80?= =?UTF-8?q?=E6=9C=AF=E5=91=98=E5=8F=91=E8=B5=B7=E7=9A=84=E4=B8=80=E8=88=AC?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=80=89=E5=AE=9A=E7=9A=84=E8=BF=90=E7=BB=B4=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E4=B8=8B=E4=B8=80=E8=8A=82=E7=82=B9=E8=B4=9F?= =?UTF-8?q?=E8=B4=A3=E4=BA=BA=202.=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E2=80=9C=E7=A7=8D=E7=B1=BB=E7=BB=9F=E8=AE=A1=E2=80=9D=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=9A=84=E6=95=B0=E6=8D=AE=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/homepage/service/impl/HomePageServiceImpl.java | 3 ++- .../plugin/workflow/core/constant/WfProcessConstant.java | 4 ++++ .../workflow/process/service/impl/WfProcessService.java | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) 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); }