From 18e54d0fcfcb5b6b34de49441c8f988366c2212f Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 31 Jul 2024 14:01:20 +0800 Subject: [PATCH 01/27] =?UTF-8?q?feat(flow):=20=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../execution/EndExecutionListener.java | 15 +++++++++++++++ .../execution/StartExecutionListener.java | 18 ++++++++++++++++++ .../execution/TakeExecutionListener.java | 15 +++++++++++++++ .../listener/task/AssignmentTaskListener.java | 15 +++++++++++++++ .../listener/task/CompleteTaskListener.java | 19 +++++++++++++++++++ .../listener/task/CreateTaskListener.java | 18 ++++++++++++++++++ .../listener/task/DeleteTaskListener.java | 18 ++++++++++++++++++ .../listener/task/NoticeTaskListener.java | 16 ++++++++++++++++ .../listener/task/TimeOutTaskListener.java | 18 ++++++++++++++++++ .../listener/task/UpdateTaskListener.java | 18 ++++++++++++++++++ 10 files changed, 170 insertions(+) create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/execution/TakeExecutionListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java new file mode 100644 index 0000000..15395a6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java @@ -0,0 +1,15 @@ +package com.olivia.peanut.flow.core.listener.execution; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; + +/*** + * + */ +public class EndExecutionListener implements ExecutionListener { + + @Override + public void notify(DelegateExecution execution) throws Exception { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java new file mode 100644 index 0000000..54f23bb --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.core.listener.execution; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; + +/*** + * + */ +public class StartExecutionListener implements ExecutionListener { + + @Override + public void notify(DelegateExecution execution) throws Exception { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/TakeExecutionListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/TakeExecutionListener.java new file mode 100644 index 0000000..0ee0a26 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/TakeExecutionListener.java @@ -0,0 +1,15 @@ +package com.olivia.peanut.flow.core.listener.execution; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; + +/*** + * + */ +public class TakeExecutionListener implements ExecutionListener { + + @Override + public void notify(DelegateExecution execution) throws Exception { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java new file mode 100644 index 0000000..7fc2dcb --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java @@ -0,0 +1,15 @@ +package com.olivia.peanut.flow.core.listener.task; + +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + +/*** + * + */ +public class AssignmentTaskListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java new file mode 100644 index 0000000..92dec4d --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java @@ -0,0 +1,19 @@ +package com.olivia.peanut.flow.core.listener.task; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + +/*** + * + */ + +public class CompleteTaskListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java new file mode 100644 index 0000000..0b10334 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.core.listener.task; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + +/*** + * + */ +public class CreateTaskListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java new file mode 100644 index 0000000..66bbf18 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.core.listener.task; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + +/*** + * + */ +public class DeleteTaskListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java new file mode 100644 index 0000000..2f2c5a3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java @@ -0,0 +1,16 @@ +package com.olivia.peanut.flow.core.listener.task; + +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior; +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; + +/*** + * 通知 + */ +public class NoticeTaskListener implements ActivityBehavior { + + + @Override + public void execute(ActivityExecution execution) throws Exception { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java new file mode 100644 index 0000000..68dd211 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.core.listener.task; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + +/*** + * + */ +public class TimeOutTaskListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java new file mode 100644 index 0000000..0bb01b2 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.core.listener.task; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + +/*** + * + */ +public class UpdateTaskListener implements TaskListener { + + @Override + public void notify(DelegateTask delegateTask) { + + } +} -- Gitee From 9f549bbdf337a7b4bae06fdf4a1dc2a147ea7603 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 31 Jul 2024 15:16:16 +0800 Subject: [PATCH 02/27] =?UTF-8?q?feat(role):=20=E8=A7=92=E8=89=B2=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- sql/tmp.sql | 139 ++++++++++ .../olivia/peanut/base/api/BaseDeptApi.java | 76 ++++++ .../peanut/base/api/BaseResourceApi.java | 76 ++++++ .../olivia/peanut/base/api/BaseRoleApi.java | 76 ++++++ .../peanut/base/api/BaseRoleGroupApi.java | 76 ++++++ .../peanut/base/api/BaseRoleResourceApi.java | 76 ++++++ .../peanut/base/api/BaseUserDeptApi.java | 76 ++++++ .../peanut/base/api/BaseUserRoleApi.java | 76 ++++++ .../peanut/base/api/BaseUserRoleGroupApi.java | 76 ++++++ .../baseDept/BaseDeptDeleteByIdListReq.java | 34 +++ .../baseDept/BaseDeptDeleteByIdListRes.java | 29 ++ .../base/api/entity/baseDept/BaseDeptDto.java | 52 ++++ .../BaseDeptExportQueryPageListInfoRes.java | 27 ++ .../BaseDeptExportQueryPageListReq.java | 34 +++ .../entity/baseDept/BaseDeptImportReq.java | 31 +++ .../entity/baseDept/BaseDeptImportRes.java | 31 +++ .../entity/baseDept/BaseDeptInsertReq.java | 25 ++ .../entity/baseDept/BaseDeptInsertRes.java | 29 ++ .../baseDept/BaseDeptQueryByIdListReq.java | 32 +++ .../baseDept/BaseDeptQueryByIdListRes.java | 31 +++ .../entity/baseDept/BaseDeptQueryListReq.java | 26 ++ .../entity/baseDept/BaseDeptQueryListRes.java | 31 +++ .../baseDept/BaseDeptUpdateByIdReq.java | 30 ++ .../baseDept/BaseDeptUpdateByIdRes.java | 24 ++ .../BaseResourceDeleteByIdListReq.java | 34 +++ .../BaseResourceDeleteByIdListRes.java | 29 ++ .../entity/baseResource/BaseResourceDto.java | 72 +++++ ...aseResourceExportQueryPageListInfoRes.java | 27 ++ .../BaseResourceExportQueryPageListReq.java | 34 +++ .../baseResource/BaseResourceImportReq.java | 31 +++ .../baseResource/BaseResourceImportRes.java | 31 +++ .../baseResource/BaseResourceInsertReq.java | 25 ++ .../baseResource/BaseResourceInsertRes.java | 29 ++ .../BaseResourceQueryByIdListReq.java | 32 +++ .../BaseResourceQueryByIdListRes.java | 31 +++ .../BaseResourceQueryListReq.java | 26 ++ .../BaseResourceQueryListRes.java | 31 +++ .../BaseResourceUpdateByIdReq.java | 30 ++ .../BaseResourceUpdateByIdRes.java | 24 ++ .../baseRole/BaseRoleDeleteByIdListReq.java | 34 +++ .../baseRole/BaseRoleDeleteByIdListRes.java | 29 ++ .../base/api/entity/baseRole/BaseRoleDto.java | 42 +++ .../BaseRoleExportQueryPageListInfoRes.java | 27 ++ .../BaseRoleExportQueryPageListReq.java | 34 +++ .../entity/baseRole/BaseRoleImportReq.java | 31 +++ .../entity/baseRole/BaseRoleImportRes.java | 31 +++ .../entity/baseRole/BaseRoleInsertReq.java | 25 ++ .../entity/baseRole/BaseRoleInsertRes.java | 29 ++ .../baseRole/BaseRoleQueryByIdListReq.java | 32 +++ .../baseRole/BaseRoleQueryByIdListRes.java | 31 +++ .../entity/baseRole/BaseRoleQueryListReq.java | 26 ++ .../entity/baseRole/BaseRoleQueryListRes.java | 31 +++ .../baseRole/BaseRoleUpdateByIdReq.java | 30 ++ .../baseRole/BaseRoleUpdateByIdRes.java | 24 ++ .../BaseRoleGroupDeleteByIdListReq.java | 34 +++ .../BaseRoleGroupDeleteByIdListRes.java | 29 ++ .../baseRoleGroup/BaseRoleGroupDto.java | 42 +++ ...seRoleGroupExportQueryPageListInfoRes.java | 27 ++ .../BaseRoleGroupExportQueryPageListReq.java | 34 +++ .../baseRoleGroup/BaseRoleGroupImportReq.java | 31 +++ .../baseRoleGroup/BaseRoleGroupImportRes.java | 31 +++ .../baseRoleGroup/BaseRoleGroupInsertReq.java | 25 ++ .../baseRoleGroup/BaseRoleGroupInsertRes.java | 29 ++ .../BaseRoleGroupQueryByIdListReq.java | 32 +++ .../BaseRoleGroupQueryByIdListRes.java | 31 +++ .../BaseRoleGroupQueryListReq.java | 26 ++ .../BaseRoleGroupQueryListRes.java | 31 +++ .../BaseRoleGroupUpdateByIdReq.java | 30 ++ .../BaseRoleGroupUpdateByIdRes.java | 24 ++ .../BaseRoleResourceDeleteByIdListReq.java | 34 +++ .../BaseRoleResourceDeleteByIdListRes.java | 29 ++ .../baseRoleResource/BaseRoleResourceDto.java | 42 +++ ...oleResourceExportQueryPageListInfoRes.java | 27 ++ ...aseRoleResourceExportQueryPageListReq.java | 34 +++ .../BaseRoleResourceImportReq.java | 31 +++ .../BaseRoleResourceImportRes.java | 31 +++ .../BaseRoleResourceInsertReq.java | 25 ++ .../BaseRoleResourceInsertRes.java | 29 ++ .../BaseRoleResourceQueryByIdListReq.java | 32 +++ .../BaseRoleResourceQueryByIdListRes.java | 31 +++ .../BaseRoleResourceQueryListReq.java | 26 ++ .../BaseRoleResourceQueryListRes.java | 31 +++ .../BaseRoleResourceUpdateByIdReq.java | 30 ++ .../BaseRoleResourceUpdateByIdRes.java | 24 ++ .../BaseUserDeptDeleteByIdListReq.java | 34 +++ .../BaseUserDeptDeleteByIdListRes.java | 29 ++ .../entity/baseUserDept/BaseUserDeptDto.java | 42 +++ ...aseUserDeptExportQueryPageListInfoRes.java | 27 ++ .../BaseUserDeptExportQueryPageListReq.java | 34 +++ .../baseUserDept/BaseUserDeptImportReq.java | 31 +++ .../baseUserDept/BaseUserDeptImportRes.java | 31 +++ .../baseUserDept/BaseUserDeptInsertReq.java | 25 ++ .../baseUserDept/BaseUserDeptInsertRes.java | 29 ++ .../BaseUserDeptQueryByIdListReq.java | 32 +++ .../BaseUserDeptQueryByIdListRes.java | 31 +++ .../BaseUserDeptQueryListReq.java | 26 ++ .../BaseUserDeptQueryListRes.java | 31 +++ .../BaseUserDeptUpdateByIdReq.java | 30 ++ .../BaseUserDeptUpdateByIdRes.java | 24 ++ .../BaseUserRoleDeleteByIdListReq.java | 34 +++ .../BaseUserRoleDeleteByIdListRes.java | 29 ++ .../entity/baseUserRole/BaseUserRoleDto.java | 42 +++ ...aseUserRoleExportQueryPageListInfoRes.java | 27 ++ .../BaseUserRoleExportQueryPageListReq.java | 34 +++ .../baseUserRole/BaseUserRoleImportReq.java | 31 +++ .../baseUserRole/BaseUserRoleImportRes.java | 31 +++ .../baseUserRole/BaseUserRoleInsertReq.java | 25 ++ .../baseUserRole/BaseUserRoleInsertRes.java | 29 ++ .../BaseUserRoleQueryByIdListReq.java | 32 +++ .../BaseUserRoleQueryByIdListRes.java | 31 +++ .../BaseUserRoleQueryListReq.java | 26 ++ .../BaseUserRoleQueryListRes.java | 31 +++ .../BaseUserRoleUpdateByIdReq.java | 30 ++ .../BaseUserRoleUpdateByIdRes.java | 24 ++ .../BaseUserRoleGroupDeleteByIdListReq.java | 34 +++ .../BaseUserRoleGroupDeleteByIdListRes.java | 29 ++ .../BaseUserRoleGroupDto.java | 42 +++ ...erRoleGroupExportQueryPageListInfoRes.java | 27 ++ ...seUserRoleGroupExportQueryPageListReq.java | 34 +++ .../BaseUserRoleGroupImportReq.java | 31 +++ .../BaseUserRoleGroupImportRes.java | 31 +++ .../BaseUserRoleGroupInsertReq.java | 25 ++ .../BaseUserRoleGroupInsertRes.java | 29 ++ .../BaseUserRoleGroupQueryByIdListReq.java | 32 +++ .../BaseUserRoleGroupQueryByIdListRes.java | 31 +++ .../BaseUserRoleGroupQueryListReq.java | 26 ++ .../BaseUserRoleGroupQueryListRes.java | 31 +++ .../BaseUserRoleGroupUpdateByIdReq.java | 30 ++ .../BaseUserRoleGroupUpdateByIdRes.java | 24 ++ .../peanut/base/api/impl/BaseDeptApiImpl.java | 104 +++++++ .../base/api/impl/BaseResourceApiImpl.java | 104 +++++++ .../peanut/base/api/impl/BaseRoleApiImpl.java | 104 +++++++ .../base/api/impl/BaseRoleGroupApiImpl.java | 104 +++++++ .../api/impl/BaseRoleResourceApiImpl.java | 104 +++++++ .../base/api/impl/BaseUserDeptApiImpl.java | 104 +++++++ .../base/api/impl/BaseUserRoleApiImpl.java | 104 +++++++ .../api/impl/BaseUserRoleGroupApiImpl.java | 104 +++++++ .../impl/listener/BaseDeptImportListener.java | 48 ++++ .../listener/BaseResourceImportListener.java | 48 ++++ .../listener/BaseRoleGroupImportListener.java | 48 ++++ .../impl/listener/BaseRoleImportListener.java | 48 ++++ .../BaseRoleResourceImportListener.java | 48 ++++ .../listener/BaseUserDeptImportListener.java | 48 ++++ .../BaseUserRoleGroupImportListener.java | 48 ++++ .../listener/BaseUserRoleImportListener.java | 48 ++++ .../peanut/base/mapper/BaseDeptMapper.java | 18 ++ .../base/mapper/BaseResourceMapper.java | 18 ++ .../base/mapper/BaseRoleGroupMapper.java | 18 ++ .../peanut/base/mapper/BaseRoleMapper.java | 18 ++ .../base/mapper/BaseRoleResourceMapper.java | 18 ++ .../base/mapper/BaseUserDeptMapper.java | 18 ++ .../base/mapper/BaseUserRoleGroupMapper.java | 18 ++ .../base/mapper/BaseUserRoleMapper.java | 18 ++ .../olivia/peanut/base/model/BaseDept.java | 43 +++ .../peanut/base/model/BaseResource.java | 59 ++++ .../olivia/peanut/base/model/BaseRole.java | 39 +++ .../peanut/base/model/BaseRoleGroup.java | 35 +++ .../peanut/base/model/BaseRoleResource.java | 35 +++ .../peanut/base/model/BaseUserDept.java | 35 +++ .../peanut/base/model/BaseUserRole.java | 35 +++ .../peanut/base/model/BaseUserRoleGroup.java | 35 +++ .../peanut/base/service/BaseDeptService.java | 26 ++ .../base/service/BaseResourceService.java | 26 ++ .../base/service/BaseRoleGroupService.java | 26 ++ .../base/service/BaseRoleResourceService.java | 26 ++ .../peanut/base/service/BaseRoleService.java | 26 ++ .../base/service/BaseUserDeptService.java | 26 ++ .../service/BaseUserRoleGroupService.java | 26 ++ .../base/service/BaseUserRoleService.java | 26 ++ .../service/impl/BaseDeptServiceImpl.java | 116 ++++++++ .../service/impl/BaseResourceServiceImpl.java | 120 ++++++++ .../impl/BaseRoleGroupServiceImpl.java | 114 ++++++++ .../impl/BaseRoleResourceServiceImpl.java | 114 ++++++++ .../service/impl/BaseRoleServiceImpl.java | 118 ++++++++ .../service/impl/BaseUserDeptServiceImpl.java | 114 ++++++++ .../impl/BaseUserRoleGroupServiceImpl.java | 114 ++++++++ .../service/impl/BaseUserRoleServiceImpl.java | 114 ++++++++ .../peanut/base/vue/baseDept/BaseDept.vue | 226 +++++++++++++++ .../base/vue/baseResource/BaseResource.vue | 258 ++++++++++++++++++ .../peanut/base/vue/baseRole/BaseRole.vue | 218 +++++++++++++++ .../base/vue/baseRoleGroup/BaseRoleGroup.vue | 210 ++++++++++++++ .../vue/baseRoleResource/BaseRoleResource.vue | 210 ++++++++++++++ .../base/vue/baseUserDept/BaseUserDept.vue | 210 ++++++++++++++ .../base/vue/baseUserRole/BaseUserRole.vue | 210 ++++++++++++++ .../baseUserRoleGroup/BaseUserRoleGroup.vue | 210 ++++++++++++++ .../peanut/portal/model/LoginAccount.java | 6 + 187 files changed, 9002 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseDeptApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseRoleApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseRoleGroupApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseRoleResourceApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseUserDeptApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseUserRoleApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseUserRoleGroupApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseDeptApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseRoleApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseRoleGroupApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseRoleResourceApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseUserDeptApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleGroupApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseDeptImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleGroupImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleResourceImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserDeptImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleGroupImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseDeptMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseRoleGroupMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseRoleMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseRoleResourceMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseUserDeptMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleGroupMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseDept.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseResource.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseRole.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseRoleGroup.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseRoleResource.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseUserDept.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseUserRole.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseUserRoleGroup.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseDeptService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseResourceService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseRoleGroupService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseRoleResourceService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseRoleService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseUserDeptService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseUserRoleGroupService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseUserRoleService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseDeptServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseRoleGroupServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseRoleResourceServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseRoleServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseUserDeptServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleGroupServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue create mode 100644 src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue diff --git a/pom.xml b/pom.xml index 1f18177..d699b66 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ peanut-sdk com.olivia - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT com.mysql diff --git a/sql/tmp.sql b/sql/tmp.sql index e69de29..7922ed5 100644 --- a/sql/tmp.sql +++ b/sql/tmp.sql @@ -0,0 +1,139 @@ + +alter table base_role_resource +add column tenant_id bigint null comment '租户ID'; + + +create table if not exists base_role +( + id bigint auto_increment comment 'ID 自增' primary key, + role_code varchar(64) null comment '角色编码', + role_name varchar(64) null comment '角色名称', + role_group_id bigint null comment '角色组', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' + +) comment '角色表'; + +create table if not exists base_role_group +( + id bigint auto_increment comment 'ID 自增' primary key, + role_group_code varchar(64) null comment '角色组编码', + role_group_name varchar(64) null comment '角色组名称', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) + comment '角色组表'; + + +create table if not exists base_user_role +( + id bigint auto_increment comment 'ID 自增' primary key, + user_id bigint null comment '用户ID', + role_id bigint null comment '角色ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + key idx_user_id (user_id) +) comment '用户角色表'; + +create table if not exists base_user_role_group +( + id bigint auto_increment comment 'ID 自增' primary key, + user_id bigint null comment '用户ID', + role_group_id bigint null comment '角色组ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + key idx_user_id (user_id) +) comment '用户角色组表'; + + +-- 部门 +create table if not exists base_dept +( + id bigint auto_increment comment 'ID 自增' primary key, + dept_code varchar(64) null comment '部门编码', + dept_name varchar(64) null comment '部门名称', + parent_id bigint null comment '父部门ID', + path varchar(512) null comment '部门路径', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) +comment '部门表'; + + +create table if not exists base_user_dept +( + id bigint auto_increment comment 'ID 自增' primary key, + user_id bigint null comment '用户ID', + dept_id bigint null comment '部门ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + key idx_user_id_dept_id (user_id, dept_id) +) comment '用户部门表'; + + + +-- 菜单 + +create table if not exists base_resource +( + id bigint auto_increment comment 'ID 自增' primary key, + resource_code varchar(64) null comment '菜单编码', + resource_name varchar(64) null comment '菜单名称', + resource_url varchar(512) null comment '菜单URL', + resource_icon varchar(64) null comment '菜单图标', + resource_type varchar(64) null comment '菜单类型', + is_button tinyint(1) default 0 null comment '是否按钮 0 否,1 是', + parent_id bigint null comment '父菜单ID', + path varchar(512) null comment '菜单路径', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) comment '资源'; + +create table if not exists base_role_resource +( + id bigint auto_increment comment 'ID 自增' primary key, + role_id bigint null comment '角色ID', + resource_id bigint null comment '菜单ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) comment '角色资源表'; diff --git a/src/main/java/com/olivia/peanut/base/api/BaseDeptApi.java b/src/main/java/com/olivia/peanut/base/api/BaseDeptApi.java new file mode 100644 index 0000000..7f2e9e6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseDeptApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseDept.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 部门表(BaseDept)对外API + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +// @FeignClient(value = "",contextId = "baseDept-api",url = "${ portal..center.endpoint:}") +public interface BaseDeptApi { + + /** + * 保存 部门表 + */ + @PostMapping("/baseDept/insert") + BaseDeptInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseDeptInsertReq req); + + /** + * 根据ID 删除 部门表 + */ + @PostMapping("/baseDept/deleteByIdList") + BaseDeptDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseDeptDeleteByIdListReq req); + + /** + * 查询 部门表 + */ + @PostMapping("/baseDept/queryList") + BaseDeptQueryListRes queryList(@RequestBody @Valid BaseDeptQueryListReq req); + + /** + * 根据ID 更新 部门表 + */ + @PostMapping("/baseDept/updateById") + BaseDeptUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseDeptUpdateByIdReq req); + + /** + * 分页查询 部门表 + */ + @PostMapping("/baseDept/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseDeptExportQueryPageListReq req); + + /** + * 导出 部门表 + */ + @PostMapping("/baseDept/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseDeptExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseDept/importData") + BaseDeptImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseDept/queryByIdList") + BaseDeptQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseDeptQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java b/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java new file mode 100644 index 0000000..4cf5e38 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseResource.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 资源(BaseResource)对外API + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +// @FeignClient(value = "",contextId = "baseResource-api",url = "${ portal..center.endpoint:}") +public interface BaseResourceApi { + + /** + * 保存 资源 + */ + @PostMapping("/baseResource/insert") + BaseResourceInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseResourceInsertReq req); + + /** + * 根据ID 删除 资源 + */ + @PostMapping("/baseResource/deleteByIdList") + BaseResourceDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseResourceDeleteByIdListReq req); + + /** + * 查询 资源 + */ + @PostMapping("/baseResource/queryList") + BaseResourceQueryListRes queryList(@RequestBody @Valid BaseResourceQueryListReq req); + + /** + * 根据ID 更新 资源 + */ + @PostMapping("/baseResource/updateById") + BaseResourceUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseResourceUpdateByIdReq req); + + /** + * 分页查询 资源 + */ + @PostMapping("/baseResource/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseResourceExportQueryPageListReq req); + + /** + * 导出 资源 + */ + @PostMapping("/baseResource/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseResourceExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseResource/importData") + BaseResourceImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseResource/queryByIdList") + BaseResourceQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseResourceQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseRoleApi.java b/src/main/java/com/olivia/peanut/base/api/BaseRoleApi.java new file mode 100644 index 0000000..da11f16 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseRoleApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseRole.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 角色表(BaseRole)对外API + * + * @author peanut + * @since 2024-07-31 14:33:34 + */ +// @FeignClient(value = "",contextId = "baseRole-api",url = "${ portal..center.endpoint:}") +public interface BaseRoleApi { + + /** + * 保存 角色表 + */ + @PostMapping("/baseRole/insert") + BaseRoleInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseRoleInsertReq req); + + /** + * 根据ID 删除 角色表 + */ + @PostMapping("/baseRole/deleteByIdList") + BaseRoleDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseRoleDeleteByIdListReq req); + + /** + * 查询 角色表 + */ + @PostMapping("/baseRole/queryList") + BaseRoleQueryListRes queryList(@RequestBody @Valid BaseRoleQueryListReq req); + + /** + * 根据ID 更新 角色表 + */ + @PostMapping("/baseRole/updateById") + BaseRoleUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseRoleUpdateByIdReq req); + + /** + * 分页查询 角色表 + */ + @PostMapping("/baseRole/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseRoleExportQueryPageListReq req); + + /** + * 导出 角色表 + */ + @PostMapping("/baseRole/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseRoleExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseRole/importData") + BaseRoleImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseRole/queryByIdList") + BaseRoleQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseRoleQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseRoleGroupApi.java b/src/main/java/com/olivia/peanut/base/api/BaseRoleGroupApi.java new file mode 100644 index 0000000..cdcf745 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseRoleGroupApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseRoleGroup.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 角色组表(BaseRoleGroup)对外API + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +// @FeignClient(value = "",contextId = "baseRoleGroup-api",url = "${ portal..center.endpoint:}") +public interface BaseRoleGroupApi { + + /** + * 保存 角色组表 + */ + @PostMapping("/baseRoleGroup/insert") + BaseRoleGroupInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseRoleGroupInsertReq req); + + /** + * 根据ID 删除 角色组表 + */ + @PostMapping("/baseRoleGroup/deleteByIdList") + BaseRoleGroupDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseRoleGroupDeleteByIdListReq req); + + /** + * 查询 角色组表 + */ + @PostMapping("/baseRoleGroup/queryList") + BaseRoleGroupQueryListRes queryList(@RequestBody @Valid BaseRoleGroupQueryListReq req); + + /** + * 根据ID 更新 角色组表 + */ + @PostMapping("/baseRoleGroup/updateById") + BaseRoleGroupUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseRoleGroupUpdateByIdReq req); + + /** + * 分页查询 角色组表 + */ + @PostMapping("/baseRoleGroup/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseRoleGroupExportQueryPageListReq req); + + /** + * 导出 角色组表 + */ + @PostMapping("/baseRoleGroup/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseRoleGroupExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseRoleGroup/importData") + BaseRoleGroupImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseRoleGroup/queryByIdList") + BaseRoleGroupQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseRoleGroupQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseRoleResourceApi.java b/src/main/java/com/olivia/peanut/base/api/BaseRoleResourceApi.java new file mode 100644 index 0000000..e4e98cd --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseRoleResourceApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseRoleResource.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 角色资源表(BaseRoleResource)对外API + * + * @author peanut + * @since 2024-07-31 14:34:06 + */ +// @FeignClient(value = "",contextId = "baseRoleResource-api",url = "${ portal..center.endpoint:}") +public interface BaseRoleResourceApi { + + /** + * 保存 角色资源表 + */ + @PostMapping("/baseRoleResource/insert") + BaseRoleResourceInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseRoleResourceInsertReq req); + + /** + * 根据ID 删除 角色资源表 + */ + @PostMapping("/baseRoleResource/deleteByIdList") + BaseRoleResourceDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseRoleResourceDeleteByIdListReq req); + + /** + * 查询 角色资源表 + */ + @PostMapping("/baseRoleResource/queryList") + BaseRoleResourceQueryListRes queryList(@RequestBody @Valid BaseRoleResourceQueryListReq req); + + /** + * 根据ID 更新 角色资源表 + */ + @PostMapping("/baseRoleResource/updateById") + BaseRoleResourceUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseRoleResourceUpdateByIdReq req); + + /** + * 分页查询 角色资源表 + */ + @PostMapping("/baseRoleResource/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseRoleResourceExportQueryPageListReq req); + + /** + * 导出 角色资源表 + */ + @PostMapping("/baseRoleResource/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseRoleResourceExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseRoleResource/importData") + BaseRoleResourceImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseRoleResource/queryByIdList") + BaseRoleResourceQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseRoleResourceQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseUserDeptApi.java b/src/main/java/com/olivia/peanut/base/api/BaseUserDeptApi.java new file mode 100644 index 0000000..5abab89 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseUserDeptApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseUserDept.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 用户部门表(BaseUserDept)对外API + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +// @FeignClient(value = "",contextId = "baseUserDept-api",url = "${ portal..center.endpoint:}") +public interface BaseUserDeptApi { + + /** + * 保存 用户部门表 + */ + @PostMapping("/baseUserDept/insert") + BaseUserDeptInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseUserDeptInsertReq req); + + /** + * 根据ID 删除 用户部门表 + */ + @PostMapping("/baseUserDept/deleteByIdList") + BaseUserDeptDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseUserDeptDeleteByIdListReq req); + + /** + * 查询 用户部门表 + */ + @PostMapping("/baseUserDept/queryList") + BaseUserDeptQueryListRes queryList(@RequestBody @Valid BaseUserDeptQueryListReq req); + + /** + * 根据ID 更新 用户部门表 + */ + @PostMapping("/baseUserDept/updateById") + BaseUserDeptUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseUserDeptUpdateByIdReq req); + + /** + * 分页查询 用户部门表 + */ + @PostMapping("/baseUserDept/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseUserDeptExportQueryPageListReq req); + + /** + * 导出 用户部门表 + */ + @PostMapping("/baseUserDept/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseUserDeptExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseUserDept/importData") + BaseUserDeptImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseUserDept/queryByIdList") + BaseUserDeptQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseUserDeptQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseUserRoleApi.java b/src/main/java/com/olivia/peanut/base/api/BaseUserRoleApi.java new file mode 100644 index 0000000..775d477 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseUserRoleApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseUserRole.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 用户角色表(BaseUserRole)对外API + * + * @author peanut + * @since 2024-07-31 14:36:02 + */ +// @FeignClient(value = "",contextId = "baseUserRole-api",url = "${ portal..center.endpoint:}") +public interface BaseUserRoleApi { + + /** + * 保存 用户角色表 + */ + @PostMapping("/baseUserRole/insert") + BaseUserRoleInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseUserRoleInsertReq req); + + /** + * 根据ID 删除 用户角色表 + */ + @PostMapping("/baseUserRole/deleteByIdList") + BaseUserRoleDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseUserRoleDeleteByIdListReq req); + + /** + * 查询 用户角色表 + */ + @PostMapping("/baseUserRole/queryList") + BaseUserRoleQueryListRes queryList(@RequestBody @Valid BaseUserRoleQueryListReq req); + + /** + * 根据ID 更新 用户角色表 + */ + @PostMapping("/baseUserRole/updateById") + BaseUserRoleUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseUserRoleUpdateByIdReq req); + + /** + * 分页查询 用户角色表 + */ + @PostMapping("/baseUserRole/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseUserRoleExportQueryPageListReq req); + + /** + * 导出 用户角色表 + */ + @PostMapping("/baseUserRole/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseUserRoleExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseUserRole/importData") + BaseUserRoleImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseUserRole/queryByIdList") + BaseUserRoleQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseUserRoleQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseUserRoleGroupApi.java b/src/main/java/com/olivia/peanut/base/api/BaseUserRoleGroupApi.java new file mode 100644 index 0000000..729e3c4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseUserRoleGroupApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseUserRoleGroup.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 用户角色组表(BaseUserRoleGroup)对外API + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +// @FeignClient(value = "",contextId = "baseUserRoleGroup-api",url = "${ portal..center.endpoint:}") +public interface BaseUserRoleGroupApi { + + /** + * 保存 用户角色组表 + */ + @PostMapping("/baseUserRoleGroup/insert") + BaseUserRoleGroupInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseUserRoleGroupInsertReq req); + + /** + * 根据ID 删除 用户角色组表 + */ + @PostMapping("/baseUserRoleGroup/deleteByIdList") + BaseUserRoleGroupDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseUserRoleGroupDeleteByIdListReq req); + + /** + * 查询 用户角色组表 + */ + @PostMapping("/baseUserRoleGroup/queryList") + BaseUserRoleGroupQueryListRes queryList(@RequestBody @Valid BaseUserRoleGroupQueryListReq req); + + /** + * 根据ID 更新 用户角色组表 + */ + @PostMapping("/baseUserRoleGroup/updateById") + BaseUserRoleGroupUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseUserRoleGroupUpdateByIdReq req); + + /** + * 分页查询 用户角色组表 + */ + @PostMapping("/baseUserRoleGroup/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseUserRoleGroupExportQueryPageListReq req); + + /** + * 导出 用户角色组表 + */ + @PostMapping("/baseUserRoleGroup/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseUserRoleGroupExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseUserRoleGroup/importData") + BaseUserRoleGroupImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseUserRoleGroup/queryByIdList") + BaseUserRoleGroupQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseUserRoleGroupQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListReq.java new file mode 100644 index 0000000..c7759c6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListRes.java new file mode 100644 index 0000000..7db59ac --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDto.java new file mode 100644 index 0000000..7d8b778 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptDto.java @@ -0,0 +1,52 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 部门表(BaseDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:31 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptDto extends BaseEntityDto { + + /*** + * 部门编码 + */ + @NotBlank(message = "部门编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String deptCode; + /*** + * 部门名称 + */ + @NotBlank(message = "部门名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String deptName; + /*** + * 父部门ID + */ + @NotNull(message = "父部门ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long parentId; + /*** + * 部门路径 + */ + @NotBlank(message = "部门路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String path; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListInfoRes.java new file mode 100644 index 0000000..b72b809 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptExportQueryPageListInfoRes extends BaseDeptDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListReq.java new file mode 100644 index 0000000..02144fb --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseDeptDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportReq.java new file mode 100644 index 0000000..2c95986 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptImportReq extends BaseDeptDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportRes.java new file mode 100644 index 0000000..125e3a4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertReq.java new file mode 100644 index 0000000..9d4ba54 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)保存入参 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptInsertReq extends BaseDeptDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertRes.java new file mode 100644 index 0000000..c1f422c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListReq.java new file mode 100644 index 0000000..255fd1f --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:31 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListRes.java new file mode 100644 index 0000000..b9cd9fa --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:31 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListReq.java new file mode 100644 index 0000000..a3a05d6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptQueryListReq { + + private BaseDeptDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListRes.java new file mode 100644 index 0000000..0f995bd --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdReq.java new file mode 100644 index 0000000..64c0614 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 部门表(BaseDept)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptUpdateByIdReq extends BaseDeptDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdRes.java new file mode 100644 index 0000000..47e7c86 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseDept/BaseDeptUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 部门表(BaseDept)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseDeptUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java new file mode 100644 index 0000000..90008c1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java new file mode 100644 index 0000000..b1980e0 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java new file mode 100644 index 0000000..3c52a98 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java @@ -0,0 +1,72 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceDto extends BaseEntityDto { + + /*** + * 菜单编码 + */ + @NotBlank(message = "菜单编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceCode; + /*** + * 菜单名称 + */ + @NotBlank(message = "菜单名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceName; + /*** + * 菜单URL + */ + @NotBlank(message = "菜单URL不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceUrl; + /*** + * 菜单图标 + */ + @NotBlank(message = "菜单图标不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceIcon; + /*** + * 菜单类型 + */ + @NotBlank(message = "菜单类型不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceType; + /*** + * 是否按钮 0 否,1 是 + */ + @NotNull(message = "是否按钮 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isButton; + /*** + * 父菜单ID + */ + @NotNull(message = "父菜单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long parentId; + /*** + * 菜单路径 + */ + @NotBlank(message = "菜单路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String path; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java new file mode 100644 index 0000000..3994a43 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceExportQueryPageListInfoRes extends BaseResourceDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java new file mode 100644 index 0000000..4df2bea --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseResourceDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java new file mode 100644 index 0000000..14e5615 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceImportReq extends BaseResourceDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java new file mode 100644 index 0000000..f232662 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java new file mode 100644 index 0000000..ea7e6c3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)保存入参 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceInsertReq extends BaseResourceDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java new file mode 100644 index 0000000..c56f209 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java new file mode 100644 index 0000000..eed7c25 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java new file mode 100644 index 0000000..77bcd58 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java new file mode 100644 index 0000000..4e81ed9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryListReq { + + private BaseResourceDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java new file mode 100644 index 0000000..1de22db --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java new file mode 100644 index 0000000..d2395a6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 资源(BaseResource)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceUpdateByIdReq extends BaseResourceDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java new file mode 100644 index 0000000..4aefb21 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListReq.java new file mode 100644 index 0000000..a3ac328 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListRes.java new file mode 100644 index 0000000..18114cf --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java new file mode 100644 index 0000000..5918ef3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; + +/** + * 角色表(BaseRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleDto extends BaseEntityDto { + + /*** + * 角色编码 + */ + @NotBlank(message = "角色编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String roleCode; + /*** + * 角色名称 + */ + @NotBlank(message = "角色名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String roleName; + /*** + * 角色组 + */ + @NotNull(message = "角色组不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long roleGroupId; + + private String roleGroupName; +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListInfoRes.java new file mode 100644 index 0000000..e703358 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleExportQueryPageListInfoRes extends BaseRoleDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListReq.java new file mode 100644 index 0000000..54e0663 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseRoleDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportReq.java new file mode 100644 index 0000000..37a3507 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleImportReq extends BaseRoleDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportRes.java new file mode 100644 index 0000000..82988b9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertReq.java new file mode 100644 index 0000000..5163f9b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)保存入参 + * + * @author peanut + * @since 2024-07-31 14:33:34 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleInsertReq extends BaseRoleDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertRes.java new file mode 100644 index 0000000..cbf49a4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListReq.java new file mode 100644 index 0000000..f13b5b5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListRes.java new file mode 100644 index 0000000..298797b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListReq.java new file mode 100644 index 0000000..0aa5e08 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleQueryListReq { + + private BaseRoleDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListRes.java new file mode 100644 index 0000000..fb70f4b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdReq.java new file mode 100644 index 0000000..ad2b71b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 角色表(BaseRole)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleUpdateByIdReq extends BaseRoleDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdRes.java new file mode 100644 index 0000000..16e8a86 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色表(BaseRole)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListReq.java new file mode 100644 index 0000000..9ecf8f6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListRes.java new file mode 100644 index 0000000..ab2a5d6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDto.java new file mode 100644 index 0000000..87ffe7c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 角色组表(BaseRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:37 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupDto extends BaseEntityDto { + + /*** + * 角色组编码 + */ + @NotBlank(message = "角色组编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String roleGroupCode; + /*** + * 角色组名称 + */ + @NotBlank(message = "角色组名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String roleGroupName; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListInfoRes.java new file mode 100644 index 0000000..a696b5d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupExportQueryPageListInfoRes extends BaseRoleGroupDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListReq.java new file mode 100644 index 0000000..8bcdea2 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseRoleGroupDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportReq.java new file mode 100644 index 0000000..d6997a2 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupImportReq extends BaseRoleGroupDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportRes.java new file mode 100644 index 0000000..90c5ddc --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertReq.java new file mode 100644 index 0000000..dea63c7 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)保存入参 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupInsertReq extends BaseRoleGroupDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertRes.java new file mode 100644 index 0000000..c718a04 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)保存返回 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListReq.java new file mode 100644 index 0000000..8c2bdde --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListRes.java new file mode 100644 index 0000000..e206e18 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListReq.java new file mode 100644 index 0000000..17539f0 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupQueryListReq { + + private BaseRoleGroupDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListRes.java new file mode 100644 index 0000000..ca9fb4a --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdReq.java new file mode 100644 index 0000000..d4daf9b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 角色组表(BaseRoleGroup)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupUpdateByIdReq extends BaseRoleGroupDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdRes.java new file mode 100644 index 0000000..57adbcc --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleGroup/BaseRoleGroupUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色组表(BaseRoleGroup)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleGroupUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListReq.java new file mode 100644 index 0000000..166ee16 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:34:07 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListRes.java new file mode 100644 index 0000000..fdf722b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:34:06 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDto.java new file mode 100644 index 0000000..76a2f21 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 角色资源表(BaseRoleResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:35:12 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceDto extends BaseEntityDto { + + /*** + * 角色ID + */ + @NotNull(message = "角色ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long roleId; + /*** + * 菜单ID + */ + @NotNull(message = "菜单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long resourceId; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListInfoRes.java new file mode 100644 index 0000000..1a69067 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:34:07 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceExportQueryPageListInfoRes extends BaseRoleResourceDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListReq.java new file mode 100644 index 0000000..13595ec --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:34:57 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseRoleResourceDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportReq.java new file mode 100644 index 0000000..71f7c20 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:35:01 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceImportReq extends BaseRoleResourceDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportRes.java new file mode 100644 index 0000000..c1e111d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)保存返回 + * + * @author peanut + * @since 2024-07-31 14:35:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertReq.java new file mode 100644 index 0000000..b714b65 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)保存入参 + * + * @author peanut + * @since 2024-07-31 14:34:06 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceInsertReq extends BaseRoleResourceDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertRes.java new file mode 100644 index 0000000..b94547c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)保存返回 + * + * @author peanut + * @since 2024-07-31 14:34:06 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListReq.java new file mode 100644 index 0000000..23aca5c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:35:11 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListRes.java new file mode 100644 index 0000000..51ea1f8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:35:12 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListReq.java new file mode 100644 index 0000000..fe8cdd8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:34:07 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceQueryListReq { + + private BaseRoleResourceDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListRes.java new file mode 100644 index 0000000..2ae2c16 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:34:07 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdReq.java new file mode 100644 index 0000000..77a5663 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 角色资源表(BaseRoleResource)表实体类 + * + * @author peanut + * @since 2024-07-31 14:34:07 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceUpdateByIdReq extends BaseRoleResourceDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdRes.java new file mode 100644 index 0000000..1ad10a0 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRoleResource/BaseRoleResourceUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseRoleResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 角色资源表(BaseRoleResource)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:34:07 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseRoleResourceUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListReq.java new file mode 100644 index 0000000..e4b4ff1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListRes.java new file mode 100644 index 0000000..0693c72 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDto.java new file mode 100644 index 0000000..380e0e5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 用户部门表(BaseUserDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:02 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptDto extends BaseEntityDto { + + /*** + * 用户ID + */ + @NotNull(message = "用户ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long userId; + /*** + * 部门ID + */ + @NotNull(message = "部门ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long deptId; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListInfoRes.java new file mode 100644 index 0000000..ed60c3e --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptExportQueryPageListInfoRes extends BaseUserDeptDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListReq.java new file mode 100644 index 0000000..6c2d9d7 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseUserDeptDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportReq.java new file mode 100644 index 0000000..289b43d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptImportReq extends BaseUserDeptDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportRes.java new file mode 100644 index 0000000..885ea4d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)保存返回 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertReq.java new file mode 100644 index 0000000..7ca5c8a --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)保存入参 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptInsertReq extends BaseUserDeptDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertRes.java new file mode 100644 index 0000000..cc82ee9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)保存返回 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListReq.java new file mode 100644 index 0000000..4080e6b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListRes.java new file mode 100644 index 0000000..b894447 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListReq.java new file mode 100644 index 0000000..16c3dd5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptQueryListReq { + + private BaseUserDeptDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListRes.java new file mode 100644 index 0000000..ca4ce6c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdReq.java new file mode 100644 index 0000000..2fe800e --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 用户部门表(BaseUserDept)表实体类 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptUpdateByIdReq extends BaseUserDeptDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdRes.java new file mode 100644 index 0000000..42a9804 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserDept/BaseUserDeptUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseUserDept; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户部门表(BaseUserDept)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserDeptUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListReq.java new file mode 100644 index 0000000..5d848cf --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListRes.java new file mode 100644 index 0000000..5383dec --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDto.java new file mode 100644 index 0000000..28fb906 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 用户角色表(BaseUserRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleDto extends BaseEntityDto { + + /*** + * 用户ID + */ + @NotNull(message = "用户ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long userId; + /*** + * 角色ID + */ + @NotNull(message = "角色ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long roleId; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListInfoRes.java new file mode 100644 index 0000000..7130e53 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleExportQueryPageListInfoRes extends BaseUserRoleDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListReq.java new file mode 100644 index 0000000..d16f590 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseUserRoleDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportReq.java new file mode 100644 index 0000000..81c48ca --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleImportReq extends BaseUserRoleDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportRes.java new file mode 100644 index 0000000..23b9697 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)保存返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertReq.java new file mode 100644 index 0000000..d1e3053 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)保存入参 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleInsertReq extends BaseUserRoleDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertRes.java new file mode 100644 index 0000000..651c0bb --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)保存返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListReq.java new file mode 100644 index 0000000..270da79 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListRes.java new file mode 100644 index 0000000..5522370 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListReq.java new file mode 100644 index 0000000..f2c487c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleQueryListReq { + + private BaseUserRoleDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListRes.java new file mode 100644 index 0000000..71740f5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdReq.java new file mode 100644 index 0000000..cedba87 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 用户角色表(BaseUserRole)表实体类 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleUpdateByIdReq extends BaseUserRoleDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdRes.java new file mode 100644 index 0000000..3d49089 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRole/BaseUserRoleUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseUserRole; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色表(BaseUserRole)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListReq.java new file mode 100644 index 0000000..36789d8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)根据ID删除多个入参 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListRes.java new file mode 100644 index 0000000..1f00279 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)根据ID删除多个反参 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDto.java new file mode 100644 index 0000000..ca17007 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupDto extends BaseEntityDto { + + /*** + * 用户ID + */ + @NotNull(message = "用户ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long userId; + /*** + * 角色组ID + */ + @NotNull(message = "角色组ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long roleGroupId; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListInfoRes.java new file mode 100644 index 0000000..8cd1b61 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupExportQueryPageListInfoRes extends BaseUserRoleGroupDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListReq.java new file mode 100644 index 0000000..0519fd3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseUserRoleGroupDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportReq.java new file mode 100644 index 0000000..7ca6539 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupImportReq extends BaseUserRoleGroupDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportRes.java new file mode 100644 index 0000000..c95beec --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)保存返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertReq.java new file mode 100644 index 0000000..e287190 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)保存入参 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupInsertReq extends BaseUserRoleGroupDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertRes.java new file mode 100644 index 0000000..b84ad36 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)保存返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListReq.java new file mode 100644 index 0000000..dba5b68 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListRes.java new file mode 100644 index 0000000..f2bcb4a --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListReq.java new file mode 100644 index 0000000..7050930 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象入参 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupQueryListReq { + + private BaseUserRoleGroupDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListRes.java new file mode 100644 index 0000000..a9956c8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)查询对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdReq.java new file mode 100644 index 0000000..b1b1d80 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 用户角色组表(BaseUserRoleGroup)表实体类 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupUpdateByIdReq extends BaseUserRoleGroupDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdRes.java new file mode 100644 index 0000000..9e561ad --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseUserRoleGroup/BaseUserRoleGroupUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseUserRoleGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 用户角色组表(BaseUserRoleGroup)修改对象返回 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseUserRoleGroupUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseDeptApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseDeptApiImpl.java new file mode 100644 index 0000000..a4f7470 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseDeptApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseDept; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseDept.*; +import com.olivia.peanut.base.service.BaseDeptService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseDeptApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 部门表(BaseDept)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@RestController +public class BaseDeptApiImpl implements BaseDeptApi { + + private @Autowired BaseDeptService baseDeptService; + + /**** + * insert + * + */ + public @Override BaseDeptInsertRes insert(BaseDeptInsertReq req) { + this.baseDeptService.save($.copy(req, BaseDept.class)); + return new BaseDeptInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseDeptDeleteByIdListRes deleteByIdList(BaseDeptDeleteByIdListReq req) { + baseDeptService.removeByIds(req.getIdList()); + return new BaseDeptDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseDeptQueryListRes queryList(BaseDeptQueryListReq req) { + return baseDeptService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseDeptUpdateByIdRes updateById(BaseDeptUpdateByIdReq req) { + baseDeptService.updateById($.copy(req, BaseDept.class)); + return new BaseDeptUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseDeptExportQueryPageListReq req) { + return baseDeptService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseDeptExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseDeptExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseDeptExportQueryPageListInfoRes.class, listInfoRes, "部门表"); + } + + public @Override BaseDeptImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseDeptImportListener(), BaseDeptImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseDept.class); + boolean bool = baseDeptService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseDeptImportRes().setCount(c); + } + + public @Override BaseDeptQueryByIdListRes queryByIdListRes(BaseDeptQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseDept.class) + .selectAll(BaseDept.class).in(BaseDept::getId, req.getIdList()); + List list = this.baseDeptService.list(q); + List dataList = $.copyList(list, BaseDeptDto.class); + this.baseDeptService.setName(dataList); + return new BaseDeptQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java new file mode 100644 index 0000000..d106ced --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseResource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseResource.*; +import com.olivia.peanut.base.service.BaseResourceService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseResourceApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 资源(BaseResource)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@RestController +public class BaseResourceApiImpl implements BaseResourceApi { + + private @Autowired BaseResourceService baseResourceService; + + /**** + * insert + * + */ + public @Override BaseResourceInsertRes insert(BaseResourceInsertReq req) { + this.baseResourceService.save($.copy(req, BaseResource.class)); + return new BaseResourceInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseResourceDeleteByIdListRes deleteByIdList(BaseResourceDeleteByIdListReq req) { + baseResourceService.removeByIds(req.getIdList()); + return new BaseResourceDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseResourceQueryListRes queryList(BaseResourceQueryListReq req) { + return baseResourceService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseResourceUpdateByIdRes updateById(BaseResourceUpdateByIdReq req) { + baseResourceService.updateById($.copy(req, BaseResource.class)); + return new BaseResourceUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req) { + return baseResourceService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseResourceExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseResourceExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseResourceExportQueryPageListInfoRes.class, listInfoRes, "资源"); + } + + public @Override BaseResourceImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseResourceImportListener(), BaseResourceImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseResource.class); + boolean bool = baseResourceService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseResourceImportRes().setCount(c); + } + + public @Override BaseResourceQueryByIdListRes queryByIdListRes(BaseResourceQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseResource.class) + .selectAll(BaseResource.class).in(BaseResource::getId, req.getIdList()); + List list = this.baseResourceService.list(q); + List dataList = $.copyList(list, BaseResourceDto.class); + this.baseResourceService.setName(dataList); + return new BaseResourceQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleApiImpl.java new file mode 100644 index 0000000..b3d2737 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseRole; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseRole.*; +import com.olivia.peanut.base.service.BaseRoleService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseRoleApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 角色表(BaseRole)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:34 + */ +@RestController +public class BaseRoleApiImpl implements BaseRoleApi { + + private @Autowired BaseRoleService baseRoleService; + + /**** + * insert + * + */ + public @Override BaseRoleInsertRes insert(BaseRoleInsertReq req) { + this.baseRoleService.save($.copy(req, BaseRole.class)); + return new BaseRoleInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseRoleDeleteByIdListRes deleteByIdList(BaseRoleDeleteByIdListReq req) { + baseRoleService.removeByIds(req.getIdList()); + return new BaseRoleDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseRoleQueryListRes queryList(BaseRoleQueryListReq req) { + return baseRoleService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseRoleUpdateByIdRes updateById(BaseRoleUpdateByIdReq req) { + baseRoleService.updateById($.copy(req, BaseRole.class)); + return new BaseRoleUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseRoleExportQueryPageListReq req) { + return baseRoleService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseRoleExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseRoleExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseRoleExportQueryPageListInfoRes.class, listInfoRes, "角色表"); + } + + public @Override BaseRoleImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseRoleImportListener(), BaseRoleImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseRole.class); + boolean bool = baseRoleService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseRoleImportRes().setCount(c); + } + + public @Override BaseRoleQueryByIdListRes queryByIdListRes(BaseRoleQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseRole.class) + .selectAll(BaseRole.class).in(BaseRole::getId, req.getIdList()); + List list = this.baseRoleService.list(q); + List dataList = $.copyList(list, BaseRoleDto.class); + this.baseRoleService.setName(dataList); + return new BaseRoleQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleGroupApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleGroupApiImpl.java new file mode 100644 index 0000000..08645c4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleGroupApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseRoleGroup; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseRoleGroup.*; +import com.olivia.peanut.base.service.BaseRoleGroupService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseRoleGroupApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 角色组表(BaseRoleGroup)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@RestController +public class BaseRoleGroupApiImpl implements BaseRoleGroupApi { + + private @Autowired BaseRoleGroupService baseRoleGroupService; + + /**** + * insert + * + */ + public @Override BaseRoleGroupInsertRes insert(BaseRoleGroupInsertReq req) { + this.baseRoleGroupService.save($.copy(req, BaseRoleGroup.class)); + return new BaseRoleGroupInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseRoleGroupDeleteByIdListRes deleteByIdList(BaseRoleGroupDeleteByIdListReq req) { + baseRoleGroupService.removeByIds(req.getIdList()); + return new BaseRoleGroupDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseRoleGroupQueryListRes queryList(BaseRoleGroupQueryListReq req) { + return baseRoleGroupService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseRoleGroupUpdateByIdRes updateById(BaseRoleGroupUpdateByIdReq req) { + baseRoleGroupService.updateById($.copy(req, BaseRoleGroup.class)); + return new BaseRoleGroupUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseRoleGroupExportQueryPageListReq req) { + return baseRoleGroupService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseRoleGroupExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseRoleGroupExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseRoleGroupExportQueryPageListInfoRes.class, listInfoRes, "角色组表"); + } + + public @Override BaseRoleGroupImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseRoleGroupImportListener(), BaseRoleGroupImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseRoleGroup.class); + boolean bool = baseRoleGroupService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseRoleGroupImportRes().setCount(c); + } + + public @Override BaseRoleGroupQueryByIdListRes queryByIdListRes(BaseRoleGroupQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseRoleGroup.class) + .selectAll(BaseRoleGroup.class).in(BaseRoleGroup::getId, req.getIdList()); + List list = this.baseRoleGroupService.list(q); + List dataList = $.copyList(list, BaseRoleGroupDto.class); + this.baseRoleGroupService.setName(dataList); + return new BaseRoleGroupQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleResourceApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleResourceApiImpl.java new file mode 100644 index 0000000..576904e --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseRoleResourceApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseRoleResource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseRoleResource.*; +import com.olivia.peanut.base.service.BaseRoleResourceService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseRoleResourceApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 角色资源表(BaseRoleResource)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:34:06 + */ +@RestController +public class BaseRoleResourceApiImpl implements BaseRoleResourceApi { + + private @Autowired BaseRoleResourceService baseRoleResourceService; + + /**** + * insert + * + */ + public @Override BaseRoleResourceInsertRes insert(BaseRoleResourceInsertReq req) { + this.baseRoleResourceService.save($.copy(req, BaseRoleResource.class)); + return new BaseRoleResourceInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseRoleResourceDeleteByIdListRes deleteByIdList(BaseRoleResourceDeleteByIdListReq req) { + baseRoleResourceService.removeByIds(req.getIdList()); + return new BaseRoleResourceDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseRoleResourceQueryListRes queryList(BaseRoleResourceQueryListReq req) { + return baseRoleResourceService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseRoleResourceUpdateByIdRes updateById(BaseRoleResourceUpdateByIdReq req) { + baseRoleResourceService.updateById($.copy(req, BaseRoleResource.class)); + return new BaseRoleResourceUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseRoleResourceExportQueryPageListReq req) { + return baseRoleResourceService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseRoleResourceExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseRoleResourceExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseRoleResourceExportQueryPageListInfoRes.class, listInfoRes, "角色资源表"); + } + + public @Override BaseRoleResourceImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseRoleResourceImportListener(), BaseRoleResourceImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseRoleResource.class); + boolean bool = baseRoleResourceService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseRoleResourceImportRes().setCount(c); + } + + public @Override BaseRoleResourceQueryByIdListRes queryByIdListRes(BaseRoleResourceQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseRoleResource.class) + .selectAll(BaseRoleResource.class).in(BaseRoleResource::getId, req.getIdList()); + List list = this.baseRoleResourceService.list(q); + List dataList = $.copyList(list, BaseRoleResourceDto.class); + this.baseRoleResourceService.setName(dataList); + return new BaseRoleResourceQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseUserDeptApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseUserDeptApiImpl.java new file mode 100644 index 0000000..628c74d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseUserDeptApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseUserDept; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseUserDept.*; +import com.olivia.peanut.base.service.BaseUserDeptService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseUserDeptApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 用户部门表(BaseUserDept)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@RestController +public class BaseUserDeptApiImpl implements BaseUserDeptApi { + + private @Autowired BaseUserDeptService baseUserDeptService; + + /**** + * insert + * + */ + public @Override BaseUserDeptInsertRes insert(BaseUserDeptInsertReq req) { + this.baseUserDeptService.save($.copy(req, BaseUserDept.class)); + return new BaseUserDeptInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseUserDeptDeleteByIdListRes deleteByIdList(BaseUserDeptDeleteByIdListReq req) { + baseUserDeptService.removeByIds(req.getIdList()); + return new BaseUserDeptDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseUserDeptQueryListRes queryList(BaseUserDeptQueryListReq req) { + return baseUserDeptService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseUserDeptUpdateByIdRes updateById(BaseUserDeptUpdateByIdReq req) { + baseUserDeptService.updateById($.copy(req, BaseUserDept.class)); + return new BaseUserDeptUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseUserDeptExportQueryPageListReq req) { + return baseUserDeptService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseUserDeptExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseUserDeptExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseUserDeptExportQueryPageListInfoRes.class, listInfoRes, "用户部门表"); + } + + public @Override BaseUserDeptImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseUserDeptImportListener(), BaseUserDeptImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseUserDept.class); + boolean bool = baseUserDeptService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseUserDeptImportRes().setCount(c); + } + + public @Override BaseUserDeptQueryByIdListRes queryByIdListRes(BaseUserDeptQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseUserDept.class) + .selectAll(BaseUserDept.class).in(BaseUserDept::getId, req.getIdList()); + List list = this.baseUserDeptService.list(q); + List dataList = $.copyList(list, BaseUserDeptDto.class); + this.baseUserDeptService.setName(dataList); + return new BaseUserDeptQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleApiImpl.java new file mode 100644 index 0000000..f9a0957 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseUserRole; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseUserRole.*; +import com.olivia.peanut.base.service.BaseUserRoleService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseUserRoleApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 用户角色表(BaseUserRole)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:36:02 + */ +@RestController +public class BaseUserRoleApiImpl implements BaseUserRoleApi { + + private @Autowired BaseUserRoleService baseUserRoleService; + + /**** + * insert + * + */ + public @Override BaseUserRoleInsertRes insert(BaseUserRoleInsertReq req) { + this.baseUserRoleService.save($.copy(req, BaseUserRole.class)); + return new BaseUserRoleInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseUserRoleDeleteByIdListRes deleteByIdList(BaseUserRoleDeleteByIdListReq req) { + baseUserRoleService.removeByIds(req.getIdList()); + return new BaseUserRoleDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseUserRoleQueryListRes queryList(BaseUserRoleQueryListReq req) { + return baseUserRoleService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseUserRoleUpdateByIdRes updateById(BaseUserRoleUpdateByIdReq req) { + baseUserRoleService.updateById($.copy(req, BaseUserRole.class)); + return new BaseUserRoleUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseUserRoleExportQueryPageListReq req) { + return baseUserRoleService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseUserRoleExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseUserRoleExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseUserRoleExportQueryPageListInfoRes.class, listInfoRes, "用户角色表"); + } + + public @Override BaseUserRoleImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseUserRoleImportListener(), BaseUserRoleImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseUserRole.class); + boolean bool = baseUserRoleService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseUserRoleImportRes().setCount(c); + } + + public @Override BaseUserRoleQueryByIdListRes queryByIdListRes(BaseUserRoleQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseUserRole.class) + .selectAll(BaseUserRole.class).in(BaseUserRole::getId, req.getIdList()); + List list = this.baseUserRoleService.list(q); + List dataList = $.copyList(list, BaseUserRoleDto.class); + this.baseUserRoleService.setName(dataList); + return new BaseUserRoleQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleGroupApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleGroupApiImpl.java new file mode 100644 index 0000000..04e6e39 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseUserRoleGroupApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseUserRoleGroup; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseUserRoleGroup.*; +import com.olivia.peanut.base.service.BaseUserRoleGroupService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseUserRoleGroupApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 用户角色组表(BaseUserRoleGroup)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@RestController +public class BaseUserRoleGroupApiImpl implements BaseUserRoleGroupApi { + + private @Autowired BaseUserRoleGroupService baseUserRoleGroupService; + + /**** + * insert + * + */ + public @Override BaseUserRoleGroupInsertRes insert(BaseUserRoleGroupInsertReq req) { + this.baseUserRoleGroupService.save($.copy(req, BaseUserRoleGroup.class)); + return new BaseUserRoleGroupInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseUserRoleGroupDeleteByIdListRes deleteByIdList(BaseUserRoleGroupDeleteByIdListReq req) { + baseUserRoleGroupService.removeByIds(req.getIdList()); + return new BaseUserRoleGroupDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseUserRoleGroupQueryListRes queryList(BaseUserRoleGroupQueryListReq req) { + return baseUserRoleGroupService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseUserRoleGroupUpdateByIdRes updateById(BaseUserRoleGroupUpdateByIdReq req) { + baseUserRoleGroupService.updateById($.copy(req, BaseUserRoleGroup.class)); + return new BaseUserRoleGroupUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseUserRoleGroupExportQueryPageListReq req) { + return baseUserRoleGroupService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseUserRoleGroupExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseUserRoleGroupExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseUserRoleGroupExportQueryPageListInfoRes.class, listInfoRes, "用户角色组表"); + } + + public @Override BaseUserRoleGroupImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseUserRoleGroupImportListener(), BaseUserRoleGroupImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseUserRoleGroup.class); + boolean bool = baseUserRoleGroupService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseUserRoleGroupImportRes().setCount(c); + } + + public @Override BaseUserRoleGroupQueryByIdListRes queryByIdListRes(BaseUserRoleGroupQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseUserRoleGroup.class) + .selectAll(BaseUserRoleGroup.class).in(BaseUserRoleGroup::getId, req.getIdList()); + List list = this.baseUserRoleGroupService.list(q); + List dataList = $.copyList(list, BaseUserRoleGroupDto.class); + this.baseUserRoleGroupService.setName(dataList); + return new BaseUserRoleGroupQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseDeptImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseDeptImportListener.java new file mode 100644 index 0000000..e7b1345 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseDeptImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseDept; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseDept.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 部门表(BaseDept)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:33:31 + */ +public class BaseDeptImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseDeptImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java new file mode 100644 index 0000000..e7e3819 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseResource; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseResource.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 资源(BaseResource)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +public class BaseResourceImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseResourceImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleGroupImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleGroupImportListener.java new file mode 100644 index 0000000..e96d269 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleGroupImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseRoleGroup; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseRoleGroup.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 角色组表(BaseRoleGroup)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +public class BaseRoleGroupImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseRoleGroupImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleImportListener.java new file mode 100644 index 0000000..9bc9268 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseRole; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseRole.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 角色表(BaseRole)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +public class BaseRoleImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseRoleImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleResourceImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleResourceImportListener.java new file mode 100644 index 0000000..c307070 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseRoleResourceImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseRoleResource; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseRoleResource.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 角色资源表(BaseRoleResource)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:35:11 + */ +public class BaseRoleResourceImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseRoleResourceImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserDeptImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserDeptImportListener.java new file mode 100644 index 0000000..85027dd --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserDeptImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseUserDept; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseUserDept.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 用户部门表(BaseUserDept)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +public class BaseUserDeptImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseUserDeptImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleGroupImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleGroupImportListener.java new file mode 100644 index 0000000..88e7ec3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleGroupImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseUserRoleGroup; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseUserRoleGroup.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 用户角色组表(BaseUserRoleGroup)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +public class BaseUserRoleGroupImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseUserRoleGroupImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleImportListener.java new file mode 100644 index 0000000..016330f --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseUserRoleImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseUserRole; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseUserRole.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 用户角色表(BaseUserRole)文件导入监听 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +public class BaseUserRoleImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseUserRoleImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseDeptMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseDeptMapper.java new file mode 100644 index 0000000..19e0bd8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseDeptMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseDept; +import org.apache.ibatis.annotations.Mapper; + +/** + * 部门表(BaseDept)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Mapper +public interface BaseDeptMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java new file mode 100644 index 0000000..5fba1da --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseResource; +import org.apache.ibatis.annotations.Mapper; + +/** + * 资源(BaseResource)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Mapper +public interface BaseResourceMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseRoleGroupMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseRoleGroupMapper.java new file mode 100644 index 0000000..c114de4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseRoleGroupMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseRoleGroup; +import org.apache.ibatis.annotations.Mapper; + +/** + * 角色组表(BaseRoleGroup)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Mapper +public interface BaseRoleGroupMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseRoleMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseRoleMapper.java new file mode 100644 index 0000000..62e5411 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseRoleMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseRole; +import org.apache.ibatis.annotations.Mapper; + +/** + * 角色表(BaseRole)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Mapper +public interface BaseRoleMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseRoleResourceMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseRoleResourceMapper.java new file mode 100644 index 0000000..7b9ea3c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseRoleResourceMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseRoleResource; +import org.apache.ibatis.annotations.Mapper; + +/** + * 角色资源表(BaseRoleResource)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:35:08 + */ +@Mapper +public interface BaseRoleResourceMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseUserDeptMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseUserDeptMapper.java new file mode 100644 index 0000000..dcd3667 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseUserDeptMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseUserDept; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户部门表(BaseUserDept)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Mapper +public interface BaseUserDeptMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleGroupMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleGroupMapper.java new file mode 100644 index 0000000..7f13b3e --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleGroupMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseUserRoleGroup; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户角色组表(BaseUserRoleGroup)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Mapper +public interface BaseUserRoleGroupMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleMapper.java new file mode 100644 index 0000000..43a51dd --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseUserRoleMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseUserRole; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户角色表(BaseUserRole)表数据库访问层 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Mapper +public interface BaseUserRoleMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseDept.java b/src/main/java/com/olivia/peanut/base/model/BaseDept.java new file mode 100644 index 0000000..8224e13 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseDept.java @@ -0,0 +1,43 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 部门表(BaseDept)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:30 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_dept") +public class BaseDept extends BaseEntity { + + /*** + * 部门编码 + */ + private String deptCode; + /*** + * 部门名称 + */ + private String deptName; + /*** + * 父部门ID + */ + private Long parentId; + /*** + * 部门路径 + */ + private String path; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseResource.java b/src/main/java/com/olivia/peanut/base/model/BaseResource.java new file mode 100644 index 0000000..aac8cd7 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseResource.java @@ -0,0 +1,59 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 资源(BaseResource)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_resource") +public class BaseResource extends BaseEntity { + + /*** + * 菜单编码 + */ + private String resourceCode; + /*** + * 菜单名称 + */ + private String resourceName; + /*** + * 菜单URL + */ + private String resourceUrl; + /*** + * 菜单图标 + */ + private String resourceIcon; + /*** + * 菜单类型 + */ + private String resourceType; + /*** + * 是否按钮 0 否,1 是 + */ + private Boolean isButton; + /*** + * 父菜单ID + */ + private Long parentId; + /*** + * 菜单路径 + */ + private String path; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseRole.java b/src/main/java/com/olivia/peanut/base/model/BaseRole.java new file mode 100644 index 0000000..b62682c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseRole.java @@ -0,0 +1,39 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 角色表(BaseRole)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_role") +public class BaseRole extends BaseEntity { + + /*** + * 角色编码 + */ + private String roleCode; + /*** + * 角色名称 + */ + private String roleName; + /*** + * 角色组 + */ + private Long roleGroupId; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseRoleGroup.java b/src/main/java/com/olivia/peanut/base/model/BaseRoleGroup.java new file mode 100644 index 0000000..d4d00fb --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseRoleGroup.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 角色组表(BaseRoleGroup)表实体类 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_role_group") +public class BaseRoleGroup extends BaseEntity { + + /*** + * 角色组编码 + */ + private String roleGroupCode; + /*** + * 角色组名称 + */ + private String roleGroupName; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseRoleResource.java b/src/main/java/com/olivia/peanut/base/model/BaseRoleResource.java new file mode 100644 index 0000000..c6074f3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseRoleResource.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 角色资源表(BaseRoleResource)表实体类 + * + * @author peanut + * @since 2024-07-31 14:35:05 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_role_resource") +public class BaseRoleResource extends BaseEntity { + + /*** + * 角色ID + */ + private Long roleId; + /*** + * 菜单ID + */ + private Long resourceId; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseUserDept.java b/src/main/java/com/olivia/peanut/base/model/BaseUserDept.java new file mode 100644 index 0000000..499a498 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseUserDept.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 用户部门表(BaseUserDept)表实体类 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_user_dept") +public class BaseUserDept extends BaseEntity { + + /*** + * 用户ID + */ + private Long userId; + /*** + * 部门ID + */ + private Long deptId; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseUserRole.java b/src/main/java/com/olivia/peanut/base/model/BaseUserRole.java new file mode 100644 index 0000000..c244c46 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseUserRole.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 用户角色表(BaseUserRole)表实体类 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_user_role") +public class BaseUserRole extends BaseEntity { + + /*** + * 用户ID + */ + private Long userId; + /*** + * 角色ID + */ + private Long roleId; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseUserRoleGroup.java b/src/main/java/com/olivia/peanut/base/model/BaseUserRoleGroup.java new file mode 100644 index 0000000..a97560d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseUserRoleGroup.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 用户角色组表(BaseUserRoleGroup)表实体类 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_user_role_group") +public class BaseUserRoleGroup extends BaseEntity { + + /*** + * 用户ID + */ + private Long userId; + /*** + * 角色组ID + */ + private Long roleGroupId; + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseDeptService.java b/src/main/java/com/olivia/peanut/base/service/BaseDeptService.java new file mode 100644 index 0000000..1d76de3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseDeptService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseDept; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseDept.*; + +/** + * 部门表(BaseDept)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:33:31 + */ +public interface BaseDeptService extends MPJBaseService { + + BaseDeptQueryListRes queryList(BaseDeptQueryListReq req); + + DynamicsPage queryPageList(BaseDeptExportQueryPageListReq req); + + + void setName(List baseDeptDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java b/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java new file mode 100644 index 0000000..b57370d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseResource; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseResource.*; + +/** + * 资源(BaseResource)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +public interface BaseResourceService extends MPJBaseService { + + BaseResourceQueryListRes queryList(BaseResourceQueryListReq req); + + DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req); + + + void setName(List baseResourceDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseRoleGroupService.java b/src/main/java/com/olivia/peanut/base/service/BaseRoleGroupService.java new file mode 100644 index 0000000..65741f8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseRoleGroupService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseRoleGroup; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseRoleGroup.*; + +/** + * 角色组表(BaseRoleGroup)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +public interface BaseRoleGroupService extends MPJBaseService { + + BaseRoleGroupQueryListRes queryList(BaseRoleGroupQueryListReq req); + + DynamicsPage queryPageList(BaseRoleGroupExportQueryPageListReq req); + + + void setName(List baseRoleGroupDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseRoleResourceService.java b/src/main/java/com/olivia/peanut/base/service/BaseRoleResourceService.java new file mode 100644 index 0000000..03a09d6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseRoleResourceService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseRoleResource; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseRoleResource.*; + +/** + * 角色资源表(BaseRoleResource)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:35:10 + */ +public interface BaseRoleResourceService extends MPJBaseService { + + BaseRoleResourceQueryListRes queryList(BaseRoleResourceQueryListReq req); + + DynamicsPage queryPageList(BaseRoleResourceExportQueryPageListReq req); + + + void setName(List baseRoleResourceDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseRoleService.java b/src/main/java/com/olivia/peanut/base/service/BaseRoleService.java new file mode 100644 index 0000000..f6b9d4e --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseRoleService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseRole; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseRole.*; + +/** + * 角色表(BaseRole)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +public interface BaseRoleService extends MPJBaseService { + + BaseRoleQueryListRes queryList(BaseRoleQueryListReq req); + + DynamicsPage queryPageList(BaseRoleExportQueryPageListReq req); + + + void setName(List baseRoleDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseUserDeptService.java b/src/main/java/com/olivia/peanut/base/service/BaseUserDeptService.java new file mode 100644 index 0000000..6d11d97 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseUserDeptService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseUserDept; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseUserDept.*; + +/** + * 用户部门表(BaseUserDept)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +public interface BaseUserDeptService extends MPJBaseService { + + BaseUserDeptQueryListRes queryList(BaseUserDeptQueryListReq req); + + DynamicsPage queryPageList(BaseUserDeptExportQueryPageListReq req); + + + void setName(List baseUserDeptDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseUserRoleGroupService.java b/src/main/java/com/olivia/peanut/base/service/BaseUserRoleGroupService.java new file mode 100644 index 0000000..25b7ea5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseUserRoleGroupService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseUserRoleGroup; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseUserRoleGroup.*; + +/** + * 用户角色组表(BaseUserRoleGroup)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +public interface BaseUserRoleGroupService extends MPJBaseService { + + BaseUserRoleGroupQueryListRes queryList(BaseUserRoleGroupQueryListReq req); + + DynamicsPage queryPageList(BaseUserRoleGroupExportQueryPageListReq req); + + + void setName(List baseUserRoleGroupDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseUserRoleService.java b/src/main/java/com/olivia/peanut/base/service/BaseUserRoleService.java new file mode 100644 index 0000000..f5944cd --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseUserRoleService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseUserRole; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseUserRole.*; + +/** + * 用户角色表(BaseUserRole)表服务接口 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +public interface BaseUserRoleService extends MPJBaseService { + + BaseUserRoleQueryListRes queryList(BaseUserRoleQueryListReq req); + + DynamicsPage queryPageList(BaseUserRoleExportQueryPageListReq req); + + + void setName(List baseUserRoleDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseDeptServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseDeptServiceImpl.java new file mode 100644 index 0000000..08271d1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseDeptServiceImpl.java @@ -0,0 +1,116 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseDeptMapper; +import com.olivia.peanut.base.model.BaseDept; +import com.olivia.peanut.base.service.BaseDeptService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseDept.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 部门表(BaseDept)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:31 + */ +@Service("baseDeptService") +@Transactional +public class BaseDeptServiceImpl extends MPJBaseServiceImpl implements BaseDeptService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseDeptQueryListRes queryList(BaseDeptQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseDeptDto.class)).collect(Collectors.toList()); + ((BaseDeptService) AopContext.currentProxy()).setName(dataList); + return new BaseDeptQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseDeptExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseDeptExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseDeptExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseDeptExportQueryPageListInfoRes.class); + ((BaseDeptService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseDeptDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getDeptCode()), BaseDept::getDeptCode, obj.getDeptCode()) + .eq(StringUtils.isNoneBlank(obj.getDeptName()), BaseDept::getDeptName, obj.getDeptName()) + .eq(Objects.nonNull(obj.getParentId()), BaseDept::getParentId, obj.getParentId()) + .eq(StringUtils.isNoneBlank(obj.getPath()), BaseDept::getPath, obj.getPath()) + + ; + } + q.orderByDesc(BaseDept::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseDeptService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java new file mode 100644 index 0000000..6ee5173 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java @@ -0,0 +1,120 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseResourceMapper; +import com.olivia.peanut.base.model.BaseResource; +import com.olivia.peanut.base.service.BaseResourceService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseResource.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 资源(BaseResource)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:33 + */ +@Service("baseResourceService") +@Transactional +public class BaseResourceServiceImpl extends MPJBaseServiceImpl implements BaseResourceService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseResourceQueryListRes queryList(BaseResourceQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseResourceDto.class)).collect(Collectors.toList()); + ((BaseResourceService) AopContext.currentProxy()).setName(dataList); + return new BaseResourceQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseResourceExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseResourceExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseResourceExportQueryPageListInfoRes.class); + ((BaseResourceService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseResourceDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getResourceCode()), BaseResource::getResourceCode, obj.getResourceCode()) + .eq(StringUtils.isNoneBlank(obj.getResourceName()), BaseResource::getResourceName, obj.getResourceName()) + .eq(StringUtils.isNoneBlank(obj.getResourceUrl()), BaseResource::getResourceUrl, obj.getResourceUrl()) + .eq(StringUtils.isNoneBlank(obj.getResourceIcon()), BaseResource::getResourceIcon, obj.getResourceIcon()) + .eq(StringUtils.isNoneBlank(obj.getResourceType()), BaseResource::getResourceType, obj.getResourceType()) + .eq(Objects.nonNull(obj.getIsButton()), BaseResource::getIsButton, obj.getIsButton()) + .eq(Objects.nonNull(obj.getParentId()), BaseResource::getParentId, obj.getParentId()) + .eq(StringUtils.isNoneBlank(obj.getPath()), BaseResource::getPath, obj.getPath()) + + ; + } + q.orderByDesc(BaseResource::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseResourceService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleGroupServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleGroupServiceImpl.java new file mode 100644 index 0000000..90ca34b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleGroupServiceImpl.java @@ -0,0 +1,114 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseRoleGroupMapper; +import com.olivia.peanut.base.model.BaseRoleGroup; +import com.olivia.peanut.base.service.BaseRoleGroupService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseRoleGroup.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 角色组表(BaseRoleGroup)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:36 + */ +@Service("baseRoleGroupService") +@Transactional +public class BaseRoleGroupServiceImpl extends MPJBaseServiceImpl implements BaseRoleGroupService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseRoleGroupQueryListRes queryList(BaseRoleGroupQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseRoleGroupDto.class)).collect(Collectors.toList()); + ((BaseRoleGroupService) AopContext.currentProxy()).setName(dataList); + return new BaseRoleGroupQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseRoleGroupExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseRoleGroupExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseRoleGroupExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseRoleGroupExportQueryPageListInfoRes.class); + ((BaseRoleGroupService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseRoleGroupDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getRoleGroupCode()), BaseRoleGroup::getRoleGroupCode, obj.getRoleGroupCode()) + .eq(StringUtils.isNoneBlank(obj.getRoleGroupName()), BaseRoleGroup::getRoleGroupName, obj.getRoleGroupName()) + + ; + } + q.orderByDesc(BaseRoleGroup::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseRoleGroupService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleResourceServiceImpl.java new file mode 100644 index 0000000..a583161 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleResourceServiceImpl.java @@ -0,0 +1,114 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseRoleResourceMapper; +import com.olivia.peanut.base.model.BaseRoleResource; +import com.olivia.peanut.base.service.BaseRoleResourceService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseRoleResource.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 角色资源表(BaseRoleResource)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:35:10 + */ +@Service("baseRoleResourceService") +@Transactional +public class BaseRoleResourceServiceImpl extends MPJBaseServiceImpl implements BaseRoleResourceService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseRoleResourceQueryListRes queryList(BaseRoleResourceQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseRoleResourceDto.class)).collect(Collectors.toList()); + ((BaseRoleResourceService) AopContext.currentProxy()).setName(dataList); + return new BaseRoleResourceQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseRoleResourceExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseRoleResourceExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseRoleResourceExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseRoleResourceExportQueryPageListInfoRes.class); + ((BaseRoleResourceService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseRoleResourceDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(Objects.nonNull(obj.getRoleId()), BaseRoleResource::getRoleId, obj.getRoleId()) + .eq(Objects.nonNull(obj.getResourceId()), BaseRoleResource::getResourceId, obj.getResourceId()) + + ; + } + q.orderByDesc(BaseRoleResource::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseRoleResourceService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleServiceImpl.java new file mode 100644 index 0000000..7df60af --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseRoleServiceImpl.java @@ -0,0 +1,118 @@ +package com.olivia.peanut.base.service.impl; + +import com.olivia.peanut.base.service.BaseRoleGroupService; +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseRoleMapper; +import com.olivia.peanut.base.model.BaseRole; +import com.olivia.peanut.base.service.BaseRoleService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseRole.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 角色表(BaseRole)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:33:35 + */ +@Service("baseRoleService") +@Transactional +public class BaseRoleServiceImpl extends MPJBaseServiceImpl implements BaseRoleService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseRoleQueryListRes queryList(BaseRoleQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseRoleDto.class)).collect(Collectors.toList()); + ((BaseRoleService) AopContext.currentProxy()).setName(dataList); + return new BaseRoleQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseRoleExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseRoleExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseRoleExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseRoleExportQueryPageListInfoRes.class); + ((BaseRoleService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + setNameService.setName(list, SetNamePojoUtils.getSetNamePojo(BaseRoleGroupService.class, + "roleGroupName","roleGroupId","roleGroupName")); + + + } + + + private MPJLambdaWrapper getWrapper(BaseRoleDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getRoleCode()), BaseRole::getRoleCode, obj.getRoleCode()) + .eq(StringUtils.isNoneBlank(obj.getRoleName()), BaseRole::getRoleName, obj.getRoleName()) + .eq(Objects.nonNull(obj.getRoleGroupId()), BaseRole::getRoleGroupId, obj.getRoleGroupId()) + + ; + } + q.orderByDesc(BaseRole::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseRoleService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseUserDeptServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseUserDeptServiceImpl.java new file mode 100644 index 0000000..9f77ceb --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseUserDeptServiceImpl.java @@ -0,0 +1,114 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseUserDeptMapper; +import com.olivia.peanut.base.model.BaseUserDept; +import com.olivia.peanut.base.service.BaseUserDeptService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseUserDept.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 用户部门表(BaseUserDept)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:36:01 + */ +@Service("baseUserDeptService") +@Transactional +public class BaseUserDeptServiceImpl extends MPJBaseServiceImpl implements BaseUserDeptService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseUserDeptQueryListRes queryList(BaseUserDeptQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseUserDeptDto.class)).collect(Collectors.toList()); + ((BaseUserDeptService) AopContext.currentProxy()).setName(dataList); + return new BaseUserDeptQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseUserDeptExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseUserDeptExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseUserDeptExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseUserDeptExportQueryPageListInfoRes.class); + ((BaseUserDeptService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseUserDeptDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(Objects.nonNull(obj.getUserId()), BaseUserDept::getUserId, obj.getUserId()) + .eq(Objects.nonNull(obj.getDeptId()), BaseUserDept::getDeptId, obj.getDeptId()) + + ; + } + q.orderByDesc(BaseUserDept::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseUserDeptService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleGroupServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleGroupServiceImpl.java new file mode 100644 index 0000000..d32e4cc --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleGroupServiceImpl.java @@ -0,0 +1,114 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseUserRoleGroupMapper; +import com.olivia.peanut.base.model.BaseUserRoleGroup; +import com.olivia.peanut.base.service.BaseUserRoleGroupService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseUserRoleGroup.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 用户角色组表(BaseUserRoleGroup)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:36:04 + */ +@Service("baseUserRoleGroupService") +@Transactional +public class BaseUserRoleGroupServiceImpl extends MPJBaseServiceImpl implements BaseUserRoleGroupService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseUserRoleGroupQueryListRes queryList(BaseUserRoleGroupQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseUserRoleGroupDto.class)).collect(Collectors.toList()); + ((BaseUserRoleGroupService) AopContext.currentProxy()).setName(dataList); + return new BaseUserRoleGroupQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseUserRoleGroupExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseUserRoleGroupExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseUserRoleGroupExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseUserRoleGroupExportQueryPageListInfoRes.class); + ((BaseUserRoleGroupService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseUserRoleGroupDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(Objects.nonNull(obj.getUserId()), BaseUserRoleGroup::getUserId, obj.getUserId()) + .eq(Objects.nonNull(obj.getRoleGroupId()), BaseUserRoleGroup::getRoleGroupId, obj.getRoleGroupId()) + + ; + } + q.orderByDesc(BaseUserRoleGroup::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseUserRoleGroupService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleServiceImpl.java new file mode 100644 index 0000000..bf5e373 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseUserRoleServiceImpl.java @@ -0,0 +1,114 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseUserRoleMapper; +import com.olivia.peanut.base.model.BaseUserRole; +import com.olivia.peanut.base.service.BaseUserRoleService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseUserRole.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 用户角色表(BaseUserRole)表服务实现类 + * + * @author peanut + * @since 2024-07-31 14:36:03 + */ +@Service("baseUserRoleService") +@Transactional +public class BaseUserRoleServiceImpl extends MPJBaseServiceImpl implements BaseUserRoleService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseUserRoleQueryListRes queryList(BaseUserRoleQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseUserRoleDto.class)).collect(Collectors.toList()); + ((BaseUserRoleService) AopContext.currentProxy()).setName(dataList); + return new BaseUserRoleQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseUserRoleExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseUserRoleExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseUserRoleExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseUserRoleExportQueryPageListInfoRes.class); + ((BaseUserRoleService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseUserRoleDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(Objects.nonNull(obj.getUserId()), BaseUserRole::getUserId, obj.getUserId()) + .eq(Objects.nonNull(obj.getRoleId()), BaseUserRole::getRoleId, obj.getRoleId()) + + ; + } + q.orderByDesc(BaseUserRole::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseUserRoleService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue b/src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue new file mode 100644 index 0000000..709cf2e --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue @@ -0,0 +1,226 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue b/src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue new file mode 100644 index 0000000..aaab01e --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue @@ -0,0 +1,258 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue b/src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue new file mode 100644 index 0000000..f874ede --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue @@ -0,0 +1,218 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue b/src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue new file mode 100644 index 0000000..4cb1e27 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue b/src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue new file mode 100644 index 0000000..4d5c452 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue b/src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue new file mode 100644 index 0000000..42df707 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue b/src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue new file mode 100644 index 0000000..cdbc893 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue b/src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue new file mode 100644 index 0000000..682ee20 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/main/java/com/olivia/peanut/portal/model/LoginAccount.java b/src/main/java/com/olivia/peanut/portal/model/LoginAccount.java index 7e2a6ad..741eaee 100644 --- a/src/main/java/com/olivia/peanut/portal/model/LoginAccount.java +++ b/src/main/java/com/olivia/peanut/portal/model/LoginAccount.java @@ -18,4 +18,10 @@ public class LoginAccount extends BaseEntity { private String userName; private String loginPhone; private String userPwd; + + private Boolean isAdmin; + + public boolean isAdmin() { + return Boolean.TRUE.equals(isAdmin); + } } -- Gitee From 3515da292c1b6af6c795791947045036c7e0cb6a Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 31 Jul 2024 16:12:20 +0800 Subject: [PATCH 03/27] =?UTF-8?q?feat(role):=20=E7=94=A8=E6=88=B7=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/portal/api/LoginAccountApi.java | 2 +- .../entity/login/account/GetUserInfoRes.java | 6 +-- .../entity/login/account/LoginAccountDto.java | 23 +++++++++ .../portal/api/impl/LoginAccountApiImpl.java | 48 ++++++++++++++++++- 4 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java diff --git a/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java b/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java index 4b250dc..d901623 100644 --- a/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java +++ b/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java @@ -22,7 +22,7 @@ public interface LoginAccountApi { GetUserInfoRes getUserInfo(@RequestBody GetUserInfoReq req, @RequestHeader("j-token") String token); @RequestMapping("/loginAccount/queryPageList") - DynamicsPage queryPageList(@RequestBody QueryPageListReq req); + DynamicsPage queryPageList(@RequestBody QueryPageListReq req); @PostMapping("/loginAccount/resetPwd") ResetPwdRes resetPwd(@RequestBody ResetPwdReq req); diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/GetUserInfoRes.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/GetUserInfoRes.java index f696d30..3f356eb 100644 --- a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/GetUserInfoRes.java +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/GetUserInfoRes.java @@ -10,10 +10,6 @@ import lombok.experimental.Accessors; @Setter @Getter @Accessors(chain = true) -public class GetUserInfoRes { +public class GetUserInfoRes extends LoginAccountDto { - private Long id; - private String userName; - private Long tenantId = 1001L; - private String loginPhone; } diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java new file mode 100644 index 0000000..608a626 --- /dev/null +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java @@ -0,0 +1,23 @@ +package com.olivia.peanut.portal.api.entity.login.account; + +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class LoginAccountDto extends BaseEntityDto { + + private String userName; + private Long tenantId; + private String loginPhone; + + private String baseRoleName; + + private String baseRoleGroupName; +} diff --git a/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java b/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java index 620c6f8..8dc72a2 100644 --- a/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java +++ b/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java @@ -2,6 +2,7 @@ package com.olivia.peanut.portal.api.impl; import static java.lang.Boolean.TRUE; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.crypto.digest.MD5; import com.alibaba.fastjson2.JSON; @@ -10,7 +11,16 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.olivia.peanut.base.model.BaseRole; +import com.olivia.peanut.base.model.BaseRoleGroup; +import com.olivia.peanut.base.model.BaseUserRole; +import com.olivia.peanut.base.model.BaseUserRoleGroup; +import com.olivia.peanut.base.service.BaseRoleGroupService; +import com.olivia.peanut.base.service.BaseRoleService; +import com.olivia.peanut.base.service.BaseUserRoleGroupService; +import com.olivia.peanut.base.service.BaseUserRoleService; import com.olivia.peanut.portal.api.LoginAccountApi; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; import com.olivia.peanut.portal.api.entity.login.account.*; import com.olivia.peanut.portal.model.LoginAccount; import com.olivia.peanut.portal.service.LoginAccountService; @@ -21,8 +31,11 @@ import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.BaseEntity; import com.olivia.sdk.utils.DynamicsPage; import jakarta.annotation.Resource; +import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; import lombok.extern.slf4j.Slf4j; import org.redisson.api.RLock; import org.redisson.api.RedissonClient; @@ -42,6 +55,14 @@ public class LoginAccountApiImpl implements LoginAccountApi { @Resource StringRedisTemplate stringRedisTemplate; @Resource + BaseUserRoleService baseUserRoleService; + @Resource + BaseUserRoleGroupService baseUserRoleGroupService; + @Resource + BaseRoleService baseRoleService; + @Resource + BaseRoleGroupService baseRoleGroupService; + @Resource private LoginAccountService loginAccountService; @Resource private RedissonClient redissonClient; @@ -80,7 +101,7 @@ public class LoginAccountApiImpl implements LoginAccountApi { } @Override - public DynamicsPage queryPageList(QueryPageListReq req) { + public DynamicsPage queryPageList(QueryPageListReq req) { LoginUserContext.ignoreTenantId(); LambdaQueryWrapper query = Wrappers.lambdaQuery(); @@ -91,7 +112,30 @@ public class LoginAccountApiImpl implements LoginAccountApi { query.likeRight(StringUtils.isNotBlank(data.getUserName()), LoginAccount::getUserName, data.getUserName()); } Page page = this.loginAccountService.page(new Page<>(req.getPageNum(), req.getPageSize()), query.orderByDesc(BaseEntity::getId)); - return DynamicsPage.init(page); + + List result = $.copyList(page.getRecords(), LoginAccountDto.class); + if (CollUtil.isNotEmpty(result)) { + Map gnMap = this.baseRoleGroupService.list().stream().collect(Collectors.toMap(BaseEntity::getId, BaseRoleGroup::getRoleGroupName)); + Map rnMap = this.baseRoleService.list().stream().collect(Collectors.toMap(BaseEntity::getId, BaseRole::getRoleName)); + + List userIdList = result.stream().map(BaseEntityDto::getId).toList(); + List userRoleGroupList = baseUserRoleGroupService.list(new LambdaQueryWrapper().in(BaseUserRoleGroup::getUserId, userIdList)); + Map> userRoleGroupIdMap = userRoleGroupList.stream().collect(Collectors.groupingBy(BaseUserRoleGroup::getUserId, + Collectors.collectingAndThen(Collectors.toList(), + list -> list.stream().map(BaseUserRoleGroup::getRoleGroupId).collect(Collectors.toList())))); + + Map> userRoleMap = this.baseUserRoleService.list(new LambdaQueryWrapper().in(BaseUserRole::getUserId, userIdList)) + .stream().collect(Collectors.groupingBy(BaseUserRole::getUserId, Collectors.collectingAndThen(Collectors.toList(), + list -> list.stream().map(BaseUserRole::getRoleId).toList()))); + + result.forEach(t -> { + t.setBaseRoleGroupName(userRoleGroupIdMap.getOrDefault(t.getId(), List.of()).stream().map(gnMap::get).distinct().sorted().collect(Collectors.joining(","))); + t.setBaseRoleName(userRoleMap.getOrDefault(t.getId(), List.of()).stream().map(rnMap::get).distinct().sorted().collect(Collectors.joining(","))); + }); + } + DynamicsPage ret = new DynamicsPage<>(); + ret.setTotal(page.getTotal()).setRecords(result); + return ret; } @Override -- Gitee From 0f12a8db27bbe5f4a7c7c6f2d227d7fdb4420e3e Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 31 Jul 2024 16:59:04 +0800 Subject: [PATCH 04/27] =?UTF-8?q?feat(role):=20=E7=94=A8=E6=88=B7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/portal/api/LoginAccountApi.java | 3 ++ .../entity/login/account/LoginAccountDto.java | 3 ++ .../entity/login/account/UpdateRoleReq.java | 24 ++++++++++++ .../entity/login/account/UpdateRoleRes.java | 15 ++++++++ .../portal/api/impl/LoginAccountApiImpl.java | 37 ++++++++++++++----- 5 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleReq.java create mode 100644 src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleRes.java diff --git a/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java b/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java index d901623..dd838cb 100644 --- a/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java +++ b/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java @@ -29,4 +29,7 @@ public interface LoginAccountApi { @PostMapping("/loginAccount/insert") InsertRes insert(@RequestBody InsertReq req); + + @PostMapping("/loginAccount/updateRole") + UpdateRoleRes updateRole(@RequestBody UpdateRoleReq req); } diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java index 608a626..5f1096e 100644 --- a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java @@ -1,6 +1,7 @@ package com.olivia.peanut.portal.api.entity.login.account; import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import java.util.List; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; @@ -18,6 +19,8 @@ public class LoginAccountDto extends BaseEntityDto { private String loginPhone; private String baseRoleName; + private List baseRoleGroupIds; private String baseRoleGroupName; + private List baseRoleIds; } diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleReq.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleReq.java new file mode 100644 index 0000000..e5426ba --- /dev/null +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleReq.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.portal.api.entity.login.account; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class UpdateRoleReq { + + @NotNull(message = "userId不能为空") + private Long userId; + @JsonProperty("roleGroupIds") + private List roleGroupIds; + @JsonProperty("roleIds") + private List roleIds; +} diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleRes.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleRes.java new file mode 100644 index 0000000..79befd6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateRoleRes.java @@ -0,0 +1,15 @@ +package com.olivia.peanut.portal.api.entity.login.account; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class UpdateRoleRes { + +} diff --git a/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java b/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java index 8dc72a2..1950b64 100644 --- a/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java +++ b/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java @@ -40,6 +40,7 @@ import lombok.extern.slf4j.Slf4j; import org.redisson.api.RLock; import org.redisson.api.RedissonClient; import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RestController; /*** @@ -75,8 +76,8 @@ public class LoginAccountApiImpl implements LoginAccountApi { RLock lock = redissonClient.getLock(peanutProperties.getRedisKey().getLoginLock() + req.getLoginPhone()); lock.lock(3, TimeUnit.SECONDS); - LoginAccount loginAccount = this.loginAccountService.getOne(new LambdaQueryWrapper() - .eq(LoginAccount::getLoginPhone, req.getLoginPhone()).eq(LoginAccount::getUserPwd, req.getPwd()), false); + LoginAccount loginAccount = this.loginAccountService.getOne( + new LambdaQueryWrapper().eq(LoginAccount::getLoginPhone, req.getLoginPhone()).eq(LoginAccount::getUserPwd, req.getPwd()), false); $.requireNonNullCanIgnoreException(loginAccount, "用户名密码错误"); loginAccount.setUserPwd(null); String token = String.join("_", IdWorker.get32UUID().toUpperCase()); @@ -121,16 +122,19 @@ public class LoginAccountApiImpl implements LoginAccountApi { List userIdList = result.stream().map(BaseEntityDto::getId).toList(); List userRoleGroupList = baseUserRoleGroupService.list(new LambdaQueryWrapper().in(BaseUserRoleGroup::getUserId, userIdList)); Map> userRoleGroupIdMap = userRoleGroupList.stream().collect(Collectors.groupingBy(BaseUserRoleGroup::getUserId, - Collectors.collectingAndThen(Collectors.toList(), - list -> list.stream().map(BaseUserRoleGroup::getRoleGroupId).collect(Collectors.toList())))); + Collectors.collectingAndThen(Collectors.toList(), list -> list.stream().map(BaseUserRoleGroup::getRoleGroupId).collect(Collectors.toList())))); - Map> userRoleMap = this.baseUserRoleService.list(new LambdaQueryWrapper().in(BaseUserRole::getUserId, userIdList)) - .stream().collect(Collectors.groupingBy(BaseUserRole::getUserId, Collectors.collectingAndThen(Collectors.toList(), - list -> list.stream().map(BaseUserRole::getRoleId).toList()))); + Map> userRoleMap = this.baseUserRoleService.list(new LambdaQueryWrapper().in(BaseUserRole::getUserId, userIdList)).stream().collect( + Collectors.groupingBy(BaseUserRole::getUserId, + Collectors.collectingAndThen(Collectors.toList(), list -> list.stream().map(BaseUserRole::getRoleId).toList()))); result.forEach(t -> { - t.setBaseRoleGroupName(userRoleGroupIdMap.getOrDefault(t.getId(), List.of()).stream().map(gnMap::get).distinct().sorted().collect(Collectors.joining(","))); - t.setBaseRoleName(userRoleMap.getOrDefault(t.getId(), List.of()).stream().map(rnMap::get).distinct().sorted().collect(Collectors.joining(","))); + List userGroupIdList = userRoleGroupIdMap.getOrDefault(t.getId(), List.of()); + t.setBaseRoleGroupName(userGroupIdList.stream().map(gnMap::get).distinct().sorted().collect(Collectors.joining(","))); + t.setBaseRoleGroupIds(userGroupIdList); + List userRoleIdList = userRoleMap.getOrDefault(t.getId(), List.of()); + t.setBaseRoleName(userRoleIdList.stream().map(rnMap::get).distinct().sorted().collect(Collectors.joining(","))); + t.setBaseRoleIds(userRoleIdList); }); } DynamicsPage ret = new DynamicsPage<>(); @@ -158,4 +162,19 @@ public class LoginAccountApiImpl implements LoginAccountApi { this.loginAccountService.save(copy); return new InsertRes().setId(copy.getId()); } + + @Override + @Transactional + public UpdateRoleRes updateRole(UpdateRoleReq req) { + this.baseUserRoleService.remove(new LambdaQueryWrapper().eq(BaseUserRole::getUserId, req.getUserId())); + this.baseUserRoleGroupService.remove(new LambdaQueryWrapper().eq(BaseUserRoleGroup::getUserId, req.getUserId())); + if (CollUtil.isNotEmpty(req.getRoleGroupIds())) { + this.baseUserRoleGroupService.saveBatch(req.getRoleGroupIds().stream().map(t -> new BaseUserRoleGroup().setUserId(req.getUserId()).setRoleGroupId(t)).toList()); + } + if (CollUtil.isNotEmpty(req.getRoleIds())) { + this.baseUserRoleService.saveBatch(req.getRoleIds().stream().map(t -> new BaseUserRole().setUserId(req.getUserId()).setRoleId(t)).toList()); + } + + return new UpdateRoleRes(); + } } -- Gitee From cc24b7593b1f2a5e5b9d26a6d5acf91321e53736 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 31 Jul 2024 17:44:09 +0800 Subject: [PATCH 05/27] =?UTF-8?q?feat(role):=20=E7=94=A8=E6=88=B7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/portal/api/LoginAccountApi.java | 3 ++ .../entity/login/account/LoginAccountDto.java | 4 ++ .../entity/login/account/UpdateDeptReq.java | 21 ++++++++++ .../entity/login/account/UpdateDeptRes.java | 15 +++++++ .../portal/api/impl/LoginAccountApiImpl.java | 42 +++++++++++++------ 5 files changed, 73 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptReq.java create mode 100644 src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptRes.java diff --git a/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java b/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java index dd838cb..fa34cbe 100644 --- a/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java +++ b/src/main/java/com/olivia/peanut/portal/api/LoginAccountApi.java @@ -32,4 +32,7 @@ public interface LoginAccountApi { @PostMapping("/loginAccount/updateRole") UpdateRoleRes updateRole(@RequestBody UpdateRoleReq req); + // updateDept + @PostMapping("/loginAccount/updateDept") + UpdateDeptRes updateDept(@RequestBody UpdateDeptReq req); } diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java index 5f1096e..2e90fe3 100644 --- a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/LoginAccountDto.java @@ -23,4 +23,8 @@ public class LoginAccountDto extends BaseEntityDto { private String baseRoleGroupName; private List baseRoleIds; + private String deptName; + + private List deptIds; + ; } diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptReq.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptReq.java new file mode 100644 index 0000000..aaeea9e --- /dev/null +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptReq.java @@ -0,0 +1,21 @@ +package com.olivia.peanut.portal.api.entity.login.account; + +import jakarta.validation.constraints.NotNull; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class UpdateDeptReq { + + @NotNull(message = "userId不能为空") + private Long userId; + private List deptList; + +} diff --git a/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptRes.java b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptRes.java new file mode 100644 index 0000000..e311946 --- /dev/null +++ b/src/main/java/com/olivia/peanut/portal/api/entity/login/account/UpdateDeptRes.java @@ -0,0 +1,15 @@ +package com.olivia.peanut.portal.api.entity.login.account; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class UpdateDeptRes { + +} diff --git a/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java b/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java index 1950b64..901dbbb 100644 --- a/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java +++ b/src/main/java/com/olivia/peanut/portal/api/impl/LoginAccountApiImpl.java @@ -11,14 +11,8 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.olivia.peanut.base.model.BaseRole; -import com.olivia.peanut.base.model.BaseRoleGroup; -import com.olivia.peanut.base.model.BaseUserRole; -import com.olivia.peanut.base.model.BaseUserRoleGroup; -import com.olivia.peanut.base.service.BaseRoleGroupService; -import com.olivia.peanut.base.service.BaseRoleService; -import com.olivia.peanut.base.service.BaseUserRoleGroupService; -import com.olivia.peanut.base.service.BaseUserRoleService; +import com.olivia.peanut.base.model.*; +import com.olivia.peanut.base.service.*; import com.olivia.peanut.portal.api.LoginAccountApi; import com.olivia.peanut.portal.api.entity.BaseEntityDto; import com.olivia.peanut.portal.api.entity.login.account.*; @@ -64,6 +58,10 @@ public class LoginAccountApiImpl implements LoginAccountApi { @Resource BaseRoleGroupService baseRoleGroupService; @Resource + BaseUserDeptService baseUserDeptService; + @Resource + BaseDeptService deptService; + @Resource private LoginAccountService loginAccountService; @Resource private RedissonClient redissonClient; @@ -118,23 +116,34 @@ public class LoginAccountApiImpl implements LoginAccountApi { if (CollUtil.isNotEmpty(result)) { Map gnMap = this.baseRoleGroupService.list().stream().collect(Collectors.toMap(BaseEntity::getId, BaseRoleGroup::getRoleGroupName)); Map rnMap = this.baseRoleService.list().stream().collect(Collectors.toMap(BaseEntity::getId, BaseRole::getRoleName)); - + Map dnMap = deptService.list().stream().collect(Collectors.toMap(BaseEntity::getId, BaseDept::getDeptName)); List userIdList = result.stream().map(BaseEntityDto::getId).toList(); + Map> userDeptMap = this.baseUserDeptService.list(new LambdaQueryWrapper().in(BaseUserDept::getUserId, userIdList)).stream().collect( + Collectors.groupingBy(BaseUserDept::getUserId, + Collectors.collectingAndThen(Collectors.toList(), + list -> list.stream().map(BaseUserDept::getDeptId).toList()) + ) + ); + List userRoleGroupList = baseUserRoleGroupService.list(new LambdaQueryWrapper().in(BaseUserRoleGroup::getUserId, userIdList)); Map> userRoleGroupIdMap = userRoleGroupList.stream().collect(Collectors.groupingBy(BaseUserRoleGroup::getUserId, Collectors.collectingAndThen(Collectors.toList(), list -> list.stream().map(BaseUserRoleGroup::getRoleGroupId).collect(Collectors.toList())))); - Map> userRoleMap = this.baseUserRoleService.list(new LambdaQueryWrapper().in(BaseUserRole::getUserId, userIdList)).stream().collect( + Map> userRoleMap = this.baseUserRoleService.list(new LambdaQueryWrapper().in(BaseUserRole::getUserId, userIdList)) + .stream().collect( Collectors.groupingBy(BaseUserRole::getUserId, - Collectors.collectingAndThen(Collectors.toList(), list -> list.stream().map(BaseUserRole::getRoleId).toList()))); + Collectors.collectingAndThen(Collectors.toList(), + list -> list.stream().map(BaseUserRole::getRoleId).toList()))); result.forEach(t -> { List userGroupIdList = userRoleGroupIdMap.getOrDefault(t.getId(), List.of()); t.setBaseRoleGroupName(userGroupIdList.stream().map(gnMap::get).distinct().sorted().collect(Collectors.joining(","))); t.setBaseRoleGroupIds(userGroupIdList); List userRoleIdList = userRoleMap.getOrDefault(t.getId(), List.of()); - t.setBaseRoleName(userRoleIdList.stream().map(rnMap::get).distinct().sorted().collect(Collectors.joining(","))); + t.setBaseRoleName(userRoleIdList.stream().map(rnMap::get).filter(StringUtils::isNotBlank).distinct().sorted().collect(Collectors.joining(","))); t.setBaseRoleIds(userRoleIdList); + List deptIds = userDeptMap.getOrDefault(t.getId(), List.of()); + t.setDeptIds(deptIds).setDeptName(deptIds.stream().map(dnMap::get).filter(StringUtils::isNotBlank).distinct().sorted().collect(Collectors.joining(","))); }); } DynamicsPage ret = new DynamicsPage<>(); @@ -177,4 +186,13 @@ public class LoginAccountApiImpl implements LoginAccountApi { return new UpdateRoleRes(); } + + @Override + public UpdateDeptRes updateDept(UpdateDeptReq req) { + this.baseUserDeptService.remove(new LambdaQueryWrapper().eq(BaseUserDept::getUserId, req.getUserId())); + if (CollUtil.isNotEmpty(req.getDeptList())) { + this.baseUserDeptService.saveBatch(req.getDeptList().stream().map(t -> new BaseUserDept().setUserId(req.getUserId()).setDeptId(t)).toList()); + } + return new UpdateDeptRes(); + } } -- Gitee From b8827aa22366566ddb718b02f30421b2542ff319 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Thu, 1 Aug 2024 16:56:22 +0800 Subject: [PATCH 06/27] =?UTF-8?q?feat(flow):=20=E7=94=A8=E6=88=B7=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=20=E5=BE=85=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- sql/delete-flow.sql | 98 ++++++++++++++ sql/tmp.sql | 125 ++---------------- .../peanut/flow/api/FlowDefinitionApi.java | 76 +++++++++++ .../olivia/peanut/flow/api/FlowGroupApi.java | 76 +++++++++++ .../peanut/flow/api/FlowRepositoryApi.java | 23 ++++ .../peanut/flow/api/FlowUserService.java | 15 +++ .../flow/api/entity/DeploymentCreateReq.java | 22 +++ .../flow/api/entity/DeploymentCreateRes.java | 16 +++ .../peanut/flow/api/entity/FlowStr.java | 10 ++ .../flow/api/entity/FlowUserAssignee.java | 42 ++++++ .../peanut/flow/api/entity/StartReq.java | 18 +++ .../peanut/flow/api/entity/StartRes.java | 18 +++ .../peanut/flow/api/entity/TaskUndoneReq.java | 18 +++ .../peanut/flow/api/entity/TaskUndoneRes.java | 23 ++++ .../FlowDefinitionDeleteByIdListReq.java | 34 +++++ .../FlowDefinitionDeleteByIdListRes.java | 29 ++++ .../flowDefinition/FlowDefinitionDto.java | 39 ++++++ ...wDefinitionExportQueryPageListInfoRes.java | 27 ++++ .../FlowDefinitionExportQueryPageListReq.java | 34 +++++ .../FlowDefinitionImportReq.java | 31 +++++ .../FlowDefinitionImportRes.java | 31 +++++ .../FlowDefinitionInsertReq.java | 25 ++++ .../FlowDefinitionInsertRes.java | 29 ++++ .../FlowDefinitionQueryByIdListReq.java | 32 +++++ .../FlowDefinitionQueryByIdListRes.java | 31 +++++ .../FlowDefinitionQueryListReq.java | 26 ++++ .../FlowDefinitionQueryListRes.java | 31 +++++ .../FlowDefinitionUpdateByIdReq.java | 30 +++++ .../FlowDefinitionUpdateByIdRes.java | 24 ++++ .../flowGroup/FlowGroupDeleteByIdListReq.java | 34 +++++ .../flowGroup/FlowGroupDeleteByIdListRes.java | 29 ++++ .../api/entity/flowGroup/FlowGroupDto.java | 39 ++++++ .../FlowGroupExportQueryPageListInfoRes.java | 27 ++++ .../FlowGroupExportQueryPageListReq.java | 34 +++++ .../entity/flowGroup/FlowGroupImportReq.java | 31 +++++ .../entity/flowGroup/FlowGroupImportRes.java | 31 +++++ .../entity/flowGroup/FlowGroupInsertReq.java | 25 ++++ .../entity/flowGroup/FlowGroupInsertRes.java | 29 ++++ .../flowGroup/FlowGroupQueryByIdListReq.java | 32 +++++ .../flowGroup/FlowGroupQueryByIdListRes.java | 31 +++++ .../flowGroup/FlowGroupQueryListReq.java | 26 ++++ .../flowGroup/FlowGroupQueryListRes.java | 31 +++++ .../flowGroup/FlowGroupUpdateByIdReq.java | 30 +++++ .../flowGroup/FlowGroupUpdateByIdRes.java | 24 ++++ .../flow/api/impl/FlowDefinitionApiImpl.java | 104 +++++++++++++++ .../flow/api/impl/FlowGroupApiImpl.java | 104 +++++++++++++++ .../flow/api/impl/FlowRepositoryApiImpl.java | 86 ++++++++++++ .../flow/api/impl/FlowUserServiceImpl.java | 31 +++++ .../FlowDefinitionImportListener.java | 48 +++++++ .../listener/FlowGroupImportListener.java | 48 +++++++ .../execution/StartExecutionListener.java | 3 + .../task/CreateBeginTaskListener.java | 28 ++++ .../listener/task/CreateTaskListener.java | 18 --- .../flow/mapper/FlowDefinitionMapper.java | 18 +++ .../peanut/flow/mapper/FlowGroupMapper.java | 18 +++ .../peanut/flow/model/FlowDefinition.java | 37 ++++++ .../olivia/peanut/flow/model/FlowGroup.java | 35 +++++ .../flow/service/FlowDefinitionService.java | 26 ++++ .../peanut/flow/service/FlowGroupService.java | 26 ++++ .../impl/FlowDefinitionServiceImpl.java | 114 ++++++++++++++++ .../service/impl/FlowGroupServiceImpl.java | 122 +++++++++++++++++ src/main/resources/application.yml | 13 +- src/main/resources/flowable/qj.bpmn | 109 +++++++++++++++ 64 files changed, 2335 insertions(+), 141 deletions(-) create mode 100644 sql/delete-flow.sql create mode 100644 src/main/java/com/olivia/peanut/flow/api/FlowDefinitionApi.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/FlowGroupApi.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/FlowRepositoryApi.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/FlowUserService.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/FlowUserAssignee.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/StartReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDto.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/FlowDefinitionApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/FlowGroupApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/FlowRepositoryApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/FlowUserServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowDefinitionImportListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowGroupImportListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java delete mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/mapper/FlowDefinitionMapper.java create mode 100644 src/main/java/com/olivia/peanut/flow/mapper/FlowGroupMapper.java create mode 100644 src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java create mode 100644 src/main/java/com/olivia/peanut/flow/model/FlowGroup.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/FlowDefinitionService.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/FlowGroupService.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/impl/FlowDefinitionServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/impl/FlowGroupServiceImpl.java create mode 100644 src/main/resources/flowable/qj.bpmn diff --git a/.gitignore b/.gitignore index 983e002..f6356e7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ src/main/resources/application-bty.yml .idea/* *.iws *.iml -/src/main/java/com/olivia/peanut/aps/vue/* +/src/main/java/com/olivia/peanut/*/vue/* *.ipr diff --git a/sql/delete-flow.sql b/sql/delete-flow.sql new file mode 100644 index 0000000..1dbd962 --- /dev/null +++ b/sql/delete-flow.sql @@ -0,0 +1,98 @@ +drop table act_ge_property; + +drop table act_ge_schema_log; + +drop table act_hi_actinst; + +drop table act_hi_attachment; + +drop table act_hi_batch; + +drop table act_hi_caseactinst; + +drop table act_hi_caseinst; + +drop table act_hi_comment; + +drop table act_hi_dec_in; + +drop table act_hi_dec_out; + +drop table act_hi_decinst; + +drop table act_hi_detail; + +drop table act_hi_ext_task_log; + +drop table act_hi_identitylink; + +drop table act_hi_incident; + +drop table act_hi_job_log; + +drop table act_hi_op_log; + +drop table act_hi_procinst; + +drop table act_hi_taskinst; + +drop table act_hi_varinst; + +drop table act_id_info; + +drop table act_id_membership; + +drop table act_id_tenant_member; + +drop table act_id_group; + +drop table act_id_tenant; + +drop table act_id_user; + +drop table act_re_camformdef; + +drop table act_re_decision_def; + +drop table act_re_decision_req_def; + +drop table act_ru_authorization; + +drop table act_ru_case_sentry_part; + +drop table act_ru_event_subscr; + +drop table act_ru_ext_task; + +drop table act_ru_filter; + +drop table act_ru_identitylink; + +drop table act_ru_incident; + +drop table act_ru_job; + +drop table act_ru_meter_log; + +drop table act_ru_task; + +drop table act_ru_task_meter_log; + +drop table act_ru_variable; + +drop table act_ge_bytearray; + +drop table act_re_deployment; + +drop table act_ru_batch; + +drop table act_ru_case_execution; + +drop table act_re_case_def; + +drop table act_ru_execution; + +drop table act_re_procdef; + +drop table act_ru_jobdef; + diff --git a/sql/tmp.sql b/sql/tmp.sql index 7922ed5..24749e3 100644 --- a/sql/tmp.sql +++ b/sql/tmp.sql @@ -1,79 +1,10 @@ -alter table base_role_resource -add column tenant_id bigint null comment '租户ID'; - -create table if not exists base_role +create table if not exists flow_group ( id bigint auto_increment comment 'ID 自增' primary key, - role_code varchar(64) null comment '角色编码', - role_name varchar(64) null comment '角色名称', - role_group_id bigint null comment '角色组', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号' - -) comment '角色表'; - -create table if not exists base_role_group -( - id bigint auto_increment comment 'ID 自增' primary key, - role_group_code varchar(64) null comment '角色组编码', - role_group_name varchar(64) null comment '角色组名称', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号' -) - comment '角色组表'; - - -create table if not exists base_user_role -( - id bigint auto_increment comment 'ID 自增' primary key, - user_id bigint null comment '用户ID', - role_id bigint null comment '角色ID', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号', - key idx_user_id (user_id) -) comment '用户角色表'; - -create table if not exists base_user_role_group -( - id bigint auto_increment comment 'ID 自增' primary key, - user_id bigint null comment '用户ID', - role_group_id bigint null comment '角色组ID', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号', - key idx_user_id (user_id) -) comment '用户角色组表'; - - --- 部门 -create table if not exists base_dept -( - id bigint auto_increment comment 'ID 自增' primary key, - dept_code varchar(64) null comment '部门编码', - dept_name varchar(64) null comment '部门名称', - parent_id bigint null comment '父部门ID', - path varchar(512) null comment '部门路径', + flow_group_code varchar(64) null comment '工作流组编码', + flow_group_name varchar(64) null comment '工作流组名称', is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', create_by bigint null comment '创建人', @@ -81,40 +12,15 @@ create table if not exists base_dept update_by bigint null comment '修改人', trace_id varchar(64) null comment '调用链路', version_num int default 0 null comment '版本号' -) -comment '部门表'; - - -create table if not exists base_user_dept -( - id bigint auto_increment comment 'ID 自增' primary key, - user_id bigint null comment '用户ID', - dept_id bigint null comment '部门ID', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号', - key idx_user_id_dept_id (user_id, dept_id) -) comment '用户部门表'; - +) comment '工作流组表'; --- 菜单 -create table if not exists base_resource +create table if not exists flow_definition ( - id bigint auto_increment comment 'ID 自增' primary key, - resource_code varchar(64) null comment '菜单编码', - resource_name varchar(64) null comment '菜单名称', - resource_url varchar(512) null comment '菜单URL', - resource_icon varchar(64) null comment '菜单图标', - resource_type varchar(64) null comment '菜单类型', - is_button tinyint(1) default 0 null comment '是否按钮 0 否,1 是', - parent_id bigint null comment '父菜单ID', - path varchar(512) null comment '菜单路径', + id bigint auto_increment comment 'ID 自增' primary key, + flow_name varchar(64) null comment '工作流名称', + flow_group_id bigint null comment '工作流组ID', is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', create_by bigint null comment '创建人', @@ -122,18 +28,5 @@ create table if not exists base_resource update_by bigint null comment '修改人', trace_id varchar(64) null comment '调用链路', version_num int default 0 null comment '版本号' -) comment '资源'; -create table if not exists base_role_resource -( - id bigint auto_increment comment 'ID 自增' primary key, - role_id bigint null comment '角色ID', - resource_id bigint null comment '菜单ID', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号' -) comment '角色资源表'; +) comment '工作定义表'; diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowDefinitionApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowDefinitionApi.java new file mode 100644 index 0000000..4a14bc1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/FlowDefinitionApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.flow.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.flow.api.entity.flowDefinition.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 工作定义表(FlowDefinition)对外API + * + * @author peanut + * @since 2024-08-01 10:43:48 + */ +// @FeignClient(value = "",contextId = "flowDefinition-api",url = "${ portal..center.endpoint:}") +public interface FlowDefinitionApi { + + /** + * 保存 工作定义表 + */ + @PostMapping("/flowDefinition/insert") + FlowDefinitionInsertRes insert(@RequestBody @Validated(InsertCheck.class) FlowDefinitionInsertReq req); + + /** + * 根据ID 删除 工作定义表 + */ + @PostMapping("/flowDefinition/deleteByIdList") + FlowDefinitionDeleteByIdListRes deleteByIdList(@RequestBody @Valid FlowDefinitionDeleteByIdListReq req); + + /** + * 查询 工作定义表 + */ + @PostMapping("/flowDefinition/queryList") + FlowDefinitionQueryListRes queryList(@RequestBody @Valid FlowDefinitionQueryListReq req); + + /** + * 根据ID 更新 工作定义表 + */ + @PostMapping("/flowDefinition/updateById") + FlowDefinitionUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) FlowDefinitionUpdateByIdReq req); + + /** + * 分页查询 工作定义表 + */ + @PostMapping("/flowDefinition/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid FlowDefinitionExportQueryPageListReq req); + + /** + * 导出 工作定义表 + */ + @PostMapping("/flowDefinition/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid FlowDefinitionExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/flowDefinition/importData") + FlowDefinitionImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/flowDefinition/queryByIdList") + FlowDefinitionQueryByIdListRes queryByIdListRes(@RequestBody @Valid FlowDefinitionQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowGroupApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowGroupApi.java new file mode 100644 index 0000000..7d476b2 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/FlowGroupApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.flow.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.flow.api.entity.flowGroup.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 工作流组表(FlowGroup)对外API + * + * @author peanut + * @since 2024-08-01 10:43:52 + */ +// @FeignClient(value = "",contextId = "flowGroup-api",url = "${ portal..center.endpoint:}") +public interface FlowGroupApi { + + /** + * 保存 工作流组表 + */ + @PostMapping("/flowGroup/insert") + FlowGroupInsertRes insert(@RequestBody @Validated(InsertCheck.class) FlowGroupInsertReq req); + + /** + * 根据ID 删除 工作流组表 + */ + @PostMapping("/flowGroup/deleteByIdList") + FlowGroupDeleteByIdListRes deleteByIdList(@RequestBody @Valid FlowGroupDeleteByIdListReq req); + + /** + * 查询 工作流组表 + */ + @PostMapping("/flowGroup/queryList") + FlowGroupQueryListRes queryList(@RequestBody @Valid FlowGroupQueryListReq req); + + /** + * 根据ID 更新 工作流组表 + */ + @PostMapping("/flowGroup/updateById") + FlowGroupUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) FlowGroupUpdateByIdReq req); + + /** + * 分页查询 工作流组表 + */ + @PostMapping("/flowGroup/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid FlowGroupExportQueryPageListReq req); + + /** + * 导出 工作流组表 + */ + @PostMapping("/flowGroup/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid FlowGroupExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/flowGroup/importData") + FlowGroupImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/flowGroup/queryByIdList") + FlowGroupQueryByIdListRes queryByIdListRes(@RequestBody @Valid FlowGroupQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowRepositoryApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowRepositoryApi.java new file mode 100644 index 0000000..906cb93 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/FlowRepositoryApi.java @@ -0,0 +1,23 @@ +package com.olivia.peanut.flow.api; + +import com.olivia.peanut.flow.api.entity.*; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +@RequestMapping("/flow") +public interface FlowRepositoryApi { + + @PostMapping("/deployment/create") + DeploymentCreateRes deploymentCreate(DeploymentCreateReq req); + // start + @PostMapping("/repository/start") + StartRes start(@RequestBody @Valid StartReq req); + // task - undone + @PostMapping("/task/undone") + DynamicsPage taskUndone(@RequestBody @Valid TaskUndoneReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowUserService.java b/src/main/java/com/olivia/peanut/flow/api/FlowUserService.java new file mode 100644 index 0000000..372e570 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/FlowUserService.java @@ -0,0 +1,15 @@ +package com.olivia.peanut.flow.api; + +import com.olivia.peanut.flow.api.entity.FlowUserAssignee; +import java.util.List; + +public interface FlowUserService { + + /**** + * + * @param assignee + * @return + */ + List getUserIdList(String assignee); + List getUserIdList(FlowUserAssignee assignee); +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateReq.java new file mode 100644 index 0000000..5d204d0 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateReq.java @@ -0,0 +1,22 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class DeploymentCreateReq { + + @NotNull(message = "流程组id不能为空") + private Long flowGroupId; + @NotNull(message = "文件名不能为空") + private String fileName; + @NotNull(message = "文件名不能为空") + private String path; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateRes.java new file mode 100644 index 0000000..4fd9bfd --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/DeploymentCreateRes.java @@ -0,0 +1,16 @@ +package com.olivia.peanut.flow.api.entity; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class DeploymentCreateRes { + + private Long id; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java new file mode 100644 index 0000000..aeadd4d --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java @@ -0,0 +1,10 @@ +package com.olivia.peanut.flow.api.entity; + +/*** + * + */ +public interface FlowStr { + + String TABLE_NAME = "table_name"; + String SERVICE_NAME = "service_name"; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/FlowUserAssignee.java b/src/main/java/com/olivia/peanut/flow/api/entity/FlowUserAssignee.java new file mode 100644 index 0000000..5bc5d57 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/FlowUserAssignee.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.flow.api.entity; + +import com.olivia.sdk.exception.RunException; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +@Getter +public enum FlowUserAssignee { + userLoin("user-login", "当前登录账户"); + private final String name; + private final String desc; + + + public static FlowUserAssignee getByName(String name) { + for (FlowUserAssignee flowUserAssignee : FlowUserAssignee.values()) { + if (flowUserAssignee.getName().equalsIgnoreCase(name)) { + return flowUserAssignee; + } + } + throw new RunException("未找到对应的流程分配人类型 " + name); + } + +// public + + public enum FlowUserAssigneeType { + user; + + public static FlowUserAssigneeType valueOf(FlowUserAssignee assignee) { + return FlowUserAssigneeType.valueOf(assignee.name().split("-")[0]); + } + } + + public enum FlowUserAssigneeValue { + create; + + public static FlowUserAssigneeValue valueOf(FlowUserAssignee assignee) { + return FlowUserAssigneeValue.valueOf(assignee.name().split("-")[1]); + } + } + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/StartReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/StartReq.java new file mode 100644 index 0000000..a730b33 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/StartReq.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotBlank; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class StartReq { + + @NotBlank(message = "流程key不能为空") + private String flowKey; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java new file mode 100644 index 0000000..a74113e --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.api.entity; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class StartRes { + + private Long id; + + private String redirectUri; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java new file mode 100644 index 0000000..fe28479 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotBlank; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskUndoneReq { + + @NotBlank(message = "流程key不能为空") + private String flowKey; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java new file mode 100644 index 0000000..ce5d642 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java @@ -0,0 +1,23 @@ +package com.olivia.peanut.flow.api.entity; + +import java.util.Date; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskUndoneRes { + + private String id; + private String name; + private String packageName; + private Date createTime; // The time when the task has been created + private Date lastUpdated; + private Date dueDate; + private Date followUpDate; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListReq.java new file mode 100644 index 0000000..ed987c7 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)根据ID删除多个入参 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListRes.java new file mode 100644 index 0000000..25235c9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)根据ID删除多个反参 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java new file mode 100644 index 0000000..34e0c22 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java @@ -0,0 +1,39 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; + +/** + * 工作定义表(FlowDefinition)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionDto extends BaseEntityDto { + + /*** + * 工作流名称 + */ + @NotBlank(message = "工作流名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String flowName; + /*** + * 工作流组ID + */ + @NotNull(message = "工作流组ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long flowGroupId; + + + @NotNull(message = "流程key不能为空") + private String flowKey; +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListInfoRes.java new file mode 100644 index 0000000..4fd798a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionExportQueryPageListInfoRes extends FlowDefinitionDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListReq.java new file mode 100644 index 0000000..9b90705 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)查询对象入参 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private FlowDefinitionDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportReq.java new file mode 100644 index 0000000..da37fb9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionImportReq extends FlowDefinitionDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportRes.java new file mode 100644 index 0000000..eba29c3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)保存返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertReq.java new file mode 100644 index 0000000..e03b565 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)保存入参 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionInsertReq extends FlowDefinitionDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertRes.java new file mode 100644 index 0000000..6c76a37 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)保存返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListReq.java new file mode 100644 index 0000000..6d31293 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)查询对象入参 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListRes.java new file mode 100644 index 0000000..b260eb1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListReq.java new file mode 100644 index 0000000..b2279e5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)查询对象入参 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionQueryListReq { + + private FlowDefinitionDto data; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListRes.java new file mode 100644 index 0000000..42c33a3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdReq.java new file mode 100644 index 0000000..b31e994 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 工作定义表(FlowDefinition)表实体类 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionUpdateByIdReq extends FlowDefinitionDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdRes.java new file mode 100644 index 0000000..e26cf69 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.flow.api.entity.flowDefinition; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作定义表(FlowDefinition)修改对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowDefinitionUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListReq.java new file mode 100644 index 0000000..e778ba8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)根据ID删除多个入参 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListRes.java new file mode 100644 index 0000000..9097119 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)根据ID删除多个反参 + * + * @author peanut + * @since 2024-08-01 10:43:52 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDto.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDto.java new file mode 100644 index 0000000..94ce236 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupDto.java @@ -0,0 +1,39 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import com.olivia.peanut.flow.api.entity.flowDefinition.FlowDefinitionDto; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +/** + * 工作流组表(FlowGroup)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupDto extends BaseEntityDto { + + /*** + * 工作流组编码 + */ + @NotBlank(message = "工作流组编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String flowGroupCode; + /*** + * 工作流组名称 + */ + @NotBlank(message = "工作流组名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String flowGroupName; + + private List flowList; + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListInfoRes.java new file mode 100644 index 0000000..ec1e0d9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupExportQueryPageListInfoRes extends FlowGroupDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListReq.java new file mode 100644 index 0000000..4e241cb --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)查询对象入参 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private FlowGroupDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportReq.java new file mode 100644 index 0000000..0be7721 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupImportReq extends FlowGroupDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportRes.java new file mode 100644 index 0000000..41bc729 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)保存返回 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertReq.java new file mode 100644 index 0000000..b87169b --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)保存入参 + * + * @author peanut + * @since 2024-08-01 10:43:52 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupInsertReq extends FlowGroupDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertRes.java new file mode 100644 index 0000000..7b42461 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)保存返回 + * + * @author peanut + * @since 2024-08-01 10:43:52 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListReq.java new file mode 100644 index 0000000..1fff760 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)查询对象入参 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListRes.java new file mode 100644 index 0000000..6745b99 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListReq.java new file mode 100644 index 0000000..6e49891 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)查询对象入参 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupQueryListReq { + + private FlowGroupDto data; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListRes.java new file mode 100644 index 0000000..7af11ab --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)查询对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdReq.java new file mode 100644 index 0000000..795ff18 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 工作流组表(FlowGroup)表实体类 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupUpdateByIdReq extends FlowGroupDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdRes.java new file mode 100644 index 0000000..f3388d6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowGroup/FlowGroupUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.flow.api.entity.flowGroup; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流组表(FlowGroup)修改对象返回 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowGroupUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowDefinitionApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowDefinitionApiImpl.java new file mode 100644 index 0000000..ab89b92 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowDefinitionApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.flow.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.flow.model.FlowDefinition; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.flow.api.entity.flowDefinition.*; +import com.olivia.peanut.flow.service.FlowDefinitionService; +import com.olivia.peanut.flow.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.flow.api.FlowDefinitionApi; + +import com.olivia.peanut.flow.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 工作定义表(FlowDefinition)表服务实现类 + * + * @author peanut + * @since 2024-08-01 10:43:48 + */ +@RestController +public class FlowDefinitionApiImpl implements FlowDefinitionApi { + + private @Autowired FlowDefinitionService flowDefinitionService; + + /**** + * insert + * + */ + public @Override FlowDefinitionInsertRes insert(FlowDefinitionInsertReq req) { + this.flowDefinitionService.save($.copy(req, FlowDefinition.class)); + return new FlowDefinitionInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override FlowDefinitionDeleteByIdListRes deleteByIdList(FlowDefinitionDeleteByIdListReq req) { + flowDefinitionService.removeByIds(req.getIdList()); + return new FlowDefinitionDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override FlowDefinitionQueryListRes queryList(FlowDefinitionQueryListReq req) { + return flowDefinitionService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override FlowDefinitionUpdateByIdRes updateById(FlowDefinitionUpdateByIdReq req) { + flowDefinitionService.updateById($.copy(req, FlowDefinition.class)); + return new FlowDefinitionUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(FlowDefinitionExportQueryPageListReq req) { + return flowDefinitionService.queryPageList(req); + } + + public @Override void queryPageListExport(FlowDefinitionExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, FlowDefinitionExportQueryPageListInfoRes.class); + PoiExcelUtil.export(FlowDefinitionExportQueryPageListInfoRes.class, listInfoRes, "工作定义表"); + } + + public @Override FlowDefinitionImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new FlowDefinitionImportListener(), FlowDefinitionImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, FlowDefinition.class); + boolean bool = flowDefinitionService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new FlowDefinitionImportRes().setCount(c); + } + + public @Override FlowDefinitionQueryByIdListRes queryByIdListRes(FlowDefinitionQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(FlowDefinition.class) + .selectAll(FlowDefinition.class).in(FlowDefinition::getId, req.getIdList()); + List list = this.flowDefinitionService.list(q); + List dataList = $.copyList(list, FlowDefinitionDto.class); + this.flowDefinitionService.setName(dataList); + return new FlowDefinitionQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowGroupApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowGroupApiImpl.java new file mode 100644 index 0000000..59a770f --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowGroupApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.flow.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.flow.model.FlowGroup; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.flow.api.entity.flowGroup.*; +import com.olivia.peanut.flow.service.FlowGroupService; +import com.olivia.peanut.flow.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.flow.api.FlowGroupApi; + +import com.olivia.peanut.flow.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 工作流组表(FlowGroup)表服务实现类 + * + * @author peanut + * @since 2024-08-01 10:43:52 + */ +@RestController +public class FlowGroupApiImpl implements FlowGroupApi { + + private @Autowired FlowGroupService flowGroupService; + + /**** + * insert + * + */ + public @Override FlowGroupInsertRes insert(FlowGroupInsertReq req) { + this.flowGroupService.save($.copy(req, FlowGroup.class)); + return new FlowGroupInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override FlowGroupDeleteByIdListRes deleteByIdList(FlowGroupDeleteByIdListReq req) { + flowGroupService.removeByIds(req.getIdList()); + return new FlowGroupDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override FlowGroupQueryListRes queryList(FlowGroupQueryListReq req) { + return flowGroupService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override FlowGroupUpdateByIdRes updateById(FlowGroupUpdateByIdReq req) { + flowGroupService.updateById($.copy(req, FlowGroup.class)); + return new FlowGroupUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(FlowGroupExportQueryPageListReq req) { + return flowGroupService.queryPageList(req); + } + + public @Override void queryPageListExport(FlowGroupExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, FlowGroupExportQueryPageListInfoRes.class); + PoiExcelUtil.export(FlowGroupExportQueryPageListInfoRes.class, listInfoRes, "工作流组表"); + } + + public @Override FlowGroupImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new FlowGroupImportListener(), FlowGroupImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, FlowGroup.class); + boolean bool = flowGroupService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new FlowGroupImportRes().setCount(c); + } + + public @Override FlowGroupQueryByIdListRes queryByIdListRes(FlowGroupQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(FlowGroup.class) + .selectAll(FlowGroup.class).in(FlowGroup::getId, req.getIdList()); + List list = this.flowGroupService.list(q); + List dataList = $.copyList(list, FlowGroupDto.class); + this.flowGroupService.setName(dataList); + return new FlowGroupQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowRepositoryApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowRepositoryApiImpl.java new file mode 100644 index 0000000..f7d2269 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowRepositoryApiImpl.java @@ -0,0 +1,86 @@ +package com.olivia.peanut.flow.api.impl; + +import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.olivia.peanut.flow.api.FlowRepositoryApi; +import com.olivia.peanut.flow.api.entity.*; +import com.olivia.peanut.flow.model.FlowDefinition; +import com.olivia.peanut.flow.service.FlowDefinitionService; +import com.olivia.sdk.comment.ServiceComment; +import com.olivia.sdk.filter.LoginUser; +import com.olivia.sdk.filter.LoginUserContext; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.annotation.Resource; +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.camunda.bpm.engine.*; +import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.task.TaskQuery; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RestController; + +/*** + * + */ +@Slf4j +@RestController +public class FlowRepositoryApiImpl implements FlowRepositoryApi { + + + @Resource + FlowDefinitionService flowDefinitionService; + @Resource + TaskService taskService; + @Resource + private RuntimeService runtimeService; + + @SneakyThrows + @Override + @Transactional + public DeploymentCreateRes deploymentCreate(DeploymentCreateReq req) { + ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); + RepositoryService repositoryService = processEngine.getRepositoryService(); + + String content = IOUtils.resourceToString(req.getPath(), StandardCharsets.UTF_8); + LoginUser loginUser = LoginUserContext.getLoginUser(); + Deployment deployed = repositoryService.createDeployment().addString(req.getFileName(), content).source("file").name(loginUser.getUserName()).deploy(); + log.info("deploymentCreate {}", JSON.toJSONString(deployed)); + FlowDefinition flowDefinition = new FlowDefinition().setFlowGroupId(req.getFlowGroupId()).setFlowName(req.getFileName()); + flowDefinitionService.save(flowDefinition); + + return new DeploymentCreateRes().setId(flowDefinition.getId()); + } + + @Override + public StartRes start(StartReq req) { + + FlowDefinition flowDefinition = flowDefinitionService.getOne(new LambdaQueryWrapper().eq(FlowDefinition::getFlowKey, req.getFlowKey())); + $.requireNonNullCanIgnoreException(flowDefinition, "流程不存在"); + Map map = Map.of(FlowStr.TABLE_NAME, "qj"); + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(req.getFlowKey(), IdWorker.getIdStr(), map); + + return null; + } + + @Override + public DynamicsPage taskUndone(TaskUndoneReq req) { + + TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()).taskAssignee(LoginUserContext.getLoginUser().getId().toString()).active(); + long count = active.count(); + List taskList = active.list(); + DynamicsPage page = new DynamicsPage<>(); + page.setTotal(count); + ServiceComment.header(page, "FlowRepositoryServiceImpl#queryTaskPageList"); + + page.setDataList($.copyList(taskList, TaskUndoneRes.class)); + return page; + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowUserServiceImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowUserServiceImpl.java new file mode 100644 index 0000000..7cc953e --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowUserServiceImpl.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.impl; + +import com.olivia.peanut.flow.api.FlowUserService; +import com.olivia.peanut.flow.api.entity.FlowUserAssignee; +import com.olivia.sdk.filter.LoginUserContext; +import com.olivia.sdk.utils.RunUtils; +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/*** + * + */ +@Slf4j +@Service +public class FlowUserServiceImpl implements FlowUserService { + + @Override + public List getUserIdList(String assignee) { + return getUserIdList(FlowUserAssignee.valueOf(assignee)); + } + + @Override + public List getUserIdList(FlowUserAssignee assignee) { + if (FlowUserAssignee.userLoin.equals(assignee)) { + return List.of(LoginUserContext.getLoginUser().getId().toString()); + } + RunUtils.noImpl(); + return null; + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowDefinitionImportListener.java b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowDefinitionImportListener.java new file mode 100644 index 0000000..b0cc495 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowDefinitionImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.flow.api.impl.listener; + + +import com.olivia.peanut.flow.model.FlowDefinition; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.api.entity.flowDefinition.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 工作定义表(FlowDefinition)文件导入监听 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +public class FlowDefinitionImportListener extends AnalysisEventListener { + + @Override + public void invoke(FlowDefinitionImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowGroupImportListener.java b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowGroupImportListener.java new file mode 100644 index 0000000..3eda30f --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowGroupImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.flow.api.impl.listener; + + +import com.olivia.peanut.flow.model.FlowGroup; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.api.entity.flowGroup.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 工作流组表(FlowGroup)文件导入监听 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +public class FlowGroupImportListener extends AnalysisEventListener { + + @Override + public void invoke(FlowGroupImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java index 54f23bb..50735f7 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java @@ -3,16 +3,19 @@ package com.olivia.peanut.flow.core.listener.execution; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.ExecutionListener; /*** * */ +@Slf4j public class StartExecutionListener implements ExecutionListener { @Override public void notify(DelegateExecution execution) throws Exception { + log.info("StartExecutionListener notify"); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java new file mode 100644 index 0000000..ca2aa44 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java @@ -0,0 +1,28 @@ +package com.olivia.peanut.flow.core.listener.task; + +import com.olivia.peanut.flow.api.FlowUserService; +import com.olivia.peanut.flow.api.entity.FlowUserAssignee; +import jakarta.annotation.Resource; +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; +import org.springframework.stereotype.Component; + +/*** + * + */ +@Slf4j +@Component("CreateBeginTaskListener") +public class CreateBeginTaskListener implements TaskListener { + + @Resource + FlowUserService flowsUserService; + + @Override + public void notify(DelegateTask delegateTask) { + List userIdList = flowsUserService.getUserIdList(FlowUserAssignee.userLoin); + delegateTask.setAssignee(userIdList.get(0)); + log.info("us : {}", delegateTask.getAssignee()); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java deleted file mode 100644 index 0b10334..0000000 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.olivia.peanut.flow.core.listener.task; - -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; -import org.camunda.bpm.engine.delegate.DelegateTask; -import org.camunda.bpm.engine.delegate.TaskListener; - -/*** - * - */ -public class CreateTaskListener implements TaskListener { - - @Override - public void notify(DelegateTask delegateTask) { - - } -} diff --git a/src/main/java/com/olivia/peanut/flow/mapper/FlowDefinitionMapper.java b/src/main/java/com/olivia/peanut/flow/mapper/FlowDefinitionMapper.java new file mode 100644 index 0000000..83e09b0 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/mapper/FlowDefinitionMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.model.FlowDefinition; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作定义表(FlowDefinition)表数据库访问层 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Mapper +public interface FlowDefinitionMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/flow/mapper/FlowGroupMapper.java b/src/main/java/com/olivia/peanut/flow/mapper/FlowGroupMapper.java new file mode 100644 index 0000000..ece0ec3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/mapper/FlowGroupMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.model.FlowGroup; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作流组表(FlowGroup)表数据库访问层 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Mapper +public interface FlowGroupMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java b/src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java new file mode 100644 index 0000000..81ae30c --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java @@ -0,0 +1,37 @@ +package com.olivia.peanut.flow.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 工作定义表(FlowDefinition)表实体类 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("flow_definition") +public class FlowDefinition extends BaseEntity { + + /*** + * 工作流名称 + */ + private String flowName; + private String flowKey; +// private String + /*** + * 工作流组ID + */ + private Long flowGroupId; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/model/FlowGroup.java b/src/main/java/com/olivia/peanut/flow/model/FlowGroup.java new file mode 100644 index 0000000..452f929 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/model/FlowGroup.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.flow.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 工作流组表(FlowGroup)表实体类 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("flow_group") +public class FlowGroup extends BaseEntity { + + /*** + * 工作流组编码 + */ + private String flowGroupCode; + /*** + * 工作流组名称 + */ + private String flowGroupName; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/FlowDefinitionService.java b/src/main/java/com/olivia/peanut/flow/service/FlowDefinitionService.java new file mode 100644 index 0000000..133e2a0 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/FlowDefinitionService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.flow.model.FlowDefinition; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.flow.api.entity.flowDefinition.*; + +/** + * 工作定义表(FlowDefinition)表服务接口 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +public interface FlowDefinitionService extends MPJBaseService { + + FlowDefinitionQueryListRes queryList(FlowDefinitionQueryListReq req); + + DynamicsPage queryPageList(FlowDefinitionExportQueryPageListReq req); + + + void setName(List flowDefinitionDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/FlowGroupService.java b/src/main/java/com/olivia/peanut/flow/service/FlowGroupService.java new file mode 100644 index 0000000..50de4e1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/FlowGroupService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.flow.model.FlowGroup; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.flow.api.entity.flowGroup.*; + +/** + * 工作流组表(FlowGroup)表服务接口 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +public interface FlowGroupService extends MPJBaseService { + + FlowGroupQueryListRes queryList(FlowGroupQueryListReq req); + + DynamicsPage queryPageList(FlowGroupExportQueryPageListReq req); + + + void setName(List flowGroupDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowDefinitionServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowDefinitionServiceImpl.java new file mode 100644 index 0000000..93dc9f7 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowDefinitionServiceImpl.java @@ -0,0 +1,114 @@ +package com.olivia.peanut.flow.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.flow.mapper.FlowDefinitionMapper; +import com.olivia.peanut.flow.model.FlowDefinition; +import com.olivia.peanut.flow.service.FlowDefinitionService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.flow.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.flow.api.entity.flowDefinition.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 工作定义表(FlowDefinition)表服务实现类 + * + * @author peanut + * @since 2024-08-01 10:43:49 + */ +@Service("flowDefinitionService") +@Transactional +public class FlowDefinitionServiceImpl extends MPJBaseServiceImpl implements FlowDefinitionService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override FlowDefinitionQueryListRes queryList(FlowDefinitionQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, FlowDefinitionDto.class)).collect(Collectors.toList()); + ((FlowDefinitionService) AopContext.currentProxy()).setName(dataList); + return new FlowDefinitionQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(FlowDefinitionExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, FlowDefinitionExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), FlowDefinitionExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, FlowDefinitionExportQueryPageListInfoRes.class); + ((FlowDefinitionService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(FlowDefinitionDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getFlowName()), FlowDefinition::getFlowName, obj.getFlowName()) + .eq(Objects.nonNull(obj.getFlowGroupId()), FlowDefinition::getFlowGroupId, obj.getFlowGroupId()) + + ; + } + q.orderByDesc(FlowDefinition::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "FlowDefinitionService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowGroupServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowGroupServiceImpl.java new file mode 100644 index 0000000..196e7dd --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowGroupServiceImpl.java @@ -0,0 +1,122 @@ +package com.olivia.peanut.flow.service.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.olivia.peanut.flow.api.entity.flowDefinition.FlowDefinitionDto; +import com.olivia.peanut.flow.api.entity.flowGroup.*; +import com.olivia.peanut.flow.mapper.FlowGroupMapper; +import com.olivia.peanut.flow.model.FlowDefinition; +import com.olivia.peanut.flow.model.FlowGroup; +import com.olivia.peanut.flow.service.FlowDefinitionService; +import com.olivia.peanut.flow.service.FlowGroupService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.sdk.service.SetNameService; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.aop.framework.AopContext; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * 工作流组表(FlowGroup)表服务实现类 + * + * @author peanut + * @since 2024-08-01 10:43:53 + */ +@Service("flowGroupService") +@Transactional +public class FlowGroupServiceImpl extends MPJBaseServiceImpl implements FlowGroupService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + @Resource + FlowDefinitionService flowDefinitionService; + + public @Override FlowGroupQueryListRes queryList(FlowGroupQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, FlowGroupDto.class)).collect(Collectors.toList()); + ((FlowGroupService) AopContext.currentProxy()).setName(dataList); + return new FlowGroupQueryListRes().setDataList(dataList); + } + + public @Override DynamicsPage queryPageList(FlowGroupExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, FlowGroupExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), FlowGroupExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, FlowGroupExportQueryPageListInfoRes.class); + ((FlowGroupService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + if (CollUtil.isEmpty(list)) { + return; + } + Set idSet = list.stream().map(FlowGroupDto::getId).collect(Collectors.toSet()); + Map> flowMap = flowDefinitionService.list(new LambdaQueryWrapper().in(FlowDefinition::getFlowGroupId, idSet)).stream() + .collect(Collectors.groupingBy(FlowDefinition::getFlowGroupId)); + list.forEach(t -> t.setFlowList($.copyList(flowMap.get(t.getId()), FlowDefinitionDto.class))); + } + + + private MPJLambdaWrapper getWrapper(FlowGroupDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getFlowGroupCode()), FlowGroup::getFlowGroupCode, obj.getFlowGroupCode()) + .eq(StringUtils.isNoneBlank(obj.getFlowGroupName()), FlowGroup::getFlowGroupName, obj.getFlowGroupName()) + + ; + } + q.orderByDesc(FlowGroup::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "FlowGroupService#queryPageList"); + + } + + +} + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 764e933..ff7c9e3 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -26,6 +26,8 @@ peanut: - /actuator - /apsGoodsSaleProjectConfig/sale2project - /districtCode + - /test/flow + - /camunda # - /uber/h3/geoToH3Address redis-key: user-token: ut_ @@ -94,10 +96,6 @@ spring: redisson: file: classpath:redisson.yml - h2: - console: - path: /h2-console #h2嵌入式数据库控制台,可以通过浏览器访问 - enabled: true logging: @@ -105,6 +103,7 @@ logging: root: info # org.springframework: trace "org.springframework.jdbc.core": debug + "org.camunda": debug # com.olivia.peanut.aps.utils.forecast: error # com.olivia.peanut.portal.model: error # com.zaxxer.hikari: trace @@ -112,9 +111,11 @@ logging: camunda: bpm: + auto-deployment-enabled: true admin-user: id: demo password: demo firstName: Demo - filter: - create: All tasks + webapp: + enabled: true + index-redirect-enabled: true diff --git a/src/main/resources/flowable/qj.bpmn b/src/main/resources/flowable/qj.bpmn new file mode 100644 index 0000000..5943cd4 --- /dev/null +++ b/src/main/resources/flowable/qj.bpmn @@ -0,0 +1,109 @@ + + + + + + Flow_07pba5u + + + + + + + + Flow_07pba5u + Flow_1krlhc6 + + + Flow_1krlhc6 + Flow_1d9ohsf + Flow_0s19z2m + + + Flow_1d9ohsf + Flow_1blnqvt + + + + + + Flow_0s19z2m + Flow_1blnqvt + Flow_1dmxa1c + + + Flow_1dmxa1c + + + + + d>3 + + + d<=3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- Gitee From d695baed0de3482aae98e34aefee1685ad33d1b2 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Thu, 1 Aug 2024 18:25:42 +0800 Subject: [PATCH 07/27] =?UTF-8?q?feat(flow):=20=E8=AF=B7=E5=81=87=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{FlowRepositoryApi.java => FlowApi.java} | 8 ++- .../peanut/flow/api/entity/CompleteReq.java | 19 +++++++ .../peanut/flow/api/entity/CompleteRes.java | 16 ++++++ .../peanut/flow/api/entity/RejectReq.java | 19 +++++++ .../peanut/flow/api/entity/RejectRes.java | 15 ++++++ ...epositoryApiImpl.java => FlowApiImpl.java} | 49 +++++++++++++++++-- .../task/CreateBeginTaskListener.java | 5 +- .../listener/task/CreateTaskListener.java | 30 ++++++++++++ .../{api => service}/FlowUserService.java | 5 +- .../impl/FlowUserServiceImpl.java | 33 ++++++++++++- src/main/resources/flowable/qj.bpmn | 19 +++++-- 11 files changed, 204 insertions(+), 14 deletions(-) rename src/main/java/com/olivia/peanut/flow/api/{FlowRepositoryApi.java => FlowApi.java} (76%) create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/CompleteReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/CompleteRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/RejectReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/RejectRes.java rename src/main/java/com/olivia/peanut/flow/api/impl/{FlowRepositoryApiImpl.java => FlowApiImpl.java} (62%) create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java rename src/main/java/com/olivia/peanut/flow/{api => service}/FlowUserService.java (68%) rename src/main/java/com/olivia/peanut/flow/{api => service}/impl/FlowUserServiceImpl.java (37%) diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowRepositoryApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java similarity index 76% rename from src/main/java/com/olivia/peanut/flow/api/FlowRepositoryApi.java rename to src/main/java/com/olivia/peanut/flow/api/FlowApi.java index 906cb93..dac4ad1 100644 --- a/src/main/java/com/olivia/peanut/flow/api/FlowRepositoryApi.java +++ b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @RequestMapping("/flow") -public interface FlowRepositoryApi { +public interface FlowApi { @PostMapping("/deployment/create") DeploymentCreateRes deploymentCreate(DeploymentCreateReq req); @@ -20,4 +20,10 @@ public interface FlowRepositoryApi { DynamicsPage taskUndone(@RequestBody @Valid TaskUndoneReq req); + // reject + @PostMapping("/task/reject") + RejectRes reject(@RequestBody @Valid RejectReq req); + + @PostMapping("/task/complete") + CompleteRes complete(@RequestBody @Valid CompleteReq req); } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/CompleteReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/CompleteReq.java new file mode 100644 index 0000000..4bb3fa2 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/CompleteReq.java @@ -0,0 +1,19 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class CompleteReq { + + @NotNull(message = "taskId不能为空") + private String taskId; + private String message; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/CompleteRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/CompleteRes.java new file mode 100644 index 0000000..fb292d6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/CompleteRes.java @@ -0,0 +1,16 @@ +package com.olivia.peanut.flow.api.entity; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class CompleteRes { + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/RejectReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/RejectReq.java new file mode 100644 index 0000000..db84c9e --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/RejectReq.java @@ -0,0 +1,19 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class RejectReq { + + @NotNull(message = "taskId不能为空") + private String taskId; + private String message; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/RejectRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/RejectRes.java new file mode 100644 index 0000000..bda3263 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/RejectRes.java @@ -0,0 +1,15 @@ +package com.olivia.peanut.flow.api.entity; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class RejectRes { + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowRepositoryApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java similarity index 62% rename from src/main/java/com/olivia/peanut/flow/api/impl/FlowRepositoryApiImpl.java rename to src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index f7d2269..df4d906 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowRepositoryApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -3,7 +3,7 @@ package com.olivia.peanut.flow.api.impl; import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.olivia.peanut.flow.api.FlowRepositoryApi; +import com.olivia.peanut.flow.api.FlowApi; import com.olivia.peanut.flow.api.entity.*; import com.olivia.peanut.flow.model.FlowDefinition; import com.olivia.peanut.flow.service.FlowDefinitionService; @@ -14,16 +14,24 @@ import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; +import java.util.Collection; import java.util.List; import java.util.Map; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.camunda.bpm.engine.*; +import org.camunda.bpm.engine.history.HistoricActivityInstance; import org.camunda.bpm.engine.repository.Deployment; +import org.camunda.bpm.engine.runtime.ActivityInstance; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.task.Task; import org.camunda.bpm.engine.task.TaskQuery; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.camunda.bpm.model.bpmn.instance.FlowNode; +import org.camunda.bpm.model.bpmn.instance.SequenceFlow; +import org.camunda.bpm.model.bpmn.instance.UserTask; +import org.camunda.bpm.model.xml.instance.ModelElementInstance; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RestController; @@ -32,7 +40,7 @@ import org.springframework.web.bind.annotation.RestController; */ @Slf4j @RestController -public class FlowRepositoryApiImpl implements FlowRepositoryApi { +public class FlowApiImpl implements FlowApi { @Resource @@ -40,6 +48,10 @@ public class FlowRepositoryApiImpl implements FlowRepositoryApi { @Resource TaskService taskService; @Resource + RepositoryService repositoryService; + @Resource + HistoryService historyService; + @Resource private RuntimeService runtimeService; @SneakyThrows @@ -47,7 +59,6 @@ public class FlowRepositoryApiImpl implements FlowRepositoryApi { @Transactional public DeploymentCreateRes deploymentCreate(DeploymentCreateReq req) { ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); - RepositoryService repositoryService = processEngine.getRepositoryService(); String content = IOUtils.resourceToString(req.getPath(), StandardCharsets.UTF_8); LoginUser loginUser = LoginUserContext.getLoginUser(); @@ -83,4 +94,36 @@ public class FlowRepositoryApiImpl implements FlowRepositoryApi { page.setDataList($.copyList(taskList, TaskUndoneRes.class)); return page; } + + @Override + public RejectRes reject(RejectReq req) { + List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); + $.requireNonNullCanIgnoreException(taskList, "任务不存在"); + Task task = taskList.get(0); + String processInstanceId = task.getProcessInstanceId(); + taskService.createComment(req.getTaskId(), processInstanceId, req.getMessage()); + + //获取当前环节实例 这是个树结构 + ActivityInstance activity = runtimeService.getActivityInstance(processInstanceId); + + runtimeService.createProcessInstanceModification(processInstanceId) + //取消现有的活动实例 + .cancelActivityInstance(activity.getId()) + //设置备注 + .setAnnotation(req.getMessage()) + //让流程实例从目标活动重新开始 + .startBeforeActivity("begin") + .execute(); + return null; + + } + + @Override + public CompleteRes complete(CompleteReq req) { + List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); + $.requireNonNullCanIgnoreException(taskList, "任务不存在"); + taskService.createComment(req.getTaskId(), taskList.get(0).getProcessInstanceId(), req.getMessage()); + taskService.complete(req.getTaskId()); + return null; + } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java index ca2aa44..66c13da 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java @@ -1,19 +1,17 @@ package com.olivia.peanut.flow.core.listener.task; -import com.olivia.peanut.flow.api.FlowUserService; +import com.olivia.peanut.flow.service.FlowUserService; import com.olivia.peanut.flow.api.entity.FlowUserAssignee; import jakarta.annotation.Resource; import java.util.List; import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; -import org.springframework.stereotype.Component; /*** * */ @Slf4j -@Component("CreateBeginTaskListener") public class CreateBeginTaskListener implements TaskListener { @Resource @@ -23,6 +21,7 @@ public class CreateBeginTaskListener implements TaskListener { public void notify(DelegateTask delegateTask) { List userIdList = flowsUserService.getUserIdList(FlowUserAssignee.userLoin); delegateTask.setAssignee(userIdList.get(0)); + log.info("us : {}", delegateTask.getAssignee()); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java new file mode 100644 index 0000000..128b4c8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.core.listener.task; + +import com.olivia.peanut.flow.service.FlowUserService; +import jakarta.annotation.Resource; +import java.util.List; +import java.util.Map; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; + +/*** + * + */ +@SuppressWarnings("unchecked") +public class CreateTaskListener implements TaskListener { + + @Resource + RuntimeService runtimeService; + @Resource + FlowUserService flowUserService; + + @Override + public void notify(DelegateTask delegateTask) { + + Map map = runtimeService.getVariables(delegateTask.getExecutionId()); + Map userAssigneeMap = (Map) map.get("userAssignee"); + List userIdList = flowUserService.getUserIdList(userAssigneeMap); + delegateTask.addCandidateUsers(userIdList); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowUserService.java b/src/main/java/com/olivia/peanut/flow/service/FlowUserService.java similarity index 68% rename from src/main/java/com/olivia/peanut/flow/api/FlowUserService.java rename to src/main/java/com/olivia/peanut/flow/service/FlowUserService.java index 372e570..0213b84 100644 --- a/src/main/java/com/olivia/peanut/flow/api/FlowUserService.java +++ b/src/main/java/com/olivia/peanut/flow/service/FlowUserService.java @@ -1,7 +1,8 @@ -package com.olivia.peanut.flow.api; +package com.olivia.peanut.flow.service; import com.olivia.peanut.flow.api.entity.FlowUserAssignee; import java.util.List; +import java.util.Map; public interface FlowUserService { @@ -12,4 +13,6 @@ public interface FlowUserService { */ List getUserIdList(String assignee); List getUserIdList(FlowUserAssignee assignee); + + List getUserIdList(Map userAssigneeMap); } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowUserServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowUserServiceImpl.java similarity index 37% rename from src/main/java/com/olivia/peanut/flow/api/impl/FlowUserServiceImpl.java rename to src/main/java/com/olivia/peanut/flow/service/impl/FlowUserServiceImpl.java index 7cc953e..70cb2fa 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowUserServiceImpl.java +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowUserServiceImpl.java @@ -1,11 +1,19 @@ -package com.olivia.peanut.flow.api.impl; +package com.olivia.peanut.flow.service.impl; -import com.olivia.peanut.flow.api.FlowUserService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.olivia.peanut.base.model.BaseRole; +import com.olivia.peanut.base.model.BaseUserRole; +import com.olivia.peanut.base.service.BaseRoleService; +import com.olivia.peanut.base.service.BaseUserRoleService; +import com.olivia.peanut.flow.service.FlowUserService; import com.olivia.peanut.flow.api.entity.FlowUserAssignee; import com.olivia.sdk.filter.LoginUserContext; import com.olivia.sdk.utils.RunUtils; +import jakarta.annotation.Resource; import java.util.List; +import java.util.Map; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; /*** @@ -15,11 +23,18 @@ import org.springframework.stereotype.Service; @Service public class FlowUserServiceImpl implements FlowUserService { + @Resource + BaseUserRoleService userRoleService; + @Resource + BaseRoleService roleService; + @Override public List getUserIdList(String assignee) { return getUserIdList(FlowUserAssignee.valueOf(assignee)); } + ; + @Override public List getUserIdList(FlowUserAssignee assignee) { if (FlowUserAssignee.userLoin.equals(assignee)) { @@ -28,4 +43,18 @@ public class FlowUserServiceImpl implements FlowUserService { RunUtils.noImpl(); return null; } + + ; + + @Override + public List getUserIdList(Map userAssigneeMap) { + String role = userAssigneeMap.get("role"); + if (StringUtils.isNotBlank(role)) { + BaseRole baseRole = roleService.getOne(new LambdaQueryWrapper().eq(BaseRole::getRoleCode, role)); + return userRoleService.list(new LambdaQueryWrapper().select(BaseUserRole::getUserId).eq(BaseUserRole::getRoleId, baseRole.getId())) + .stream().map(BaseUserRole::getUserId).distinct().map(Object::toString).toList(); + } + RunUtils.noImpl("用户分派[" + String.join(",", userAssigneeMap.keySet()) + "]"); + return null; + } } diff --git a/src/main/resources/flowable/qj.bpmn b/src/main/resources/flowable/qj.bpmn index 5943cd4..6658371 100644 --- a/src/main/resources/flowable/qj.bpmn +++ b/src/main/resources/flowable/qj.bpmn @@ -10,8 +10,8 @@ Flow_07pba5u - - + + @@ -19,7 +19,18 @@ Flow_07pba5u Flow_1krlhc6 - + + + + + + + + zongjian + + + + Flow_1krlhc6 Flow_1d9ohsf Flow_0s19z2m @@ -76,7 +87,7 @@ - + -- Gitee From 039e299a80ec4fc709fd3f77c8c10a6f53907936 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sat, 3 Aug 2024 00:56:02 +0800 Subject: [PATCH 08/27] =?UTF-8?q?feat(flow):=20=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/tmp.sql | 67 +++++--- .../olivia/peanut/flow/api/FlowFormApi.java | 76 ++++++++ .../peanut/flow/api/FlowFormItemApi.java | 76 ++++++++ .../peanut/flow/api/entity/TaskUndoneReq.java | 2 + .../flowForm/FlowFormDeleteByIdListReq.java | 34 ++++ .../flowForm/FlowFormDeleteByIdListRes.java | 29 ++++ .../flow/api/entity/flowForm/FlowFormDto.java | 42 +++++ .../FlowFormExportQueryPageListInfoRes.java | 27 +++ .../FlowFormExportQueryPageListReq.java | 34 ++++ .../entity/flowForm/FlowFormImportReq.java | 31 ++++ .../entity/flowForm/FlowFormImportRes.java | 31 ++++ .../entity/flowForm/FlowFormInsertReq.java | 25 +++ .../entity/flowForm/FlowFormInsertRes.java | 29 ++++ .../flowForm/FlowFormQueryByIdListReq.java | 32 ++++ .../flowForm/FlowFormQueryByIdListRes.java | 31 ++++ .../entity/flowForm/FlowFormQueryListReq.java | 26 +++ .../entity/flowForm/FlowFormQueryListRes.java | 31 ++++ .../flowForm/FlowFormUpdateByIdReq.java | 30 ++++ .../flowForm/FlowFormUpdateByIdRes.java | 24 +++ .../FlowFormItemDeleteByIdListReq.java | 34 ++++ .../FlowFormItemDeleteByIdListRes.java | 29 ++++ .../entity/flowFormItem/FlowFormItemDto.java | 82 +++++++++ ...lowFormItemExportQueryPageListInfoRes.java | 27 +++ .../FlowFormItemExportQueryPageListReq.java | 34 ++++ .../flowFormItem/FlowFormItemImportReq.java | 31 ++++ .../flowFormItem/FlowFormItemImportRes.java | 31 ++++ .../flowFormItem/FlowFormItemInsertReq.java | 25 +++ .../flowFormItem/FlowFormItemInsertRes.java | 29 ++++ .../FlowFormItemQueryByIdListReq.java | 32 ++++ .../FlowFormItemQueryByIdListRes.java | 31 ++++ .../FlowFormItemQueryListReq.java | 26 +++ .../FlowFormItemQueryListRes.java | 31 ++++ .../FlowFormItemUpdateByIdReq.java | 30 ++++ .../FlowFormItemUpdateByIdRes.java | 24 +++ .../peanut/flow/api/impl/FlowApiImpl.java | 24 +-- .../peanut/flow/api/impl/FlowFormApiImpl.java | 94 ++++++++++ .../flow/api/impl/FlowFormItemApiImpl.java | 104 +++++++++++ .../impl/listener/FlowFormImportListener.java | 48 ++++++ .../listener/FlowFormItemImportListener.java | 48 ++++++ .../peanut/flow/core/FlowBaseService.java | 127 ++++++++++++++ .../core/delegate/NoticeTaskDelegate.java | 40 +++++ .../listener/task/AssignmentTaskListener.java | 3 +- .../listener/task/CompleteTaskListener.java | 6 +- .../task/CreateBeginTaskListener.java | 14 +- .../listener/task/CreateTaskListener.java | 16 +- .../listener/task/DeleteTaskListener.java | 6 +- .../listener/task/NoticeTaskListener.java | 32 +++- .../listener/task/TimeOutTaskListener.java | 6 +- .../listener/task/UpdateTaskListener.java | 6 +- .../flow/mapper/FlowFormItemMapper.java | 18 ++ .../peanut/flow/mapper/FlowFormMapper.java | 18 ++ .../olivia/peanut/flow/model/FlowForm.java | 35 ++++ .../peanut/flow/model/FlowFormItem.java | 67 ++++++++ .../flow/service/FlowFormItemService.java | 26 +++ .../peanut/flow/service/FlowFormService.java | 30 ++++ .../service/impl/FlowFormItemServiceImpl.java | 122 +++++++++++++ .../service/impl/FlowFormServiceImpl.java | 162 ++++++++++++++++++ src/main/resources/flowable/qj.bpmn | 22 ++- 58 files changed, 2172 insertions(+), 75 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/flow/api/FlowFormApi.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/FlowFormItemApi.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDto.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDto.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/FlowFormApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/FlowFormItemApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormImportListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormItemImportListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/delegate/NoticeTaskDelegate.java create mode 100644 src/main/java/com/olivia/peanut/flow/mapper/FlowFormItemMapper.java create mode 100644 src/main/java/com/olivia/peanut/flow/mapper/FlowFormMapper.java create mode 100644 src/main/java/com/olivia/peanut/flow/model/FlowForm.java create mode 100644 src/main/java/com/olivia/peanut/flow/model/FlowFormItem.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/FlowFormItemService.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/FlowFormService.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/impl/FlowFormItemServiceImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/impl/FlowFormServiceImpl.java diff --git a/sql/tmp.sql b/sql/tmp.sql index 24749e3..2b015d4 100644 --- a/sql/tmp.sql +++ b/sql/tmp.sql @@ -1,32 +1,49 @@ -create table if not exists flow_group +create table if not exists flow_form ( - id bigint auto_increment comment 'ID 自增' primary key, - flow_group_code varchar(64) null comment '工作流组编码', - flow_group_name varchar(64) null comment '工作流组名称', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号' + id bigint auto_increment comment 'ID 自增' primary key, + form_name varchar(64) null comment '表单名称', + form_code varchar(64) null comment '表单编码', + tenant_id bigint null comment '租户ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + key idx_form_code(form_code) -) comment '工作流组表'; +) comment '工作流表单表'; -create table if not exists flow_definition + + + +create table if not exists flow_form_item ( - id bigint auto_increment comment 'ID 自增' primary key, - flow_name varchar(64) null comment '工作流名称', - flow_group_id bigint null comment '工作流组ID', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号' - -) comment '工作定义表'; + id bigint auto_increment comment 'ID 自增' primary key, + form_id bigint null comment '表单ID', + form_item_name varchar(64) null comment '表单项名称', + form_item_filed varchar(64) null comment '表单项字段', + form_item_value varchar(512) null comment '表单项类型', + form_item_default_value varchar(512) null comment '表单项默认值', + form_item_value_type varchar(64) null comment '表单值类型 text , date , dateTime ,array', + is_add_flow_value tinyint(1) default 0 null comment '是否添加流程变量 0 否,1 是', + -- 必填 + is_required tinyint(1) default 0 null comment '是否必填 0 否,1 是', + sort_index int default 0 null comment '排序', + -- 失去焦点事件 + lose_focus_event varchar(512) null comment '失去焦点事件', + tenant_id bigint null comment '租户ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + key idx_form_id(form_id) + +) comment '工作流表单项表'; diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowFormApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowFormApi.java new file mode 100644 index 0000000..32e7eb0 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/FlowFormApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.flow.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.flow.api.entity.flowForm.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 工作流表单表(FlowForm)对外API + * + * @author peanut + * @since 2024-08-02 23:26:21 + */ +// @FeignClient(value = "",contextId = "flowForm-api",url = "${ portal..center.endpoint:}") +public interface FlowFormApi { + + /** + * 保存 工作流表单表 + */ + @PostMapping("/flowForm/insert") + FlowFormInsertRes insert(@RequestBody @Validated(InsertCheck.class) FlowFormInsertReq req); + + /** + * 根据ID 删除 工作流表单表 + */ + @PostMapping("/flowForm/deleteByIdList") + FlowFormDeleteByIdListRes deleteByIdList(@RequestBody @Valid FlowFormDeleteByIdListReq req); + + /** + * 查询 工作流表单表 + */ + @PostMapping("/flowForm/queryList") + FlowFormQueryListRes queryList(@RequestBody @Valid FlowFormQueryListReq req); + + /** + * 根据ID 更新 工作流表单表 + */ + @PostMapping("/flowForm/updateById") + FlowFormUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) FlowFormUpdateByIdReq req); + + /** + * 分页查询 工作流表单表 + */ + @PostMapping("/flowForm/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid FlowFormExportQueryPageListReq req); + + /** + * 导出 工作流表单表 + */ + @PostMapping("/flowForm/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid FlowFormExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/flowForm/importData") + FlowFormImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/flowForm/queryByIdList") + FlowFormQueryByIdListRes queryByIdListRes(@RequestBody @Valid FlowFormQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowFormItemApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowFormItemApi.java new file mode 100644 index 0000000..235b93c --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/FlowFormItemApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.flow.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.flow.api.entity.flowFormItem.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 工作流表单项表(FlowFormItem)对外API + * + * @author peanut + * @since 2024-08-02 23:26:25 + */ +// @FeignClient(value = "",contextId = "flowFormItem-api",url = "${ portal..center.endpoint:}") +public interface FlowFormItemApi { + + /** + * 保存 工作流表单项表 + */ + @PostMapping("/flowFormItem/insert") + FlowFormItemInsertRes insert(@RequestBody @Validated(InsertCheck.class) FlowFormItemInsertReq req); + + /** + * 根据ID 删除 工作流表单项表 + */ + @PostMapping("/flowFormItem/deleteByIdList") + FlowFormItemDeleteByIdListRes deleteByIdList(@RequestBody @Valid FlowFormItemDeleteByIdListReq req); + + /** + * 查询 工作流表单项表 + */ + @PostMapping("/flowFormItem/queryList") + FlowFormItemQueryListRes queryList(@RequestBody @Valid FlowFormItemQueryListReq req); + + /** + * 根据ID 更新 工作流表单项表 + */ + @PostMapping("/flowFormItem/updateById") + FlowFormItemUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) FlowFormItemUpdateByIdReq req); + + /** + * 分页查询 工作流表单项表 + */ + @PostMapping("/flowFormItem/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid FlowFormItemExportQueryPageListReq req); + + /** + * 导出 工作流表单项表 + */ + @PostMapping("/flowFormItem/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid FlowFormItemExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/flowFormItem/importData") + FlowFormItemImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/flowFormItem/queryByIdList") + FlowFormItemQueryByIdListRes queryByIdListRes(@RequestBody @Valid FlowFormItemQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java index fe28479..2a30024 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneReq.java @@ -13,6 +13,8 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class TaskUndoneReq { + private Integer pageNum; + private Integer pageSize; @NotBlank(message = "流程key不能为空") private String flowKey; } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListReq.java new file mode 100644 index 0000000..65d756e --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)根据ID删除多个入参 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListRes.java new file mode 100644 index 0000000..3cd3380 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)根据ID删除多个反参 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDto.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDto.java new file mode 100644 index 0000000..9b2075a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import com.olivia.peanut.flow.api.entity.flowFormItem.FlowFormItemDto; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +/** + * 工作流表单表(FlowForm)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormDto extends BaseEntityDto { + + /*** + * 表单名称 + */ + @NotBlank(message = "表单名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formName; + /*** + * 表单编码 + */ + @NotBlank(message = "表单编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formCode; + + @Size(max = 100, message = "表单字段不能超过100个") + @NotNull(message = "表单字段不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private List flowFormItemDtoList; +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListInfoRes.java new file mode 100644 index 0000000..83518ed --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormExportQueryPageListInfoRes extends FlowFormDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListReq.java new file mode 100644 index 0000000..da3521b --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)查询对象入参 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private FlowFormDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportReq.java new file mode 100644 index 0000000..9cdaf75 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormImportReq extends FlowFormDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportRes.java new file mode 100644 index 0000000..f5e0a75 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)保存返回 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertReq.java new file mode 100644 index 0000000..ebf609d --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)保存入参 + * + * @author peanut + * @since 2024-08-02 23:26:21 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormInsertReq extends FlowFormDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertRes.java new file mode 100644 index 0000000..529d169 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)保存返回 + * + * @author peanut + * @since 2024-08-02 23:26:21 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListReq.java new file mode 100644 index 0000000..da5c4be --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)查询对象入参 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListRes.java new file mode 100644 index 0000000..d5290e3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListReq.java new file mode 100644 index 0000000..6f765f4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)查询对象入参 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormQueryListReq { + + private FlowFormDto data; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListRes.java new file mode 100644 index 0000000..ab0745a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdReq.java new file mode 100644 index 0000000..0df14ba --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 工作流表单表(FlowForm)表实体类 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUpdateByIdReq extends FlowFormDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdRes.java new file mode 100644 index 0000000..848ece6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowForm/FlowFormUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.flow.api.entity.flowForm; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单表(FlowForm)修改对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListReq.java new file mode 100644 index 0000000..170e5cf --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)根据ID删除多个入参 + * + * @author peanut + * @since 2024-08-02 23:26:25 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListRes.java new file mode 100644 index 0000000..8c6ac65 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)根据ID删除多个反参 + * + * @author peanut + * @since 2024-08-02 23:26:25 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDto.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDto.java new file mode 100644 index 0000000..3e9c54c --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemDto.java @@ -0,0 +1,82 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 工作流表单项表(FlowFormItem)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemDto extends BaseEntityDto { + + /*** + * 表单ID + */ + @NotNull(message = "表单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long formId; + /*** + * 表单项名称 + */ + @NotBlank(message = "表单项名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemName; + /*** + * 表单项字段 + */ + @NotBlank(message = "表单项字段不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemFiled; + /*** + * 表单项类型 + */ + @NotBlank(message = "表单项类型不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemValue; + /*** + * 表单项默认值 + */ + @NotBlank(message = "表单项默认值不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemDefaultValue; + /*** + * 表单值类型 text , date , dateTime ,array + */ + @NotBlank(message = "表单值类型 text , date , dateTime ,array不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemValueType; + /*** + * 是否添加流程变量 0 否,1 是 + */ + @NotNull(message = "是否添加流程变量 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isAddFlowValue; + /*** + * 是否必填 0 否,1 是 + */ + @NotNull(message = "是否必填 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isRequired; + /*** + * 排序 + */ + @NotNull(message = "排序不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Integer sortIndex; + /*** + * 失去焦点事件 + */ + @NotBlank(message = "失去焦点事件不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String loseFocusEvent; + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListInfoRes.java new file mode 100644 index 0000000..f539fb1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemExportQueryPageListInfoRes extends FlowFormItemDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListReq.java new file mode 100644 index 0000000..ee9e9d6 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)查询对象入参 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private FlowFormItemDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportReq.java new file mode 100644 index 0000000..b3f17be --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemImportReq extends FlowFormItemDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportRes.java new file mode 100644 index 0000000..6452358 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)保存返回 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertReq.java new file mode 100644 index 0000000..e06737b --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)保存入参 + * + * @author peanut + * @since 2024-08-02 23:26:25 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemInsertReq extends FlowFormItemDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertRes.java new file mode 100644 index 0000000..6762c97 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)保存返回 + * + * @author peanut + * @since 2024-08-02 23:26:25 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListReq.java new file mode 100644 index 0000000..f2fbde5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)查询对象入参 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListRes.java new file mode 100644 index 0000000..243adf5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListReq.java new file mode 100644 index 0000000..a22ec8c --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)查询对象入参 + * + * @author peanut + * @since 2024-08-02 23:26:25 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemQueryListReq { + + private FlowFormItemDto data; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListRes.java new file mode 100644 index 0000000..0c15e43 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)查询对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdReq.java new file mode 100644 index 0000000..5967040 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 工作流表单项表(FlowFormItem)表实体类 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemUpdateByIdReq extends FlowFormItemDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdRes.java new file mode 100644 index 0000000..039a062 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormItem/FlowFormItemUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.flow.api.entity.flowFormItem; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单项表(FlowFormItem)修改对象返回 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormItemUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index df4d906..64578a6 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -14,24 +14,17 @@ import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; -import java.util.Collection; import java.util.List; import java.util.Map; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.camunda.bpm.engine.*; -import org.camunda.bpm.engine.history.HistoricActivityInstance; import org.camunda.bpm.engine.repository.Deployment; import org.camunda.bpm.engine.runtime.ActivityInstance; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.task.Task; import org.camunda.bpm.engine.task.TaskQuery; -import org.camunda.bpm.model.bpmn.BpmnModelInstance; -import org.camunda.bpm.model.bpmn.instance.FlowNode; -import org.camunda.bpm.model.bpmn.instance.SequenceFlow; -import org.camunda.bpm.model.bpmn.instance.UserTask; -import org.camunda.bpm.model.xml.instance.ModelElementInstance; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RestController; @@ -84,9 +77,18 @@ public class FlowApiImpl implements FlowApi { @Override public DynamicsPage taskUndone(TaskUndoneReq req) { - TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()).taskAssignee(LoginUserContext.getLoginUser().getId().toString()).active(); + String userId = LoginUserContext.getLoginUser().getId().toString(); + TaskQuery active = taskService.createTaskQuery(). + processDefinitionKey(req.getFlowKey()) +// .taskCandidateUser(userId) +// .taskAssignee(userId) + .taskOwner(userId) + .orderByTaskCreateTime().desc() + .active(); long count = active.count(); - List taskList = active.list(); + int pageSize = req.getPageSize(); + int bg = (req.getPageNum() - 1) * pageSize; + List taskList = active.listPage(bg, pageSize); DynamicsPage page = new DynamicsPage<>(); page.setTotal(count); ServiceComment.header(page, "FlowRepositoryServiceImpl#queryTaskPageList"); @@ -122,7 +124,9 @@ public class FlowApiImpl implements FlowApi { public CompleteRes complete(CompleteReq req) { List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); $.requireNonNullCanIgnoreException(taskList, "任务不存在"); - taskService.createComment(req.getTaskId(), taskList.get(0).getProcessInstanceId(), req.getMessage()); + String processInstanceId = taskList.get(0).getProcessInstanceId(); + runtimeService.setVariable(processInstanceId, "d", 2); + taskService.createComment(req.getTaskId(), processInstanceId, req.getMessage()); taskService.complete(req.getTaskId()); return null; } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormApiImpl.java new file mode 100644 index 0000000..979f29a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormApiImpl.java @@ -0,0 +1,94 @@ +package com.olivia.peanut.flow.api.impl; + +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.olivia.peanut.flow.api.FlowFormApi; +import com.olivia.peanut.flow.api.entity.flowForm.*; +import com.olivia.peanut.flow.api.impl.listener.FlowFormImportListener; +import com.olivia.peanut.flow.model.FlowForm; +import com.olivia.peanut.flow.service.FlowFormService; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +/** + * 工作流表单表(FlowForm)表服务实现类 + * + * @author peanut + * @since 2024-08-02 23:26:21 + */ +@RestController +public class FlowFormApiImpl implements FlowFormApi { + + private @Autowired FlowFormService flowFormService; + + /**** + * insert + * + */ + public @Override FlowFormInsertRes insert(FlowFormInsertReq req) { + return this.flowFormService.save(req); +// return new FlowFormInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override FlowFormDeleteByIdListRes deleteByIdList(FlowFormDeleteByIdListReq req) { + flowFormService.removeByIds(req.getIdList()); + return new FlowFormDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override FlowFormQueryListRes queryList(FlowFormQueryListReq req) { + return flowFormService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override FlowFormUpdateByIdRes updateById(FlowFormUpdateByIdReq req) { + return flowFormService.updateById(req); +// return new FlowFormUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(FlowFormExportQueryPageListReq req) { + return flowFormService.queryPageList(req); + } + + public @Override void queryPageListExport(FlowFormExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, FlowFormExportQueryPageListInfoRes.class); + PoiExcelUtil.export(FlowFormExportQueryPageListInfoRes.class, listInfoRes, "工作流表单表"); + } + + public @Override FlowFormImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new FlowFormImportListener(), FlowFormImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, FlowForm.class); + boolean bool = flowFormService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new FlowFormImportRes().setCount(c); + } + + public @Override FlowFormQueryByIdListRes queryByIdListRes(FlowFormQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(FlowForm.class) + .selectAll(FlowForm.class).in(FlowForm::getId, req.getIdList()); + List list = this.flowFormService.list(q); + List dataList = $.copyList(list, FlowFormDto.class); + this.flowFormService.setName(dataList); + return new FlowFormQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormItemApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormItemApiImpl.java new file mode 100644 index 0000000..29b2903 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormItemApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.flow.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.flow.model.FlowFormItem; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.flow.api.entity.flowFormItem.*; +import com.olivia.peanut.flow.service.FlowFormItemService; +import com.olivia.peanut.flow.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.flow.api.FlowFormItemApi; + +import com.olivia.peanut.flow.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 工作流表单项表(FlowFormItem)表服务实现类 + * + * @author peanut + * @since 2024-08-02 23:26:25 + */ +@RestController +public class FlowFormItemApiImpl implements FlowFormItemApi { + + private @Autowired FlowFormItemService flowFormItemService; + + /**** + * insert + * + */ + public @Override FlowFormItemInsertRes insert(FlowFormItemInsertReq req) { + this.flowFormItemService.save($.copy(req, FlowFormItem.class)); + return new FlowFormItemInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override FlowFormItemDeleteByIdListRes deleteByIdList(FlowFormItemDeleteByIdListReq req) { + flowFormItemService.removeByIds(req.getIdList()); + return new FlowFormItemDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override FlowFormItemQueryListRes queryList(FlowFormItemQueryListReq req) { + return flowFormItemService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override FlowFormItemUpdateByIdRes updateById(FlowFormItemUpdateByIdReq req) { + flowFormItemService.updateById($.copy(req, FlowFormItem.class)); + return new FlowFormItemUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(FlowFormItemExportQueryPageListReq req) { + return flowFormItemService.queryPageList(req); + } + + public @Override void queryPageListExport(FlowFormItemExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, FlowFormItemExportQueryPageListInfoRes.class); + PoiExcelUtil.export(FlowFormItemExportQueryPageListInfoRes.class, listInfoRes, "工作流表单项表"); + } + + public @Override FlowFormItemImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new FlowFormItemImportListener(), FlowFormItemImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, FlowFormItem.class); + boolean bool = flowFormItemService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new FlowFormItemImportRes().setCount(c); + } + + public @Override FlowFormItemQueryByIdListRes queryByIdListRes(FlowFormItemQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(FlowFormItem.class) + .selectAll(FlowFormItem.class).in(FlowFormItem::getId, req.getIdList()); + List list = this.flowFormItemService.list(q); + List dataList = $.copyList(list, FlowFormItemDto.class); + this.flowFormItemService.setName(dataList); + return new FlowFormItemQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormImportListener.java b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormImportListener.java new file mode 100644 index 0000000..4b3ab28 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.flow.api.impl.listener; + + +import com.olivia.peanut.flow.model.FlowForm; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.api.entity.flowForm.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 工作流表单表(FlowForm)文件导入监听 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +public class FlowFormImportListener extends AnalysisEventListener { + + @Override + public void invoke(FlowFormImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormItemImportListener.java b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormItemImportListener.java new file mode 100644 index 0000000..3b759d3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormItemImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.flow.api.impl.listener; + + +import com.olivia.peanut.flow.model.FlowFormItem; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.api.entity.flowFormItem.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 工作流表单项表(FlowFormItem)文件导入监听 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +public class FlowFormItemImportListener extends AnalysisEventListener { + + @Override + public void invoke(FlowFormItemImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java new file mode 100644 index 0000000..e273401 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java @@ -0,0 +1,127 @@ +package com.olivia.peanut.flow.core; + +import cn.hutool.extra.spring.SpringUtil; +import com.olivia.peanut.flow.service.FlowUserService; +import org.camunda.bpm.engine.*; + +/*** + * + */ +public class FlowBaseService { + + + public FlowUserService getFlowUserService() { + return SpringUtil.getBean(FlowUserService.class); + } + + + public CaseService getCaseService() { + return SpringUtil.getBean(CaseService.class); + } + + + public RepositoryService repositoryService() { + return SpringUtil.getBean(RepositoryService.class); + } + + + /** + * Returns the process engine's {@link RuntimeService}. + * + * @return the {@link RuntimeService} object. + */ + public RuntimeService getRuntimeService() { + return SpringUtil.getBean(RuntimeService.class); + } + + /** + * Returns the process engine's {@link RepositoryService}. + * + * @return the {@link RepositoryService} object. + */ + public RepositoryService getRepositoryService() { + return SpringUtil.getBean(RepositoryService.class); + } + + /** + * Returns the process engine's {@link FormService}. + * + * @return the {@link FormService} object. + */ + public FormService getFormService() { + return SpringUtil.getBean(FormService.class); + } + + /** + * Returns the process engine's {@link TaskService}. + * + * @return the {@link TaskService} object. + */ + public TaskService getTaskService() { + return SpringUtil.getBean(TaskService.class); + } + + /** + * Returns the process engine's {@link HistoryService}. + * + * @return the {@link HistoryService} object. + */ + public HistoryService getHistoryService() { + return SpringUtil.getBean(HistoryService.class); + } + + /** + * Returns the process engine's {@link IdentityService}. + * + * @return the {@link IdentityService} object. + */ + public IdentityService getIdentityService() { + return SpringUtil.getBean(IdentityService.class); + } + + /** + * Returns the process engine's {@link ManagementService}. + * + * @return the {@link ManagementService} object. + */ + public ManagementService getManagementService() { + return SpringUtil.getBean(ManagementService.class); + } + + /** + * Returns the process engine's {@link AuthorizationService}. + * + * @return the {@link AuthorizationService} object. + */ + public AuthorizationService getAuthorizationService() { + return SpringUtil.getBean(AuthorizationService.class); + } + + + /** + * Returns the engine's {@link FilterService}. + * + * @return the {@link FilterService} object. + */ + public FilterService getFilterService() { + return SpringUtil.getBean(FilterService.class); + } + + /** + * Returns the engine's {@link ExternalTaskService}. + * + * @return the {@link ExternalTaskService} object. + */ + public ExternalTaskService getExternalTaskService() { + return SpringUtil.getBean(ExternalTaskService.class); + } + + /** + * Returns the engine's {@link DecisionService}. + * + * @return the {@link DecisionService} object. + */ + public DecisionService getDecisionService() { + return SpringUtil.getBean(DecisionService.class); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/delegate/NoticeTaskDelegate.java b/src/main/java/com/olivia/peanut/flow/core/delegate/NoticeTaskDelegate.java new file mode 100644 index 0000000..258e366 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/delegate/NoticeTaskDelegate.java @@ -0,0 +1,40 @@ +package com.olivia.peanut.flow.core.delegate; + +import com.olivia.peanut.flow.core.FlowBaseService; +import lombok.extern.slf4j.Slf4j; +import org.camunda.bpm.engine.HistoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.camunda.bpm.engine.history.HistoricProcessInstance; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.runtime.ProcessInstanceQuery; + +/*** + * + */ +@Slf4j +public class NoticeTaskDelegate extends FlowBaseService implements JavaDelegate { + + @Override + public void execute(DelegateExecution execution) throws Exception { +// DelegateExecution processInstance = execution.getProcessInstance(); + + String processDefinitionId = execution.getProcessDefinitionId(); + String processInstanceId = execution.getProcessInstanceId(); + + ProcessDefinition processDefinition = getRepositoryService().getProcessDefinition(processDefinitionId); +// RuntimeService runtimeService = getRuntimeService(); + +// ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId); + HistoryService historyService = getHistoryService(); + HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery() + .processInstanceId(processInstanceId).singleResult(); +// ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + + String name = processDefinition.getName(); + log.info("name:{} 开始时间{}", name, historicProcessInstance.getStartTime()); + + + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java index 7fc2dcb..f623db5 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/AssignmentTaskListener.java @@ -1,12 +1,13 @@ package com.olivia.peanut.flow.core.listener.task; +import com.olivia.peanut.flow.core.FlowBaseService; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; /*** * */ -public class AssignmentTaskListener implements TaskListener { +public class AssignmentTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java index 92dec4d..f819e59 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CompleteTaskListener.java @@ -1,8 +1,6 @@ package com.olivia.peanut.flow.core.listener.task; -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; +import com.olivia.peanut.flow.core.FlowBaseService; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; @@ -10,7 +8,7 @@ import org.camunda.bpm.engine.delegate.TaskListener; * */ -public class CompleteTaskListener implements TaskListener { +public class CompleteTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java index 66c13da..42b9bb2 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java @@ -1,8 +1,8 @@ package com.olivia.peanut.flow.core.listener.task; -import com.olivia.peanut.flow.service.FlowUserService; import com.olivia.peanut.flow.api.entity.FlowUserAssignee; -import jakarta.annotation.Resource; +import com.olivia.peanut.flow.core.FlowBaseService; +import com.olivia.peanut.flow.service.FlowUserService; import java.util.List; import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.delegate.DelegateTask; @@ -12,16 +12,16 @@ import org.camunda.bpm.engine.delegate.TaskListener; * */ @Slf4j -public class CreateBeginTaskListener implements TaskListener { - @Resource - FlowUserService flowsUserService; +public class CreateBeginTaskListener extends FlowBaseService implements TaskListener { + @Override public void notify(DelegateTask delegateTask) { + FlowUserService flowsUserService = getFlowUserService(); List userIdList = flowsUserService.getUserIdList(FlowUserAssignee.userLoin); - delegateTask.setAssignee(userIdList.get(0)); - +// delegateTask.setAssignee(userIdList.get(0)); + delegateTask.setOwner(userIdList.get(0)); log.info("us : {}", delegateTask.getAssignee()); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java index 128b4c8..c6e0015 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java @@ -1,9 +1,10 @@ package com.olivia.peanut.flow.core.listener.task; +import com.olivia.peanut.flow.core.FlowBaseService; import com.olivia.peanut.flow.service.FlowUserService; -import jakarta.annotation.Resource; import java.util.List; import java.util.Map; +import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; @@ -11,20 +12,21 @@ import org.camunda.bpm.engine.delegate.TaskListener; /*** * */ +@Slf4j @SuppressWarnings("unchecked") -public class CreateTaskListener implements TaskListener { +public class CreateTaskListener extends FlowBaseService implements TaskListener { - @Resource - RuntimeService runtimeService; - @Resource - FlowUserService flowUserService; @Override public void notify(DelegateTask delegateTask) { + RuntimeService runtimeService = getRuntimeService(); + FlowUserService flowUserService = getFlowUserService(); Map map = runtimeService.getVariables(delegateTask.getExecutionId()); Map userAssigneeMap = (Map) map.get("userAssignee"); List userIdList = flowUserService.getUserIdList(userAssigneeMap); - delegateTask.addCandidateUsers(userIdList); + delegateTask.setOwner(userIdList.get(0)); + log.info("setAssignee:{}", userIdList.get(0)); + } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java index 66bbf18..109031a 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/DeleteTaskListener.java @@ -1,15 +1,13 @@ package com.olivia.peanut.flow.core.listener.task; -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; +import com.olivia.peanut.flow.core.FlowBaseService; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; /*** * */ -public class DeleteTaskListener implements TaskListener { +public class DeleteTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java index 2f2c5a3..81e5ba1 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java @@ -1,16 +1,40 @@ package com.olivia.peanut.flow.core.listener.task; -import org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior; -import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; +import com.olivia.peanut.flow.core.FlowBaseService; +import lombok.extern.slf4j.Slf4j; +import org.camunda.bpm.engine.HistoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.delegate.TaskListener; +import org.camunda.bpm.engine.history.HistoricProcessInstance; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.runtime.ProcessInstanceQuery; /*** * 通知 */ -public class NoticeTaskListener implements ActivityBehavior { +@Slf4j +public class NoticeTaskListener extends FlowBaseService implements TaskListener { @Override - public void execute(ActivityExecution execution) throws Exception { + public void notify(DelegateTask delegateTask) { + delegateTask.complete(); + String processDefinitionId = delegateTask.getProcessDefinitionId(); + String processInstanceId = delegateTask.getProcessInstanceId(); + + ProcessDefinition processDefinition = getRepositoryService().getProcessDefinition(processDefinitionId); + RuntimeService runtimeService = getRuntimeService(); + + ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId); + HistoryService historyService = getHistoryService(); + HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().processDefinitionId(processInstanceId).singleResult(); + ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + + String name = processDefinition.getName(); + log.info("name:{} 开始时间{}", name, historicProcessInstance.getStartTime()); + } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java index 68dd211..7bd544e 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java @@ -1,15 +1,13 @@ package com.olivia.peanut.flow.core.listener.task; -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; +import com.olivia.peanut.flow.core.FlowBaseService; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; /*** * */ -public class TimeOutTaskListener implements TaskListener { +public class TimeOutTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java index 0bb01b2..f6d3566 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/UpdateTaskListener.java @@ -1,15 +1,13 @@ package com.olivia.peanut.flow.core.listener.task; -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; +import com.olivia.peanut.flow.core.FlowBaseService; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; /*** * */ -public class UpdateTaskListener implements TaskListener { +public class UpdateTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { diff --git a/src/main/java/com/olivia/peanut/flow/mapper/FlowFormItemMapper.java b/src/main/java/com/olivia/peanut/flow/mapper/FlowFormItemMapper.java new file mode 100644 index 0000000..9f9b8f2 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/mapper/FlowFormItemMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.model.FlowFormItem; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作流表单项表(FlowFormItem)表数据库访问层 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Mapper +public interface FlowFormItemMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/flow/mapper/FlowFormMapper.java b/src/main/java/com/olivia/peanut/flow/mapper/FlowFormMapper.java new file mode 100644 index 0000000..8f7ad52 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/mapper/FlowFormMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.model.FlowForm; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作流表单表(FlowForm)表数据库访问层 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Mapper +public interface FlowFormMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/flow/model/FlowForm.java b/src/main/java/com/olivia/peanut/flow/model/FlowForm.java new file mode 100644 index 0000000..14f326b --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/model/FlowForm.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.flow.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 工作流表单表(FlowForm)表实体类 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("flow_form") +public class FlowForm extends BaseEntity { + + /*** + * 表单名称 + */ + private String formName; + /*** + * 表单编码 + */ + private String formCode; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/model/FlowFormItem.java b/src/main/java/com/olivia/peanut/flow/model/FlowFormItem.java new file mode 100644 index 0000000..a1acf7a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/model/FlowFormItem.java @@ -0,0 +1,67 @@ +package com.olivia.peanut.flow.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 工作流表单项表(FlowFormItem)表实体类 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("flow_form_item") +public class FlowFormItem extends BaseEntity { + + /*** + * 表单ID + */ + private Long formId; + /*** + * 表单项名称 + */ + private String formItemName; + /*** + * 表单项字段 + */ + private String formItemFiled; + /*** + * 表单项类型 + */ + private String formItemValue; + /*** + * 表单项默认值 + */ + private String formItemDefaultValue; + /*** + * 表单值类型 text , date , dateTime ,array + */ + private String formItemValueType; + /*** + * 是否添加流程变量 0 否,1 是 + */ + private Boolean isAddFlowValue; + /*** + * 是否必填 0 否,1 是 + */ + private Boolean isRequired; + /*** + * 排序 + */ + private Integer sortIndex; + /*** + * 失去焦点事件 + */ + private String loseFocusEvent; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/FlowFormItemService.java b/src/main/java/com/olivia/peanut/flow/service/FlowFormItemService.java new file mode 100644 index 0000000..64b415a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/FlowFormItemService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.flow.model.FlowFormItem; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.flow.api.entity.flowFormItem.*; + +/** + * 工作流表单项表(FlowFormItem)表服务接口 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +public interface FlowFormItemService extends MPJBaseService { + + FlowFormItemQueryListRes queryList(FlowFormItemQueryListReq req); + + DynamicsPage queryPageList(FlowFormItemExportQueryPageListReq req); + + + void setName(List flowFormItemDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/FlowFormService.java b/src/main/java/com/olivia/peanut/flow/service/FlowFormService.java new file mode 100644 index 0000000..807d40d --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/FlowFormService.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.flow.model.FlowForm; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.flow.api.entity.flowForm.*; + +/** + * 工作流表单表(FlowForm)表服务接口 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +public interface FlowFormService extends MPJBaseService { + + FlowFormQueryListRes queryList(FlowFormQueryListReq req); + + DynamicsPage queryPageList(FlowFormExportQueryPageListReq req); + + + void setName(List flowFormDtoList); + + FlowFormInsertRes save(FlowFormInsertReq req); + + FlowFormUpdateByIdRes updateById(FlowFormUpdateByIdReq req); +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormItemServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormItemServiceImpl.java new file mode 100644 index 0000000..0940b28 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormItemServiceImpl.java @@ -0,0 +1,122 @@ +package com.olivia.peanut.flow.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.flow.mapper.FlowFormItemMapper; +import com.olivia.peanut.flow.model.FlowFormItem; +import com.olivia.peanut.flow.service.FlowFormItemService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.flow.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.flow.api.entity.flowFormItem.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 工作流表单项表(FlowFormItem)表服务实现类 + * + * @author peanut + * @since 2024-08-02 23:26:26 + */ +@Service("flowFormItemService") +@Transactional +public class FlowFormItemServiceImpl extends MPJBaseServiceImpl implements FlowFormItemService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override FlowFormItemQueryListRes queryList(FlowFormItemQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, FlowFormItemDto.class)).collect(Collectors.toList()); + ((FlowFormItemService) AopContext.currentProxy()).setName(dataList); + return new FlowFormItemQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(FlowFormItemExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, FlowFormItemExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), FlowFormItemExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, FlowFormItemExportQueryPageListInfoRes.class); + ((FlowFormItemService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(FlowFormItemDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(Objects.nonNull(obj.getFormId()), FlowFormItem::getFormId, obj.getFormId()) + .eq(StringUtils.isNoneBlank(obj.getFormItemName()), FlowFormItem::getFormItemName, obj.getFormItemName()) + .eq(StringUtils.isNoneBlank(obj.getFormItemFiled()), FlowFormItem::getFormItemFiled, obj.getFormItemFiled()) + .eq(StringUtils.isNoneBlank(obj.getFormItemValue()), FlowFormItem::getFormItemValue, obj.getFormItemValue()) + .eq(StringUtils.isNoneBlank(obj.getFormItemDefaultValue()), FlowFormItem::getFormItemDefaultValue, obj.getFormItemDefaultValue()) + .eq(StringUtils.isNoneBlank(obj.getFormItemValueType()), FlowFormItem::getFormItemValueType, obj.getFormItemValueType()) + .eq(Objects.nonNull(obj.getIsAddFlowValue()), FlowFormItem::getIsAddFlowValue, obj.getIsAddFlowValue()) + .eq(Objects.nonNull(obj.getIsRequired()), FlowFormItem::getIsRequired, obj.getIsRequired()) + .eq(Objects.nonNull(obj.getSortIndex()), FlowFormItem::getSortIndex, obj.getSortIndex()) + .eq(StringUtils.isNoneBlank(obj.getLoseFocusEvent()), FlowFormItem::getLoseFocusEvent, obj.getLoseFocusEvent()) + + ; + } + q.orderByDesc(FlowFormItem::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "FlowFormItemService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormServiceImpl.java new file mode 100644 index 0000000..9f3b961 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormServiceImpl.java @@ -0,0 +1,162 @@ +package com.olivia.peanut.flow.service.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.olivia.peanut.flow.api.entity.flowForm.*; +import com.olivia.peanut.flow.api.entity.flowFormItem.FlowFormItemDto; +import com.olivia.peanut.flow.mapper.FlowFormMapper; +import com.olivia.peanut.flow.model.FlowForm; +import com.olivia.peanut.flow.model.FlowFormItem; +import com.olivia.peanut.flow.service.FlowFormItemService; +import com.olivia.peanut.flow.service.FlowFormService; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.sdk.service.SetNameService; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.aop.framework.AopContext; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * 工作流表单表(FlowForm)表服务实现类 + * + * @author peanut + * @since 2024-08-02 23:26:22 + */ +@Service("flowFormService") +@Transactional +public class FlowFormServiceImpl extends MPJBaseServiceImpl implements FlowFormService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + @Resource + FlowFormItemService flowFormItemService; + + + @Override + @Transactional + public FlowFormInsertRes save(FlowFormInsertReq req) { + FlowForm flowForm = $.copy(req, FlowForm.class); + long formId = IdWorker.getId(); + flowForm.setId(formId); + AtomicInteger count = new AtomicInteger(0); + List list = req.getFlowFormItemDtoList().stream().map(t -> { + t.setFormId(formId); + t.setSortIndex(count.getAndIncrement()); + t.setId(IdWorker.getId()); + return $.copy(t, FlowFormItem.class); + }).toList(); + this.save(flowForm); + flowFormItemService.saveBatch(list); + return new FlowFormInsertRes().setId(formId).setCount(1); + } + + @Override + @Transactional + public FlowFormUpdateByIdRes updateById(FlowFormUpdateByIdReq req) { + FlowForm flowForm = $.copy(req, FlowForm.class); + AtomicInteger count = new AtomicInteger(0); + List list = req.getFlowFormItemDtoList().stream().map(t -> { + t.setSortIndex(count.getAndIncrement()); + t.setFormId(flowForm.getId()); + t.setId(IdWorker.getId()); + return $.copy(t, FlowFormItem.class); + }).toList(); + this.updateById(flowForm); + this.flowFormItemService.remove(new MPJLambdaWrapper().eq(FlowFormItem::getFormId, flowForm.getId())); + flowFormItemService.saveBatch(list); + return new FlowFormUpdateByIdRes(); + } + + public @Override FlowFormQueryListRes queryList(FlowFormQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, FlowFormDto.class)).collect(Collectors.toList()); + ((FlowFormService) AopContext.currentProxy()).setName(dataList); + return new FlowFormQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(FlowFormExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, FlowFormExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), FlowFormExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, FlowFormExportQueryPageListInfoRes.class); + ((FlowFormService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + if (CollUtil.isEmpty(list)) { + return; + } + + Map> listMap = this.flowFormItemService.list( + new MPJLambdaWrapper().in(FlowFormItem::getFormId, list.stream().map(BaseEntityDto::getId).collect(Collectors.toSet()))).stream() + .collect(Collectors.groupingBy(FlowFormItem::getFormId, Collectors.collectingAndThen(Collectors.toList(), lt -> $.copyList(lt, FlowFormItemDto.class)))); + list.forEach(t -> t.setFlowFormItemDtoList(listMap.get(t.getId()))); + } + + + private MPJLambdaWrapper getWrapper(FlowFormDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q.eq(StringUtils.isNoneBlank(obj.getFormName()), FlowForm::getFormName, obj.getFormName()) + .eq(StringUtils.isNoneBlank(obj.getFormCode()), FlowForm::getFormCode, obj.getFormCode()) + + ; + } + q.orderByDesc(FlowForm::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "FlowFormService#queryPageList"); + + } + + +} + diff --git a/src/main/resources/flowable/qj.bpmn b/src/main/resources/flowable/qj.bpmn index 6658371..77a6a0d 100644 --- a/src/main/resources/flowable/qj.bpmn +++ b/src/main/resources/flowable/qj.bpmn @@ -35,13 +35,25 @@ Flow_1d9ohsf Flow_0s19z2m - + + + + + + + + + zongjian + + + + Flow_1d9ohsf Flow_1blnqvt - + - + Flow_0s19z2m Flow_1blnqvt @@ -53,10 +65,10 @@ - d>3 + ${d >= 3} - d<=3 + ${d <=3 } -- Gitee From d6f396d89c384aef5dcbc8dfbb14f8c1e44fb217 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sat, 3 Aug 2024 19:40:01 +0800 Subject: [PATCH 09/27] =?UTF-8?q?feat(flow)=20=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/olivia/peanut/flow/api/FlowApi.java | 6 + .../peanut/flow/api/FlowFormUserValueApi.java | 78 +++++++++++ .../peanut/flow/api/entity/FlowStr.java | 2 +- .../peanut/flow/api/entity/StartRes.java | 7 +- .../TaskUndoneByProcessInstanceIdReq.java | 19 +++ .../TaskUndoneByProcessInstanceIdRes.java | 16 +++ .../flowDefinition/FlowDefinitionDto.java | 3 + .../FlowFormUserValueDeleteByIdListReq.java | 34 +++++ .../FlowFormUserValueDeleteByIdListRes.java | 29 ++++ .../FlowFormUserValueDto.java | 97 ++++++++++++++ ...rmUserValueExportQueryPageListInfoRes.java | 27 ++++ ...owFormUserValueExportQueryPageListReq.java | 34 +++++ .../FlowFormUserValueImportReq.java | 31 +++++ .../FlowFormUserValueImportRes.java | 31 +++++ .../FlowFormUserValueInsertReq.java | 25 ++++ .../FlowFormUserValueInsertRes.java | 29 ++++ .../FlowFormUserValueQueryByIdListReq.java | 32 +++++ .../FlowFormUserValueQueryByIdListRes.java | 31 +++++ .../FlowFormUserValueQueryListReq.java | 26 ++++ .../FlowFormUserValueQueryListRes.java | 31 +++++ .../FlowFormUserValueUpdateByIdReq.java | 30 +++++ .../FlowFormUserValueUpdateByIdRes.java | 24 ++++ .../peanut/flow/api/impl/FlowApiImpl.java | 29 ++-- .../api/impl/FlowFormUserValueApiImpl.java | 103 +++++++++++++++ .../FlowFormUserValueImportListener.java | 48 +++++++ .../flow/mapper/FlowFormUserValueMapper.java | 18 +++ .../peanut/flow/model/FlowDefinition.java | 2 +- .../peanut/flow/model/FlowFormUserValue.java | 79 +++++++++++ .../service/FlowFormUserValueService.java | 26 ++++ .../impl/FlowFormUserValueServiceImpl.java | 125 ++++++++++++++++++ 30 files changed, 1056 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/flow/api/FlowFormUserValueApi.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDto.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormUserValueImportListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/mapper/FlowFormUserValueMapper.java create mode 100644 src/main/java/com/olivia/peanut/flow/model/FlowFormUserValue.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/FlowFormUserValueService.java create mode 100644 src/main/java/com/olivia/peanut/flow/service/impl/FlowFormUserValueServiceImpl.java diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java index dac4ad1..dbbbfa8 100644 --- a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java +++ b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java @@ -12,10 +12,16 @@ public interface FlowApi { @PostMapping("/deployment/create") DeploymentCreateRes deploymentCreate(DeploymentCreateReq req); + // start @PostMapping("/repository/start") StartRes start(@RequestBody @Valid StartReq req); + // task - undone + // processInstanceId + @PostMapping("/task/undone/processInstanceId") + TaskUndoneByProcessInstanceIdRes taskUndoneByProcessInstanceId(@RequestBody @Valid TaskUndoneByProcessInstanceIdReq req); + @PostMapping("/task/undone") DynamicsPage taskUndone(@RequestBody @Valid TaskUndoneReq req); diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowFormUserValueApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowFormUserValueApi.java new file mode 100644 index 0000000..580b40a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/FlowFormUserValueApi.java @@ -0,0 +1,78 @@ +package com.olivia.peanut.flow.api; + +import com.olivia.peanut.flow.api.entity.flowFormUserValue.*; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import java.util.List; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.multipart.MultipartFile; + + +/** + * 工作流表单用户数据表(FlowFormUserValue)对外API + * + * @author peanut + * @since 2024-08-03 18:10:53 + */ +// @FeignClient(value = "",contextId = "flowFormUserValue-api",url = "${ portal..center.endpoint:}") +public interface FlowFormUserValueApi { + + /** + * 保存 工作流表单用户数据表 + */ + @PostMapping("/flowFormUserValue/insert") + FlowFormUserValueInsertRes insert(@RequestBody @Validated(InsertCheck.class) FlowFormUserValueInsertReq req); + + @PostMapping("/flowFormUserValue/insertBatch") + FlowFormUserValueInsertRes insertBadBatch(@RequestBody @Validated(InsertCheck.class) List req); + + /** + * 根据ID 删除 工作流表单用户数据表 + */ + @PostMapping("/flowFormUserValue/deleteByIdList") + FlowFormUserValueDeleteByIdListRes deleteByIdList(@RequestBody @Valid FlowFormUserValueDeleteByIdListReq req); + + /** + * 查询 工作流表单用户数据表 + */ + @PostMapping("/flowFormUserValue/queryList") + FlowFormUserValueQueryListRes queryList(@RequestBody @Valid FlowFormUserValueQueryListReq req); + + /** + * 根据ID 更新 工作流表单用户数据表 + */ + @PostMapping("/flowFormUserValue/updateById") + FlowFormUserValueUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) FlowFormUserValueUpdateByIdReq req); + + /** + * 分页查询 工作流表单用户数据表 + */ + @PostMapping("/flowFormUserValue/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid FlowFormUserValueExportQueryPageListReq req); + + /** + * 导出 工作流表单用户数据表 + */ + @PostMapping("/flowFormUserValue/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid FlowFormUserValueExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/flowFormUserValue/importData") + FlowFormUserValueImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/flowFormUserValue/queryByIdList") + FlowFormUserValueQueryByIdListRes queryByIdListRes(@RequestBody @Valid FlowFormUserValueQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java index aeadd4d..e31b863 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java @@ -5,6 +5,6 @@ package com.olivia.peanut.flow.api.entity; */ public interface FlowStr { - String TABLE_NAME = "table_name"; + String FLOW_FORM_ID = "FLOW_FORM_ID"; String SERVICE_NAME = "service_name"; } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java index a74113e..b227c3a 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java @@ -12,7 +12,8 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class StartRes { - private Long id; - - private String redirectUri; + private String flowKey; + private String processInstanceId; + private Long flowFormId; + private String businessKey; } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdReq.java new file mode 100644 index 0000000..8980347 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdReq.java @@ -0,0 +1,19 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotBlank; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskUndoneByProcessInstanceIdReq { + + @NotBlank(message = "流程实例ID不能为空") + private String processInstanceId; + private String taskId; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdRes.java new file mode 100644 index 0000000..dc4391c --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneByProcessInstanceIdRes.java @@ -0,0 +1,16 @@ +package com.olivia.peanut.flow.api.entity; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskUndoneByProcessInstanceIdRes { + + private String taskId; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java index 34e0c22..25ec664 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowDefinition/FlowDefinitionDto.java @@ -34,6 +34,9 @@ public class FlowDefinitionDto extends BaseEntityDto { @NotNull(message = "流程key不能为空") private String flowKey; + + @NotNull(message = "工作流组表单不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long flowFormId; } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListReq.java new file mode 100644 index 0000000..122fd8b --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)根据ID删除多个入参 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListRes.java new file mode 100644 index 0000000..4bf61f9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)根据ID删除多个反参 + * + * @author peanut + * @since 2024-08-03 18:10:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDto.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDto.java new file mode 100644 index 0000000..68cc614 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueDto.java @@ -0,0 +1,97 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象返回 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueDto extends BaseEntityDto { + + /*** + * 流程实例ID + */ + @NotBlank(message = "流程实例ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String processInstanceId; + /*** + * 业务主键 + */ + @NotBlank(message = "业务主键不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String businessKey; + /*** + * 表单ID + */ + @NotNull(message = "表单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long formId; + /*** + * 表单默认值 + */ + @NotBlank(message = "表单默认值不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemDefaultValue; + /*** + * 表单字段 + */ + @NotBlank(message = "表单字段不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemFiled; + /*** + * 表单名称 + */ + @NotBlank(message = "表单名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemName; + /*** + * 表单值 + */ + @NotBlank(message = "表单值不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemValue; + /*** + * 表单值类型 + */ + @NotBlank(message = "表单值类型不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String formItemValueType; + /*** + * 是否添加流程表单值 0 否,1 是 + */ + @NotNull(message = "是否添加流程表单值 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isAddFlowValue; + /*** + * 是否必填 0 否,1 是 + */ + @NotNull(message = "是否必填 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isRequired; + /*** + * 失去焦点事件 + */ + @NotBlank(message = "失去焦点事件不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String loseFocusEvent; + /*** + * 排序 + */ + @NotNull(message = "排序不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Integer sortIndex; + /*** + * 用户值 + */ + @NotBlank(message = "用户值不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String userValue; + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListInfoRes.java new file mode 100644 index 0000000..e156a43 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象返回 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueExportQueryPageListInfoRes extends FlowFormUserValueDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListReq.java new file mode 100644 index 0000000..bd9bc92 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象入参 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private FlowFormUserValueDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportReq.java new file mode 100644 index 0000000..937e369 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象返回 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueImportReq extends FlowFormUserValueDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportRes.java new file mode 100644 index 0000000..3a21b85 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)保存返回 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertReq.java new file mode 100644 index 0000000..4acc9b8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)保存入参 + * + * @author peanut + * @since 2024-08-03 18:10:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueInsertReq extends FlowFormUserValueDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertRes.java new file mode 100644 index 0000000..b5a4f66 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)保存返回 + * + * @author peanut + * @since 2024-08-03 18:10:53 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListReq.java new file mode 100644 index 0000000..55fb687 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象入参 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListRes.java new file mode 100644 index 0000000..97ad8f4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象返回 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListReq.java new file mode 100644 index 0000000..04b4649 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象入参 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueQueryListReq { + + private FlowFormUserValueDto data; +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListRes.java new file mode 100644 index 0000000..bc275ec --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)查询对象返回 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdReq.java new file mode 100644 index 0000000..80e3234 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 工作流表单用户数据表(FlowFormUserValue)表实体类 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueUpdateByIdReq extends FlowFormUserValueDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdRes.java new file mode 100644 index 0000000..ca6ac37 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/flowFormUserValue/FlowFormUserValueUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.flow.api.entity.flowFormUserValue; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 工作流表单用户数据表(FlowFormUserValue)修改对象返回 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class FlowFormUserValueUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index 64578a6..2bace7d 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -1,5 +1,7 @@ package com.olivia.peanut.flow.api.impl; +import static com.olivia.peanut.flow.api.entity.FlowStr.FLOW_FORM_ID; + import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; @@ -7,6 +9,7 @@ import com.olivia.peanut.flow.api.FlowApi; import com.olivia.peanut.flow.api.entity.*; import com.olivia.peanut.flow.model.FlowDefinition; import com.olivia.peanut.flow.service.FlowDefinitionService; +import com.olivia.peanut.flow.service.FlowFormUserValueService; import com.olivia.sdk.comment.ServiceComment; import com.olivia.sdk.filter.LoginUser; import com.olivia.sdk.filter.LoginUserContext; @@ -65,26 +68,31 @@ public class FlowApiImpl implements FlowApi { @Override public StartRes start(StartReq req) { - FlowDefinition flowDefinition = flowDefinitionService.getOne(new LambdaQueryWrapper().eq(FlowDefinition::getFlowKey, req.getFlowKey())); $.requireNonNullCanIgnoreException(flowDefinition, "流程不存在"); - Map map = Map.of(FlowStr.TABLE_NAME, "qj"); - ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(req.getFlowKey(), IdWorker.getIdStr(), map); + Map map = Map.of(FLOW_FORM_ID, flowDefinition.getFlowFormId()); + String businessKey = IdWorker.getIdStr(); + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(req.getFlowKey(), businessKey, map); + String processInstanceId = processInstance.getProcessInstanceId(); + return new StartRes().setProcessInstanceId(processInstanceId).setFlowKey(req.getFlowKey()).setFlowFormId(flowDefinition.getFlowFormId()).setBusinessKey(businessKey); + } - return null; + @Override + public TaskUndoneByProcessInstanceIdRes taskUndoneByProcessInstanceId(TaskUndoneByProcessInstanceIdReq req) { + String userId = LoginUserContext.getLoginUser().getId().toString(); + Task task = taskService.createTaskQuery().processInstanceId(req.getProcessInstanceId()) + .taskOwner(userId).orderByTaskCreateTime().desc().active().singleResult(); + return new TaskUndoneByProcessInstanceIdRes().setTaskId(task.getId()); } @Override public DynamicsPage taskUndone(TaskUndoneReq req) { String userId = LoginUserContext.getLoginUser().getId().toString(); - TaskQuery active = taskService.createTaskQuery(). - processDefinitionKey(req.getFlowKey()) + TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()) // .taskCandidateUser(userId) // .taskAssignee(userId) - .taskOwner(userId) - .orderByTaskCreateTime().desc() - .active(); + .taskOwner(userId).orderByTaskCreateTime().desc().active(); long count = active.count(); int pageSize = req.getPageSize(); int bg = (req.getPageNum() - 1) * pageSize; @@ -114,8 +122,7 @@ public class FlowApiImpl implements FlowApi { //设置备注 .setAnnotation(req.getMessage()) //让流程实例从目标活动重新开始 - .startBeforeActivity("begin") - .execute(); + .startBeforeActivity("begin").execute(); return null; } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java new file mode 100644 index 0000000..f06b51f --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java @@ -0,0 +1,103 @@ +package com.olivia.peanut.flow.api.impl; + +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.olivia.peanut.flow.api.FlowFormUserValueApi; +import com.olivia.peanut.flow.api.entity.flowFormUserValue.*; +import com.olivia.peanut.flow.api.impl.listener.FlowFormUserValueImportListener; +import com.olivia.peanut.flow.model.FlowFormUserValue; +import com.olivia.peanut.flow.service.FlowFormUserValueService; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +/** + * 工作流表单用户数据表(FlowFormUserValue)表服务实现类 + * + * @author peanut + * @since 2024-08-03 18:10:53 + */ +@RestController +public class FlowFormUserValueApiImpl implements FlowFormUserValueApi { + + private @Autowired FlowFormUserValueService flowFormUserValueService; + + /**** + * insert + * + */ + public @Override FlowFormUserValueInsertRes insert(FlowFormUserValueInsertReq req) { + this.flowFormUserValueService.save($.copy(req, FlowFormUserValue.class)); + return new FlowFormUserValueInsertRes().setCount(1); + } + + @Override + public FlowFormUserValueInsertRes insertBadBatch(List req) { + $.requireNonNullCanIgnoreException(req, "用户值不能为空"); + req.forEach(t->t.setId(IdWorker.getId())); + this.flowFormUserValueService.saveBatch($.copyList(req, FlowFormUserValue.class)); + return new FlowFormUserValueInsertRes().setCount(req.size()); + } + + /**** + * deleteByIds + * + */ + public @Override FlowFormUserValueDeleteByIdListRes deleteByIdList(FlowFormUserValueDeleteByIdListReq req) { + flowFormUserValueService.removeByIds(req.getIdList()); + return new FlowFormUserValueDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override FlowFormUserValueQueryListRes queryList(FlowFormUserValueQueryListReq req) { + return flowFormUserValueService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override FlowFormUserValueUpdateByIdRes updateById(FlowFormUserValueUpdateByIdReq req) { + flowFormUserValueService.updateById($.copy(req, FlowFormUserValue.class)); + return new FlowFormUserValueUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(FlowFormUserValueExportQueryPageListReq req) { + return flowFormUserValueService.queryPageList(req); + } + + public @Override void queryPageListExport(FlowFormUserValueExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, FlowFormUserValueExportQueryPageListInfoRes.class); + PoiExcelUtil.export(FlowFormUserValueExportQueryPageListInfoRes.class, listInfoRes, "工作流表单用户数据表"); + } + + public @Override FlowFormUserValueImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new FlowFormUserValueImportListener(), FlowFormUserValueImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, FlowFormUserValue.class); + boolean bool = flowFormUserValueService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new FlowFormUserValueImportRes().setCount(c); + } + + public @Override FlowFormUserValueQueryByIdListRes queryByIdListRes(FlowFormUserValueQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(FlowFormUserValue.class) + .selectAll(FlowFormUserValue.class).in(FlowFormUserValue::getId, req.getIdList()); + List list = this.flowFormUserValueService.list(q); + List dataList = $.copyList(list, FlowFormUserValueDto.class); + this.flowFormUserValueService.setName(dataList); + return new FlowFormUserValueQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormUserValueImportListener.java b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormUserValueImportListener.java new file mode 100644 index 0000000..d6fc38e --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/impl/listener/FlowFormUserValueImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.flow.api.impl.listener; + + +import com.olivia.peanut.flow.model.FlowFormUserValue; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.api.entity.flowFormUserValue.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 工作流表单用户数据表(FlowFormUserValue)文件导入监听 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +public class FlowFormUserValueImportListener extends AnalysisEventListener { + + @Override + public void invoke(FlowFormUserValueImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/flow/mapper/FlowFormUserValueMapper.java b/src/main/java/com/olivia/peanut/flow/mapper/FlowFormUserValueMapper.java new file mode 100644 index 0000000..9223d7a --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/mapper/FlowFormUserValueMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.flow.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.flow.model.FlowFormUserValue; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作流表单用户数据表(FlowFormUserValue)表数据库访问层 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Mapper +public interface FlowFormUserValueMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java b/src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java index 81ae30c..d53c87c 100644 --- a/src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java +++ b/src/main/java/com/olivia/peanut/flow/model/FlowDefinition.java @@ -32,6 +32,6 @@ public class FlowDefinition extends BaseEntity { * 工作流组ID */ private Long flowGroupId; - + private Long flowFormId; } diff --git a/src/main/java/com/olivia/peanut/flow/model/FlowFormUserValue.java b/src/main/java/com/olivia/peanut/flow/model/FlowFormUserValue.java new file mode 100644 index 0000000..203758c --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/model/FlowFormUserValue.java @@ -0,0 +1,79 @@ +package com.olivia.peanut.flow.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 工作流表单用户数据表(FlowFormUserValue)表实体类 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("flow_form_user_value") +public class FlowFormUserValue extends BaseEntity { + + /*** + * 流程实例ID + */ + private String processInstanceId; + /*** + * 业务主键 + */ + private String businessKey; + /*** + * 表单ID + */ + private Long formId; + /*** + * 表单默认值 + */ + private String formItemDefaultValue; + /*** + * 表单字段 + */ + private String formItemFiled; + /*** + * 表单名称 + */ + private String formItemName; + /*** + * 表单值 + */ + private String formItemValue; + /*** + * 表单值类型 + */ + private String formItemValueType; + /*** + * 是否添加流程表单值 0 否,1 是 + */ + private Boolean isAddFlowValue; + /*** + * 是否必填 0 否,1 是 + */ + private Boolean isRequired; + /*** + * 失去焦点事件 + */ + private String loseFocusEvent; + /*** + * 排序 + */ + private Integer sortIndex; + /*** + * 用户值 + */ + private String userValue; + +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/FlowFormUserValueService.java b/src/main/java/com/olivia/peanut/flow/service/FlowFormUserValueService.java new file mode 100644 index 0000000..034bbe8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/FlowFormUserValueService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.flow.model.FlowFormUserValue; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.flow.api.entity.flowFormUserValue.*; + +/** + * 工作流表单用户数据表(FlowFormUserValue)表服务接口 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +public interface FlowFormUserValueService extends MPJBaseService { + + FlowFormUserValueQueryListRes queryList(FlowFormUserValueQueryListReq req); + + DynamicsPage queryPageList(FlowFormUserValueExportQueryPageListReq req); + + + void setName(List flowFormUserValueDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormUserValueServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormUserValueServiceImpl.java new file mode 100644 index 0000000..d49c989 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowFormUserValueServiceImpl.java @@ -0,0 +1,125 @@ +package com.olivia.peanut.flow.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.flow.mapper.FlowFormUserValueMapper; +import com.olivia.peanut.flow.model.FlowFormUserValue; +import com.olivia.peanut.flow.service.FlowFormUserValueService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.flow.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.flow.api.entity.flowFormUserValue.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 工作流表单用户数据表(FlowFormUserValue)表服务实现类 + * + * @author peanut + * @since 2024-08-03 18:10:54 + */ +@Service("flowFormUserValueService") +@Transactional +public class FlowFormUserValueServiceImpl extends MPJBaseServiceImpl implements FlowFormUserValueService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override FlowFormUserValueQueryListRes queryList(FlowFormUserValueQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, FlowFormUserValueDto.class)).collect(Collectors.toList()); + ((FlowFormUserValueService) AopContext.currentProxy()).setName(dataList); + return new FlowFormUserValueQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(FlowFormUserValueExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, FlowFormUserValueExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), FlowFormUserValueExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, FlowFormUserValueExportQueryPageListInfoRes.class); + ((FlowFormUserValueService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(FlowFormUserValueDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getProcessInstanceId()), FlowFormUserValue::getProcessInstanceId, obj.getProcessInstanceId()) + .eq(StringUtils.isNoneBlank(obj.getBusinessKey()), FlowFormUserValue::getBusinessKey, obj.getBusinessKey()) + .eq(Objects.nonNull(obj.getFormId()), FlowFormUserValue::getFormId, obj.getFormId()) + .eq(StringUtils.isNoneBlank(obj.getFormItemDefaultValue()), FlowFormUserValue::getFormItemDefaultValue, obj.getFormItemDefaultValue()) + .eq(StringUtils.isNoneBlank(obj.getFormItemFiled()), FlowFormUserValue::getFormItemFiled, obj.getFormItemFiled()) + .eq(StringUtils.isNoneBlank(obj.getFormItemName()), FlowFormUserValue::getFormItemName, obj.getFormItemName()) + .eq(StringUtils.isNoneBlank(obj.getFormItemValue()), FlowFormUserValue::getFormItemValue, obj.getFormItemValue()) + .eq(StringUtils.isNoneBlank(obj.getFormItemValueType()), FlowFormUserValue::getFormItemValueType, obj.getFormItemValueType()) + .eq(Objects.nonNull(obj.getIsAddFlowValue()), FlowFormUserValue::getIsAddFlowValue, obj.getIsAddFlowValue()) + .eq(Objects.nonNull(obj.getIsRequired()), FlowFormUserValue::getIsRequired, obj.getIsRequired()) + .eq(StringUtils.isNoneBlank(obj.getLoseFocusEvent()), FlowFormUserValue::getLoseFocusEvent, obj.getLoseFocusEvent()) + .eq(Objects.nonNull(obj.getSortIndex()), FlowFormUserValue::getSortIndex, obj.getSortIndex()) + .eq(StringUtils.isNoneBlank(obj.getUserValue()), FlowFormUserValue::getUserValue, obj.getUserValue()) + + ; + } + q.orderByDesc(FlowFormUserValue::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "FlowFormUserValueService#queryPageList"); + + } + + +} + -- Gitee From 827e60782eb720fc3d7b248fc2794f65418980a2 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sat, 3 Aug 2024 20:18:24 +0800 Subject: [PATCH 10/27] =?UTF-8?q?feat(flow)=20=20=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=A3=E7=A0=81=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/olivia/peanut/flow/api/FlowApi.java | 2 ++ .../peanut/flow/api/impl/FlowApiImpl.java | 21 ++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java index dbbbfa8..11931fd 100644 --- a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java +++ b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java @@ -24,6 +24,8 @@ public interface FlowApi { @PostMapping("/task/undone") DynamicsPage taskUndone(@RequestBody @Valid TaskUndoneReq req); + @PostMapping("/task/undone/home") + DynamicsPage taskUndoneHome(@RequestBody @Valid TaskUndoneReq req); // reject diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index 2bace7d..ff048ce 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -9,7 +9,6 @@ import com.olivia.peanut.flow.api.FlowApi; import com.olivia.peanut.flow.api.entity.*; import com.olivia.peanut.flow.model.FlowDefinition; import com.olivia.peanut.flow.service.FlowDefinitionService; -import com.olivia.peanut.flow.service.FlowFormUserValueService; import com.olivia.sdk.comment.ServiceComment; import com.olivia.sdk.filter.LoginUser; import com.olivia.sdk.filter.LoginUserContext; @@ -80,8 +79,7 @@ public class FlowApiImpl implements FlowApi { @Override public TaskUndoneByProcessInstanceIdRes taskUndoneByProcessInstanceId(TaskUndoneByProcessInstanceIdReq req) { String userId = LoginUserContext.getLoginUser().getId().toString(); - Task task = taskService.createTaskQuery().processInstanceId(req.getProcessInstanceId()) - .taskOwner(userId).orderByTaskCreateTime().desc().active().singleResult(); + Task task = taskService.createTaskQuery().processInstanceId(req.getProcessInstanceId()).taskOwner(userId).orderByTaskCreateTime().desc().active().singleResult(); return new TaskUndoneByProcessInstanceIdRes().setTaskId(task.getId()); } @@ -90,8 +88,6 @@ public class FlowApiImpl implements FlowApi { String userId = LoginUserContext.getLoginUser().getId().toString(); TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()) -// .taskCandidateUser(userId) -// .taskAssignee(userId) .taskOwner(userId).orderByTaskCreateTime().desc().active(); long count = active.count(); int pageSize = req.getPageSize(); @@ -105,6 +101,21 @@ public class FlowApiImpl implements FlowApi { return page; } + @Override + public DynamicsPage taskUndoneHome(TaskUndoneReq req) { + String userId = LoginUserContext.getLoginUser().getId().toString(); + TaskQuery active = taskService.createTaskQuery().taskOwner(userId).orderByTaskCreateTime().desc().active(); + long count = active.count(); + int pageSize = req.getPageSize(); + int bg = (req.getPageNum() - 1) * pageSize; + List taskList = active.listPage(bg, pageSize); + DynamicsPage page = new DynamicsPage<>(); + page.setTotal(count); + ServiceComment.header(page, "FlowRepositoryServiceImpl#queryTaskPageList"); + page.setDataList($.copyList(taskList, TaskUndoneRes.class)); + return page; + } + @Override public RejectRes reject(RejectReq req) { List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); -- Gitee From f61559f377d3364e130df274c31a9ad771c43a1e Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sat, 3 Aug 2024 22:51:47 +0800 Subject: [PATCH 11/27] =?UTF-8?q?feat(flow)=20=20=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=A3=E7=A0=81=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/flow/api/entity/FlowStr.java | 4 +- .../peanut/flow/api/entity/TaskUndoneRes.java | 6 +- .../peanut/flow/api/impl/FlowApiImpl.java | 67 ++++++++++++++----- 3 files changed, 57 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java index e31b863..6bd636f 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java @@ -6,5 +6,7 @@ package com.olivia.peanut.flow.api.entity; public interface FlowStr { String FLOW_FORM_ID = "FLOW_FORM_ID"; - String SERVICE_NAME = "service_name"; + String IS_FIRST_TASK = "FIRST_TASK"; + String IS_FIRST_TASK_YES = "1"; + String IS_FIRST_TASK_NO = "0"; } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java index ce5d642..8c85d9a 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskUndoneRes.java @@ -13,11 +13,15 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class TaskUndoneRes { - private String id; + private String taskId; private String name; private String packageName; private Date createTime; // The time when the task has been created private Date lastUpdated; private Date dueDate; private Date followUpDate; + private String processInstanceId; + private String businessKey; + private Object flowFormId; + private Boolean isFirstTask; } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index ff048ce..c6dbe1b 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -1,23 +1,30 @@ package com.olivia.peanut.flow.api.impl; import static com.olivia.peanut.flow.api.entity.FlowStr.FLOW_FORM_ID; +import static com.olivia.peanut.flow.api.entity.FlowStr.IS_FIRST_TASK; +import static com.olivia.peanut.flow.api.entity.FlowStr.IS_FIRST_TASK_NO; +import static com.olivia.peanut.flow.api.entity.FlowStr.IS_FIRST_TASK_YES; +import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.olivia.peanut.flow.api.FlowApi; import com.olivia.peanut.flow.api.entity.*; import com.olivia.peanut.flow.model.FlowDefinition; +import com.olivia.peanut.flow.model.FlowFormUserValue; import com.olivia.peanut.flow.service.FlowDefinitionService; +import com.olivia.peanut.flow.service.FlowFormUserValueService; import com.olivia.sdk.comment.ServiceComment; import com.olivia.sdk.filter.LoginUser; import com.olivia.sdk.filter.LoginUserContext; import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.RunUtils; import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; @@ -27,6 +34,7 @@ import org.camunda.bpm.engine.runtime.ActivityInstance; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.task.Task; import org.camunda.bpm.engine.task.TaskQuery; +import org.jetbrains.annotations.NotNull; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RestController; @@ -47,6 +55,8 @@ public class FlowApiImpl implements FlowApi { @Resource HistoryService historyService; @Resource + FlowFormUserValueService flowFormUserValueService; + @Resource private RuntimeService runtimeService; @SneakyThrows @@ -69,7 +79,7 @@ public class FlowApiImpl implements FlowApi { public StartRes start(StartReq req) { FlowDefinition flowDefinition = flowDefinitionService.getOne(new LambdaQueryWrapper().eq(FlowDefinition::getFlowKey, req.getFlowKey())); $.requireNonNullCanIgnoreException(flowDefinition, "流程不存在"); - Map map = Map.of(FLOW_FORM_ID, flowDefinition.getFlowFormId()); + Map map = Map.of(FLOW_FORM_ID, flowDefinition.getFlowFormId()+"", IS_FIRST_TASK, "1"); String businessKey = IdWorker.getIdStr(); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(req.getFlowKey(), businessKey, map); String processInstanceId = processInstance.getProcessInstanceId(); @@ -87,32 +97,49 @@ public class FlowApiImpl implements FlowApi { public DynamicsPage taskUndone(TaskUndoneReq req) { String userId = LoginUserContext.getLoginUser().getId().toString(); - TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()) - .taskOwner(userId).orderByTaskCreateTime().desc().active(); - long count = active.count(); - int pageSize = req.getPageSize(); - int bg = (req.getPageNum() - 1) * pageSize; - List taskList = active.listPage(bg, pageSize); - DynamicsPage page = new DynamicsPage<>(); - page.setTotal(count); - ServiceComment.header(page, "FlowRepositoryServiceImpl#queryTaskPageList"); - - page.setDataList($.copyList(taskList, TaskUndoneRes.class)); - return page; + TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()).taskOwner(userId).orderByTaskCreateTime().desc().active(); + return getTaskUndoneResDynamicsPage(active, req); } @Override public DynamicsPage taskUndoneHome(TaskUndoneReq req) { String userId = LoginUserContext.getLoginUser().getId().toString(); TaskQuery active = taskService.createTaskQuery().taskOwner(userId).orderByTaskCreateTime().desc().active(); + + return getTaskUndoneResDynamicsPage(active, req); + + } + + @NotNull + private DynamicsPage getTaskUndoneResDynamicsPage(TaskQuery active, TaskUndoneReq req) { + DynamicsPage page = new DynamicsPage<>(); long count = active.count(); int pageSize = req.getPageSize(); int bg = (req.getPageNum() - 1) * pageSize; List taskList = active.listPage(bg, pageSize); - DynamicsPage page = new DynamicsPage<>(); + if (CollUtil.isNotEmpty(taskList)) { + List undoneResList = Collections.synchronizedList(new ArrayList<>()); + List runnableList = new ArrayList<>(); + taskList.forEach(task -> { + runnableList.add(() -> { + TaskUndoneRes taskUndoneRes = $.copy(task, TaskUndoneRes.class); + taskUndoneRes.setTaskId(task.getId()); + ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).active().singleResult(); + taskUndoneRes.setBusinessKey(processInstance.getBusinessKey()); + Map variableMap = runtimeService.getVariables(task.getExecutionId()); + taskUndoneRes.setFlowFormId(variableMap.get(FLOW_FORM_ID)); + taskUndoneRes.setIsFirstTask(IS_FIRST_TASK_YES.equals(variableMap.get(IS_FIRST_TASK))); + undoneResList.add(taskUndoneRes); + }); + }); + RunUtils.run("undoneLit", runnableList); + undoneResList.sort(Comparator.comparing(TaskUndoneRes::getCreateTime).reversed()); + page.setDataList(undoneResList); + } page.setTotal(count); + ServiceComment.header(page, "FlowRepositoryServiceImpl#queryTaskPageList"); - page.setDataList($.copyList(taskList, TaskUndoneRes.class)); + return page; } @@ -143,7 +170,11 @@ public class FlowApiImpl implements FlowApi { List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); $.requireNonNullCanIgnoreException(taskList, "任务不存在"); String processInstanceId = taskList.get(0).getProcessInstanceId(); - runtimeService.setVariable(processInstanceId, "d", 2); + Map flowValueMap = this.flowFormUserValueService.list( + new LambdaQueryWrapper().eq(FlowFormUserValue::getProcessInstanceId, processInstanceId).eq(FlowFormUserValue::getIsAddFlowValue, true)) + .stream().collect(Collectors.toMap(FlowFormUserValue::getFormItemFiled, FlowFormUserValue::getUserValue)); + flowValueMap.put(IS_FIRST_TASK, IS_FIRST_TASK_NO); + runtimeService.setVariables(processInstanceId, flowValueMap); taskService.createComment(req.getTaskId(), processInstanceId, req.getMessage()); taskService.complete(req.getTaskId()); return null; -- Gitee From 62fdc0b75fb2c2a20656987ae0a0cdcc7bafbec4 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sun, 4 Aug 2024 00:45:54 +0800 Subject: [PATCH 12/27] =?UTF-8?q?docs(flow):=20=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- install.md => doc/install.md | 2 +- doc/workflow.md | 23 +++++++++++++++++++ sql/delete-flow.sql | 3 +++ .../execution/EndExecutionListener.java | 2 +- 5 files changed, 31 insertions(+), 3 deletions(-) rename install.md => doc/install.md (98%) create mode 100644 doc/workflow.md diff --git a/README.md b/README.md index b63fa69..43facc5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # 安装文档 -[用户安装手册](install.md) +[用户安装手册](doc/install.md) [二开手册](second-develop.md) +[工作流相关](doc/workflow.md) + # 用户配置 | 用户名 | 密码 | 说明 | diff --git a/install.md b/doc/install.md similarity index 98% rename from install.md rename to doc/install.md index 0050088..ca60653 100644 --- a/install.md +++ b/doc/install.md @@ -146,7 +146,7 @@ 2. 打包后文件 -> 打包后在[target](target) 生成两个jar文件 , app.jar 即部署jar文件 +> 打包后在[target](../target) 生成两个jar文件 , app.jar 即部署jar文件 3. 执行时数据库缺少字段 diff --git a/doc/workflow.md b/doc/workflow.md new file mode 100644 index 0000000..ec3d5cc --- /dev/null +++ b/doc/workflow.md @@ -0,0 +1,23 @@ +## 工作流 listener + +| 类功能 | 使用位置 | 事件类型 | 实现接口 | 类名 | +|------------|----------------|-------------------|-------------------|-----------------------------------------------------------------------| +| 任务分配给流程创建人 | 工作流第一个任务 | assignee | TaskListener | com.olivia.peanut.flow.core.listener.task.CreateBeginTaskListener | +| 流程结束通知类 | 工作流结束 | begin/end | JavaDelegate | com.olivia.peanut.flow.core.delegate.NoticeTaskDelegate | +| 任务分派 | 指定用户使用,指派第一个用户 | create/assignment | TaskListener | com.olivia.peanut.flow.core.listener.task.CreateTaskListener | +| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.EndExecutionListener | +| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.StartExecutionListener | +| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.TakeExecutionListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.AssignmentTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.CompleteTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.DeleteTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.NoticeTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.TimeOutTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.UpdateTaskListener | + +## 工作流配置 inputs + +| 配置名称 | 类型 | 值 | 描述 | 使用类 | 示例 | +|--------------|-----|----------------------|--------|--------------------|----------------| +| userAssignee | map | key: role , roleCode | 任务分配给谁 | CreateTaskListener | {"role":"CEO"} | + diff --git a/sql/delete-flow.sql b/sql/delete-flow.sql index 1dbd962..1e2420d 100644 --- a/sql/delete-flow.sql +++ b/sql/delete-flow.sql @@ -96,3 +96,6 @@ drop table act_re_procdef; drop table act_ru_jobdef; + +truncate table flow_form_user_value; + diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java index 15395a6..16e9f7c 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java @@ -10,6 +10,6 @@ public class EndExecutionListener implements ExecutionListener { @Override public void notify(DelegateExecution execution) throws Exception { - +// execution.getEventName() } } -- Gitee From 8e44c9c34d9148ee248596af7222e27e88c117d9 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sun, 4 Aug 2024 14:12:09 +0800 Subject: [PATCH 13/27] =?UTF-8?q?feat(flow):=20=E5=9F=BA=E7=A1=80=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/workflow.md | 61 +++++++++---- .../peanut/flow/api/entity/FlowStr.java | 6 ++ .../peanut/flow/api/impl/FlowApiImpl.java | 21 +++-- .../peanut/flow/core/FlowBaseService.java | 27 +++++- .../flow/core/listener/DelegateTaskInfo.java | 22 +++++ .../execution/DingNoticeTaskEndListener.java | 26 ++++++ .../execution/EndExecutionListener.java | 2 + .../execution/NoticeTaskEndListener.java | 31 +++++++ .../task/CreateBeginTaskListener.java | 21 +++-- .../listener/task/CreateTaskListener.java | 12 ++- .../listener/task/NoticeTaskListener.java | 26 ++---- .../listener/task/TimeOutTaskListener.java | 7 ++ ...serService.java => FlowConfigService.java} | 14 +-- .../service/impl/FlowConfigServiceImpl.java | 87 +++++++++++++++++++ .../service/impl/FlowUserServiceImpl.java | 60 ------------- .../com/olivia/test/forcecast/PoiTest.java | 9 ++ 16 files changed, 294 insertions(+), 138 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/execution/DingNoticeTaskEndListener.java create mode 100644 src/main/java/com/olivia/peanut/flow/core/listener/execution/NoticeTaskEndListener.java rename src/main/java/com/olivia/peanut/flow/service/{FlowUserService.java => FlowConfigService.java} (30%) create mode 100644 src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java delete mode 100644 src/main/java/com/olivia/peanut/flow/service/impl/FlowUserServiceImpl.java diff --git a/doc/workflow.md b/doc/workflow.md index ec3d5cc..af5ef76 100644 --- a/doc/workflow.md +++ b/doc/workflow.md @@ -1,23 +1,50 @@ + +## 工作流相关下载 +[camunda-modeler](https://github.com/camunda/camunda-modeler/releases) + +## 工作流配置约定 + +1. 工作流开始第一个节点id必须为: begin ,流程被驳回时需要定位到第一个节点 +2. 工作流多人处理时, condition 配置为: ${userIdList} , completion-condition 配置为: ${nrOfCompletedInstances == 1},1人通过即通过 +3. 工作流单个任务分派 assignee 配置为: ${userId} , +4. 超时配置 : timeOut 配置为: 4D + ## 工作流 listener -| 类功能 | 使用位置 | 事件类型 | 实现接口 | 类名 | -|------------|----------------|-------------------|-------------------|-----------------------------------------------------------------------| -| 任务分配给流程创建人 | 工作流第一个任务 | assignee | TaskListener | com.olivia.peanut.flow.core.listener.task.CreateBeginTaskListener | -| 流程结束通知类 | 工作流结束 | begin/end | JavaDelegate | com.olivia.peanut.flow.core.delegate.NoticeTaskDelegate | -| 任务分派 | 指定用户使用,指派第一个用户 | create/assignment | TaskListener | com.olivia.peanut.flow.core.listener.task.CreateTaskListener | -| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.EndExecutionListener | -| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.StartExecutionListener | -| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.TakeExecutionListener | -| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.AssignmentTaskListener | -| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.CompleteTaskListener | -| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.DeleteTaskListener | -| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.NoticeTaskListener | -| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.TimeOutTaskListener | -| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.UpdateTaskListener | +| 类功能 | 使用位置 | 事件类型 | 实现接口 | 类名 | +|------------|----------------|-------------------|-------------------|--------------------------------------------------------------------------| +| 任务分配给流程创建人 | 用户任务第一个任务 | create | TaskListener | com.olivia.peanut.flow.core.listener.task.CreateBeginTaskListener | +| 流程结束通知类 | 工作流结束 | end | JavaDelegate | com.olivia.peanut.flow.core.delegate.NoticeTaskDelegate | +| 任务分派 | 指定用户使用,指派第一个用户 | create/assignment | TaskListener | com.olivia.peanut.flow.core.listener.task.CreateTaskListener | +| 钉钉通知流程结束 | 工作流 end监听器 | end | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.DingNoticeTaskEndListener | +| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.EndExecutionListener | +| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.StartExecutionListener | +| | | | ExecutionListener | com.olivia.peanut.flow.core.listener.execution.TakeExecutionListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.AssignmentTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.CompleteTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.DeleteTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.NoticeTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.TimeOutTaskListener | +| | | | TaskListener | com.olivia.peanut.flow.core.listener.task.UpdateTaskListener | ## 工作流配置 inputs -| 配置名称 | 类型 | 值 | 描述 | 使用类 | 示例 | -|--------------|-----|----------------------|--------|--------------------|----------------| -| userAssignee | map | key: role , roleCode | 任务分配给谁 | CreateTaskListener | {"role":"CEO"} | +| 配置名称 | 类型 | 值 | 描述 | 使用类 | 示例 | +|--------------|--------|-----------------------|--------|--------------------|-----------------------------| +| userAssignee | map | key: role , roleCode | 任务分配给谁 | CreateTaskListener | {"role":"CEO"} ,角色CEO 处理 | +| userAssignee | map | key: user , login | 任务分配给谁 | CreateTaskListener | {"user":"login"} ,登录用户 处理 | +| timeOut | String | 时长-[H (小时),D (天),W(周) | 任务超时时间 | CreateTaskListener | 3D ,3天后超时 | + +## 多人处理 + +先了解到,对于“多实例任务”, task 会自动生成以下几个流程变量: + +> nrOfActiviteInstances:当前活动的实例数量,即还没有完成的实例数量 +> loopCounter :循环计数器,办理人在列表中的索引 +> nrOfInstances:会签中总共的实例数 +> nrOfCompletedInstances:已经完成的实例数量 + +那么,在 Completion condition 中 可以这么填写: +> $ {nrOfInstances == nrOfCompletedInstances} 表示所有人员审批完成后会签结束。 +> ${ nrOfCompletedInstances == 1} 表示一个人完成审批。 diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java index 6bd636f..a58cef3 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java @@ -6,7 +6,13 @@ package com.olivia.peanut.flow.api.entity; public interface FlowStr { String FLOW_FORM_ID = "FLOW_FORM_ID"; + String FLOW_FORM_NAME = "FLOW_FORM_NAME"; + String FLOW_CREATE_USER_ID = "FLOW_CREATE_USER_ID"; String IS_FIRST_TASK = "FIRST_TASK"; + String FLOW_USER_ID = "userId"; + String FLOW_USER_ID_LIST = "userIdList"; + + String IS_FIRST_TASK_YES = "1"; String IS_FIRST_TASK_NO = "0"; } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index c6dbe1b..422ae47 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -1,9 +1,6 @@ package com.olivia.peanut.flow.api.impl; -import static com.olivia.peanut.flow.api.entity.FlowStr.FLOW_FORM_ID; -import static com.olivia.peanut.flow.api.entity.FlowStr.IS_FIRST_TASK; -import static com.olivia.peanut.flow.api.entity.FlowStr.IS_FIRST_TASK_NO; -import static com.olivia.peanut.flow.api.entity.FlowStr.IS_FIRST_TASK_YES; +import static com.olivia.peanut.flow.api.entity.FlowStr.*; import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson2.JSON; @@ -79,7 +76,9 @@ public class FlowApiImpl implements FlowApi { public StartRes start(StartReq req) { FlowDefinition flowDefinition = flowDefinitionService.getOne(new LambdaQueryWrapper().eq(FlowDefinition::getFlowKey, req.getFlowKey())); $.requireNonNullCanIgnoreException(flowDefinition, "流程不存在"); - Map map = Map.of(FLOW_FORM_ID, flowDefinition.getFlowFormId()+"", IS_FIRST_TASK, "1"); + Map map = new HashMap<>(Map.of(FLOW_FORM_ID, flowDefinition.getFlowFormId() + "", IS_FIRST_TASK, "1")); + map.put(FLOW_CREATE_USER_ID, LoginUserContext.getLoginUser().getIdStr()); + map.put(FLOW_FORM_NAME, flowDefinition.getFlowName()); String businessKey = IdWorker.getIdStr(); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(req.getFlowKey(), businessKey, map); String processInstanceId = processInstance.getProcessInstanceId(); @@ -88,23 +87,23 @@ public class FlowApiImpl implements FlowApi { @Override public TaskUndoneByProcessInstanceIdRes taskUndoneByProcessInstanceId(TaskUndoneByProcessInstanceIdReq req) { - String userId = LoginUserContext.getLoginUser().getId().toString(); - Task task = taskService.createTaskQuery().processInstanceId(req.getProcessInstanceId()).taskOwner(userId).orderByTaskCreateTime().desc().active().singleResult(); + String userId = LoginUserContext.getLoginUser().getIdStr(); + Task task = taskService.createTaskQuery().processInstanceId(req.getProcessInstanceId()).taskAssignee(userId).orderByTaskCreateTime().desc().active().singleResult(); return new TaskUndoneByProcessInstanceIdRes().setTaskId(task.getId()); } @Override public DynamicsPage taskUndone(TaskUndoneReq req) { - String userId = LoginUserContext.getLoginUser().getId().toString(); - TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()).taskOwner(userId).orderByTaskCreateTime().desc().active(); + String userId = LoginUserContext.getLoginUser().getIdStr(); + TaskQuery active = taskService.createTaskQuery().processDefinitionKey(req.getFlowKey()).taskAssignee(userId).orderByTaskCreateTime().desc().active(); return getTaskUndoneResDynamicsPage(active, req); } @Override public DynamicsPage taskUndoneHome(TaskUndoneReq req) { - String userId = LoginUserContext.getLoginUser().getId().toString(); - TaskQuery active = taskService.createTaskQuery().taskOwner(userId).orderByTaskCreateTime().desc().active(); + String userId = LoginUserContext.getLoginUser().getIdStr(); + TaskQuery active = taskService.createTaskQuery().taskAssignee(userId).orderByTaskCreateTime().desc().active(); return getTaskUndoneResDynamicsPage(active, req); diff --git a/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java index e273401..9d3a88f 100644 --- a/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java +++ b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java @@ -1,8 +1,11 @@ package com.olivia.peanut.flow.core; import cn.hutool.extra.spring.SpringUtil; -import com.olivia.peanut.flow.service.FlowUserService; +import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; +import com.olivia.peanut.flow.service.FlowConfigService; import org.camunda.bpm.engine.*; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.camunda.bpm.engine.repository.ProcessDefinition; /*** * @@ -10,8 +13,8 @@ import org.camunda.bpm.engine.*; public class FlowBaseService { - public FlowUserService getFlowUserService() { - return SpringUtil.getBean(FlowUserService.class); + public FlowConfigService getFlowConfigService() { + return SpringUtil.getBean(FlowConfigService.class); } @@ -124,4 +127,22 @@ public class FlowBaseService { public DecisionService getDecisionService() { return SpringUtil.getBean(DecisionService.class); } + + public DelegateTaskInfo delegateTaskInfo(DelegateTask delegateTask) { + String processDefinitionId = delegateTask.getProcessDefinitionId(); + String processInstanceId = delegateTask.getProcessInstanceId(); + + ProcessDefinition processDefinition = getRepositoryService().getProcessDefinition(processDefinitionId); +// RuntimeService runtimeService = getRuntimeService(); + +// ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId); +// HistoryService historyService = getHistoryService(); +// HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().processDefinitionId(processInstanceId).singleResult(); +// ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + + String name = processDefinition.getName(); + + return new DelegateTaskInfo().setProcessDefinitionName(name).setTaskId(delegateTask.getId()).setTaskName(delegateTask.getName())// + .setProcessInstanceId(processInstanceId).setProcessDefinitionId(processDefinitionId); + } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java b/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java new file mode 100644 index 0000000..8a09580 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java @@ -0,0 +1,22 @@ +package com.olivia.peanut.flow.core.listener; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class DelegateTaskInfo { + + private String processDefinitionName; + private String taskId; + private String taskName; + private String processDefinitionId; + private String processInstanceId; + + +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/DingNoticeTaskEndListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/DingNoticeTaskEndListener.java new file mode 100644 index 0000000..ba9bc11 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/DingNoticeTaskEndListener.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.flow.core.listener.execution; + +import com.alibaba.fastjson2.JSON; +import com.olivia.peanut.flow.core.FlowBaseService; +import com.olivia.sdk.config.ServiceNotice; +import java.util.Map; +import lombok.extern.slf4j.Slf4j; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; + +/*** + * + */ +@Slf4j +public class DingNoticeTaskEndListener extends FlowBaseService implements ExecutionListener { + + @Override + public void notify(DelegateExecution execution) throws Exception { + String processInstanceId = execution.getProcessInstanceId(); + RuntimeService runtimeService = getRuntimeService(); + Map variables = runtimeService.getVariables(processInstanceId); + ServiceNotice.sendMsg("流程结束", JSON.toJSONString(variables)); + log.info("variables {}", JSON.toJSONString(variables)); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java index 16e9f7c..421902f 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/EndExecutionListener.java @@ -11,5 +11,7 @@ public class EndExecutionListener implements ExecutionListener { @Override public void notify(DelegateExecution execution) throws Exception { // execution.getEventName() + + execution.setVariable("",""); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/NoticeTaskEndListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/NoticeTaskEndListener.java new file mode 100644 index 0000000..9b640eb --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/NoticeTaskEndListener.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.core.listener.execution; + +import com.olivia.peanut.flow.core.FlowBaseService; +import lombok.extern.slf4j.Slf4j; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.ExecutionListener; +import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.runtime.ActivityInstance; +import org.camunda.bpm.engine.runtime.ProcessInstance; + +/*** + * + */ +@Slf4j +public class NoticeTaskEndListener extends FlowBaseService implements ExecutionListener { + + @Override + public void notify(DelegateExecution execution) throws Exception { + String processDefinitionId = execution.getProcessDefinitionId(); + String processInstanceId = execution.getProcessInstanceId(); + RuntimeService runtimeService = getRuntimeService(); + RepositoryService repositoryService = getRepositoryService(); + ActivityInstance activityInstance = runtimeService.getActivityInstance(processInstanceId); + ProcessDefinition processDefinition = repositoryService.getProcessDefinition(processDefinitionId); + ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + + log.info("processInstance {}", processDefinition.getName()); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java index 42b9bb2..2a9f202 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java @@ -1,10 +1,11 @@ package com.olivia.peanut.flow.core.listener.task; -import com.olivia.peanut.flow.api.entity.FlowUserAssignee; import com.olivia.peanut.flow.core.FlowBaseService; -import com.olivia.peanut.flow.service.FlowUserService; -import java.util.List; +import com.olivia.peanut.flow.service.FlowConfigService; +import com.olivia.sdk.filter.LoginUserContext; +import java.util.Map; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; @@ -13,15 +14,19 @@ import org.camunda.bpm.engine.delegate.TaskListener; */ @Slf4j -public class CreateBeginTaskListener extends FlowBaseService implements TaskListener { +public class CreateBeginTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { - FlowUserService flowsUserService = getFlowUserService(); - List userIdList = flowsUserService.getUserIdList(FlowUserAssignee.userLoin); -// delegateTask.setAssignee(userIdList.get(0)); - delegateTask.setOwner(userIdList.get(0)); + FlowConfigService flowsUserService = getFlowConfigService(); + Map variables = delegateTask.getVariables(); + if (StringUtils.isBlank(delegateTask.getAssignee())) { +// variables.put("userAssignee", Map.of("user", "login")); + delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); + } + flowsUserService.setInputConfig(variables, true, delegateTask); +// delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); log.info("us : {}", delegateTask.getAssignee()); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java index c6e0015..a449760 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java @@ -1,8 +1,7 @@ package com.olivia.peanut.flow.core.listener.task; import com.olivia.peanut.flow.core.FlowBaseService; -import com.olivia.peanut.flow.service.FlowUserService; -import java.util.List; +import com.olivia.peanut.flow.service.FlowConfigService; import java.util.Map; import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.RuntimeService; @@ -21,12 +20,11 @@ public class CreateTaskListener extends FlowBaseService implements TaskListener public void notify(DelegateTask delegateTask) { RuntimeService runtimeService = getRuntimeService(); - FlowUserService flowUserService = getFlowUserService(); + FlowConfigService flowConfigService = getFlowConfigService(); Map map = runtimeService.getVariables(delegateTask.getExecutionId()); - Map userAssigneeMap = (Map) map.get("userAssignee"); - List userIdList = flowUserService.getUserIdList(userAssigneeMap); - delegateTask.setOwner(userIdList.get(0)); - log.info("setAssignee:{}", userIdList.get(0)); + flowConfigService.setInputConfig(map, true, delegateTask); +// delegateTask.setAssignee(userIdList.get(0)); +// log.info("setAssignee:{}", userIdList.get(0)); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java index 81e5ba1..45a5746 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java @@ -1,40 +1,24 @@ package com.olivia.peanut.flow.core.listener.task; +import com.alibaba.fastjson2.JSON; import com.olivia.peanut.flow.core.FlowBaseService; +import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; import lombok.extern.slf4j.Slf4j; -import org.camunda.bpm.engine.HistoryService; -import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; -import org.camunda.bpm.engine.history.HistoricProcessInstance; -import org.camunda.bpm.engine.repository.ProcessDefinition; -import org.camunda.bpm.engine.runtime.ProcessInstance; -import org.camunda.bpm.engine.runtime.ProcessInstanceQuery; /*** * 通知 */ @Slf4j -public class NoticeTaskListener extends FlowBaseService implements TaskListener { +public class NoticeTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { delegateTask.complete(); - String processDefinitionId = delegateTask.getProcessDefinitionId(); - String processInstanceId = delegateTask.getProcessInstanceId(); - - ProcessDefinition processDefinition = getRepositoryService().getProcessDefinition(processDefinitionId); - RuntimeService runtimeService = getRuntimeService(); - - ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId); - HistoryService historyService = getHistoryService(); - HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().processDefinitionId(processInstanceId).singleResult(); - ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); - - String name = processDefinition.getName(); - log.info("name:{} 开始时间{}", name, historicProcessInstance.getStartTime()); - + DelegateTaskInfo delegateTaskInfo = delegateTaskInfo(delegateTask); + log.info("delegateTaskInfo {}", JSON.toJSONString(delegateTaskInfo)); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java index 7bd544e..f2d0209 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/TimeOutTaskListener.java @@ -1,16 +1,23 @@ package com.olivia.peanut.flow.core.listener.task; import com.olivia.peanut.flow.core.FlowBaseService; +import java.util.List; +import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.delegate.TaskListener; +import org.camunda.bpm.engine.history.HistoricProcessInstance; +import org.camunda.bpm.engine.task.DelegationState; +import org.camunda.bpm.engine.task.Task; /*** * */ +@Slf4j public class TimeOutTaskListener extends FlowBaseService implements TaskListener { @Override public void notify(DelegateTask delegateTask) { + String processInstanceId = delegateTask.getProcessInstanceId(); } } diff --git a/src/main/java/com/olivia/peanut/flow/service/FlowUserService.java b/src/main/java/com/olivia/peanut/flow/service/FlowConfigService.java similarity index 30% rename from src/main/java/com/olivia/peanut/flow/service/FlowUserService.java rename to src/main/java/com/olivia/peanut/flow/service/FlowConfigService.java index 0213b84..8f4b1f6 100644 --- a/src/main/java/com/olivia/peanut/flow/service/FlowUserService.java +++ b/src/main/java/com/olivia/peanut/flow/service/FlowConfigService.java @@ -1,18 +1,10 @@ package com.olivia.peanut.flow.service; import com.olivia.peanut.flow.api.entity.FlowUserAssignee; -import java.util.List; import java.util.Map; +import org.camunda.bpm.engine.delegate.DelegateTask; -public interface FlowUserService { +public interface FlowConfigService { - /**** - * - * @param assignee - * @return - */ - List getUserIdList(String assignee); - List getUserIdList(FlowUserAssignee assignee); - - List getUserIdList(Map userAssigneeMap); + void setInputConfig(Map userAssigneeMap, Boolean addVariableMap, DelegateTask delegateTask); } diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java new file mode 100644 index 0000000..8411a4c --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java @@ -0,0 +1,87 @@ +package com.olivia.peanut.flow.service.impl; + +import static com.olivia.peanut.flow.api.entity.FlowStr.FLOW_USER_ID; +import static com.olivia.peanut.flow.api.entity.FlowStr.FLOW_USER_ID_LIST; + +import cn.hutool.core.collection.CollUtil; +import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.olivia.peanut.base.model.BaseRole; +import com.olivia.peanut.base.model.BaseUserRole; +import com.olivia.peanut.base.service.BaseRoleService; +import com.olivia.peanut.base.service.BaseUserRoleService; +import com.olivia.peanut.flow.api.entity.FlowUserAssignee; +import com.olivia.peanut.flow.service.FlowConfigService; +import com.olivia.sdk.filter.LoginUserContext; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.RunUtils; +import jakarta.annotation.Resource; +import java.time.Duration; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateTask; +import org.springframework.stereotype.Service; + +/*** + * + */ +@Slf4j +@Service +public class FlowConfigServiceImpl implements FlowConfigService { + + @Resource + BaseUserRoleService userRoleService; + @Resource + BaseRoleService roleService; + @Resource + RuntimeService runtimeService; + + + + @Override + @SuppressWarnings("unchecked") + public void setInputConfig(Map variableMap, Boolean addVariableMap, DelegateTask delegateTask) { + Map userAssigneeMap = (Map) variableMap.get("userAssignee"); + List list = null; + if (CollUtil.isNotEmpty(userAssigneeMap)) { + String role = userAssigneeMap.get("role"); + if (StringUtils.isNotBlank(role)) { + role = role.replaceAll(" ", ""); + BaseRole baseRole = roleService.getOne(new LambdaQueryWrapper().eq(BaseRole::getRoleCode, role)); + list = userRoleService.list(new LambdaQueryWrapper().select(BaseUserRole::getUserId).eq(BaseUserRole::getRoleId, baseRole.getId())).stream() + .map(BaseUserRole::getUserId).distinct().map(Object::toString).toList(); + log.info("角色: {} addVariableMap:{} 用户: {}", role, addVariableMap, list); + $.requireNonNullCanIgnoreException(list, "角色: " + role + " 没有用户"); + if (Boolean.TRUE.equals(addVariableMap)) { + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); + } + + } + String user = userAssigneeMap.get("user"); + if (StringUtils.isNotBlank(user)) { + user = user.replaceAll(" ", ""); + if ("login".equalsIgnoreCase(user)) { + list = List.of(LoginUserContext.getLoginUser().getIdStr()); + if (Boolean.TRUE.equals(addVariableMap)) { + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); + } + + } + } + } + Object timeOutObj = variableMap.get("timeOut"); + if (Objects.nonNull(timeOutObj)) { + Duration duration = $.getDuration((String) timeOutObj); + delegateTask.setDueDate(new Date(new Date().getTime() + duration.toMillis())); + } + + log.info("variableMap: {} addVariableMap:{} 用户: {}", JSON.toJSONString(variableMap), addVariableMap, list); + } +} diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowUserServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowUserServiceImpl.java deleted file mode 100644 index 70cb2fa..0000000 --- a/src/main/java/com/olivia/peanut/flow/service/impl/FlowUserServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.olivia.peanut.flow.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.olivia.peanut.base.model.BaseRole; -import com.olivia.peanut.base.model.BaseUserRole; -import com.olivia.peanut.base.service.BaseRoleService; -import com.olivia.peanut.base.service.BaseUserRoleService; -import com.olivia.peanut.flow.service.FlowUserService; -import com.olivia.peanut.flow.api.entity.FlowUserAssignee; -import com.olivia.sdk.filter.LoginUserContext; -import com.olivia.sdk.utils.RunUtils; -import jakarta.annotation.Resource; -import java.util.List; -import java.util.Map; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; - -/*** - * - */ -@Slf4j -@Service -public class FlowUserServiceImpl implements FlowUserService { - - @Resource - BaseUserRoleService userRoleService; - @Resource - BaseRoleService roleService; - - @Override - public List getUserIdList(String assignee) { - return getUserIdList(FlowUserAssignee.valueOf(assignee)); - } - - ; - - @Override - public List getUserIdList(FlowUserAssignee assignee) { - if (FlowUserAssignee.userLoin.equals(assignee)) { - return List.of(LoginUserContext.getLoginUser().getId().toString()); - } - RunUtils.noImpl(); - return null; - } - - ; - - @Override - public List getUserIdList(Map userAssigneeMap) { - String role = userAssigneeMap.get("role"); - if (StringUtils.isNotBlank(role)) { - BaseRole baseRole = roleService.getOne(new LambdaQueryWrapper().eq(BaseRole::getRoleCode, role)); - return userRoleService.list(new LambdaQueryWrapper().select(BaseUserRole::getUserId).eq(BaseUserRole::getRoleId, baseRole.getId())) - .stream().map(BaseUserRole::getUserId).distinct().map(Object::toString).toList(); - } - RunUtils.noImpl("用户分派[" + String.join(",", userAssigneeMap.keySet()) + "]"); - return null; - } -} diff --git a/src/test/java/com/olivia/test/forcecast/PoiTest.java b/src/test/java/com/olivia/test/forcecast/PoiTest.java index fd876fc..7119cac 100644 --- a/src/test/java/com/olivia/test/forcecast/PoiTest.java +++ b/src/test/java/com/olivia/test/forcecast/PoiTest.java @@ -1,6 +1,9 @@ package com.olivia.test.forcecast; +import java.time.Duration; import java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalUnit; import java.util.List; import java.util.stream.Collectors; import lombok.SneakyThrows; @@ -49,4 +52,10 @@ public class PoiTest { } + + @Test + public void day(){ + Duration duration = Duration.of(1, ChronoUnit.valueOf("DAYS")); + log.info("duration:{}",duration.getSeconds()); + } } -- Gitee From c7bdf761b58a0f9ffbd966e9092e4a7183351e2e Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sun, 4 Aug 2024 16:20:37 +0800 Subject: [PATCH 14/27] =?UTF-8?q?feat(flow):=20=E9=83=A8=E9=97=A8=E4=BA=BA?= =?UTF-8?q?=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/workflow.md | 15 +- .../peanut/flow/core/FlowBaseService.java | 13 +- .../flow/core/listener/DelegateTaskInfo.java | 4 +- .../task/CreateBeginTaskListener.java | 2 +- .../listener/task/CreateTaskListener.java | 2 +- .../listener/task/NoticeTaskListener.java | 5 +- .../flow/service/FlowConfigService.java | 3 +- .../service/impl/FlowConfigServiceImpl.java | 50 +++--- src/main/resources/flowable/qj.bpmn | 143 +++++------------- 9 files changed, 97 insertions(+), 140 deletions(-) diff --git a/doc/workflow.md b/doc/workflow.md index af5ef76..d0a4f8d 100644 --- a/doc/workflow.md +++ b/doc/workflow.md @@ -1,5 +1,5 @@ - ## 工作流相关下载 + [camunda-modeler](https://github.com/camunda/camunda-modeler/releases) ## 工作流配置约定 @@ -7,7 +7,7 @@ 1. 工作流开始第一个节点id必须为: begin ,流程被驳回时需要定位到第一个节点 2. 工作流多人处理时, condition 配置为: ${userIdList} , completion-condition 配置为: ${nrOfCompletedInstances == 1},1人通过即通过 3. 工作流单个任务分派 assignee 配置为: ${userId} , -4. 超时配置 : timeOut 配置为: 4D +4. 超时配置 : timeOut 配置为: 4D :4天后超时 ## 工作流 listener @@ -29,11 +29,12 @@ ## 工作流配置 inputs -| 配置名称 | 类型 | 值 | 描述 | 使用类 | 示例 | -|--------------|--------|-----------------------|--------|--------------------|-----------------------------| -| userAssignee | map | key: role , roleCode | 任务分配给谁 | CreateTaskListener | {"role":"CEO"} ,角色CEO 处理 | -| userAssignee | map | key: user , login | 任务分配给谁 | CreateTaskListener | {"user":"login"} ,登录用户 处理 | -| timeOut | String | 时长-[H (小时),D (天),W(周) | 任务超时时间 | CreateTaskListener | 3D ,3天后超时 | +| 配置名称 | 类型 | 值 | 描述 | 使用类 | 示例 | +|--------------|--------|---------------------------------------|---------------|--------------------|------------------------| +| userAssignee | map | key: role , value: roleCode (可变) | 指定角色处理 | CreateTaskListener | {"role":"CEO"} | +| userAssignee | map | key: user , value: login (定值) | 当前登录用户处理 | CreateTaskListener | {"user":"login"} | +| userAssignee | map | key: deptRole , value: roleCode (可变) | 用户所在部门角色下人员处理 | CreateTaskListener | {"deptRole":"manager"} | +| timeOut | String | 时长-[H (小时),D (天),W(周) | 任务超时时间 | CreateTaskListener | 3D ,3天后超时 | ## 多人处理 diff --git a/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java index 9d3a88f..f1f6540 100644 --- a/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java +++ b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java @@ -1,8 +1,11 @@ package com.olivia.peanut.flow.core; import cn.hutool.extra.spring.SpringUtil; +import com.alibaba.fastjson2.JSON; +import com.olivia.peanut.flow.api.entity.FlowStr; import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; import com.olivia.peanut.flow.service.FlowConfigService; +import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.*; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.repository.ProcessDefinition; @@ -10,6 +13,7 @@ import org.camunda.bpm.engine.repository.ProcessDefinition; /*** * */ +@Slf4j public class FlowBaseService { @@ -128,7 +132,7 @@ public class FlowBaseService { return SpringUtil.getBean(DecisionService.class); } - public DelegateTaskInfo delegateTaskInfo(DelegateTask delegateTask) { + public DelegateTaskInfo getDelegateTaskInfo(DelegateTask delegateTask) { String processDefinitionId = delegateTask.getProcessDefinitionId(); String processInstanceId = delegateTask.getProcessInstanceId(); @@ -142,7 +146,10 @@ public class FlowBaseService { String name = processDefinition.getName(); - return new DelegateTaskInfo().setProcessDefinitionName(name).setTaskId(delegateTask.getId()).setTaskName(delegateTask.getName())// - .setProcessInstanceId(processInstanceId).setProcessDefinitionId(processDefinitionId); + String userId = (String) getRuntimeService().getVariable(processInstanceId, FlowStr.FLOW_USER_ID); + DelegateTaskInfo taskInfo = new DelegateTaskInfo().setProcessDefinitionName(name).setTaskId(delegateTask.getId()).setTaskName(delegateTask.getName())// + .setProcessInstanceId(processInstanceId).setProcessDefinitionId(processDefinitionId).setCreateByUserId(userId); + log.info("taskInfo:{}", JSON.toJSONString(taskInfo)); + return taskInfo; } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java b/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java index 8a09580..06eef0a 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java @@ -3,6 +3,7 @@ package com.olivia.peanut.flow.core.listener; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateTask; /*** * @@ -17,6 +18,7 @@ public class DelegateTaskInfo { private String taskName; private String processDefinitionId; private String processInstanceId; - + private DelegateTask delegateTask; + private String createByUserId; } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java index 2a9f202..33add0b 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateBeginTaskListener.java @@ -25,7 +25,7 @@ public class CreateBeginTaskListener extends FlowBaseService implements TaskList // variables.put("userAssignee", Map.of("user", "login")); delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); } - flowsUserService.setInputConfig(variables, true, delegateTask); + flowsUserService.setInputConfig(variables, true, getDelegateTaskInfo(delegateTask)); // delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); log.info("us : {}", delegateTask.getAssignee()); } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java index a449760..aa6a6ea 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/CreateTaskListener.java @@ -22,7 +22,7 @@ public class CreateTaskListener extends FlowBaseService implements TaskListener RuntimeService runtimeService = getRuntimeService(); FlowConfigService flowConfigService = getFlowConfigService(); Map map = runtimeService.getVariables(delegateTask.getExecutionId()); - flowConfigService.setInputConfig(map, true, delegateTask); + flowConfigService.setInputConfig(map, true, getDelegateTaskInfo(delegateTask)); // delegateTask.setAssignee(userIdList.get(0)); // log.info("setAssignee:{}", userIdList.get(0)); diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java index 45a5746..893af16 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/task/NoticeTaskListener.java @@ -1,6 +1,5 @@ package com.olivia.peanut.flow.core.listener.task; -import com.alibaba.fastjson2.JSON; import com.olivia.peanut.flow.core.FlowBaseService; import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; import lombok.extern.slf4j.Slf4j; @@ -17,8 +16,6 @@ public class NoticeTaskListener extends FlowBaseService implements TaskListener @Override public void notify(DelegateTask delegateTask) { delegateTask.complete(); - DelegateTaskInfo delegateTaskInfo = delegateTaskInfo(delegateTask); - log.info("delegateTaskInfo {}", JSON.toJSONString(delegateTaskInfo)); - + DelegateTaskInfo delegateTaskInfo = getDelegateTaskInfo(delegateTask); } } diff --git a/src/main/java/com/olivia/peanut/flow/service/FlowConfigService.java b/src/main/java/com/olivia/peanut/flow/service/FlowConfigService.java index 8f4b1f6..a0ddf7b 100644 --- a/src/main/java/com/olivia/peanut/flow/service/FlowConfigService.java +++ b/src/main/java/com/olivia/peanut/flow/service/FlowConfigService.java @@ -1,10 +1,11 @@ package com.olivia.peanut.flow.service; import com.olivia.peanut.flow.api.entity.FlowUserAssignee; +import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; import java.util.Map; import org.camunda.bpm.engine.delegate.DelegateTask; public interface FlowConfigService { - void setInputConfig(Map userAssigneeMap, Boolean addVariableMap, DelegateTask delegateTask); + void setInputConfig(Map userAssigneeMap, Boolean addVariableMap, DelegateTaskInfo delegateTask); } diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java index 8411a4c..9675bca 100644 --- a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java @@ -7,20 +7,19 @@ import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.olivia.peanut.base.model.BaseRole; +import com.olivia.peanut.base.model.BaseUserDept; import com.olivia.peanut.base.model.BaseUserRole; import com.olivia.peanut.base.service.BaseRoleService; +import com.olivia.peanut.base.service.BaseUserDeptService; import com.olivia.peanut.base.service.BaseUserRoleService; -import com.olivia.peanut.flow.api.entity.FlowUserAssignee; +import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; import com.olivia.peanut.flow.service.FlowConfigService; import com.olivia.sdk.filter.LoginUserContext; import com.olivia.sdk.utils.$; -import com.olivia.sdk.utils.RunUtils; import jakarta.annotation.Resource; import java.time.Duration; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; +import java.util.stream.Collectors; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.camunda.bpm.engine.RuntimeService; @@ -41,11 +40,13 @@ public class FlowConfigServiceImpl implements FlowConfigService { @Resource RuntimeService runtimeService; - + @Resource + BaseUserDeptService baseUserDeptService; @Override @SuppressWarnings("unchecked") - public void setInputConfig(Map variableMap, Boolean addVariableMap, DelegateTask delegateTask) { + public void setInputConfig(Map variableMap, Boolean addVariableMap, DelegateTaskInfo delegateTaskInfo) { + DelegateTask delegateTask = delegateTaskInfo.getDelegateTask(); Map userAssigneeMap = (Map) variableMap.get("userAssignee"); List list = null; if (CollUtil.isNotEmpty(userAssigneeMap)) { @@ -57,31 +58,42 @@ public class FlowConfigServiceImpl implements FlowConfigService { .map(BaseUserRole::getUserId).distinct().map(Object::toString).toList(); log.info("角色: {} addVariableMap:{} 用户: {}", role, addVariableMap, list); $.requireNonNullCanIgnoreException(list, "角色: " + role + " 没有用户"); - if (Boolean.TRUE.equals(addVariableMap)) { - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); - } - } String user = userAssigneeMap.get("user"); if (StringUtils.isNotBlank(user)) { user = user.replaceAll(" ", ""); if ("login".equalsIgnoreCase(user)) { list = List.of(LoginUserContext.getLoginUser().getIdStr()); - if (Boolean.TRUE.equals(addVariableMap)) { - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); - } - } } + String deptRole = userAssigneeMap.get("deptRole"); + if (StringUtils.isNotBlank(deptRole)) { + Set userIdSet = this.baseUserDeptService.list(new LambdaQueryWrapper().eq(BaseUserDept::getUserId, delegateTaskInfo.getCreateByUserId())) + .stream().map(BaseUserDept::getUserId).collect(Collectors.toSet()); + list = userRoleService.list(new LambdaQueryWrapper().in(BaseUserRole::getUserId, userIdSet) + .eq(BaseUserRole::getRoleId, roleService.getOne(new LambdaQueryWrapper().eq(BaseRole::getRoleCode, deptRole)).getId())).stream() + .map(BaseUserRole::getUserId).distinct().map(Object::toString).toList(); + log.info("用户所在部门中的角色: {} addVariableMap:{} 用户: {}", deptRole, addVariableMap, list); + $.requireNonNullCanIgnoreException(list, "用户所在部门中的角色: " + deptRole + " 没有用户"); + } + + } + if (Boolean.TRUE.equals(addVariableMap) && CollUtil.isNotEmpty(list)) { + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); } Object timeOutObj = variableMap.get("timeOut"); if (Objects.nonNull(timeOutObj)) { Duration duration = $.getDuration((String) timeOutObj); delegateTask.setDueDate(new Date(new Date().getTime() + duration.toMillis())); } - + if (StringUtils.isBlank(delegateTask.getAssignee())) { + if (CollUtil.isNotEmpty(list)) { + delegateTask.setAssignee(list.get(0)); + } else { + delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); + } + } log.info("variableMap: {} addVariableMap:{} 用户: {}", JSON.toJSONString(variableMap), addVariableMap, list); } } diff --git a/src/main/resources/flowable/qj.bpmn b/src/main/resources/flowable/qj.bpmn index 77a6a0d..1e5d3a4 100644 --- a/src/main/resources/flowable/qj.bpmn +++ b/src/main/resources/flowable/qj.bpmn @@ -1,131 +1,68 @@ - - - + + + + + - Flow_07pba5u + Flow_0v965sg - - + + + - - + - Flow_07pba5u - Flow_1krlhc6 + Flow_0v965sg + Flow_0xvlmra - + - - + zongjian + 1H - Flow_1krlhc6 - Flow_1d9ohsf - Flow_0s19z2m - - - - - - - - - - zongjian - - - - - Flow_1d9ohsf - Flow_1blnqvt - - - - - - Flow_0s19z2m - Flow_1blnqvt - Flow_1dmxa1c - - - Flow_1dmxa1c + Flow_0xvlmra + Flow_0m7r8de + + + + + Flow_0m7r8de - - - - ${d >= 3} - - - ${d <=3 } - - - + - - - - - + - - - + + + - - - + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + + - - - - + + + -- Gitee From ef71fdd1c70b7349107e4c27d1c6d75a66dfeb30 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Sun, 4 Aug 2024 21:42:24 +0800 Subject: [PATCH 15/27] =?UTF-8?q?feat(flow):=20=E4=BB=BB=E5=8A=A1=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=AE=A1=E6=89=B9=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/workflow.md | 26 +++++- .../com/olivia/peanut/flow/api/FlowApi.java | 10 +++ .../flow/api/entity/SelectTaskCopyReq.java | 20 +++++ .../flow/api/entity/SelectTaskCopyRes.java | 27 +++++++ .../flow/api/entity/TaskHistoryListReq.java | 20 +++++ .../flow/api/entity/TaskHistoryListRes.java | 31 ++++++++ .../peanut/flow/api/impl/FlowApiImpl.java | 39 ++++++++- .../service/impl/FlowConfigServiceImpl.java | 54 +++++++------ src/main/resources/flowable/qj.bpmn | 79 +++++++++++++++---- 9 files changed, 263 insertions(+), 43 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyRes.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java diff --git a/doc/workflow.md b/doc/workflow.md index d0a4f8d..b48d7d1 100644 --- a/doc/workflow.md +++ b/doc/workflow.md @@ -4,10 +4,9 @@ ## 工作流配置约定 +0. 工作流版本 camunda-7版本, 使用bpmn结构 1. 工作流开始第一个节点id必须为: begin ,流程被驳回时需要定位到第一个节点 -2. 工作流多人处理时, condition 配置为: ${userIdList} , completion-condition 配置为: ${nrOfCompletedInstances == 1},1人通过即通过 -3. 工作流单个任务分派 assignee 配置为: ${userId} , -4. 超时配置 : timeOut 配置为: 4D :4天后超时 +2. 用户选择查看 [task inputs 添加默认数据](#task-inputs-添加默认数据) ## 工作流 listener @@ -33,9 +32,20 @@ |--------------|--------|---------------------------------------|---------------|--------------------|------------------------| | userAssignee | map | key: role , value: roleCode (可变) | 指定角色处理 | CreateTaskListener | {"role":"CEO"} | | userAssignee | map | key: user , value: login (定值) | 当前登录用户处理 | CreateTaskListener | {"user":"login"} | -| userAssignee | map | key: deptRole , value: roleCode (可变) | 用户所在部门角色下人员处理 | CreateTaskListener | {"deptRole":"manager"} | +| userAssignee | map | key: deptRole , value: roleCode (可变) | 用户所在部门角色下人员处理 | CreateTaskListener | {"deptRole":"manager"} | +| copyAssignee | map | key: role , value: roleCode (可变) | 抄送 | CreateTaskListener | {"role":"CEO"} | +| copyAssignee | map | key: user , value: login (定值) | 抄送 | CreateTaskListener | {"user":"login"} | +| copyAssignee | map | key: deptRole , value: roleCode (可变) | 抄送 | CreateTaskListener | {"deptRole":"manager"} | | timeOut | String | 时长-[H (小时),D (天),W(周) | 任务超时时间 | CreateTaskListener | 3D ,3天后超时 | +## task inputs 添加默认数据 + +| 配置名称 | 说明 | inputs 来源 | 值 | +|----------------|--------|--------------|-----------------------------| +| copyUserIdList | 抄送用户列表 | copyAssignee | ["userId1","userId2"] | +| userIdList | 抄送用户列表 | userAssignee | ["userId1","userId2"] | +| userId | 抄送用户列表 | userAssignee | userId: userIdList列表第一个用户ID | + ## 多人处理 先了解到,对于“多实例任务”, task 会自动生成以下几个流程变量: @@ -49,3 +59,11 @@ > $ {nrOfInstances == nrOfCompletedInstances} 表示所有人员审批完成后会签结束。 > ${ nrOfCompletedInstances == 1} 表示一个人完成审批。 + +## 问题 + +1. 流程TTL应该配置 + +> 流程配置 history cleanup 中: time to live 必填,单位 天 + +2. 2 diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java index 11931fd..1e212af 100644 --- a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java +++ b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java @@ -3,6 +3,7 @@ package com.olivia.peanut.flow.api; import com.olivia.peanut.flow.api.entity.*; import com.olivia.sdk.utils.DynamicsPage; import jakarta.validation.Valid; +import java.util.List; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -24,6 +25,7 @@ public interface FlowApi { @PostMapping("/task/undone") DynamicsPage taskUndone(@RequestBody @Valid TaskUndoneReq req); + @PostMapping("/task/undone/home") DynamicsPage taskUndoneHome(@RequestBody @Valid TaskUndoneReq req); @@ -34,4 +36,12 @@ public interface FlowApi { @PostMapping("/task/complete") CompleteRes complete(@RequestBody @Valid CompleteReq req); + + //copy + @PostMapping("/task/copy") + DynamicsPage selectTaskCopy(@RequestBody @Valid SelectTaskCopyReq req); + + // taskHistoryList + @PostMapping("/task/historyList") + List taskHistoryList(@RequestBody @Valid TaskHistoryListReq req); } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyReq.java new file mode 100644 index 0000000..557fdd3 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyReq.java @@ -0,0 +1,20 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotBlank; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class SelectTaskCopyReq { + + private Integer pageNum; + private Integer pageSize; + @NotBlank(message = "流程key不能为空") + private String flowKey; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyRes.java new file mode 100644 index 0000000..7d17b94 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/SelectTaskCopyRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.flow.api.entity; + +import java.util.Date; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class SelectTaskCopyRes { + + private String taskId; + private String name; + private String packageName; + private Date createTime; // The time when the task has been created + private Date lastUpdated; + private Date dueDate; + private Date followUpDate; + private String processInstanceId; + private String businessKey; + private Object flowFormId; + private Boolean isFirstTask; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListReq.java new file mode 100644 index 0000000..ce2b93b --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListReq.java @@ -0,0 +1,20 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotBlank; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskHistoryListReq { + + // @NotBlank(message = "任务id不能为空") + private String taskId; + @NotBlank(message = "流程实例id不能为空") + private String processInstanceId; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java new file mode 100644 index 0000000..4bcd655 --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.flow.api.entity; + +import java.util.Date; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import org.camunda.bpm.engine.task.Comment; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskHistoryListRes { + + protected String taskId; + protected String assignee; + protected String owner; + protected String name; + protected String description; + protected Date dueDate; + protected Date followUpDate; + protected int priority; + protected String parentTaskId; + protected String deleteReason; + protected String taskDefinitionKey; + protected String activityInstanceId; + + private Comment messageComment; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index 422ae47..5fb5d6e 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -21,14 +21,17 @@ import com.olivia.sdk.utils.RunUtils; import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.camunda.bpm.engine.*; +import org.camunda.bpm.engine.history.HistoricTaskInstance; import org.camunda.bpm.engine.repository.Deployment; import org.camunda.bpm.engine.runtime.ActivityInstance; import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.task.Comment; import org.camunda.bpm.engine.task.Task; import org.camunda.bpm.engine.task.TaskQuery; import org.jetbrains.annotations.NotNull; @@ -53,6 +56,7 @@ public class FlowApiImpl implements FlowApi { HistoryService historyService; @Resource FlowFormUserValueService flowFormUserValueService; + @Resource private RuntimeService runtimeService; @@ -170,12 +174,43 @@ public class FlowApiImpl implements FlowApi { $.requireNonNullCanIgnoreException(taskList, "任务不存在"); String processInstanceId = taskList.get(0).getProcessInstanceId(); Map flowValueMap = this.flowFormUserValueService.list( - new LambdaQueryWrapper().eq(FlowFormUserValue::getProcessInstanceId, processInstanceId).eq(FlowFormUserValue::getIsAddFlowValue, true)) - .stream().collect(Collectors.toMap(FlowFormUserValue::getFormItemFiled, FlowFormUserValue::getUserValue)); + new LambdaQueryWrapper().eq(FlowFormUserValue::getProcessInstanceId, processInstanceId).eq(FlowFormUserValue::getIsAddFlowValue, true)).stream() + .collect(Collectors.toMap(FlowFormUserValue::getFormItemFiled, FlowFormUserValue::getUserValue)); flowValueMap.put(IS_FIRST_TASK, IS_FIRST_TASK_NO); runtimeService.setVariables(processInstanceId, flowValueMap); taskService.createComment(req.getTaskId(), processInstanceId, req.getMessage()); taskService.complete(req.getTaskId()); return null; } + + @Override + public DynamicsPage selectTaskCopy(SelectTaskCopyReq req) { + String userId = LoginUserContext.getLoginUser().getIdStr(); + TaskQuery active = taskService.createTaskQuery().taskCandidateUser(userId).processDefinitionKey(req.getFlowKey()).orderByTaskCreateTime().desc().active(); + DynamicsPage undoneResDynamicsPage = getTaskUndoneResDynamicsPage(active, $.copy(req, TaskUndoneReq.class)); + DynamicsPage page = new DynamicsPage<>(); + page.setTotal(undoneResDynamicsPage.getTotal()); + page.setDataList($.copyList(undoneResDynamicsPage.getDataList(), SelectTaskCopyRes.class)); + return page; + + } + + + @Override + public List taskHistoryList(TaskHistoryListReq req) { + List taskInstanceList = historyService.createHistoricTaskInstanceQuery().processInstanceId(req.getProcessInstanceId()).list(); + taskInstanceList.sort(Comparator.comparing(HistoricTaskInstance::getStartTime)); + + List taskList = taskService.createTaskQuery().processInstanceId(req.getProcessInstanceId()).list(); + if (CollUtil.isEmpty(taskList)) { + return List.of(); + } + Map taskCommentMap = taskService.getProcessInstanceComments(req.getProcessInstanceId()).stream() + .collect(Collectors.toMap(Comment::getTaskId, Function.identity(), (o, o2) -> o2)); + List resList = $.copyList(taskList, TaskHistoryListRes.class); + resList.forEach(taskInstance -> { + taskInstance.setMessageComment(taskCommentMap.get(taskInstance.getTaskId())); + }); + return resList; + } } diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java index 9675bca..9fcfe75 100644 --- a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java @@ -48,7 +48,33 @@ public class FlowConfigServiceImpl implements FlowConfigService { public void setInputConfig(Map variableMap, Boolean addVariableMap, DelegateTaskInfo delegateTaskInfo) { DelegateTask delegateTask = delegateTaskInfo.getDelegateTask(); Map userAssigneeMap = (Map) variableMap.get("userAssignee"); - List list = null; + List list = getUserIdList(addVariableMap, delegateTaskInfo, userAssigneeMap); + if (Boolean.TRUE.equals(addVariableMap) && CollUtil.isNotEmpty(list)) { + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); + runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); + } + Map copyAssigneeMap = (Map) variableMap.get("copyAssignee"); + List copyUserIdList = getUserIdList(addVariableMap, delegateTaskInfo, copyAssigneeMap); + if (CollUtil.isNotEmpty(copyUserIdList)) { + delegateTask.addCandidateUsers(copyUserIdList); + } + Object timeOutObj = variableMap.get("timeOut"); + if (Objects.nonNull(timeOutObj)) { + Duration duration = $.getDuration((String) timeOutObj); + delegateTask.setDueDate(new Date(new Date().getTime() + duration.toMillis())); + } + if (StringUtils.isBlank(delegateTask.getAssignee())) { + if (CollUtil.isNotEmpty(list)) { + delegateTask.setAssignee(list.get(0)); + } else { + delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); + } + } + log.info("variableMap: {} addVariableMap:{} 用户: {}", JSON.toJSONString(variableMap), addVariableMap, list); + } + + private List getUserIdList(Boolean addVariableMap, DelegateTaskInfo delegateTaskInfo, Map userAssigneeMap) { + List list = new ArrayList<>(); if (CollUtil.isNotEmpty(userAssigneeMap)) { String role = userAssigneeMap.get("role"); if (StringUtils.isNotBlank(role)) { @@ -68,32 +94,16 @@ public class FlowConfigServiceImpl implements FlowConfigService { } String deptRole = userAssigneeMap.get("deptRole"); if (StringUtils.isNotBlank(deptRole)) { - Set userIdSet = this.baseUserDeptService.list(new LambdaQueryWrapper().eq(BaseUserDept::getUserId, delegateTaskInfo.getCreateByUserId())) - .stream().map(BaseUserDept::getUserId).collect(Collectors.toSet()); + Set userIdSet = this.baseUserDeptService.list(new LambdaQueryWrapper().eq(BaseUserDept::getUserId, delegateTaskInfo.getCreateByUserId())).stream() + .map(BaseUserDept::getUserId).collect(Collectors.toSet()); list = userRoleService.list(new LambdaQueryWrapper().in(BaseUserRole::getUserId, userIdSet) - .eq(BaseUserRole::getRoleId, roleService.getOne(new LambdaQueryWrapper().eq(BaseRole::getRoleCode, deptRole)).getId())).stream() - .map(BaseUserRole::getUserId).distinct().map(Object::toString).toList(); + .eq(BaseUserRole::getRoleId, roleService.getOne(new LambdaQueryWrapper().eq(BaseRole::getRoleCode, deptRole)).getId())).stream().map(BaseUserRole::getUserId) + .distinct().map(Object::toString).toList(); log.info("用户所在部门中的角色: {} addVariableMap:{} 用户: {}", deptRole, addVariableMap, list); $.requireNonNullCanIgnoreException(list, "用户所在部门中的角色: " + deptRole + " 没有用户"); } } - if (Boolean.TRUE.equals(addVariableMap) && CollUtil.isNotEmpty(list)) { - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); - } - Object timeOutObj = variableMap.get("timeOut"); - if (Objects.nonNull(timeOutObj)) { - Duration duration = $.getDuration((String) timeOutObj); - delegateTask.setDueDate(new Date(new Date().getTime() + duration.toMillis())); - } - if (StringUtils.isBlank(delegateTask.getAssignee())) { - if (CollUtil.isNotEmpty(list)) { - delegateTask.setAssignee(list.get(0)); - } else { - delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); - } - } - log.info("variableMap: {} addVariableMap:{} 用户: {}", JSON.toJSONString(variableMap), addVariableMap, list); + return list; } } diff --git a/src/main/resources/flowable/qj.bpmn b/src/main/resources/flowable/qj.bpmn index 1e5d3a4..3e43458 100644 --- a/src/main/resources/flowable/qj.bpmn +++ b/src/main/resources/flowable/qj.bpmn @@ -1,22 +1,22 @@ - + - + Flow_0v965sg - + Flow_0v965sg Flow_0xvlmra - + @@ -29,13 +29,37 @@ Flow_0xvlmra - Flow_0m7r8de - - - - - Flow_0m7r8de + Flow_07dwxsu + + + + + ${dayCount>3} + + + Flow_1eim3a9 + Flow_02k6lkn + + + ${dayCount<=3} + + + Flow_07dwxsu + Flow_1k56zux + Flow_02k6lkn + + + + + + + + + + Flow_1k56zux + Flow_1eim3a9 + @@ -46,11 +70,17 @@ - + - - + + + + + + + + @@ -60,9 +90,28 @@ - + - + + + + + + + + + + + + + + + + + + + + -- Gitee From a61c8e81b11be14df42f3a9ab77d5ffeac1e8707 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Mon, 5 Aug 2024 10:52:09 +0800 Subject: [PATCH 16/27] =?UTF-8?q?feat(=E5=B7=A5=E4=BD=9C=E6=B5=81):?= =?UTF-8?q?=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/api/entity/baseRole/BaseRoleDto.java | 2 +- .../peanut/flow/api/entity/FlowStr.java | 3 ++ .../peanut/flow/api/impl/FlowApiImpl.java | 3 +- .../peanut/flow/core/FlowBaseService.java | 17 ++++++++- .../flow/core/listener/DelegateTaskInfo.java | 2 + .../execution/StartExecutionListener.java | 14 +++++-- .../service/impl/FlowConfigServiceImpl.java | 38 +++++++++++-------- src/main/resources/flowable/qj.bpmn | 21 +++++++--- 8 files changed, 73 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java index 5918ef3..2fc128e 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseRole/BaseRoleDto.java @@ -33,7 +33,7 @@ public class BaseRoleDto extends BaseEntityDto { /*** * 角色组 */ - @NotNull(message = "角色组不能为空", groups = {InsertCheck.class, UpdateCheck.class}) +// @NotNull(message = "角色组不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long roleGroupId; private String roleGroupName; diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java index a58cef3..1ed6501 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java @@ -10,9 +10,12 @@ public interface FlowStr { String FLOW_CREATE_USER_ID = "FLOW_CREATE_USER_ID"; String IS_FIRST_TASK = "FIRST_TASK"; String FLOW_USER_ID = "userId"; + String FLOW_USER = "user"; + String FLOW_LOGIN = "login"; String FLOW_USER_ID_LIST = "userIdList"; String IS_FIRST_TASK_YES = "1"; String IS_FIRST_TASK_NO = "0"; + String USER_ASSIGNEE = "userAssignee"; } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index 5fb5d6e..6e160b7 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -169,13 +169,14 @@ public class FlowApiImpl implements FlowApi { } @Override + @Transactional public CompleteRes complete(CompleteReq req) { List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); $.requireNonNullCanIgnoreException(taskList, "任务不存在"); String processInstanceId = taskList.get(0).getProcessInstanceId(); Map flowValueMap = this.flowFormUserValueService.list( new LambdaQueryWrapper().eq(FlowFormUserValue::getProcessInstanceId, processInstanceId).eq(FlowFormUserValue::getIsAddFlowValue, true)).stream() - .collect(Collectors.toMap(FlowFormUserValue::getFormItemFiled, FlowFormUserValue::getUserValue)); + .collect(Collectors.toMap(FlowFormUserValue::getFormItemFiled, FlowFormUserValue::getUserValue, (a, b) -> b)); flowValueMap.put(IS_FIRST_TASK, IS_FIRST_TASK_NO); runtimeService.setVariables(processInstanceId, flowValueMap); taskService.createComment(req.getTaskId(), processInstanceId, req.getMessage()); diff --git a/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java index f1f6540..80badd2 100644 --- a/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java +++ b/src/main/java/com/olivia/peanut/flow/core/FlowBaseService.java @@ -7,6 +7,7 @@ import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; import com.olivia.peanut.flow.service.FlowConfigService; import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.*; +import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.DelegateTask; import org.camunda.bpm.engine.repository.ProcessDefinition; @@ -132,6 +133,20 @@ public class FlowBaseService { return SpringUtil.getBean(DecisionService.class); } + public DelegateTaskInfo getDelegateTaskInfo(DelegateExecution delegateTask) { + String processDefinitionId = delegateTask.getProcessDefinitionId(); + String processInstanceId = delegateTask.getProcessInstanceId(); + + ProcessDefinition processDefinition = getRepositoryService().getProcessDefinition(processDefinitionId); + String name = processDefinition.getName(); + + String userId = (String) getRuntimeService().getVariable(processInstanceId, FlowStr.FLOW_USER_ID); + DelegateTaskInfo taskInfo = new DelegateTaskInfo().setProcessDefinitionName(name).setTaskId(delegateTask.getId()).setTaskName(delegateTask.getCurrentActivityName())// + .setProcessInstanceId(processInstanceId).setProcessDefinitionId(processDefinitionId).setCreateByUserId(userId); + log.info("taskInfo:{}", JSON.toJSONString(taskInfo)); + return taskInfo.setDelegateExecution(delegateTask); + } + public DelegateTaskInfo getDelegateTaskInfo(DelegateTask delegateTask) { String processDefinitionId = delegateTask.getProcessDefinitionId(); String processInstanceId = delegateTask.getProcessInstanceId(); @@ -150,6 +165,6 @@ public class FlowBaseService { DelegateTaskInfo taskInfo = new DelegateTaskInfo().setProcessDefinitionName(name).setTaskId(delegateTask.getId()).setTaskName(delegateTask.getName())// .setProcessInstanceId(processInstanceId).setProcessDefinitionId(processDefinitionId).setCreateByUserId(userId); log.info("taskInfo:{}", JSON.toJSONString(taskInfo)); - return taskInfo; + return taskInfo.setDelegateTask(delegateTask); } } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java b/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java index 06eef0a..2c324b9 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/DelegateTaskInfo.java @@ -3,6 +3,7 @@ package com.olivia.peanut.flow.core.listener; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; +import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.DelegateTask; /*** @@ -19,6 +20,7 @@ public class DelegateTaskInfo { private String processDefinitionId; private String processInstanceId; private DelegateTask delegateTask; + private DelegateExecution delegateExecution; private String createByUserId; } diff --git a/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java b/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java index 50735f7..06dad30 100644 --- a/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java +++ b/src/main/java/com/olivia/peanut/flow/core/listener/execution/StartExecutionListener.java @@ -1,8 +1,9 @@ package com.olivia.peanut.flow.core.listener.execution; -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; +import com.olivia.peanut.flow.api.entity.FlowStr; +import com.olivia.peanut.flow.core.FlowBaseService; +import com.olivia.peanut.flow.service.FlowConfigService; +import java.util.Map; import lombok.extern.slf4j.Slf4j; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.ExecutionListener; @@ -11,11 +12,16 @@ import org.camunda.bpm.engine.delegate.ExecutionListener; * */ @Slf4j -public class StartExecutionListener implements ExecutionListener { +public class StartExecutionListener extends FlowBaseService implements ExecutionListener { @Override public void notify(DelegateExecution execution) throws Exception { log.info("StartExecutionListener notify"); + FlowConfigService flowsUserService = getFlowConfigService(); + Map variables = execution.getVariables(); + variables.put(FlowStr.USER_ASSIGNEE, Map.of(FlowStr.FLOW_USER, FlowStr.FLOW_LOGIN)); + + flowsUserService.setInputConfig(variables, true, getDelegateTaskInfo(execution)); } } diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java index 9fcfe75..a0b6990 100644 --- a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java @@ -23,6 +23,7 @@ import java.util.stream.Collectors; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.DelegateTask; import org.springframework.stereotype.Service; @@ -47,29 +48,35 @@ public class FlowConfigServiceImpl implements FlowConfigService { @SuppressWarnings("unchecked") public void setInputConfig(Map variableMap, Boolean addVariableMap, DelegateTaskInfo delegateTaskInfo) { DelegateTask delegateTask = delegateTaskInfo.getDelegateTask(); + DelegateExecution delegateExecution = delegateTaskInfo.getDelegateExecution(); Map userAssigneeMap = (Map) variableMap.get("userAssignee"); List list = getUserIdList(addVariableMap, delegateTaskInfo, userAssigneeMap); if (Boolean.TRUE.equals(addVariableMap) && CollUtil.isNotEmpty(list)) { - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID, list.get(0)); - runtimeService.setVariable(delegateTask.getExecutionId(), FLOW_USER_ID_LIST, list); + runtimeService.setVariable(delegateTaskInfo.getProcessInstanceId(), FLOW_USER_ID, list.get(0)); + runtimeService.setVariable(delegateTaskInfo.getProcessInstanceId(), FLOW_USER_ID_LIST, list); } Map copyAssigneeMap = (Map) variableMap.get("copyAssignee"); List copyUserIdList = getUserIdList(addVariableMap, delegateTaskInfo, copyAssigneeMap); - if (CollUtil.isNotEmpty(copyUserIdList)) { - delegateTask.addCandidateUsers(copyUserIdList); - } - Object timeOutObj = variableMap.get("timeOut"); - if (Objects.nonNull(timeOutObj)) { - Duration duration = $.getDuration((String) timeOutObj); - delegateTask.setDueDate(new Date(new Date().getTime() + duration.toMillis())); - } - if (StringUtils.isBlank(delegateTask.getAssignee())) { - if (CollUtil.isNotEmpty(list)) { - delegateTask.setAssignee(list.get(0)); - } else { - delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); + if (Objects.nonNull(delegateTask)){ + if (CollUtil.isNotEmpty(copyUserIdList)) { + delegateTask.addCandidateUsers(copyUserIdList); + } + Object timeOutObj = variableMap.get("timeOut"); + if (Objects.nonNull(timeOutObj)) { + Duration duration = $.getDuration((String) timeOutObj); + delegateTask.setDueDate(new Date(new Date().getTime() + duration.toMillis())); + } + if (StringUtils.isBlank(delegateTask.getAssignee())) { + if (CollUtil.isNotEmpty(list)) { + delegateTask.setAssignee(list.get(0)); + } else { + delegateTask.setAssignee(LoginUserContext.getLoginUser().getIdStr()); + } } } +// if (Objects.nonNull(delegateExecution)){ +// +// } log.info("variableMap: {} addVariableMap:{} 用户: {}", JSON.toJSONString(variableMap), addVariableMap, list); } @@ -90,6 +97,7 @@ public class FlowConfigServiceImpl implements FlowConfigService { user = user.replaceAll(" ", ""); if ("login".equalsIgnoreCase(user)) { list = List.of(LoginUserContext.getLoginUser().getIdStr()); +// delegateTaskInfo.getDelegateTask().setAssignee(list.get(0)); } } String deptRole = userAssigneeMap.get("deptRole"); diff --git a/src/main/resources/flowable/qj.bpmn b/src/main/resources/flowable/qj.bpmn index 3e43458..03bf47e 100644 --- a/src/main/resources/flowable/qj.bpmn +++ b/src/main/resources/flowable/qj.bpmn @@ -3,22 +3,31 @@ + Flow_0v965sg - + - + + + + login + + + 1H + Flow_0v965sg Flow_0xvlmra - + + - + @@ -53,7 +62,9 @@ - + + CEO + -- Gitee From ceeca53a740c1c4cf3755e9085fc2a2185d2523b Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Mon, 5 Aug 2024 17:51:03 +0800 Subject: [PATCH 17/27] =?UTF-8?q?feat(menu):=20=E5=8A=A8=E6=80=81=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/tmp.sql | 81 +- .../olivia/peanut/base/api/BaseAppApi.java | 76 ++ ...sourceApi.java => BaseAppResourceApi.java} | 42 +- .../BaseAppDeleteByIdListReq.java} | 8 +- .../BaseAppDeleteByIdListRes.java} | 8 +- .../base/api/entity/baseApp/BaseAppDto.java | 42 + .../BaseAppExportQueryPageListInfoRes.java} | 8 +- .../BaseAppExportQueryPageListReq.java} | 10 +- .../BaseAppImportReq.java} | 8 +- .../BaseAppImportRes.java} | 8 +- .../BaseAppInsertReq.java} | 8 +- .../BaseAppInsertRes.java} | 8 +- .../BaseAppQueryByIdListReq.java} | 8 +- .../BaseAppQueryByIdListRes.java} | 10 +- .../BaseAppQueryListReq.java} | 10 +- .../BaseAppQueryListRes.java} | 10 +- .../BaseAppUpdateByIdReq.java} | 8 +- .../BaseAppUpdateByIdRes.java} | 8 +- .../BaseAppResourceDeleteByIdListReq.java | 34 + .../BaseAppResourceDeleteByIdListRes.java | 29 + .../BaseAppResourceDto.java} | 21 +- ...AppResourceExportQueryPageListInfoRes.java | 27 + ...BaseAppResourceExportQueryPageListReq.java | 34 + .../BaseAppResourceImportReq.java | 31 + .../BaseAppResourceImportRes.java | 31 + .../BaseAppResourceInsertReq.java | 25 + .../BaseAppResourceInsertRes.java | 29 + .../BaseAppResourceQueryByIdListReq.java | 32 + .../BaseAppResourceQueryByIdListRes.java | 31 + .../BaseAppResourceQueryListReq.java | 26 + .../BaseAppResourceQueryListRes.java | 31 + .../BaseAppResourceUpdateByIdReq.java | 30 + .../BaseAppResourceUpdateByIdRes.java | 24 + .../peanut/base/api/impl/BaseAppApiImpl.java | 104 +++ .../base/api/impl/BaseAppResourceApiImpl.java | 104 +++ .../base/api/impl/BaseResourceApiImpl.java | 104 --- ...stener.java => BaseAppImportListener.java} | 12 +- .../BaseAppResourceImportListener.java | 48 + ...ResourceMapper.java => BaseAppMapper.java} | 8 +- .../base/mapper/BaseAppResourceMapper.java | 18 + .../com/olivia/peanut/base/model/BaseApp.java | 35 + ...BaseResource.java => BaseAppResource.java} | 20 +- .../base/service/BaseAppResourceService.java | 26 + ...sourceService.java => BaseAppService.java} | 16 +- ...l.java => BaseAppResourceServiceImpl.java} | 92 +- .../base/service/impl/BaseAppServiceImpl.java | 114 +++ .../peanut/base/vue/baseDept/BaseDept.vue | 226 ----- .../base/vue/baseResource/BaseResource.vue | 258 ------ .../peanut/base/vue/baseRole/BaseRole.vue | 218 ----- .../base/vue/baseRoleGroup/BaseRoleGroup.vue | 210 ----- .../vue/baseRoleResource/BaseRoleResource.vue | 210 ----- .../base/vue/baseUserDept/BaseUserDept.vue | 210 ----- .../base/vue/baseUserRole/BaseUserRole.vue | 210 ----- .../baseUserRoleGroup/BaseUserRoleGroup.vue | 210 ----- src/main/resources/application.yml | 2 +- src/test/java/com/olivia/menu/Menu.java | 67 ++ src/test/resources/menu.json | 837 ++++++++++++++++++ 57 files changed, 2108 insertions(+), 2047 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseAppApi.java rename src/main/java/com/olivia/peanut/base/api/{BaseResourceApi.java => BaseAppResourceApi.java} (35%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceDeleteByIdListReq.java => baseApp/BaseAppDeleteByIdListReq.java} (71%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceDeleteByIdListRes.java => baseApp/BaseAppDeleteByIdListRes.java} (64%) create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDto.java rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceExportQueryPageListInfoRes.java => baseApp/BaseAppExportQueryPageListInfoRes.java} (63%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceExportQueryPageListReq.java => baseApp/BaseAppExportQueryPageListReq.java} (65%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceImportReq.java => baseApp/BaseAppImportReq.java} (67%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceImportRes.java => baseApp/BaseAppImportRes.java} (70%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceInsertReq.java => baseApp/BaseAppInsertReq.java} (60%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceInsertRes.java => baseApp/BaseAppInsertRes.java} (66%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceQueryByIdListReq.java => baseApp/BaseAppQueryByIdListReq.java} (68%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceQueryListRes.java => baseApp/BaseAppQueryByIdListRes.java} (61%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceQueryListReq.java => baseApp/BaseAppQueryListReq.java} (58%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceQueryByIdListRes.java => baseApp/BaseAppQueryListRes.java} (61%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceUpdateByIdReq.java => baseApp/BaseAppUpdateByIdReq.java} (66%) rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceUpdateByIdRes.java => baseApp/BaseAppUpdateByIdRes.java} (59%) create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java rename src/main/java/com/olivia/peanut/base/api/entity/{baseResource/BaseResourceDto.java => baseAppResource/BaseAppResourceDto.java} (77%) create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseAppApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java delete mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java rename src/main/java/com/olivia/peanut/base/api/impl/listener/{BaseResourceImportListener.java => BaseAppImportListener.java} (73%) create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java rename src/main/java/com/olivia/peanut/base/mapper/{BaseResourceMapper.java => BaseAppMapper.java} (53%) create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseApp.java rename src/main/java/com/olivia/peanut/base/model/{BaseResource.java => BaseAppResource.java} (73%) create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java rename src/main/java/com/olivia/peanut/base/service/{BaseResourceService.java => BaseAppService.java} (33%) rename src/main/java/com/olivia/peanut/base/service/impl/{BaseResourceServiceImpl.java => BaseAppResourceServiceImpl.java} (38%) create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseAppServiceImpl.java delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue delete mode 100644 src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue create mode 100644 src/test/java/com/olivia/menu/Menu.java create mode 100644 src/test/resources/menu.json diff --git a/sql/tmp.sql b/sql/tmp.sql index 2b015d4..a3d021f 100644 --- a/sql/tmp.sql +++ b/sql/tmp.sql @@ -1,49 +1,52 @@ -create table if not exists flow_form +create table if not exists base_app ( - id bigint auto_increment comment 'ID 自增' primary key, - form_name varchar(64) null comment '表单名称', - form_code varchar(64) null comment '表单编码', - tenant_id bigint null comment '租户ID', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号', - key idx_form_code(form_code) + id bigint auto_increment comment 'ID 自增' primary key, + app_code varchar(64) null comment 'app编码', + app_name varchar(64) null comment 'app名称', + tenant_id bigint null comment '租户ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + key idx_app_code(app_code) -) comment '工作流表单表'; +) comment '应用表'; -create table if not exists flow_form_item +create table if not exists base_app_resource ( - id bigint auto_increment comment 'ID 自增' primary key, - form_id bigint null comment '表单ID', - form_item_name varchar(64) null comment '表单项名称', - form_item_filed varchar(64) null comment '表单项字段', - form_item_value varchar(512) null comment '表单项类型', - form_item_default_value varchar(512) null comment '表单项默认值', - form_item_value_type varchar(64) null comment '表单值类型 text , date , dateTime ,array', - is_add_flow_value tinyint(1) default 0 null comment '是否添加流程变量 0 否,1 是', - -- 必填 - is_required tinyint(1) default 0 null comment '是否必填 0 否,1 是', - sort_index int default 0 null comment '排序', - -- 失去焦点事件 - lose_focus_event varchar(512) null comment '失去焦点事件', - tenant_id bigint null comment '租户ID', - is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', - create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', - create_by bigint null comment '创建人', - update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', - update_by bigint null comment '修改人', - trace_id varchar(64) null comment '调用链路', - version_num int default 0 null comment '版本号', - key idx_form_id(form_id) - -) comment '工作流表单项表'; + id bigint auto_increment comment 'ID 自增' primary key, + app_id bigint null comment '应用ID', + app_code varchar(64) null comment '应用编码', + resource_code varchar(64) null comment '菜单编码', + resource_name varchar(64) null comment '菜单名称', + resource_url varchar(512) null comment '菜单URL', + resource_icon varchar(64) null comment '菜单图标', + resource_type varchar(64) null comment '菜单类型', + is_button tinyint(1) default 0 null comment '是否按钮 0 否,1 是', + parent_id bigint null comment '父菜单ID', + path varchar(512) null comment '菜单路径', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID', + key idx_app_code(app_code), + key idx_app_id(app_id) +) + comment '资源'; + + + + diff --git a/src/main/java/com/olivia/peanut/base/api/BaseAppApi.java b/src/main/java/com/olivia/peanut/base/api/BaseAppApi.java new file mode 100644 index 0000000..c03c979 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseAppApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseApp.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 应用表(BaseApp)对外API + * + * @author peanut + * @since 2024-08-05 11:18:57 + */ +// @FeignClient(value = "",contextId = "baseApp-api",url = "${ portal..center.endpoint:}") +public interface BaseAppApi { + + /** + * 保存 应用表 + */ + @PostMapping("/baseApp/insert") + BaseAppInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseAppInsertReq req); + + /** + * 根据ID 删除 应用表 + */ + @PostMapping("/baseApp/deleteByIdList") + BaseAppDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseAppDeleteByIdListReq req); + + /** + * 查询 应用表 + */ + @PostMapping("/baseApp/queryList") + BaseAppQueryListRes queryList(@RequestBody @Valid BaseAppQueryListReq req); + + /** + * 根据ID 更新 应用表 + */ + @PostMapping("/baseApp/updateById") + BaseAppUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseAppUpdateByIdReq req); + + /** + * 分页查询 应用表 + */ + @PostMapping("/baseApp/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseAppExportQueryPageListReq req); + + /** + * 导出 应用表 + */ + @PostMapping("/baseApp/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseAppExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseApp/importData") + BaseAppImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseApp/queryByIdList") + BaseAppQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseAppQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java b/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java similarity index 35% rename from src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java rename to src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java index 4cf5e38..eaad2c5 100644 --- a/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java +++ b/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java @@ -4,7 +4,7 @@ import org.springframework.validation.annotation.Validated; import com.olivia.sdk.utils.DynamicsPage; import jakarta.validation.Valid; import org.springframework.web.bind.annotation.*; -import com.olivia.peanut.base.api.entity.baseResource.*; +import com.olivia.peanut.base.api.entity.baseAppResource.*; import java.time.LocalDate; import java.time.LocalDateTime; import org.springframework.web.multipart.MultipartFile; @@ -15,62 +15,62 @@ import jakarta.validation.constraints.NotNull; /** - * 资源(BaseResource)对外API + * 资源(BaseAppResource)对外API * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:59 */ -// @FeignClient(value = "",contextId = "baseResource-api",url = "${ portal..center.endpoint:}") -public interface BaseResourceApi { +// @FeignClient(value = "",contextId = "baseAppResource-api",url = "${ portal..center.endpoint:}") +public interface BaseAppResourceApi { /** * 保存 资源 */ - @PostMapping("/baseResource/insert") - BaseResourceInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseResourceInsertReq req); + @PostMapping("/baseAppResource/insert") + BaseAppResourceInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseAppResourceInsertReq req); /** * 根据ID 删除 资源 */ - @PostMapping("/baseResource/deleteByIdList") - BaseResourceDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseResourceDeleteByIdListReq req); + @PostMapping("/baseAppResource/deleteByIdList") + BaseAppResourceDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseAppResourceDeleteByIdListReq req); /** * 查询 资源 */ - @PostMapping("/baseResource/queryList") - BaseResourceQueryListRes queryList(@RequestBody @Valid BaseResourceQueryListReq req); + @PostMapping("/baseAppResource/queryList") + BaseAppResourceQueryListRes queryList(@RequestBody @Valid BaseAppResourceQueryListReq req); /** * 根据ID 更新 资源 */ - @PostMapping("/baseResource/updateById") - BaseResourceUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseResourceUpdateByIdReq req); + @PostMapping("/baseAppResource/updateById") + BaseAppResourceUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseAppResourceUpdateByIdReq req); /** * 分页查询 资源 */ - @PostMapping("/baseResource/queryPageList") - DynamicsPage queryPageList(@RequestBody @Valid BaseResourceExportQueryPageListReq req); + @PostMapping("/baseAppResource/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseAppResourceExportQueryPageListReq req); /** * 导出 资源 */ - @PostMapping("/baseResource/exportQueryPageList") - void queryPageListExport(@RequestBody @Valid BaseResourceExportQueryPageListReq req); + @PostMapping("/baseAppResource/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseAppResourceExportQueryPageListReq req); /** * 导入 */ - @PostMapping("/baseResource/importData") - BaseResourceImportRes importData(@RequestParam("file") MultipartFile file); + @PostMapping("/baseAppResource/importData") + BaseAppResourceImportRes importData(@RequestParam("file") MultipartFile file); /** * 根据ID 批量查询 */ - @PostMapping("/baseResource/queryByIdList") - BaseResourceQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseResourceQueryByIdListReq req); + @PostMapping("/baseAppResource/queryByIdList") + BaseAppResourceQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseAppResourceQueryByIdListReq req); } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDeleteByIdListReq.java similarity index 71% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDeleteByIdListReq.java index 90008c1..e1b79ce 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDeleteByIdListReq.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import lombok.Getter; import lombok.Setter; @@ -9,16 +9,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)根据ID删除多个入参 + * 应用表(BaseApp)根据ID删除多个入参 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceDeleteByIdListReq { +public class BaseAppDeleteByIdListReq { /*** * 要删除的ID diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDeleteByIdListRes.java similarity index 64% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDeleteByIdListRes.java index b1980e0..e55564a 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDeleteByIdListRes.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import lombok.Getter; import lombok.Setter; @@ -9,16 +9,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)根据ID删除多个反参 + * 应用表(BaseApp)根据ID删除多个反参 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceDeleteByIdListRes { +public class BaseAppDeleteByIdListRes { /*** * 受影响行数 diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDto.java new file mode 100644 index 0000000..6492dec --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppDto.java @@ -0,0 +1,42 @@ +package com.olivia.peanut.base.api.entity.baseApp; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 应用表(BaseApp)查询对象返回 + * + * @author peanut + * @since 2024-08-05 11:18:58 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppDto extends BaseEntityDto { + + /*** + * app编码 + */ + @NotBlank(message = "app编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String appCode; + /*** + * app名称 + */ + @NotBlank(message = "app名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String appName; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppExportQueryPageListInfoRes.java similarity index 63% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppExportQueryPageListInfoRes.java index 3994a43..30f1025 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppExportQueryPageListInfoRes.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; import lombok.Getter; @@ -11,16 +11,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)查询对象返回 + * 应用表(BaseApp)查询对象返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceExportQueryPageListInfoRes extends BaseResourceDto { +public class BaseAppExportQueryPageListInfoRes extends BaseAppDto { } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppExportQueryPageListReq.java similarity index 65% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppExportQueryPageListReq.java index 4df2bea..89976a7 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppExportQueryPageListReq.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; import lombok.Getter; @@ -10,21 +10,21 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)查询对象入参 + * 应用表(BaseApp)查询对象入参 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceExportQueryPageListReq { +public class BaseAppExportQueryPageListReq { private int pageNum; private int pageSize; private Boolean queryPage = true; - private BaseResourceDto data; + private BaseAppDto data; public void checkParam() { diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppImportReq.java similarity index 67% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppImportReq.java index 14e5615..87bb80f 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppImportReq.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; import lombok.Getter; @@ -11,16 +11,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)查询对象返回 + * 应用表(BaseApp)查询对象返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ //@Accessors(chain=true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceImportReq extends BaseResourceDto { +public class BaseAppImportReq extends BaseAppDto { public void checkParam() { diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppImportRes.java similarity index 70% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppImportRes.java index f232662..a1f1f7a 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppImportRes.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import lombok.Getter; import lombok.Setter; @@ -8,16 +8,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)保存返回 + * 应用表(BaseApp)保存返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceImportRes { +public class BaseAppImportRes { /**** * 写入行数 diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppInsertReq.java similarity index 60% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppInsertReq.java index ea7e6c3..a88a254 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppInsertReq.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import lombok.Getter; import lombok.Setter; @@ -8,16 +8,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)保存入参 + * 应用表(BaseApp)保存入参 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceInsertReq extends BaseResourceDto { +public class BaseAppInsertReq extends BaseAppDto { public void checkParam() { } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppInsertRes.java similarity index 66% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppInsertRes.java index c56f209..84afa82 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppInsertRes.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import lombok.Getter; import lombok.Setter; @@ -8,16 +8,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)保存返回 + * 应用表(BaseApp)保存返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceInsertRes { +public class BaseAppInsertRes { /**** * 写入行数 diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryByIdListReq.java similarity index 68% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryByIdListReq.java index eed7c25..b628a85 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryByIdListReq.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; import java.util.List; @@ -11,16 +11,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)查询对象入参 + * 应用表(BaseApp)查询对象入参 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:58 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceQueryByIdListReq { +public class BaseAppQueryByIdListReq { private List idList; diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryByIdListRes.java similarity index 61% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryByIdListRes.java index 1de22db..559c63a 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryByIdListRes.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; import lombok.Getter; @@ -10,21 +10,21 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)查询对象返回 + * 应用表(BaseApp)查询对象返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:58 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceQueryListRes { +public class BaseAppQueryByIdListRes { /*** * 返回对象列表 */ - private List dataList; + private List dataList; } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryListReq.java similarity index 58% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryListReq.java index 4e81ed9..68b7f1f 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryListReq.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; import lombok.Getter; @@ -10,17 +10,17 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)查询对象入参 + * 应用表(BaseApp)查询对象入参 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceQueryListReq { +public class BaseAppQueryListReq { - private BaseResourceDto data; + private BaseAppDto data; } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryListRes.java similarity index 61% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryListRes.java index 77bcd58..50821b4 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppQueryListRes.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; import lombok.Getter; @@ -10,21 +10,21 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)查询对象返回 + * 应用表(BaseApp)查询对象返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceQueryByIdListRes { +public class BaseAppQueryListRes { /*** * 返回对象列表 */ - private List dataList; + private List dataList; } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppUpdateByIdReq.java similarity index 66% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppUpdateByIdReq.java index d2395a6..2400d56 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppUpdateByIdReq.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import java.time.LocalDateTime; @@ -11,16 +11,16 @@ import lombok.ToString; import lombok.experimental.Accessors; /** - * 资源(BaseResource)表实体类 + * 应用表(BaseApp)表实体类 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceUpdateByIdReq extends BaseResourceDto { +public class BaseAppUpdateByIdReq extends BaseAppDto { public void checkParam() { diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppUpdateByIdRes.java similarity index 59% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppUpdateByIdRes.java index 4aefb21..54407f0 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseApp/BaseAppUpdateByIdRes.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseApp; import lombok.Getter; import lombok.Setter; @@ -8,16 +8,16 @@ import java.time.LocalDate; import java.time.LocalDateTime; /** - * 资源(BaseResource)修改对象返回 + * 应用表(BaseApp)修改对象返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:57 */ @Accessors(chain = true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceUpdateByIdRes { +public class BaseAppUpdateByIdRes { } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java new file mode 100644 index 0000000..078be2c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)根据ID删除多个入参 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java new file mode 100644 index 0000000..4c8a868 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)根据ID删除多个反参 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java similarity index 77% rename from src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java rename to src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java index 3c52a98..087ea32 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java @@ -1,4 +1,4 @@ -package com.olivia.peanut.base.api.entity.baseResource; +package com.olivia.peanut.base.api.entity.baseAppResource; import java.time.LocalDateTime; import lombok.Getter; @@ -15,17 +15,27 @@ import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; /** - * 资源(BaseResource)查询对象返回 + * 资源(BaseAppResource)查询对象返回 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:19:00 */ //@Accessors(chain=true) @Getter @Setter @SuppressWarnings("serial") -public class BaseResourceDto extends BaseEntityDto { +public class BaseAppResourceDto extends BaseEntityDto { + /*** + * 应用ID + */ + @NotNull(message = "应用ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long appId; + /*** + * 应用编码 + */ +// @NotBlank(message = "应用编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String appCode; /*** * 菜单编码 */ @@ -67,6 +77,9 @@ public class BaseResourceDto extends BaseEntityDto { @NotBlank(message = "菜单路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private String path; + private Boolean isHidden; + + private String filePath; } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java new file mode 100644 index 0000000..e5ad574 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)查询对象返回 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceExportQueryPageListInfoRes extends BaseAppResourceDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java new file mode 100644 index 0000000..5dd149a --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)查询对象入参 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseAppResourceDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java new file mode 100644 index 0000000..3ef7a74 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)查询对象返回 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceImportReq extends BaseAppResourceDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java new file mode 100644 index 0000000..0863c1a --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)保存返回 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java new file mode 100644 index 0000000..e593dff --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)保存入参 + * + * @author peanut + * @since 2024-08-05 11:18:59 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceInsertReq extends BaseAppResourceDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java new file mode 100644 index 0000000..97a6db9 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)保存返回 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java new file mode 100644 index 0000000..8466d2c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)查询对象入参 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java new file mode 100644 index 0000000..6b8b90a --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)查询对象返回 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java new file mode 100644 index 0000000..abd56f4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)查询对象入参 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceQueryListReq { + + private BaseAppResourceDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java new file mode 100644 index 0000000..611393f --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)查询对象返回 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java new file mode 100644 index 0000000..e69b8ed --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 资源(BaseAppResource)表实体类 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceUpdateByIdReq extends BaseAppResourceDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java new file mode 100644 index 0000000..7ca528b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseAppResource)修改对象返回 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseAppResourceUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseAppApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppApiImpl.java new file mode 100644 index 0000000..1253400 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseApp; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseApp.*; +import com.olivia.peanut.base.service.BaseAppService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseAppApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 应用表(BaseApp)表服务实现类 + * + * @author peanut + * @since 2024-08-05 11:18:57 + */ +@RestController +public class BaseAppApiImpl implements BaseAppApi { + + private @Autowired BaseAppService baseAppService; + + /**** + * insert + * + */ + public @Override BaseAppInsertRes insert(BaseAppInsertReq req) { + this.baseAppService.save($.copy(req, BaseApp.class)); + return new BaseAppInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseAppDeleteByIdListRes deleteByIdList(BaseAppDeleteByIdListReq req) { + baseAppService.removeByIds(req.getIdList()); + return new BaseAppDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseAppQueryListRes queryList(BaseAppQueryListReq req) { + return baseAppService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseAppUpdateByIdRes updateById(BaseAppUpdateByIdReq req) { + baseAppService.updateById($.copy(req, BaseApp.class)); + return new BaseAppUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseAppExportQueryPageListReq req) { + return baseAppService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseAppExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseAppExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseAppExportQueryPageListInfoRes.class, listInfoRes, "应用表"); + } + + public @Override BaseAppImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseAppImportListener(), BaseAppImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseApp.class); + boolean bool = baseAppService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseAppImportRes().setCount(c); + } + + public @Override BaseAppQueryByIdListRes queryByIdListRes(BaseAppQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseApp.class) + .selectAll(BaseApp.class).in(BaseApp::getId, req.getIdList()); + List list = this.baseAppService.list(q); + List dataList = $.copyList(list, BaseAppDto.class); + this.baseAppService.setName(dataList); + return new BaseAppQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java new file mode 100644 index 0000000..a561c14 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseAppResource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseAppResource.*; +import com.olivia.peanut.base.service.BaseAppResourceService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseAppResourceApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 资源(BaseAppResource)表服务实现类 + * + * @author peanut + * @since 2024-08-05 11:18:59 + */ +@RestController +public class BaseAppResourceApiImpl implements BaseAppResourceApi { + + private @Autowired BaseAppResourceService baseAppResourceService; + + /**** + * insert + * + */ + public @Override BaseAppResourceInsertRes insert(BaseAppResourceInsertReq req) { + this.baseAppResourceService.save($.copy(req, BaseAppResource.class)); + return new BaseAppResourceInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseAppResourceDeleteByIdListRes deleteByIdList(BaseAppResourceDeleteByIdListReq req) { + baseAppResourceService.removeByIds(req.getIdList()); + return new BaseAppResourceDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseAppResourceQueryListRes queryList(BaseAppResourceQueryListReq req) { + return baseAppResourceService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseAppResourceUpdateByIdRes updateById(BaseAppResourceUpdateByIdReq req) { + baseAppResourceService.updateById($.copy(req, BaseAppResource.class)); + return new BaseAppResourceUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseAppResourceExportQueryPageListReq req) { + return baseAppResourceService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseAppResourceExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseAppResourceExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseAppResourceExportQueryPageListInfoRes.class, listInfoRes, "资源"); + } + + public @Override BaseAppResourceImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseAppResourceImportListener(), BaseAppResourceImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseAppResource.class); + boolean bool = baseAppResourceService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseAppResourceImportRes().setCount(c); + } + + public @Override BaseAppResourceQueryByIdListRes queryByIdListRes(BaseAppResourceQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseAppResource.class) + .selectAll(BaseAppResource.class).in(BaseAppResource::getId, req.getIdList()); + List list = this.baseAppResourceService.list(q); + List dataList = $.copyList(list, BaseAppResourceDto.class); + this.baseAppResourceService.setName(dataList); + return new BaseAppResourceQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java deleted file mode 100644 index d106ced..0000000 --- a/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.olivia.peanut.base.api.impl; - -import java.time.LocalDateTime; - -import com.olivia.peanut.base.model.BaseResource; -import com.olivia.sdk.utils.$; -import com.olivia.sdk.utils.DynamicsPage; -import com.olivia.sdk.utils.PoiExcelUtil; -import java.util.stream.Collectors; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.*; -import org.apache.commons.lang3.StringUtils; -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestBody; -import com.olivia.peanut.base.api.entity.baseResource.*; -import com.olivia.peanut.base.service.BaseResourceService; -import com.olivia.peanut.base.model.*; -import com.baomidou.mybatisplus.core.conditions.query.*; -import com.github.yulichang.wrapper.MPJLambdaWrapper; -import org.springframework.web.bind.annotation.*; -import com.olivia.peanut.base.api.BaseResourceApi; - -import com.olivia.peanut.base.api.impl.listener.*; -import org.springframework.web.multipart.MultipartFile; - -/** - * 资源(BaseResource)表服务实现类 - * - * @author peanut - * @since 2024-07-31 14:33:33 - */ -@RestController -public class BaseResourceApiImpl implements BaseResourceApi { - - private @Autowired BaseResourceService baseResourceService; - - /**** - * insert - * - */ - public @Override BaseResourceInsertRes insert(BaseResourceInsertReq req) { - this.baseResourceService.save($.copy(req, BaseResource.class)); - return new BaseResourceInsertRes().setCount(1); - } - - /**** - * deleteByIds - * - */ - public @Override BaseResourceDeleteByIdListRes deleteByIdList(BaseResourceDeleteByIdListReq req) { - baseResourceService.removeByIds(req.getIdList()); - return new BaseResourceDeleteByIdListRes(); - } - - /**** - * queryList - * - */ - public @Override BaseResourceQueryListRes queryList(BaseResourceQueryListReq req) { - return baseResourceService.queryList(req); - } - - /**** - * updateById - * - */ - public @Override BaseResourceUpdateByIdRes updateById(BaseResourceUpdateByIdReq req) { - baseResourceService.updateById($.copy(req, BaseResource.class)); - return new BaseResourceUpdateByIdRes(); - - } - - public @Override DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req) { - return baseResourceService.queryPageList(req); - } - - public @Override void queryPageListExport(BaseResourceExportQueryPageListReq req) { - DynamicsPage page = queryPageList(req); - List list = page.getDataList(); - // 类型转换, 更换枚举 等操作 - List listInfoRes = $.copyList(list, BaseResourceExportQueryPageListInfoRes.class); - PoiExcelUtil.export(BaseResourceExportQueryPageListInfoRes.class, listInfoRes, "资源"); - } - - public @Override BaseResourceImportRes importData(@RequestParam("file") MultipartFile file) { - List reqList = PoiExcelUtil.readData(file, new BaseResourceImportListener(), BaseResourceImportReq.class); - // 类型转换, 更换枚举 等操作 - List readList = $.copyList(reqList, BaseResource.class); - boolean bool = baseResourceService.saveBatch(readList); - int c = bool ? readList.size() : 0; - return new BaseResourceImportRes().setCount(c); - } - - public @Override BaseResourceQueryByIdListRes queryByIdListRes(BaseResourceQueryByIdListReq req) { - MPJLambdaWrapper q = new MPJLambdaWrapper(BaseResource.class) - .selectAll(BaseResource.class).in(BaseResource::getId, req.getIdList()); - List list = this.baseResourceService.list(q); - List dataList = $.copyList(list, BaseResourceDto.class); - this.baseResourceService.setName(dataList); - return new BaseResourceQueryByIdListRes().setDataList(dataList); - } -} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppImportListener.java similarity index 73% rename from src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java rename to src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppImportListener.java index e7e3819..5b2bb8c 100644 --- a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppImportListener.java @@ -1,10 +1,10 @@ package com.olivia.peanut.base.api.impl.listener; -import com.olivia.peanut.base.model.BaseResource; +import com.olivia.peanut.base.model.BaseApp; import org.apache.ibatis.annotations.Mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.olivia.peanut.base.api.entity.baseResource.*; +import com.olivia.peanut.base.api.entity.baseApp.*; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; import java.util.ArrayList; @@ -15,15 +15,15 @@ import lombok.experimental.Accessors; import lombok.extern.slf4j.Slf4j; /** - * 资源(BaseResource)文件导入监听 + * 应用表(BaseApp)文件导入监听 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:58 */ -public class BaseResourceImportListener extends AnalysisEventListener { +public class BaseAppImportListener extends AnalysisEventListener { @Override - public void invoke(BaseResourceImportReq data, AnalysisContext analysisContext) { + public void invoke(BaseAppImportReq data, AnalysisContext analysisContext) { // 文件校验 } diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java new file mode 100644 index 0000000..57c2647 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseAppResource; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseAppResource.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 资源(BaseAppResource)文件导入监听 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +public class BaseAppResourceImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseAppResourceImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseAppMapper.java similarity index 53% rename from src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java rename to src/main/java/com/olivia/peanut/base/mapper/BaseAppMapper.java index 5fba1da..3a84b77 100644 --- a/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseAppMapper.java @@ -2,17 +2,17 @@ package com.olivia.peanut.base.mapper; import com.github.yulichang.base.MPJBaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.olivia.peanut.base.model.BaseResource; +import com.olivia.peanut.base.model.BaseApp; import org.apache.ibatis.annotations.Mapper; /** - * 资源(BaseResource)表数据库访问层 + * 应用表(BaseApp)表数据库访问层 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:58 */ @Mapper -public interface BaseResourceMapper extends MPJBaseMapper { +public interface BaseAppMapper extends MPJBaseMapper { } diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java new file mode 100644 index 0000000..967e8a4 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseAppResource; +import org.apache.ibatis.annotations.Mapper; + +/** + * 资源(BaseAppResource)表数据库访问层 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +@Mapper +public interface BaseAppResourceMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseApp.java b/src/main/java/com/olivia/peanut/base/model/BaseApp.java new file mode 100644 index 0000000..1e131b5 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseApp.java @@ -0,0 +1,35 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 应用表(BaseApp)表实体类 + * + * @author peanut + * @since 2024-08-05 11:18:57 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_app") +public class BaseApp extends BaseEntity { + + /*** + * app编码 + */ + private String appCode; + /*** + * app名称 + */ + private String appName; + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseResource.java b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java similarity index 73% rename from src/main/java/com/olivia/peanut/base/model/BaseResource.java rename to src/main/java/com/olivia/peanut/base/model/BaseAppResource.java index aac8cd7..94e6d84 100644 --- a/src/main/java/com/olivia/peanut/base/model/BaseResource.java +++ b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java @@ -10,18 +10,26 @@ import lombok.experimental.Accessors; import com.baomidou.mybatisplus.annotation.TableName; /** - * 资源(BaseResource)表实体类 + * 资源(BaseAppResource)表实体类 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:19:00 */ @Accessors(chain = true) @Getter @Setter //@SuppressWarnings("serial") -@TableName("base_resource") -public class BaseResource extends BaseEntity { +@TableName("base_app_resource") +public class BaseAppResource extends BaseEntity { + /*** + * 应用ID + */ + private Long appId; + /*** + * 应用编码 + */ + private String appCode; /*** * 菜单编码 */ @@ -46,6 +54,8 @@ public class BaseResource extends BaseEntity { * 是否按钮 0 否,1 是 */ private Boolean isButton; + + private Boolean isHidden; /*** * 父菜单ID */ @@ -55,5 +65,7 @@ public class BaseResource extends BaseEntity { */ private String path; + + private String filePath; } diff --git a/src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java b/src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java new file mode 100644 index 0000000..795814d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseAppResource; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseAppResource.*; + +/** + * 资源(BaseAppResource)表服务接口 + * + * @author peanut + * @since 2024-08-05 11:19:00 + */ +public interface BaseAppResourceService extends MPJBaseService { + + BaseAppResourceQueryListRes queryList(BaseAppResourceQueryListReq req); + + DynamicsPage queryPageList(BaseAppResourceExportQueryPageListReq req); + + + void setName(List baseAppResourceDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java b/src/main/java/com/olivia/peanut/base/service/BaseAppService.java similarity index 33% rename from src/main/java/com/olivia/peanut/base/service/BaseResourceService.java rename to src/main/java/com/olivia/peanut/base/service/BaseAppService.java index b57370d..b18945a 100644 --- a/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java +++ b/src/main/java/com/olivia/peanut/base/service/BaseAppService.java @@ -2,25 +2,25 @@ package com.olivia.peanut.base.service; import com.olivia.sdk.utils.DynamicsPage; import com.baomidou.mybatisplus.extension.service.IService; -import com.olivia.peanut.base.model.BaseResource; +import com.olivia.peanut.base.model.BaseApp; import java.util.List; import com.github.yulichang.base.MPJBaseService; -import com.olivia.peanut.base.api.entity.baseResource.*; +import com.olivia.peanut.base.api.entity.baseApp.*; /** - * 资源(BaseResource)表服务接口 + * 应用表(BaseApp)表服务接口 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:18:58 */ -public interface BaseResourceService extends MPJBaseService { +public interface BaseAppService extends MPJBaseService { - BaseResourceQueryListRes queryList(BaseResourceQueryListReq req); + BaseAppQueryListRes queryList(BaseAppQueryListReq req); - DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req); + DynamicsPage queryPageList(BaseAppExportQueryPageListReq req); - void setName(List baseResourceDtoList); + void setName(List baseAppDtoList); } diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java similarity index 38% rename from src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java rename to src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java index 6ee5173..b085725 100644 --- a/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java @@ -1,41 +1,39 @@ package com.olivia.peanut.base.service.impl; -import org.springframework.aop.framework.AopContext; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import jakarta.annotation.Resource; +import com.olivia.peanut.base.api.entity.baseAppResource.*; +import com.olivia.peanut.base.mapper.BaseAppResourceMapper; +import com.olivia.peanut.base.model.BaseAppResource; +import com.olivia.peanut.base.service.BaseAppResourceService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.sdk.filter.LoginUserContext; +import com.olivia.sdk.service.SetNameService; import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; +import org.springframework.aop.framework.AopContext; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.olivia.peanut.base.mapper.BaseResourceMapper; -import com.olivia.peanut.base.model.BaseResource; -import com.olivia.peanut.base.service.BaseResourceService; -import cn.hutool.core.collection.CollUtil; -//import com.olivia.peanut.base.service.BaseTableHeaderService; -import com.olivia.peanut.portal.service.BaseTableHeaderService; -import com.olivia.peanut.base.api.entity.baseResource.*; -import com.olivia.peanut.util.SetNamePojoUtils; -import com.olivia.sdk.service.SetNameService; /** - * 资源(BaseResource)表服务实现类 + * 资源(BaseAppResource)表服务实现类 * * @author peanut - * @since 2024-07-31 14:33:33 + * @since 2024-08-05 11:19:00 */ -@Service("baseResourceService") +@Service("baseAppResourceService") @Transactional -public class BaseResourceServiceImpl extends MPJBaseServiceImpl implements BaseResourceService { +public class BaseAppResourceServiceImpl extends MPJBaseServiceImpl implements BaseAppResourceService { final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); @@ -45,73 +43,79 @@ public class BaseResourceServiceImpl extends MPJBaseServiceImpl q = getWrapper(req.getData()); - List list = this.list(q); + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); - List dataList = list.stream().map(t -> $.copy(t, BaseResourceDto.class)).collect(Collectors.toList()); - ((BaseResourceService) AopContext.currentProxy()).setName(dataList); - return new BaseResourceQueryListRes().setDataList(dataList); + List dataList = list.stream().map(t -> $.copy(t, BaseAppResourceDto.class)).collect(Collectors.toList()); + ((BaseAppResourceService) AopContext.currentProxy()).setName(dataList); + return new BaseAppResourceQueryListRes().setDataList(dataList); } - public @Override DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req) { + public @Override DynamicsPage queryPageList(BaseAppResourceExportQueryPageListReq req) { - DynamicsPage page = new DynamicsPage<>(); + DynamicsPage page = new DynamicsPage<>(); page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); setQueryListHeader(page); - MPJLambdaWrapper q = getWrapper(req.getData()); - List records; + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; if (Boolean.TRUE.equals(req.getQueryPage())) { - IPage list = this.page(page, q); - IPage dataList = list.convert(t -> $.copy(t, BaseResourceExportQueryPageListInfoRes.class)); + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseAppResourceExportQueryPageListInfoRes.class)); records = dataList.getRecords(); } else { - records = $.copyList(this.list(q), BaseResourceExportQueryPageListInfoRes.class); + records = $.copyList(this.list(q), BaseAppResourceExportQueryPageListInfoRes.class); } // 类型转换, 更换枚举 等操作 - List listInfoRes = $.copyList(records, BaseResourceExportQueryPageListInfoRes.class); - ((BaseResourceService) AopContext.currentProxy()).setName(listInfoRes); + List listInfoRes = $.copyList(records, BaseAppResourceExportQueryPageListInfoRes.class); + ((BaseAppResourceService) AopContext.currentProxy()).setName(listInfoRes); return DynamicsPage.init(page, listInfoRes); } // 以下为私有对象封装 - public @Override void setName(List list) { + public @Override void setName(List list) { // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); } - private MPJLambdaWrapper getWrapper(BaseResourceDto obj) { - MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + private MPJLambdaWrapper getWrapper(BaseAppResourceDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + String useAppKey = LoginUserContext.getLoginUser().getUseAppKey(); if (Objects.nonNull(obj)) { + obj.setAppCode(useAppKey); q - .eq(StringUtils.isNoneBlank(obj.getResourceCode()), BaseResource::getResourceCode, obj.getResourceCode()) - .eq(StringUtils.isNoneBlank(obj.getResourceName()), BaseResource::getResourceName, obj.getResourceName()) - .eq(StringUtils.isNoneBlank(obj.getResourceUrl()), BaseResource::getResourceUrl, obj.getResourceUrl()) - .eq(StringUtils.isNoneBlank(obj.getResourceIcon()), BaseResource::getResourceIcon, obj.getResourceIcon()) - .eq(StringUtils.isNoneBlank(obj.getResourceType()), BaseResource::getResourceType, obj.getResourceType()) - .eq(Objects.nonNull(obj.getIsButton()), BaseResource::getIsButton, obj.getIsButton()) - .eq(Objects.nonNull(obj.getParentId()), BaseResource::getParentId, obj.getParentId()) - .eq(StringUtils.isNoneBlank(obj.getPath()), BaseResource::getPath, obj.getPath()) + .eq(Objects.nonNull(obj.getAppId()), BaseAppResource::getAppId, obj.getAppId()) + .eq(StringUtils.isNoneBlank(obj.getAppCode()), BaseAppResource::getAppCode, obj.getAppCode()) + .eq(StringUtils.isNoneBlank(obj.getResourceCode()), BaseAppResource::getResourceCode, obj.getResourceCode()) + .eq(StringUtils.isNoneBlank(obj.getResourceName()), BaseAppResource::getResourceName, obj.getResourceName()) + .eq(StringUtils.isNoneBlank(obj.getResourceUrl()), BaseAppResource::getResourceUrl, obj.getResourceUrl()) + .eq(StringUtils.isNoneBlank(obj.getResourceIcon()), BaseAppResource::getResourceIcon, obj.getResourceIcon()) + .eq(StringUtils.isNoneBlank(obj.getResourceType()), BaseAppResource::getResourceType, obj.getResourceType()) + .eq(Objects.nonNull(obj.getIsButton()), BaseAppResource::getIsButton, obj.getIsButton()) + .eq(Objects.nonNull(obj.getParentId()), BaseAppResource::getParentId, obj.getParentId()) + .eq(StringUtils.isNoneBlank(obj.getPath()), BaseAppResource::getPath, obj.getPath()) ; + } else { + q.eq(BaseAppResource::getAppCode, useAppKey); } - q.orderByDesc(BaseResource::getId); +// q.orderByDesc(BaseAppResource::getId); return q; } - private void setQueryListHeader(DynamicsPage page) { + private void setQueryListHeader(DynamicsPage page) { - tableHeaderService.listByBizKey(page, "BaseResourceService#queryPageList"); + tableHeaderService.listByBizKey(page, "BaseAppResourceService#queryPageList"); } diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppServiceImpl.java new file mode 100644 index 0000000..1054bce --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppServiceImpl.java @@ -0,0 +1,114 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseAppMapper; +import com.olivia.peanut.base.model.BaseApp; +import com.olivia.peanut.base.service.BaseAppService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseApp.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 应用表(BaseApp)表服务实现类 + * + * @author peanut + * @since 2024-08-05 11:18:58 + */ +@Service("baseAppService") +@Transactional +public class BaseAppServiceImpl extends MPJBaseServiceImpl implements BaseAppService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseAppQueryListRes queryList(BaseAppQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseAppDto.class)).collect(Collectors.toList()); + ((BaseAppService) AopContext.currentProxy()).setName(dataList); + return new BaseAppQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseAppExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseAppExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseAppExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseAppExportQueryPageListInfoRes.class); + ((BaseAppService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseAppDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getAppCode()), BaseApp::getAppCode, obj.getAppCode()) + .eq(StringUtils.isNoneBlank(obj.getAppName()), BaseApp::getAppName, obj.getAppName()) + + ; + } + q.orderByDesc(BaseApp::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseAppService#queryPageList"); + + } + + +} + diff --git a/src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue b/src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue deleted file mode 100644 index 709cf2e..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseDept/BaseDept.vue +++ /dev/null @@ -1,226 +0,0 @@ - - - - - diff --git a/src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue b/src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue deleted file mode 100644 index aaab01e..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseResource/BaseResource.vue +++ /dev/null @@ -1,258 +0,0 @@ - - - - - diff --git a/src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue b/src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue deleted file mode 100644 index f874ede..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseRole/BaseRole.vue +++ /dev/null @@ -1,218 +0,0 @@ - - - - - diff --git a/src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue b/src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue deleted file mode 100644 index 4cb1e27..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseRoleGroup/BaseRoleGroup.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue b/src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue deleted file mode 100644 index 4d5c452..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseRoleResource/BaseRoleResource.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue b/src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue deleted file mode 100644 index 42df707..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseUserDept/BaseUserDept.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue b/src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue deleted file mode 100644 index cdbc893..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseUserRole/BaseUserRole.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue b/src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue deleted file mode 100644 index 682ee20..0000000 --- a/src/main/java/com/olivia/peanut/base/vue/baseUserRoleGroup/BaseUserRoleGroup.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ff7c9e3..d5c4d43 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -11,7 +11,7 @@ server: min-spare: 1 max: 300 peanut: - dbInit: false + default-use-app-name: aps mock: enable: false match: diff --git a/src/test/java/com/olivia/menu/Menu.java b/src/test/java/com/olivia/menu/Menu.java new file mode 100644 index 0000000..51088d9 --- /dev/null +++ b/src/test/java/com/olivia/menu/Menu.java @@ -0,0 +1,67 @@ +package com.olivia.menu; + +import cn.hutool.core.collection.CollUtil; +import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import java.nio.charset.StandardCharsets; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.junit.jupiter.api.Test; + +/*** + * + */ +@Setter +@Getter +@Slf4j +public class Menu { + + private String path; + private String name; + private List children; + private Long id; + private Long parentId; + private boolean hidden; + + + @Test + @SneakyThrows + public void test() { + String menu = IOUtils.resourceToString( + "menu.json", + StandardCharsets.UTF_8, Menu.class.getClassLoader()); + + List menus = JSON.parseArray(menu, Menu.class); + setMenuId(menus, 0L); + log.info("{}", JSON.toJSONString(menus)); + + System.out.println("insert into base_app_resource (id,app_id,resource_code,resource_name,resource_url,parent_id ,is_hidden,tenant_id ) values "); + + print(menus); + } + + + private void print(List menus) { + if (CollUtil.isEmpty(menus)) { + return; + } + menus.forEach(t -> { + System.out.println("('" + String.join("','", t.id + "", "4", IdWorker.getIdStr(), t.name, t.path, t.parentId + "", Boolean.FALSE.equals(t.hidden) ? "0" : "1", "1001'),")); + print(t.children); + }); + } + + private void setMenuId(List menus, Long parentId) { + if (CollUtil.isNotEmpty(menus)) { + menus.forEach(t -> { + t.setId(IdWorker.getId()); + t.setParentId(parentId); + setMenuId(t.children, t.id); + }); + } + } +} diff --git a/src/test/resources/menu.json b/src/test/resources/menu.json new file mode 100644 index 0000000..cf087a1 --- /dev/null +++ b/src/test/resources/menu.json @@ -0,0 +1,837 @@ +[ + { + "path": "/baseConfig/", + "component": "src/layout/index.vue", + "redirect": "index", + + "children": [ + { + "path": "/views/tenant/index", + "name": "租户管理", + "meta": { + "title": "租户管理", + "icon": "", + "affix": false + } + }, + { + "path": "/views/factory/index", + "name": "工厂", + "meta": { + "title": "工厂管理", + "icon": "", + "affix": false + } + }, + { + "path": "/views/brand/index", + "name": "品牌管理", + "meta": { + "title": "品牌管理", + "icon": "", + "affix": false + } + }, + { + "path": "/prop/spec/index", + "name": "日历管理", + "meta": { + "title": "日历管理", + "icon": "calendar", + "affix": false + } + }, + { + "path": "/prop/shift/index", + "name": "班次管理", + "meta": { + "title": "班次管理", + "icon": "calendar", + "affix": false + } + }, + { + "path": "/file/upload/index", + "name": "文件管理", + "meta": { + "title": "文件管理", + "icon": "calendar", + "affix": false + } + }, + { + "path": "/base/baseTableHeader/index", + "name": "表格头管理", + "meta": { + "title": "表格头管理", + "icon": "", + "affix": false + } + }, + { + "path": "/base/role/group/index", + "name": "角色组管理", + "meta": { + "title": "角色组管理", + "icon": "", + "affix": false + } + }, + { + "path": "/base/role/index", + "name": "角色管理", + "meta": { + "title": "角色管理", + "icon": "", + "affix": false + } + }, + { + "path": "/base/app/index", + "name": "系统管理", + "meta": { + "title": "系统管理", + "icon": "", + "affix": false + } + }, + { + "path": "/base/app/resource/index", + "name": "系统菜单管理", + "meta": { + "title": "系统菜单管理", + "icon": "", + "affix": false + } + } + ] + }, + { + "path": "/aps/base-data/", + "component": "src/layout/index.vue", + "meta": { + "title": "Aps系统", + "icon": "android-system", + "affix": false + }, + "children": [ + { + "path": "/aps/basic/config/index", + "name": "基础配置", + + "__file": "src/components/ParentView/index.vue" + }, + "meta": { + "title": "基础配置", + "icon": "setting", + "affix": false + }, + "children": [ + { + "path": "/aps/sale/index", + "name": "销售配置管理", + "meta": { + "title": "销售配置管理", + "icon": "group", + "affix": false + } + }, + { + "path": "/aps/project/index", + "name": "工程配置管理", + "meta": { + "title": "工程配置管理", + "icon": "group", + "affix": false + } + }, + { + "path": "/aps/status/index", + "name": "状态", + "meta": { + "title": "状态管理", + "icon": "status", + "affix": false + } + }, + { + "path": "/aps/section/index", + "name": "工段管理", + "meta": { + "title": "工段管理", + "icon": "section", + "affix": false + } + }, + { + "path": "/aps/station/index", + "name": "工位管理", + "meta": { + "title": "工位管理", + "icon": "workstation", + "affix": false + } + }, + { + "path": "/aps/room/index", + "name": "车间管理", + "meta": { + "title": "车间", + "icon": "room", + "affix": false + } + }, + { + "path": "/aps/process/path/index", + "name": "工艺路径", + "meta": { + "title": "工艺路径管理", + "icon": "process-setting", + "affix": false + } + }, + { + "path": "/aps/apsLogistics/path/index", + "name": "物流路径", + "meta": { + "title": "物流路径", + "icon": "process-setting", + "affix": false + } + } + ] + }, + { + "path": "/aps/goods/main/index", + "name": "APS商品管理", + + "meta": { + "title": "商品管理", + "icon": "order-1", + "affix": false + }, + "children": [ + { + "path": "/aps/bomGroup/index", + "name": "零件组配置", + "meta": { + "title": "零件组配置", + "icon": "setting", + "affix": false + } + }, + { + "path": "/aps/bom/index", + "name": "零件配置", + "meta": { + "title": "零件配置", + "icon": "setting", + "affix": false + } + }, + { + "path": "/aps/goodsBom/index", + "name": "商品零件配置", + "meta": { + "title": "商品零件配置", + "icon": "setting", + "affix": false + } + }, + { + "path": "/aps/bomBuyPlan/index", + "name": "零件购买计划", + "meta": { + "title": "零件购买计划", + "icon": "setting", + "affix": false + } + }, + { + "path": "/aps/goods/index", + "name": "商品管理", + "meta": { + "title": "商品管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/goods/sale/index", + "name": "商品销售特征绑定", + "meta": { + "title": "商品销售特征绑定", + "icon": "setting", + "affix": false + } + }, + { + "path": "/aps/goods/sale/project/index", + "name": "商品销售特转规划", + "meta": { + "title": "商品销售特转规划", + "icon": "setting", + "affix": false + } + } + ] + }, + { + "path": "/aps/goods/forecast/index", + "name": "预测管理", + "component": { + "staticRenderFns": [ + + ], + "_compiled": true, + "beforeCreate": [ + null + ], + "beforeDestroy": [ + null + ], + "__file": "src/components/ParentView/index.vue" + }, + "meta": { + "title": "预测管理", + "icon": "eye-open", + "affix": false + }, + "children": [ + { + "path": "/aps/goods/forecast/index", + "name": "商品预测", + "meta": { + "title": "商品预测", + "icon": "eye-open", + "affix": false + } + }, + { + "path": "/aps/goods/forecast/main/index", + "name": "预测主版本", + "meta": { + "title": "预测主版本", + "icon": "main", + "affix": false + } + }, + { + "path": "/aps/goods/forecast/make/week/index", + "name": "(预)生产数据", + "meta": { + "title": "(预)周生产管理", + "icon": "eye-open", + "affix": false + } + }, + { + "path": "/aps/goods/forecast/make/weekMain/index", + "name": "(预)生产数据主版本", + "meta": { + "title": "(预)生产数据主版本", + "icon": "eye-open", + "affix": false + } + } + ] + }, + { + "path": "/aps/order/main/index", + "name": "订单管理", + "component": { + "staticRenderFns": [ + + ], + "_compiled": true, + "beforeCreate": [ + null + ], + "beforeDestroy": [ + null + ], + "__file": "src/components/ParentView/index.vue" + }, + "meta": { + "title": "订单管理", + "icon": "order-1", + "affix": false + }, + "children": [ + { + "path": "/aps/order/index", + "name": "订单管理", + "meta": { + "title": "订单管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/order/timeline/index", + "name": "订单进度", + "meta": { + "title": "订单进度", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/order/roll/factory/index", + "name": "工厂滚动预测产能", + "meta": { + "title": "工厂滚动预测产能", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/order/roll/index", + "name": "滚动预测", + "meta": { + "title": "滚动预测", + "icon": "order-1", + "affix": false + } + } + ] + }, + { + "path": "/aps/make/q/index", + "name": "APS工厂产能管理", + "component": { + "staticRenderFns": [ + + ], + "_compiled": true, + "beforeCreate": [ + null + ], + "beforeDestroy": [ + null + ], + "__file": "src/components/ParentView/index.vue" + }, + "meta": { + "title": "产能管理", + "icon": "order-1", + "affix": false + }, + "children": [ + { + "path": "/aps/make_capacity_factory/index", + "name": "工厂产能管理", + "meta": { + "title": "工厂产能管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/make/make_capacity_sale_config/index", + "name": "销售特征产能管理", + "meta": { + "title": "销售特征产能管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/make/make_capacity_goods/index", + "name": "商品产能", + "meta": { + "title": "商品产能", + "icon": "order-1", + "affix": false + } + } + ] + }, + { + "path": "/aps/scheduling/main/index", + "name": "排产排程", + "component": { + "staticRenderFns": [ + + ], + "_compiled": true, + "beforeCreate": [ + null + ], + "beforeDestroy": [ + null + ], + "__file": "src/components/ParentView/index.vue" + }, + "meta": { + "title": "排产排程", + "icon": "order-1", + "affix": false + }, + "children": [ + { + "path": "/aps/make/constraint/index", + "name": "排产约束", + "meta": { + "title": "排产约束", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/scheduling/index", + "name": "排产版本管理", + "meta": { + "title": "排产管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/scheduling/bom/index", + "name": "排产零件", + "hidden": true, + "meta": { + "title": "排产零件", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/scheduling/day/index", + "name": "排程配置", + "hidden": false, + "meta": { + "title": "排程配置", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/aps/scheduling/day/config/index", + "name": "排程管理", + "hidden": false, + "meta": { + "title": "排程管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/apsSchedulingDayConfigVersion/detailList", + "name": "排程结果", + "hidden": true, + "meta": { + "title": "排程结果", + "icon": "order-1", + "affix": false + } + } + ] + } + ] + }, + { + "path": "/base/index", + "component": "src/layout/index.vue", + "redirect": "index", + "meta": { + "title": "账户管理", + "icon": "user", + "affix": false + }, + "children": [ + { + "path": "/login/account/index", + "name": "账户管理", + "hidden": false, + "meta": { + "title": "账户管理", + "icon": "peoples", + "affix": false + } + }, + { + "path": "/supplier/index", + "name": "供应管理", + "meta": { + "title": "供应管理", + "icon": "pastebin", + "affix": false + } + } + ] + }, + { + "path": "/store", + "hidden": true, + "component": "src/layout/index.vue", + "redirect": "index", + "meta": { + "title": "门店管理", + "icon": "shop", + "affix": false + }, + "children": [ + { + "path": "/store/manage/index", + "name": "门店管理", + "meta": { + "title": "门店管理", + "icon": "", + "affix": false + } + } + ] + }, + { + "path": "/food/index", + "component": "src/layout/index.vue", + "hidden": true, + "redirect": "index", + "meta": { + "title": "菜品管理", + "icon": "skill", + "affix": false + }, + "children": [ + { + "path": "index", + "name": "", + "meta": { + "title": "菜品管理", + "icon": "redis", + "affix": false + } + }, + { + "path": "1index", + "meta": { + "title": "售卖趋势", + "icon": "redis", + "affix": false + } + } + ] + }, + { + "path": "/map/", + "component": "src/layout/index.vue", + "redirect": "index", + "meta": { + "title": "地图", + "icon": "international", + "affix": false + }, + "children": [ + { + "path": "/map/store/index", + "name": "高德门店地图", + "meta": { + "title": "高德门店地图", + "icon": "international", + "affix": false + } + }, + { + "path": "/map/store/fence", + "name": "高德电子围栏", + "meta": { + "title": "高德电子围栏", + "icon": "lock", + "affix": false + } + } + ] + }, + { + "path": "/property/", + "component": "src/layout/index.vue", + "redirect": "index", + "meta": { + "title": "资产管理", + "icon": "tools", + "affix": false + }, + "children": [ + { + "path": "/prop/storey/index", + "name": "楼层管理", + "meta": { + "title": "楼层管理", + "icon": "storey", + "affix": false + } + }, + { + "path": "/prop/room/index", + "name": "房间管理", + "meta": { + "title": "房间管理", + "icon": "room", + "affix": false + } + }, + { + "path": "/prop/property/index", + "name": "资产管理", + "meta": { + "title": "资产管理", + "icon": "construction", + "affix": false + } + }, + { + "path": "/prop/property/propertyScanQr", + "name": "扫码盘点", + "meta": { + "title": "扫码盘点", + "icon": "scan-qr-code", + "affix": false + } + }, + { + "path": "/prop/property/propertyScanQrTest", + "name": "扫码盘点(测试)", + "meta": { + "title": "扫码盘点(测试)", + "icon": "scan-qr-code", + "affix": false + } + }, + { + "path": "/prop/property/checkList", + "name": "盘点管理", + "meta": { + "title": "盘点管理", + "icon": "check-list", + "affix": false + } + } + ] + }, + { + "path": "/jxc/", + "component": "src/layout/index.vue", + "redirect": "index", + "meta": { + "title": "进存销", + "icon": "international", + "affix": false + }, + "children": [ + { + "path": "/jcx/goods/index", + "name": "进存销-商品管理", + "meta": { + "title": "商品管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/order/index", + "name": "进存销-订单管理", + "meta": { + "title": "进存销-订单管理", + "icon": "order-1", + "affix": false + } + }, + { + "path": "/goods/waring/index", + "name": "预警管理", + "meta": { + "title": "预警管理", + "icon": "warning", + "affix": false + } + }, + { + "path": "/buy/plan/index", + "name": "购买计划", + "meta": { + "title": "购买计划", + "icon": "buy-car", + "affix": false + } + }, + { + "path": "/buy/order/index", + "name": "采购订单", + "meta": { + "title": "采购订单", + "icon": "order-2", + "affix": false + } + } + ] + }, + { + "path": "/flow/", + "component": "src/layout/index.vue", + "redirect": "index", + "meta": { + "title": "工作流", + "icon": "international", + "affix": false + }, + "children": [ + { + "path": "/flow/form", + "name": "流程表单", + "meta": { + "title": "流程表单", + "icon": "international", + "affix": false + } + }, + { + "path": "/flow/form/detail", + "name": "流程表预览", + "hidden": true, + "meta": { + "title": "流程表预览", + "icon": "international", + "affix": false + } + }, + { + "path": "/flow/start", + "name": "流程发起", + "meta": { + "title": "流程发起", + "icon": "international", + "affix": false + } + }, + { + "path": "/flow/todo", + "name": "流程待办", + "meta": { + "title": "流程待办", + "icon": "international", + "affix": false + } + }, + { + "path": "/flow/done", + "name": "流程已办", + "meta": { + "title": "流程已办", + "icon": "international", + "affix": false + } + }, + { + "path": "/flow/todo-flow-qj", + "name": "请假流程待办", + "meta": { + "title": "请假流程待办", + "icon": "international", + "affix": false + } + } + ] + } +] -- Gitee From c98c9eaccf1099151f2a87300de9901a09f95685 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Tue, 6 Aug 2024 09:24:50 +0800 Subject: [PATCH 18/27] =?UTF-8?q?feat(menu)=20=E5=8A=A8=E6=80=81=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/base/service/impl/BaseAppResourceServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java index b085725..184b60d 100644 --- a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java @@ -103,7 +103,6 @@ public class BaseAppResourceServiceImpl extends MPJBaseServiceImpl Date: Tue, 6 Aug 2024 16:09:28 +0800 Subject: [PATCH 19/27] =?UTF-8?q?docs(=E6=B3=A8=E9=87=8A):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apsLogisticsPath/ApsLogisticsPathDto.java | 4 +-- .../ApsLogisticsPathItemDto.java | 4 +-- .../ApsSchedulingDayConfigDto.java | 4 +-- .../ApsSchedulingDayConfigItemDto.java | 4 +-- .../ApsSchedulingDayConfigVersionDto.java | 4 +-- ...psSchedulingDayConfigVersionDetailDto.java | 8 ++--- .../peanut/aps/model/ApsLogisticsPath.java | 2 +- .../aps/model/ApsLogisticsPathItem.java | 2 +- .../aps/model/ApsSchedulingDayConfig.java | 2 +- .../aps/model/ApsSchedulingDayConfigItem.java | 2 +- .../model/ApsSchedulingDayConfigVersion.java | 2 +- .../ApsSchedulingDayConfigVersionDetail.java | 4 +-- .../baseAppResource/BaseAppResourceDto.java | 34 +++++++++---------- .../peanut/base/model/BaseAppResource.java | 2 +- .../impl/BaseAppResourceServiceImpl.java | 5 ++- .../entity/flowFormItem/FlowFormItemDto.java | 8 ++--- .../FlowFormUserValueDto.java | 8 ++--- .../peanut/flow/model/FlowFormItem.java | 4 +-- .../peanut/flow/model/FlowFormUserValue.java | 4 +-- 19 files changed, 55 insertions(+), 52 deletions(-) diff --git a/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPath/ApsLogisticsPathDto.java b/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPath/ApsLogisticsPathDto.java index ae09a07..f70a7e3 100644 --- a/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPath/ApsLogisticsPathDto.java +++ b/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPath/ApsLogisticsPathDto.java @@ -39,9 +39,9 @@ public class ApsLogisticsPathDto extends BaseEntityDto { @NotBlank(message = "备注不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private String logisticsPathRemark; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ - @NotNull(message = "是否默认 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否默认不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Integer isDefault; /*** * 工厂ID diff --git a/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPathItem/ApsLogisticsPathItemDto.java b/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPathItem/ApsLogisticsPathItemDto.java index 9a90cba..1997402 100644 --- a/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPathItem/ApsLogisticsPathItemDto.java +++ b/src/main/java/com/olivia/peanut/aps/api/entity/apsLogisticsPathItem/ApsLogisticsPathItemDto.java @@ -51,9 +51,9 @@ public class ApsLogisticsPathItemDto extends BaseEntityDto { @NotNull(message = "运输天数不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Integer transportDay; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ - @NotNull(message = "是否默认 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否默认不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Integer isDefault; /*** * 工厂ID diff --git a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfig/ApsSchedulingDayConfigDto.java b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfig/ApsSchedulingDayConfigDto.java index 22223e9..9408ba5 100644 --- a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfig/ApsSchedulingDayConfigDto.java +++ b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfig/ApsSchedulingDayConfigDto.java @@ -46,9 +46,9 @@ public class ApsSchedulingDayConfigDto extends BaseEntityDto { @NotBlank(message = "排程版本名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private String schedulingDayName; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ - @NotNull(message = "是否默认 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否默认不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Boolean isDefault; @NotNull(message = "排程版本明细不能为空", groups = {InsertCheck.class, UpdateCheck.class}) diff --git a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigItem/ApsSchedulingDayConfigItemDto.java b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigItem/ApsSchedulingDayConfigItemDto.java index 5867776..29dd25d 100644 --- a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigItem/ApsSchedulingDayConfigItemDto.java +++ b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigItem/ApsSchedulingDayConfigItemDto.java @@ -73,9 +73,9 @@ public class ApsSchedulingDayConfigItemDto extends BaseEntityDto { @NotNull(message = "配置业务耗时(秒)不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long configBizTime; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ - @NotNull(message = "是否默认 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否默认不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Boolean isDefault; } diff --git a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersion/ApsSchedulingDayConfigVersionDto.java b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersion/ApsSchedulingDayConfigVersionDto.java index 5c74d7f..84c3d8a 100644 --- a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersion/ApsSchedulingDayConfigVersionDto.java +++ b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersion/ApsSchedulingDayConfigVersionDto.java @@ -45,9 +45,9 @@ public class ApsSchedulingDayConfigVersionDto extends BaseEntityDto { @NotNull(message = "排程日期不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private LocalDate schedulingDay; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ - @NotNull(message = "是否下发 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否下发不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Boolean isIssuedThird; public String getIsIssuedThirdStr() { diff --git a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersionDetail/ApsSchedulingDayConfigVersionDetailDto.java b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersionDetail/ApsSchedulingDayConfigVersionDetailDto.java index e51e429..2724363 100644 --- a/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersionDetail/ApsSchedulingDayConfigVersionDetailDto.java +++ b/src/main/java/com/olivia/peanut/aps/api/entity/apsSchedulingDayConfigVersionDetail/ApsSchedulingDayConfigVersionDetailDto.java @@ -59,9 +59,9 @@ public class ApsSchedulingDayConfigVersionDetailDto extends BaseEntityDto { @NotBlank(message = "订单编号不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private String orderNo; /*** - * 是否匹配 0 否,1 是 + * 是否匹配 */ - @NotNull(message = "是否匹配 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否匹配不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Boolean isMatch; /*** * 循环次数 @@ -69,9 +69,9 @@ public class ApsSchedulingDayConfigVersionDetailDto extends BaseEntityDto { @NotNull(message = "循环次数不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Integer loopIndex; /*** - * 是否满足 0 否,1 是 + * 是否满足 */ - @NotNull(message = "是否满足 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否满足不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Boolean loopEnough; private Long roomId; diff --git a/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPath.java b/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPath.java index b9d8820..6233396 100644 --- a/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPath.java +++ b/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPath.java @@ -35,7 +35,7 @@ public class ApsLogisticsPath extends BaseEntity { */ private String logisticsPathRemark; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ private Integer isDefault; /*** diff --git a/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPathItem.java b/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPathItem.java index edd9715..315e27a 100644 --- a/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPathItem.java +++ b/src/main/java/com/olivia/peanut/aps/model/ApsLogisticsPathItem.java @@ -47,7 +47,7 @@ public class ApsLogisticsPathItem extends BaseEntity { */ private Integer transportDay; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ private Integer isDefault; /*** diff --git a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfig.java b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfig.java index 0ffc36a..71a34e3 100644 --- a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfig.java +++ b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfig.java @@ -39,7 +39,7 @@ public class ApsSchedulingDayConfig extends BaseEntity { */ private String schedulingDayName; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ private Boolean isDefault; diff --git a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigItem.java b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigItem.java index da991fa..f4c4cec 100644 --- a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigItem.java +++ b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigItem.java @@ -59,7 +59,7 @@ public class ApsSchedulingDayConfigItem extends BaseEntity { */ private Long configBizTime; /*** - * 是否默认 0 否,1 是 + * 是否默认 */ private Boolean isDefault; diff --git a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersion.java b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersion.java index f39bab1..3bff8d5 100644 --- a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersion.java +++ b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersion.java @@ -38,7 +38,7 @@ public class ApsSchedulingDayConfigVersion extends BaseEntity { */ private LocalDate schedulingDay; /*** - * 是否下发第三方 0 否,1 是 + * 是否下发第三方 */ private Boolean isIssuedThird; diff --git a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersionDetail.java b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersionDetail.java index 66cfe16..b93ea18 100644 --- a/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersionDetail.java +++ b/src/main/java/com/olivia/peanut/aps/model/ApsSchedulingDayConfigVersionDetail.java @@ -52,7 +52,7 @@ public class ApsSchedulingDayConfigVersionDetail extends BaseEntity { */ private String orderNo; /*** - * 是否匹配 0 否,1 是 + * 是否匹配 */ private Boolean isMatch; /*** @@ -60,7 +60,7 @@ public class ApsSchedulingDayConfigVersionDetail extends BaseEntity { */ private Integer loopIndex; /*** - * 是否满足 0 否,1 是 + * 是否满足 */ private Boolean loopEnough; diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java index 087ea32..1a4cfd1 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java @@ -1,18 +1,13 @@ package com.olivia.peanut.base.api.entity.baseAppResource; -import java.time.LocalDateTime; -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; -import java.util.List; import com.olivia.peanut.portal.api.entity.BaseEntityDto; -import com.alibaba.excel.annotation.ExcelProperty; -import java.time.LocalDate; -import java.time.LocalDateTime; import com.olivia.sdk.ann.InsertCheck; import com.olivia.sdk.ann.UpdateCheck; +import com.olivia.sdk.utils.Str; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; +import lombok.Getter; +import lombok.Setter; /** * 资源(BaseAppResource)查询对象返回 @@ -31,6 +26,8 @@ public class BaseAppResourceDto extends BaseEntityDto { */ @NotNull(message = "应用ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long appId; + + private String appName; /*** * 应用编码 */ @@ -54,32 +51,35 @@ public class BaseAppResourceDto extends BaseEntityDto { /*** * 菜单图标 */ - @NotBlank(message = "菜单图标不能为空", groups = {InsertCheck.class, UpdateCheck.class}) +// @NotBlank(message = "菜单图标不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private String resourceIcon; /*** * 菜单类型 */ - @NotBlank(message = "菜单类型不能为空", groups = {InsertCheck.class, UpdateCheck.class}) +// @NotBlank(message = "菜单类型不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private String resourceType; /*** - * 是否按钮 0 否,1 是 + * 是否按钮 */ - @NotNull(message = "是否按钮 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + @NotNull(message = "是否按钮不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Boolean isButton; /*** * 父菜单ID */ @NotNull(message = "父菜单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long parentId; - /*** - * 菜单路径 - */ - @NotBlank(message = "菜单路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String path; private Boolean isHidden; private String filePath; + + public String getIsHiddenStr() { + return Str.booleanToStr(isHidden); + } + + public String getIsButtonStr() { + return Str.booleanToStr(isButton); + } } diff --git a/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java index 94e6d84..208e65b 100644 --- a/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java +++ b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java @@ -51,7 +51,7 @@ public class BaseAppResource extends BaseEntity { */ private String resourceType; /*** - * 是否按钮 0 否,1 是 + * 是否按钮 */ private Boolean isButton; diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java index 184b60d..fdf0d54 100644 --- a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java @@ -9,7 +9,9 @@ import com.olivia.peanut.base.api.entity.baseAppResource.*; import com.olivia.peanut.base.mapper.BaseAppResourceMapper; import com.olivia.peanut.base.model.BaseAppResource; import com.olivia.peanut.base.service.BaseAppResourceService; +import com.olivia.peanut.base.service.BaseAppService; import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.util.SetNamePojoUtils; import com.olivia.sdk.filter.LoginUserContext; import com.olivia.sdk.service.SetNameService; import com.olivia.sdk.utils.$; @@ -83,6 +85,8 @@ public class BaseAppResourceServiceImpl extends MPJBaseServiceImpl Date: Tue, 6 Aug 2024 18:05:31 +0800 Subject: [PATCH 20/27] =?UTF-8?q?feat(menu):=20=E5=8A=A8=E6=80=81=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/base/api/BaseAppResourceApi.java | 2 +- .../peanut/base/api/BaseResourceApi.java | 76 ++ .../BaseAppResourceDeleteByIdListReq.java | 2 +- .../BaseAppResourceDeleteByIdListRes.java | 2 +- .../baseAppResource/BaseAppResourceDto.java | 70 +- ...AppResourceExportQueryPageListInfoRes.java | 2 +- ...BaseAppResourceExportQueryPageListReq.java | 2 +- .../BaseAppResourceImportReq.java | 2 +- .../BaseAppResourceImportRes.java | 2 +- .../BaseAppResourceInsertReq.java | 2 +- .../BaseAppResourceInsertRes.java | 2 +- .../BaseAppResourceQueryByIdListReq.java | 2 +- .../BaseAppResourceQueryByIdListRes.java | 2 +- .../BaseAppResourceQueryListReq.java | 2 +- .../BaseAppResourceQueryListRes.java | 2 +- .../BaseAppResourceUpdateByIdReq.java | 2 +- .../BaseAppResourceUpdateByIdRes.java | 2 +- .../BaseResourceDeleteByIdListReq.java | 34 + .../BaseResourceDeleteByIdListRes.java | 29 + .../entity/baseResource/BaseResourceDto.java | 72 ++ ...aseResourceExportQueryPageListInfoRes.java | 27 + .../BaseResourceExportQueryPageListReq.java | 34 + .../baseResource/BaseResourceImportReq.java | 31 + .../baseResource/BaseResourceImportRes.java | 31 + .../baseResource/BaseResourceInsertReq.java | 25 + .../baseResource/BaseResourceInsertRes.java | 29 + .../BaseResourceQueryByIdListReq.java | 32 + .../BaseResourceQueryByIdListRes.java | 31 + .../BaseResourceQueryListReq.java | 26 + .../BaseResourceQueryListRes.java | 31 + .../BaseResourceUpdateByIdReq.java | 30 + .../BaseResourceUpdateByIdRes.java | 24 + .../base/api/impl/BaseAppResourceApiImpl.java | 2 +- .../base/api/impl/BaseResourceApiImpl.java | 104 +++ .../BaseAppResourceImportListener.java | 2 +- .../listener/BaseResourceImportListener.java | 48 + .../base/mapper/BaseAppResourceMapper.java | 2 +- .../base/mapper/BaseResourceMapper.java | 18 + .../peanut/base/model/BaseAppResource.java | 34 +- .../peanut/base/model/BaseResource.java | 59 ++ .../base/service/BaseAppResourceService.java | 2 +- .../base/service/BaseResourceService.java | 26 + .../impl/BaseAppResourceServiceImpl.java | 43 +- .../service/impl/BaseResourceServiceImpl.java | 120 +++ src/test/java/com/olivia/menu/Menu.java | 4 +- src/test/resources/menu.json | 838 +----------------- 46 files changed, 1012 insertions(+), 952 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java create mode 100644 src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java create mode 100644 src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java create mode 100644 src/main/java/com/olivia/peanut/base/model/BaseResource.java create mode 100644 src/main/java/com/olivia/peanut/base/service/BaseResourceService.java create mode 100644 src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java diff --git a/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java b/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java index eaad2c5..3d77464 100644 --- a/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java +++ b/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java @@ -18,7 +18,7 @@ import jakarta.validation.constraints.NotNull; * 资源(BaseAppResource)对外API * * @author peanut - * @since 2024-08-05 11:18:59 + * @since 2024-08-06 17:30:27 */ // @FeignClient(value = "",contextId = "baseAppResource-api",url = "${ portal..center.endpoint:}") public interface BaseAppResourceApi { diff --git a/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java b/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java new file mode 100644 index 0000000..bab05e8 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/BaseResourceApi.java @@ -0,0 +1,76 @@ +package com.olivia.peanut.base.api; + +import org.springframework.validation.annotation.Validated; +import com.olivia.sdk.utils.DynamicsPage; +import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.entity.baseResource.*; +import java.time.LocalDate; +import java.time.LocalDateTime; +import org.springframework.web.multipart.MultipartFile; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + + +/** + * 资源(BaseResource)对外API + * + * @author peanut + * @since 2024-08-06 17:29:00 + */ +// @FeignClient(value = "",contextId = "baseResource-api",url = "${ portal..center.endpoint:}") +public interface BaseResourceApi { + + /** + * 保存 资源 + */ + @PostMapping("/baseResource/insert") + BaseResourceInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseResourceInsertReq req); + + /** + * 根据ID 删除 资源 + */ + @PostMapping("/baseResource/deleteByIdList") + BaseResourceDeleteByIdListRes deleteByIdList(@RequestBody @Valid BaseResourceDeleteByIdListReq req); + + /** + * 查询 资源 + */ + @PostMapping("/baseResource/queryList") + BaseResourceQueryListRes queryList(@RequestBody @Valid BaseResourceQueryListReq req); + + /** + * 根据ID 更新 资源 + */ + @PostMapping("/baseResource/updateById") + BaseResourceUpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) BaseResourceUpdateByIdReq req); + + /** + * 分页查询 资源 + */ + @PostMapping("/baseResource/queryPageList") + DynamicsPage queryPageList(@RequestBody @Valid BaseResourceExportQueryPageListReq req); + + /** + * 导出 资源 + */ + @PostMapping("/baseResource/exportQueryPageList") + void queryPageListExport(@RequestBody @Valid BaseResourceExportQueryPageListReq req); + + /** + * 导入 + */ + @PostMapping("/baseResource/importData") + BaseResourceImportRes importData(@RequestParam("file") MultipartFile file); + + + /** + * 根据ID 批量查询 + */ + @PostMapping("/baseResource/queryByIdList") + BaseResourceQueryByIdListRes queryByIdListRes(@RequestBody @Valid BaseResourceQueryByIdListReq req); + + +} diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java index 078be2c..dc5bbf8 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListReq.java @@ -12,7 +12,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)根据ID删除多个入参 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java index 4c8a868..af59b65 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDeleteByIdListRes.java @@ -12,7 +12,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)根据ID删除多个反参 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java index 1a4cfd1..c97d9c4 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java @@ -1,19 +1,24 @@ package com.olivia.peanut.base.api.entity.baseAppResource; +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; import com.olivia.sdk.ann.InsertCheck; import com.olivia.sdk.ann.UpdateCheck; -import com.olivia.sdk.utils.Str; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; -import lombok.Getter; -import lombok.Setter; /** * 资源(BaseAppResource)查询对象返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ //@Accessors(chain=true) @Getter @@ -26,60 +31,37 @@ public class BaseAppResourceDto extends BaseEntityDto { */ @NotNull(message = "应用ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long appId; - - private String appName; - /*** - * 应用编码 - */ -// @NotBlank(message = "应用编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String appCode; - /*** - * 菜单编码 - */ - @NotBlank(message = "菜单编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String resourceCode; - /*** - * 菜单名称 - */ - @NotBlank(message = "菜单名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String resourceName; /*** - * 菜单URL + * 资源ID */ - @NotBlank(message = "菜单URL不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String resourceUrl; + @NotNull(message = "资源ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long resourceId; /*** - * 菜单图标 + * 是否按钮 0 否,1 是 */ -// @NotBlank(message = "菜单图标不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String resourceIcon; + @NotNull(message = "是否按钮 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isButton; /*** - * 菜单类型 + * 是否隐藏 0 否,1 是 */ -// @NotBlank(message = "菜单类型不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String resourceType; + @NotNull(message = "是否隐藏 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isHidden; /*** - * 是否按钮 + * 文件路径 */ - @NotNull(message = "是否按钮不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private Boolean isButton; + @NotBlank(message = "文件路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String filePath; /*** * 父菜单ID */ @NotNull(message = "父菜单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long parentId; + /*** + * 菜单路径 + */ + @NotBlank(message = "菜单路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String path; - private Boolean isHidden; - - private String filePath; - - public String getIsHiddenStr() { - return Str.booleanToStr(isHidden); - } - - public String getIsButtonStr() { - return Str.booleanToStr(isButton); - } } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java index e5ad574..e79cc7c 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListInfoRes.java @@ -14,7 +14,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)查询对象返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java index 5dd149a..12641a0 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceExportQueryPageListReq.java @@ -13,7 +13,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)查询对象入参 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java index 3ef7a74..37d353b 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportReq.java @@ -14,7 +14,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)查询对象返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ //@Accessors(chain=true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java index 0863c1a..e0c12c5 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceImportRes.java @@ -11,7 +11,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)保存返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java index e593dff..39d896c 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertReq.java @@ -11,7 +11,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)保存入参 * * @author peanut - * @since 2024-08-05 11:18:59 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java index 97a6db9..f97f745 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertRes.java @@ -11,7 +11,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)保存返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java index 8466d2c..9d4635d 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListReq.java @@ -14,7 +14,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)查询对象入参 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java index 6b8b90a..564b389 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryByIdListRes.java @@ -13,7 +13,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)查询对象返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java index abd56f4..7fd7b36 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListReq.java @@ -13,7 +13,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)查询对象入参 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java index 611393f..1a7126b 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceQueryListRes.java @@ -13,7 +13,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)查询对象返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java index e69b8ed..4436bc8 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdReq.java @@ -14,7 +14,7 @@ import lombok.experimental.Accessors; * 资源(BaseAppResource)表实体类 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java index 7ca528b..a69996b 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceUpdateByIdRes.java @@ -11,7 +11,7 @@ import java.time.LocalDateTime; * 资源(BaseAppResource)修改对象返回 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java new file mode 100644 index 0000000..a74b912 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import jakarta.validation.constraints.NotEmpty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)根据ID删除多个入参 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceDeleteByIdListReq { + + /*** + * 要删除的ID + */ + @NotEmpty(message = "请选择删除对象") + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java new file mode 100644 index 0000000..08e2b0f --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDeleteByIdListRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)根据ID删除多个反参 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceDeleteByIdListRes { + + /*** + * 受影响行数 + */ + private int count; + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java new file mode 100644 index 0000000..ec0f189 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceDto.java @@ -0,0 +1,72 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import com.olivia.peanut.portal.api.entity.BaseEntityDto; +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceDto extends BaseEntityDto { + + /*** + * 菜单编码 + */ + @NotBlank(message = "菜单编码不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceCode; + /*** + * 菜单名称 + */ + @NotBlank(message = "菜单名称不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceName; + /*** + * 菜单URL + */ + @NotBlank(message = "菜单URL不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceUrl; + /*** + * 菜单图标 + */ + @NotBlank(message = "菜单图标不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceIcon; + /*** + * 菜单类型 + */ + @NotBlank(message = "菜单类型不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String resourceType; + /*** + * 是否按钮 0 否,1 是 + */ + @NotNull(message = "是否按钮 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Boolean isButton; + /*** + * 父菜单ID + */ + @NotNull(message = "父菜单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long parentId; + /*** + * 菜单路径 + */ + @NotBlank(message = "菜单路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private String path; + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java new file mode 100644 index 0000000..3257cdf --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListInfoRes.java @@ -0,0 +1,27 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceExportQueryPageListInfoRes extends BaseResourceDto { + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java new file mode 100644 index 0000000..082da8a --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceExportQueryPageListReq.java @@ -0,0 +1,34 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象入参 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceExportQueryPageListReq { + + private int pageNum; + private int pageSize; + private Boolean queryPage = true; + private BaseResourceDto data; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java new file mode 100644 index 0000000..5c44a06 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportReq.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import com.alibaba.excel.annotation.ExcelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +//@Accessors(chain=true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceImportReq extends BaseResourceDto { + + + public void checkParam() { + } + +} + + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java new file mode 100644 index 0000000..f81d93d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceImportRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)保存返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceImportRes { + + /**** + * 写入行数 + */ + private int count; + /** + * 错误信息 + */ + private List errorMsg; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java new file mode 100644 index 0000000..2853d1f --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertReq.java @@ -0,0 +1,25 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)保存入参 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceInsertReq extends BaseResourceDto { + + public void checkParam() { + } +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java new file mode 100644 index 0000000..09acd39 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceInsertRes.java @@ -0,0 +1,29 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)保存返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceInsertRes { + + /**** + * 写入行数 + */ + private int count; + + private Long id; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java new file mode 100644 index 0000000..a747c67 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListReq.java @@ -0,0 +1,32 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象入参 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryByIdListReq { + + private List idList; + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java new file mode 100644 index 0000000..d127a1b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryByIdListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryByIdListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java new file mode 100644 index 0000000..d61024c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListReq.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象入参 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryListReq { + + private BaseResourceDto data; +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java new file mode 100644 index 0000000..9162925 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceQueryListRes.java @@ -0,0 +1,31 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import java.util.List; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)查询对象返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceQueryListRes { + + /*** + * 返回对象列表 + */ + private List dataList; + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java new file mode 100644 index 0000000..083eabe --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdReq.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import java.time.LocalDateTime; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.io.Serializable; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +/** + * 资源(BaseResource)表实体类 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceUpdateByIdReq extends BaseResourceDto { + + + public void checkParam() { + } + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java new file mode 100644 index 0000000..7106edf --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseResource/BaseResourceUpdateByIdRes.java @@ -0,0 +1,24 @@ +package com.olivia.peanut.base.api.entity.baseResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 资源(BaseResource)修改对象返回 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +@SuppressWarnings("serial") +public class BaseResourceUpdateByIdRes { + + +} + diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java index a561c14..3c6210e 100644 --- a/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java @@ -29,7 +29,7 @@ import org.springframework.web.multipart.MultipartFile; * 资源(BaseAppResource)表服务实现类 * * @author peanut - * @since 2024-08-05 11:18:59 + * @since 2024-08-06 17:30:28 */ @RestController public class BaseAppResourceApiImpl implements BaseAppResourceApi { diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java new file mode 100644 index 0000000..577d75c --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseResourceApiImpl.java @@ -0,0 +1,104 @@ +package com.olivia.peanut.base.api.impl; + +import java.time.LocalDateTime; + +import com.olivia.peanut.base.model.BaseResource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import com.olivia.sdk.utils.PoiExcelUtil; +import java.util.stream.Collectors; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import org.apache.commons.lang3.StringUtils; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import com.olivia.peanut.base.api.entity.baseResource.*; +import com.olivia.peanut.base.service.BaseResourceService; +import com.olivia.peanut.base.model.*; +import com.baomidou.mybatisplus.core.conditions.query.*; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import org.springframework.web.bind.annotation.*; +import com.olivia.peanut.base.api.BaseResourceApi; + +import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.web.multipart.MultipartFile; + +/** + * 资源(BaseResource)表服务实现类 + * + * @author peanut + * @since 2024-08-06 17:29:00 + */ +@RestController +public class BaseResourceApiImpl implements BaseResourceApi { + + private @Autowired BaseResourceService baseResourceService; + + /**** + * insert + * + */ + public @Override BaseResourceInsertRes insert(BaseResourceInsertReq req) { + this.baseResourceService.save($.copy(req, BaseResource.class)); + return new BaseResourceInsertRes().setCount(1); + } + + /**** + * deleteByIds + * + */ + public @Override BaseResourceDeleteByIdListRes deleteByIdList(BaseResourceDeleteByIdListReq req) { + baseResourceService.removeByIds(req.getIdList()); + return new BaseResourceDeleteByIdListRes(); + } + + /**** + * queryList + * + */ + public @Override BaseResourceQueryListRes queryList(BaseResourceQueryListReq req) { + return baseResourceService.queryList(req); + } + + /**** + * updateById + * + */ + public @Override BaseResourceUpdateByIdRes updateById(BaseResourceUpdateByIdReq req) { + baseResourceService.updateById($.copy(req, BaseResource.class)); + return new BaseResourceUpdateByIdRes(); + + } + + public @Override DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req) { + return baseResourceService.queryPageList(req); + } + + public @Override void queryPageListExport(BaseResourceExportQueryPageListReq req) { + DynamicsPage page = queryPageList(req); + List list = page.getDataList(); + // 类型转换, 更换枚举 等操作 + List listInfoRes = $.copyList(list, BaseResourceExportQueryPageListInfoRes.class); + PoiExcelUtil.export(BaseResourceExportQueryPageListInfoRes.class, listInfoRes, "资源"); + } + + public @Override BaseResourceImportRes importData(@RequestParam("file") MultipartFile file) { + List reqList = PoiExcelUtil.readData(file, new BaseResourceImportListener(), BaseResourceImportReq.class); + // 类型转换, 更换枚举 等操作 + List readList = $.copyList(reqList, BaseResource.class); + boolean bool = baseResourceService.saveBatch(readList); + int c = bool ? readList.size() : 0; + return new BaseResourceImportRes().setCount(c); + } + + public @Override BaseResourceQueryByIdListRes queryByIdListRes(BaseResourceQueryByIdListReq req) { + MPJLambdaWrapper q = new MPJLambdaWrapper(BaseResource.class) + .selectAll(BaseResource.class).in(BaseResource::getId, req.getIdList()); + List list = this.baseResourceService.list(q); + List dataList = $.copyList(list, BaseResourceDto.class); + this.baseResourceService.setName(dataList); + return new BaseResourceQueryByIdListRes().setDataList(dataList); + } +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java index 57c2647..3de0a84 100644 --- a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseAppResourceImportListener.java @@ -18,7 +18,7 @@ import lombok.extern.slf4j.Slf4j; * 资源(BaseAppResource)文件导入监听 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ public class BaseAppResourceImportListener extends AnalysisEventListener { diff --git a/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java new file mode 100644 index 0000000..85e255f --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/impl/listener/BaseResourceImportListener.java @@ -0,0 +1,48 @@ +package com.olivia.peanut.base.api.impl.listener; + + +import com.olivia.peanut.base.model.BaseResource; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.api.entity.baseResource.*; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; + +/** + * 资源(BaseResource)文件导入监听 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +public class BaseResourceImportListener extends AnalysisEventListener { + + @Override + public void invoke(BaseResourceImportReq data, AnalysisContext analysisContext) { + // 文件校验 + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 数据处理完毕后的操作(如果需要) + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + // 异常处理 + super.onException(exception, context); + } + + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + // log.info("headMap:{}", JSON.toJSONString(headMap)); + super.invokeHeadMap(headMap, context); + } + + +} diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java index 967e8a4..302f695 100644 --- a/src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseAppResourceMapper.java @@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper; * 资源(BaseAppResource)表数据库访问层 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Mapper public interface BaseAppResourceMapper extends MPJBaseMapper { diff --git a/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java b/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java new file mode 100644 index 0000000..c12234f --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/mapper/BaseResourceMapper.java @@ -0,0 +1,18 @@ +package com.olivia.peanut.base.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.olivia.peanut.base.model.BaseResource; +import org.apache.ibatis.annotations.Mapper; + +/** + * 资源(BaseResource)表数据库访问层 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Mapper +public interface BaseResourceMapper extends MPJBaseMapper { + +} + diff --git a/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java index 208e65b..ecbc226 100644 --- a/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java +++ b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java @@ -13,7 +13,7 @@ import com.baomidou.mybatisplus.annotation.TableName; * 资源(BaseAppResource)表实体类 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Accessors(chain = true) @Getter @@ -27,35 +27,21 @@ public class BaseAppResource extends BaseEntity { */ private Long appId; /*** - * 应用编码 + * 资源ID */ - private String appCode; + private Long resourceId; /*** - * 菜单编码 + * 是否按钮 0 否,1 是 */ - private String resourceCode; - /*** - * 菜单名称 - */ - private String resourceName; - /*** - * 菜单URL - */ - private String resourceUrl; - /*** - * 菜单图标 - */ - private String resourceIcon; + private Boolean isButton; /*** - * 菜单类型 + * 是否隐藏 0 否,1 是 */ - private String resourceType; + private Boolean isHidden; /*** - * 是否按钮 + * 文件路径 */ - private Boolean isButton; - - private Boolean isHidden; + private String filePath; /*** * 父菜单ID */ @@ -65,7 +51,5 @@ public class BaseAppResource extends BaseEntity { */ private String path; - - private String filePath; } diff --git a/src/main/java/com/olivia/peanut/base/model/BaseResource.java b/src/main/java/com/olivia/peanut/base/model/BaseResource.java new file mode 100644 index 0000000..4f0a245 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/model/BaseResource.java @@ -0,0 +1,59 @@ +package com.olivia.peanut.base.model; + + +import java.time.LocalDate; +import java.time.LocalDateTime; +import com.olivia.sdk.utils.BaseEntity; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import com.baomidou.mybatisplus.annotation.TableName; + +/** + * 资源(BaseResource)表实体类 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Accessors(chain = true) +@Getter +@Setter +//@SuppressWarnings("serial") +@TableName("base_resource") +public class BaseResource extends BaseEntity { + + /*** + * 菜单编码 + */ + private String resourceCode; + /*** + * 菜单名称 + */ + private String resourceName; + /*** + * 菜单URL + */ + private String resourceUrl; + /*** + * 菜单图标 + */ + private String resourceIcon; + /*** + * 菜单类型 + */ + private String resourceType; + /*** + * 是否按钮 0 否,1 是 + */ + private Boolean isButton; + /*** + * 父菜单ID + */ + private Long parentId; + /*** + * 菜单路径 + */ + private String path; + +} + diff --git a/src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java b/src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java index 795814d..2ecf223 100644 --- a/src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java +++ b/src/main/java/com/olivia/peanut/base/service/BaseAppResourceService.java @@ -12,7 +12,7 @@ import com.olivia.peanut.base.api.entity.baseAppResource.*; * 资源(BaseAppResource)表服务接口 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ public interface BaseAppResourceService extends MPJBaseService { diff --git a/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java b/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java new file mode 100644 index 0000000..4ac2d24 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/BaseResourceService.java @@ -0,0 +1,26 @@ +package com.olivia.peanut.base.service; + +import com.olivia.sdk.utils.DynamicsPage; +import com.baomidou.mybatisplus.extension.service.IService; +import com.olivia.peanut.base.model.BaseResource; +import java.util.List; +import com.github.yulichang.base.MPJBaseService; + +import com.olivia.peanut.base.api.entity.baseResource.*; + +/** + * 资源(BaseResource)表服务接口 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +public interface BaseResourceService extends MPJBaseService { + + BaseResourceQueryListRes queryList(BaseResourceQueryListReq req); + + DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req); + + + void setName(List baseResourceDtoList); +} + diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java index fdf0d54..f351471 100644 --- a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java @@ -1,37 +1,37 @@ package com.olivia.peanut.base.service.impl; +import org.springframework.aop.framework.AopContext; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import com.olivia.peanut.base.api.entity.baseAppResource.*; -import com.olivia.peanut.base.mapper.BaseAppResourceMapper; -import com.olivia.peanut.base.model.BaseAppResource; -import com.olivia.peanut.base.service.BaseAppResourceService; -import com.olivia.peanut.base.service.BaseAppService; -import com.olivia.peanut.portal.service.BaseTableHeaderService; -import com.olivia.peanut.util.SetNamePojoUtils; -import com.olivia.sdk.filter.LoginUserContext; -import com.olivia.sdk.service.SetNameService; +import jakarta.annotation.Resource; import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; -import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; -import org.springframework.aop.framework.AopContext; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseAppResourceMapper; +import com.olivia.peanut.base.model.BaseAppResource; +import com.olivia.peanut.base.service.BaseAppResourceService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseAppResource.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; /** * 资源(BaseAppResource)表服务实现类 * * @author peanut - * @since 2024-08-05 11:19:00 + * @since 2024-08-06 17:30:28 */ @Service("baseAppResourceService") @Transactional @@ -85,32 +85,25 @@ public class BaseAppResourceServiceImpl extends MPJBaseServiceImpl getWrapper(BaseAppResourceDto obj) { MPJLambdaWrapper q = new MPJLambdaWrapper<>(); - String useAppKey = LoginUserContext.getLoginUser().getUseAppKey(); if (Objects.nonNull(obj)) { - obj.setAppCode(useAppKey); q .eq(Objects.nonNull(obj.getAppId()), BaseAppResource::getAppId, obj.getAppId()) - .eq(StringUtils.isNoneBlank(obj.getAppCode()), BaseAppResource::getAppCode, obj.getAppCode()) - .eq(StringUtils.isNoneBlank(obj.getResourceCode()), BaseAppResource::getResourceCode, obj.getResourceCode()) - .eq(StringUtils.isNoneBlank(obj.getResourceName()), BaseAppResource::getResourceName, obj.getResourceName()) - .eq(StringUtils.isNoneBlank(obj.getResourceUrl()), BaseAppResource::getResourceUrl, obj.getResourceUrl()) - .eq(StringUtils.isNoneBlank(obj.getResourceIcon()), BaseAppResource::getResourceIcon, obj.getResourceIcon()) - .eq(StringUtils.isNoneBlank(obj.getResourceType()), BaseAppResource::getResourceType, obj.getResourceType()) + .eq(Objects.nonNull(obj.getResourceId()), BaseAppResource::getResourceId, obj.getResourceId()) .eq(Objects.nonNull(obj.getIsButton()), BaseAppResource::getIsButton, obj.getIsButton()) + .eq(Objects.nonNull(obj.getIsHidden()), BaseAppResource::getIsHidden, obj.getIsHidden()) + .eq(StringUtils.isNoneBlank(obj.getFilePath()), BaseAppResource::getFilePath, obj.getFilePath()) .eq(Objects.nonNull(obj.getParentId()), BaseAppResource::getParentId, obj.getParentId()) + .eq(StringUtils.isNoneBlank(obj.getPath()), BaseAppResource::getPath, obj.getPath()) + ; - } else { - q.eq(BaseAppResource::getAppCode, useAppKey); } -// q.orderByDesc(BaseAppResource::getId); + q.orderByDesc(BaseAppResource::getId); return q; } diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java new file mode 100644 index 0000000..5a19e7d --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseResourceServiceImpl.java @@ -0,0 +1,120 @@ +package com.olivia.peanut.base.service.impl; + +import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.yulichang.base.MPJBaseServiceImpl; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import jakarta.annotation.Resource; +import com.olivia.sdk.utils.$; +import com.olivia.sdk.utils.DynamicsPage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.olivia.peanut.base.mapper.BaseResourceMapper; +import com.olivia.peanut.base.model.BaseResource; +import com.olivia.peanut.base.service.BaseResourceService; +import cn.hutool.core.collection.CollUtil; +//import com.olivia.peanut.base.service.BaseTableHeaderService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.base.api.entity.baseResource.*; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; + +/** + * 资源(BaseResource)表服务实现类 + * + * @author peanut + * @since 2024-08-06 17:29:01 + */ +@Service("baseResourceService") +@Transactional +public class BaseResourceServiceImpl extends MPJBaseServiceImpl implements BaseResourceService { + + final static Cache> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build(); + + @Resource + BaseTableHeaderService tableHeaderService; + @Resource + SetNameService setNameService; + + + public @Override BaseResourceQueryListRes queryList(BaseResourceQueryListReq req) { + + MPJLambdaWrapper q = getWrapper(req.getData()); + List list = this.list(q); + + List dataList = list.stream().map(t -> $.copy(t, BaseResourceDto.class)).collect(Collectors.toList()); + ((BaseResourceService) AopContext.currentProxy()).setName(dataList); + return new BaseResourceQueryListRes().setDataList(dataList); + } + + + public @Override DynamicsPage queryPageList(BaseResourceExportQueryPageListReq req) { + + DynamicsPage page = new DynamicsPage<>(); + page.setCurrent(req.getPageNum()).setSize(req.getPageSize()); + setQueryListHeader(page); + MPJLambdaWrapper q = getWrapper(req.getData()); + List records; + if (Boolean.TRUE.equals(req.getQueryPage())) { + IPage list = this.page(page, q); + IPage dataList = list.convert(t -> $.copy(t, BaseResourceExportQueryPageListInfoRes.class)); + records = dataList.getRecords(); + } else { + records = $.copyList(this.list(q), BaseResourceExportQueryPageListInfoRes.class); + } + + // 类型转换, 更换枚举 等操作 + + List listInfoRes = $.copyList(records, BaseResourceExportQueryPageListInfoRes.class); + ((BaseResourceService) AopContext.currentProxy()).setName(listInfoRes); + + return DynamicsPage.init(page, listInfoRes); + } + + // 以下为私有对象封装 + + public @Override void setName(List list) { + + // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + + } + + + private MPJLambdaWrapper getWrapper(BaseResourceDto obj) { + MPJLambdaWrapper q = new MPJLambdaWrapper<>(); + + if (Objects.nonNull(obj)) { + q + .eq(StringUtils.isNoneBlank(obj.getResourceCode()), BaseResource::getResourceCode, obj.getResourceCode()) + .eq(StringUtils.isNoneBlank(obj.getResourceName()), BaseResource::getResourceName, obj.getResourceName()) + .eq(StringUtils.isNoneBlank(obj.getResourceUrl()), BaseResource::getResourceUrl, obj.getResourceUrl()) + .eq(StringUtils.isNoneBlank(obj.getResourceIcon()), BaseResource::getResourceIcon, obj.getResourceIcon()) + .eq(StringUtils.isNoneBlank(obj.getResourceType()), BaseResource::getResourceType, obj.getResourceType()) + .eq(Objects.nonNull(obj.getIsButton()), BaseResource::getIsButton, obj.getIsButton()) + .eq(Objects.nonNull(obj.getParentId()), BaseResource::getParentId, obj.getParentId()) + .eq(StringUtils.isNoneBlank(obj.getPath()), BaseResource::getPath, obj.getPath()) + + ; + } + q.orderByDesc(BaseResource::getId); + return q; + + } + + private void setQueryListHeader(DynamicsPage page) { + + tableHeaderService.listByBizKey(page, "BaseResourceService#queryPageList"); + + } + + +} + diff --git a/src/test/java/com/olivia/menu/Menu.java b/src/test/java/com/olivia/menu/Menu.java index 51088d9..abcbf9e 100644 --- a/src/test/java/com/olivia/menu/Menu.java +++ b/src/test/java/com/olivia/menu/Menu.java @@ -39,7 +39,7 @@ public class Menu { setMenuId(menus, 0L); log.info("{}", JSON.toJSONString(menus)); - System.out.println("insert into base_app_resource (id,app_id,resource_code,resource_name,resource_url,parent_id ,is_hidden,tenant_id ) values "); + System.out.println("insert into base_resource (id,resource_code,resource_name,resource_url,parent_id ,is_hidden,tenant_id ) values "); print(menus); } @@ -50,7 +50,7 @@ public class Menu { return; } menus.forEach(t -> { - System.out.println("('" + String.join("','", t.id + "", "4", IdWorker.getIdStr(), t.name, t.path, t.parentId + "", Boolean.FALSE.equals(t.hidden) ? "0" : "1", "1001'),")); + System.out.println("('" + String.join("','", t.id + "", IdWorker.getIdStr(), t.name, t.path, t.parentId + "", Boolean.FALSE.equals(t.hidden) ? "0" : "1", "1001'),")); print(t.children); }); } diff --git a/src/test/resources/menu.json b/src/test/resources/menu.json index cf087a1..b5f393e 100644 --- a/src/test/resources/menu.json +++ b/src/test/resources/menu.json @@ -1,837 +1 @@ -[ - { - "path": "/baseConfig/", - "component": "src/layout/index.vue", - "redirect": "index", - - "children": [ - { - "path": "/views/tenant/index", - "name": "租户管理", - "meta": { - "title": "租户管理", - "icon": "", - "affix": false - } - }, - { - "path": "/views/factory/index", - "name": "工厂", - "meta": { - "title": "工厂管理", - "icon": "", - "affix": false - } - }, - { - "path": "/views/brand/index", - "name": "品牌管理", - "meta": { - "title": "品牌管理", - "icon": "", - "affix": false - } - }, - { - "path": "/prop/spec/index", - "name": "日历管理", - "meta": { - "title": "日历管理", - "icon": "calendar", - "affix": false - } - }, - { - "path": "/prop/shift/index", - "name": "班次管理", - "meta": { - "title": "班次管理", - "icon": "calendar", - "affix": false - } - }, - { - "path": "/file/upload/index", - "name": "文件管理", - "meta": { - "title": "文件管理", - "icon": "calendar", - "affix": false - } - }, - { - "path": "/base/baseTableHeader/index", - "name": "表格头管理", - "meta": { - "title": "表格头管理", - "icon": "", - "affix": false - } - }, - { - "path": "/base/role/group/index", - "name": "角色组管理", - "meta": { - "title": "角色组管理", - "icon": "", - "affix": false - } - }, - { - "path": "/base/role/index", - "name": "角色管理", - "meta": { - "title": "角色管理", - "icon": "", - "affix": false - } - }, - { - "path": "/base/app/index", - "name": "系统管理", - "meta": { - "title": "系统管理", - "icon": "", - "affix": false - } - }, - { - "path": "/base/app/resource/index", - "name": "系统菜单管理", - "meta": { - "title": "系统菜单管理", - "icon": "", - "affix": false - } - } - ] - }, - { - "path": "/aps/base-data/", - "component": "src/layout/index.vue", - "meta": { - "title": "Aps系统", - "icon": "android-system", - "affix": false - }, - "children": [ - { - "path": "/aps/basic/config/index", - "name": "基础配置", - - "__file": "src/components/ParentView/index.vue" - }, - "meta": { - "title": "基础配置", - "icon": "setting", - "affix": false - }, - "children": [ - { - "path": "/aps/sale/index", - "name": "销售配置管理", - "meta": { - "title": "销售配置管理", - "icon": "group", - "affix": false - } - }, - { - "path": "/aps/project/index", - "name": "工程配置管理", - "meta": { - "title": "工程配置管理", - "icon": "group", - "affix": false - } - }, - { - "path": "/aps/status/index", - "name": "状态", - "meta": { - "title": "状态管理", - "icon": "status", - "affix": false - } - }, - { - "path": "/aps/section/index", - "name": "工段管理", - "meta": { - "title": "工段管理", - "icon": "section", - "affix": false - } - }, - { - "path": "/aps/station/index", - "name": "工位管理", - "meta": { - "title": "工位管理", - "icon": "workstation", - "affix": false - } - }, - { - "path": "/aps/room/index", - "name": "车间管理", - "meta": { - "title": "车间", - "icon": "room", - "affix": false - } - }, - { - "path": "/aps/process/path/index", - "name": "工艺路径", - "meta": { - "title": "工艺路径管理", - "icon": "process-setting", - "affix": false - } - }, - { - "path": "/aps/apsLogistics/path/index", - "name": "物流路径", - "meta": { - "title": "物流路径", - "icon": "process-setting", - "affix": false - } - } - ] - }, - { - "path": "/aps/goods/main/index", - "name": "APS商品管理", - - "meta": { - "title": "商品管理", - "icon": "order-1", - "affix": false - }, - "children": [ - { - "path": "/aps/bomGroup/index", - "name": "零件组配置", - "meta": { - "title": "零件组配置", - "icon": "setting", - "affix": false - } - }, - { - "path": "/aps/bom/index", - "name": "零件配置", - "meta": { - "title": "零件配置", - "icon": "setting", - "affix": false - } - }, - { - "path": "/aps/goodsBom/index", - "name": "商品零件配置", - "meta": { - "title": "商品零件配置", - "icon": "setting", - "affix": false - } - }, - { - "path": "/aps/bomBuyPlan/index", - "name": "零件购买计划", - "meta": { - "title": "零件购买计划", - "icon": "setting", - "affix": false - } - }, - { - "path": "/aps/goods/index", - "name": "商品管理", - "meta": { - "title": "商品管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/goods/sale/index", - "name": "商品销售特征绑定", - "meta": { - "title": "商品销售特征绑定", - "icon": "setting", - "affix": false - } - }, - { - "path": "/aps/goods/sale/project/index", - "name": "商品销售特转规划", - "meta": { - "title": "商品销售特转规划", - "icon": "setting", - "affix": false - } - } - ] - }, - { - "path": "/aps/goods/forecast/index", - "name": "预测管理", - "component": { - "staticRenderFns": [ - - ], - "_compiled": true, - "beforeCreate": [ - null - ], - "beforeDestroy": [ - null - ], - "__file": "src/components/ParentView/index.vue" - }, - "meta": { - "title": "预测管理", - "icon": "eye-open", - "affix": false - }, - "children": [ - { - "path": "/aps/goods/forecast/index", - "name": "商品预测", - "meta": { - "title": "商品预测", - "icon": "eye-open", - "affix": false - } - }, - { - "path": "/aps/goods/forecast/main/index", - "name": "预测主版本", - "meta": { - "title": "预测主版本", - "icon": "main", - "affix": false - } - }, - { - "path": "/aps/goods/forecast/make/week/index", - "name": "(预)生产数据", - "meta": { - "title": "(预)周生产管理", - "icon": "eye-open", - "affix": false - } - }, - { - "path": "/aps/goods/forecast/make/weekMain/index", - "name": "(预)生产数据主版本", - "meta": { - "title": "(预)生产数据主版本", - "icon": "eye-open", - "affix": false - } - } - ] - }, - { - "path": "/aps/order/main/index", - "name": "订单管理", - "component": { - "staticRenderFns": [ - - ], - "_compiled": true, - "beforeCreate": [ - null - ], - "beforeDestroy": [ - null - ], - "__file": "src/components/ParentView/index.vue" - }, - "meta": { - "title": "订单管理", - "icon": "order-1", - "affix": false - }, - "children": [ - { - "path": "/aps/order/index", - "name": "订单管理", - "meta": { - "title": "订单管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/order/timeline/index", - "name": "订单进度", - "meta": { - "title": "订单进度", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/order/roll/factory/index", - "name": "工厂滚动预测产能", - "meta": { - "title": "工厂滚动预测产能", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/order/roll/index", - "name": "滚动预测", - "meta": { - "title": "滚动预测", - "icon": "order-1", - "affix": false - } - } - ] - }, - { - "path": "/aps/make/q/index", - "name": "APS工厂产能管理", - "component": { - "staticRenderFns": [ - - ], - "_compiled": true, - "beforeCreate": [ - null - ], - "beforeDestroy": [ - null - ], - "__file": "src/components/ParentView/index.vue" - }, - "meta": { - "title": "产能管理", - "icon": "order-1", - "affix": false - }, - "children": [ - { - "path": "/aps/make_capacity_factory/index", - "name": "工厂产能管理", - "meta": { - "title": "工厂产能管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/make/make_capacity_sale_config/index", - "name": "销售特征产能管理", - "meta": { - "title": "销售特征产能管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/make/make_capacity_goods/index", - "name": "商品产能", - "meta": { - "title": "商品产能", - "icon": "order-1", - "affix": false - } - } - ] - }, - { - "path": "/aps/scheduling/main/index", - "name": "排产排程", - "component": { - "staticRenderFns": [ - - ], - "_compiled": true, - "beforeCreate": [ - null - ], - "beforeDestroy": [ - null - ], - "__file": "src/components/ParentView/index.vue" - }, - "meta": { - "title": "排产排程", - "icon": "order-1", - "affix": false - }, - "children": [ - { - "path": "/aps/make/constraint/index", - "name": "排产约束", - "meta": { - "title": "排产约束", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/scheduling/index", - "name": "排产版本管理", - "meta": { - "title": "排产管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/scheduling/bom/index", - "name": "排产零件", - "hidden": true, - "meta": { - "title": "排产零件", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/scheduling/day/index", - "name": "排程配置", - "hidden": false, - "meta": { - "title": "排程配置", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/aps/scheduling/day/config/index", - "name": "排程管理", - "hidden": false, - "meta": { - "title": "排程管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/apsSchedulingDayConfigVersion/detailList", - "name": "排程结果", - "hidden": true, - "meta": { - "title": "排程结果", - "icon": "order-1", - "affix": false - } - } - ] - } - ] - }, - { - "path": "/base/index", - "component": "src/layout/index.vue", - "redirect": "index", - "meta": { - "title": "账户管理", - "icon": "user", - "affix": false - }, - "children": [ - { - "path": "/login/account/index", - "name": "账户管理", - "hidden": false, - "meta": { - "title": "账户管理", - "icon": "peoples", - "affix": false - } - }, - { - "path": "/supplier/index", - "name": "供应管理", - "meta": { - "title": "供应管理", - "icon": "pastebin", - "affix": false - } - } - ] - }, - { - "path": "/store", - "hidden": true, - "component": "src/layout/index.vue", - "redirect": "index", - "meta": { - "title": "门店管理", - "icon": "shop", - "affix": false - }, - "children": [ - { - "path": "/store/manage/index", - "name": "门店管理", - "meta": { - "title": "门店管理", - "icon": "", - "affix": false - } - } - ] - }, - { - "path": "/food/index", - "component": "src/layout/index.vue", - "hidden": true, - "redirect": "index", - "meta": { - "title": "菜品管理", - "icon": "skill", - "affix": false - }, - "children": [ - { - "path": "index", - "name": "", - "meta": { - "title": "菜品管理", - "icon": "redis", - "affix": false - } - }, - { - "path": "1index", - "meta": { - "title": "售卖趋势", - "icon": "redis", - "affix": false - } - } - ] - }, - { - "path": "/map/", - "component": "src/layout/index.vue", - "redirect": "index", - "meta": { - "title": "地图", - "icon": "international", - "affix": false - }, - "children": [ - { - "path": "/map/store/index", - "name": "高德门店地图", - "meta": { - "title": "高德门店地图", - "icon": "international", - "affix": false - } - }, - { - "path": "/map/store/fence", - "name": "高德电子围栏", - "meta": { - "title": "高德电子围栏", - "icon": "lock", - "affix": false - } - } - ] - }, - { - "path": "/property/", - "component": "src/layout/index.vue", - "redirect": "index", - "meta": { - "title": "资产管理", - "icon": "tools", - "affix": false - }, - "children": [ - { - "path": "/prop/storey/index", - "name": "楼层管理", - "meta": { - "title": "楼层管理", - "icon": "storey", - "affix": false - } - }, - { - "path": "/prop/room/index", - "name": "房间管理", - "meta": { - "title": "房间管理", - "icon": "room", - "affix": false - } - }, - { - "path": "/prop/property/index", - "name": "资产管理", - "meta": { - "title": "资产管理", - "icon": "construction", - "affix": false - } - }, - { - "path": "/prop/property/propertyScanQr", - "name": "扫码盘点", - "meta": { - "title": "扫码盘点", - "icon": "scan-qr-code", - "affix": false - } - }, - { - "path": "/prop/property/propertyScanQrTest", - "name": "扫码盘点(测试)", - "meta": { - "title": "扫码盘点(测试)", - "icon": "scan-qr-code", - "affix": false - } - }, - { - "path": "/prop/property/checkList", - "name": "盘点管理", - "meta": { - "title": "盘点管理", - "icon": "check-list", - "affix": false - } - } - ] - }, - { - "path": "/jxc/", - "component": "src/layout/index.vue", - "redirect": "index", - "meta": { - "title": "进存销", - "icon": "international", - "affix": false - }, - "children": [ - { - "path": "/jcx/goods/index", - "name": "进存销-商品管理", - "meta": { - "title": "商品管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/order/index", - "name": "进存销-订单管理", - "meta": { - "title": "进存销-订单管理", - "icon": "order-1", - "affix": false - } - }, - { - "path": "/goods/waring/index", - "name": "预警管理", - "meta": { - "title": "预警管理", - "icon": "warning", - "affix": false - } - }, - { - "path": "/buy/plan/index", - "name": "购买计划", - "meta": { - "title": "购买计划", - "icon": "buy-car", - "affix": false - } - }, - { - "path": "/buy/order/index", - "name": "采购订单", - "meta": { - "title": "采购订单", - "icon": "order-2", - "affix": false - } - } - ] - }, - { - "path": "/flow/", - "component": "src/layout/index.vue", - "redirect": "index", - "meta": { - "title": "工作流", - "icon": "international", - "affix": false - }, - "children": [ - { - "path": "/flow/form", - "name": "流程表单", - "meta": { - "title": "流程表单", - "icon": "international", - "affix": false - } - }, - { - "path": "/flow/form/detail", - "name": "流程表预览", - "hidden": true, - "meta": { - "title": "流程表预览", - "icon": "international", - "affix": false - } - }, - { - "path": "/flow/start", - "name": "流程发起", - "meta": { - "title": "流程发起", - "icon": "international", - "affix": false - } - }, - { - "path": "/flow/todo", - "name": "流程待办", - "meta": { - "title": "流程待办", - "icon": "international", - "affix": false - } - }, - { - "path": "/flow/done", - "name": "流程已办", - "meta": { - "title": "流程已办", - "icon": "international", - "affix": false - } - }, - { - "path": "/flow/todo-flow-qj", - "name": "请假流程待办", - "meta": { - "title": "请假流程待办", - "icon": "international", - "affix": false - } - } - ] - } -] +[{"path":"/base/config","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"redirect":"index","meta":{"title":"基础配置","icon":"setting","affix":false},"children":[{"path":"/baseApp/index","name":"APP管理","meta":{"title":"APP管理","affix":false}},{"path":"/baseAppResource/index","name":"APP资源管理","meta":{"title":"APP资源管理","affix":false}},{"path":"/views/tenant/index","name":"租户管理","meta":{"title":"租户管理","icon":"","affix":false}},{"path":"/views/factory/index","name":"工厂","meta":{"title":"工厂管理","icon":"","affix":false}},{"path":"/views/brand/index","name":"品牌管理","meta":{"title":"品牌管理","icon":"","affix":false}},{"path":"/prop/spec/index","name":"日历管理","meta":{"title":"日历管理","icon":"calendar","affix":false}},{"path":"/prop/shift/index","name":"班次管理","meta":{"title":"班次管理","icon":"calendar","affix":false}},{"path":"/file/upload/index","name":"文件管理","meta":{"title":"文件管理","icon":"calendar","affix":false}},{"path":"/base/baseTableHeader/index","name":"表格头管理","meta":{"title":"表格头管理","icon":"","affix":false}},{"path":"/base/role/group/index","name":"角色组管理","meta":{"title":"角色组管理","icon":"","affix":false}},{"path":"/base/role/index","name":"角色管理","meta":{"title":"角色管理","icon":"","affix":false}},{"path":"/aps/sale/index","name":"销售配置管理","meta":{"title":"销售配置管理","icon":"group","affix":false}},{"path":"/aps/project/index","name":"工程配置管理","meta":{"title":"工程配置管理","icon":"group","affix":false}},{"path":"/aps/status/index","name":"状态","meta":{"title":"状态管理","icon":"status","affix":false}},{"path":"/aps/section/index","name":"工段管理","meta":{"title":"工段管理","icon":"section","affix":false}},{"path":"/aps/station/index","name":"工位管理","meta":{"title":"工位管理","icon":"workstation","affix":false}},{"path":"/aps/room/index","name":"车间管理","meta":{"title":"车间","icon":"room","affix":false}},{"path":"/aps/process/path/index","name":"工艺路径","meta":{"title":"工艺路径管理","icon":"process-setting","affix":false}},{"path":"/aps/apsLogistics/path/index","name":"物流路径","meta":{"title":"物流路径","icon":"process-setting","affix":false}}]},{"path":"/aps/goods/main/index","name":"APS商品管理","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"meta":{"title":"商品管理","icon":"order-1","affix":false},"children":[{"path":"/aps/bomGroup/index","name":"零件组配置","meta":{"title":"零件组配置","icon":"setting","affix":false}},{"path":"/aps/bom/index","name":"零件配置","meta":{"title":"零件配置","icon":"setting","affix":false}},{"path":"/aps/goodsBom/index","name":"商品零件配置","meta":{"title":"商品零件配置","icon":"setting","affix":false}},{"path":"/aps/bomBuyPlan/index","name":"零件购买计划","meta":{"title":"零件购买计划","icon":"setting","affix":false}},{"path":"/aps/goods/index","name":"商品管理","meta":{"title":"商品管理","icon":"order-1","affix":false}},{"path":"/aps/goods/sale/index","name":"商品销售特征绑定","meta":{"title":"商品销售特征绑定","icon":"setting","affix":false}},{"path":"/aps/goods/sale/project/index","name":"商品销售特转规划","meta":{"title":"商品销售特转规划","icon":"setting","affix":false}}]},{"path":"/aps/goods/forecast/index","name":"预测管理","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"meta":{"title":"预测管理","icon":"eye-open","affix":false},"children":[{"path":"/aps/goods/forecast/index","name":"商品预测","meta":{"title":"商品预测","icon":"eye-open","affix":false}},{"path":"/aps/goods/forecast/main/index","name":"预测主版本","meta":{"title":"预测主版本","icon":"main","affix":false}},{"path":"/aps/goods/forecast/make/week/index","name":"(预)生产数据","meta":{"title":"(预)周生产管理","icon":"eye-open","affix":false}},{"path":"/aps/goods/forecast/make/weekMain/index","name":"(预)生产数据主版本","meta":{"title":"(预)生产数据主版本","icon":"eye-open","affix":false}}]},{"path":"/aps/order/main/index","name":"订单管理","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"meta":{"title":"订单管理","icon":"order-1","affix":false},"children":[{"path":"/aps/order/index","name":"订单管理","meta":{"title":"订单管理","icon":"order-1","affix":false}},{"path":"/aps/order/timeline/index","name":"订单进度","meta":{"title":"订单进度","icon":"order-1","affix":false}},{"path":"/aps/order/roll/factory/index","name":"工厂滚动预测产能","meta":{"title":"工厂滚动预测产能","icon":"order-1","affix":false}},{"path":"/aps/order/roll/index","name":"滚动预测","meta":{"title":"滚动预测","icon":"order-1","affix":false}}]},{"path":"/aps/make/q/index","name":"APS工厂产能管理","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"meta":{"title":"产能管理","icon":"order-1","affix":false},"children":[{"path":"/aps/make_capacity_factory/index","name":"工厂产能管理","meta":{"title":"工厂产能管理","icon":"order-1","affix":false}},{"path":"/aps/make/make_capacity_sale_config/index","name":"销售特征产能管理","meta":{"title":"销售特征产能管理","icon":"order-1","affix":false}},{"path":"/aps/make/make_capacity_goods/index","name":"商品产能","meta":{"title":"商品产能","icon":"order-1","affix":false}}]},{"path":"/aps/scheduling/main/index","name":"排产排程","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"meta":{"title":"排产排程","icon":"order-1","affix":false},"children":[{"path":"/aps/make/constraint/index","name":"排产约束","meta":{"title":"排产约束","icon":"order-1","affix":false}},{"path":"/aps/scheduling/index","name":"排产版本管理","meta":{"title":"排产管理","icon":"order-1","affix":false}},{"path":"/aps/scheduling/bom/index","name":"排产零件","hidden":true,"meta":{"title":"排产零件","icon":"order-1","affix":false}},{"path":"/aps/scheduling/day/index","name":"排程配置","hidden":false,"meta":{"title":"排程配置","icon":"order-1","affix":false}},{"path":"/aps/scheduling/day/config/index","name":"排程管理","hidden":false,"meta":{"title":"排程管理","icon":"order-1","affix":false}},{"path":"/apsSchedulingDayConfigVersion/detailList","name":"排程结果","hidden":true,"meta":{"title":"排程结果","icon":"order-1","affix":false}}]},{"path":"/base/index","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"redirect":"index","meta":{"title":"账户管理","icon":"user","affix":false},"children":[{"path":"/login/account/index","name":"账户管理","hidden":false,"meta":{"title":"账户管理","icon":"peoples","affix":false}},{"path":"/supplier/index","name":"供应管理","meta":{"title":"供应管理","icon":"pastebin","affix":false}}]},{"path":"/store","hidden":true,"component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"redirect":"index","meta":{"title":"门店管理","icon":"shop","affix":false},"children":[{"path":"/store/manage/index","name":"门店管理","meta":{"title":"门店管理","icon":"","affix":false}}]},{"path":"/food/index","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"hidden":true,"redirect":"index","meta":{"title":"菜品管理","icon":"skill","affix":false},"children":[{"path":"index","name":"","meta":{"title":"菜品管理","icon":"redis","affix":false}},{"path":"1index","meta":{"title":"售卖趋势","icon":"redis","affix":false}}]},{"path":"/map/","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"redirect":"index","meta":{"title":"地图","icon":"international","affix":false},"children":[{"path":"/map/store/index","name":"高德门店地图","meta":{"title":"高德门店地图","icon":"international","affix":false}},{"path":"/map/store/fence","name":"高德电子围栏","meta":{"title":"高德电子围栏","icon":"lock","affix":false}}]},{"path":"/property/","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"redirect":"index","meta":{"title":"资产管理","icon":"tools","affix":false},"children":[{"path":"/prop/storey/index","name":"楼层管理","meta":{"title":"楼层管理","icon":"storey","affix":false}},{"path":"/prop/room/index","name":"房间管理","meta":{"title":"房间管理","icon":"room","affix":false}},{"path":"/prop/property/index","name":"资产管理","meta":{"title":"资产管理","icon":"construction","affix":false}},{"path":"/prop/property/propertyScanQr","name":"扫码盘点","meta":{"title":"扫码盘点","icon":"scan-qr-code","affix":false}},{"path":"/prop/property/propertyScanQrTest","name":"扫码盘点(测试)","meta":{"title":"扫码盘点(测试)","icon":"scan-qr-code","affix":false}},{"path":"/prop/property/checkList","name":"盘点管理","meta":{"title":"盘点管理","icon":"check-list","affix":false}}]},{"path":"/jxc/","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"redirect":"index","meta":{"title":"进存销","icon":"international","affix":false},"children":[{"path":"/jcx/goods/index","name":"进存销-商品管理","meta":{"title":"商品管理","icon":"order-1","affix":false}},{"path":"/order/index","name":"进存销-订单管理","meta":{"title":"进存销-订单管理","icon":"order-1","affix":false}},{"path":"/goods/waring/index","name":"预警管理","meta":{"title":"预警管理","icon":"warning","affix":false}},{"path":"/buy/plan/index","name":"购买计划","meta":{"title":"购买计划","icon":"buy-car","affix":false}},{"path":"/buy/order/index","name":"采购订单","meta":{"title":"采购订单","icon":"order-2","affix":false}}]},{"path":"/flow/","component":{"name":"Layout","components":{"AppMain":{"name":"AppMain","components":{"iframeToggle":{"components":{"InnerLink":{"props":{"src":{"default":"/"},"iframeId":{}},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/InnerLink/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/IframeToggle/index.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-078753dd","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/AppMain.vue"},"Navbar":{"components":{"Breadcrumb":{"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-b50ef614","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Breadcrumb/index.vue"},"TopNav":{"computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"__file":"src/components/TopNav/index.vue"},"Hamburger":{"name":"Hamburger","props":{"isActive":{"default":false}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-4e6f274c","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/Hamburger/index.vue"},"Screenfull":{"name":"Screenfull","beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-29234bee","beforeCreate":[null],"__file":"src/components/Screenfull/index.vue"},"SizeSelect":{"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/SizeSelect/index.vue"},"Search":{"name":"HeaderSearch","computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-032bd1f0","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/HeaderSearch/index.vue"},"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"},"UserMessage":{"name":"Message","components":{"DynamicTable":{"name":"index","props":{"tableData":{"headerList":[],"dataList":[]},"showPage":{"default":true}},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-49017ac2","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/DynamicTable/index.vue"}},"props":{"queryUnReadCountFun":{}},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-14eceb9f","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/UserMessage.vue"}},"computed":{"setting":{},"topNav":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-d16d6306","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Navbar.vue"},"RightPanel":{"name":"RightPanel","props":{"clickNotClose":{"default":false}},"computed":{"show":{}},"watch":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-1e488bfb","beforeCreate":[null],"__file":"src/components/RightPanel/index.vue"},"Settings":{"components":{"ThemePicker":{"computed":{},"watch":{"defaultTheme":{"immediate":true,"user":true}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/components/ThemePicker/index.vue","_Ctor":{}}},"computed":{"visible":{},"fixedHeader":{},"topNav":{},"tagsView":{},"sidebarLogo":{},"dynamicTitle":{}},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-126b135a","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Settings/index.vue"},"Sidebar":{"components":{"SidebarItem":{"name":"SidebarItem","components":{"Item":{"name":"MenuItem","functional":true,"props":{"icon":{"default":""},"title":{"default":""}},"__file":"src/layout/components/Sidebar/Item.vue"},"AppLink":{"props":{"to":{"type":[null,null],"required":true}},"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Link.vue"}},"mixins":[{"computed":{},"methods":{}}],"props":{"item":{"required":true},"isNest":{"default":false},"basePath":{"default":""}},"methods":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/SidebarItem.vue"},"Logo":{"name":"SidebarLogo","props":{"collapse":{"required":true}},"computed":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-6494804b","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/Logo.vue"}},"computed":{},"staticRenderFns":[],"_compiled":true,"beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/Sidebar/index.vue"},"TagsView":{"components":{"ScrollPane":{"name":"ScrollPane","computed":{},"beforeDestroy":[null,null],"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-be6b7bae","beforeCreate":[null],"__file":"src/layout/components/TagsView/ScrollPane.vue"}},"computed":{},"watch":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-fac8ca64","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/components/TagsView/index.vue"}},"mixins":[{"watch":{},"methods":{}}],"computed":{},"methods":{},"staticRenderFns":[],"_compiled":true,"_scopeId":"data-v-13877386","beforeCreate":[null],"beforeDestroy":[null],"__file":"src/layout/index.vue"},"redirect":"index","meta":{"title":"工作流","affix":false},"children":[{"path":"/flow/def","name":"流程定义","meta":{"title":"流程定义","affix":false}},{"path":"/flow/form","name":"流程表单","meta":{"title":"流程表单","affix":false}}]}] -- Gitee From ca977f550655ce5468ab016a162ef5d0000f2e57 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 7 Aug 2024 13:51:31 +0800 Subject: [PATCH 21/27] =?UTF-8?q?feat(app):=20app=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peanut/base/api/BaseAppResourceApi.java | 2 ++ .../baseAppResource/BaseAppResourceDto.java | 26 +------------- .../BaseAppResourceInsertListReq.java | 23 ++++++++++++ .../BaseAppResourceInsertListRes.java | 16 +++++++++ .../base/api/impl/BaseAppResourceApiImpl.java | 35 ++++++++++--------- .../peanut/base/model/BaseAppResource.java | 20 ----------- .../impl/BaseAppResourceServiceImpl.java | 6 ---- 7 files changed, 60 insertions(+), 68 deletions(-) create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListReq.java create mode 100644 src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListRes.java diff --git a/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java b/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java index 3d77464..138e8a9 100644 --- a/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java +++ b/src/main/java/com/olivia/peanut/base/api/BaseAppResourceApi.java @@ -28,6 +28,8 @@ public interface BaseAppResourceApi { */ @PostMapping("/baseAppResource/insert") BaseAppResourceInsertRes insert(@RequestBody @Validated(InsertCheck.class) BaseAppResourceInsertReq req); + @PostMapping("/baseAppResource/insertList") + BaseAppResourceInsertListRes insertList(@RequestBody @Validated(InsertCheck.class) BaseAppResourceInsertListReq req); /** * 根据ID 删除 资源 diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java index c97d9c4..314098e 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java @@ -36,31 +36,7 @@ public class BaseAppResourceDto extends BaseEntityDto { */ @NotNull(message = "资源ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long resourceId; - /*** - * 是否按钮 0 否,1 是 - */ - @NotNull(message = "是否按钮 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private Boolean isButton; - /*** - * 是否隐藏 0 否,1 是 - */ - @NotNull(message = "是否隐藏 0 否,1 是不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private Boolean isHidden; - /*** - * 文件路径 - */ - @NotBlank(message = "文件路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String filePath; - /*** - * 父菜单ID - */ - @NotNull(message = "父菜单ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private Long parentId; - /*** - * 菜单路径 - */ - @NotBlank(message = "菜单路径不能为空", groups = {InsertCheck.class, UpdateCheck.class}) - private String path; + } diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListReq.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListReq.java new file mode 100644 index 0000000..f22f5b1 --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListReq.java @@ -0,0 +1,23 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import com.olivia.sdk.ann.InsertCheck; +import com.olivia.sdk.ann.UpdateCheck; +import jakarta.validation.constraints.NotNull; +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class BaseAppResourceInsertListReq { + + @NotNull(message = "应用ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private Long appId; + @NotNull(message = "应用资源列表不能为空", groups = {InsertCheck.class, UpdateCheck.class}) + private List appResourceIdList; +} diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListRes.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListRes.java new file mode 100644 index 0000000..d9f3f2b --- /dev/null +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceInsertListRes.java @@ -0,0 +1,16 @@ +package com.olivia.peanut.base.api.entity.baseAppResource; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class BaseAppResourceInsertListRes { + + private Integer size; +} diff --git a/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java index 3c6210e..136a678 100644 --- a/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java +++ b/src/main/java/com/olivia/peanut/base/api/impl/BaseAppResourceApiImpl.java @@ -1,28 +1,20 @@ package com.olivia.peanut.base.api.impl; -import java.time.LocalDateTime; - +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.olivia.peanut.base.api.BaseAppResourceApi; +import com.olivia.peanut.base.api.entity.baseAppResource.*; +import com.olivia.peanut.base.api.impl.listener.BaseAppResourceImportListener; import com.olivia.peanut.base.model.BaseAppResource; +import com.olivia.peanut.base.service.BaseAppResourceService; import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; import com.olivia.sdk.utils.PoiExcelUtil; -import java.util.stream.Collectors; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.*; -import org.apache.commons.lang3.StringUtils; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestBody; -import com.olivia.peanut.base.api.entity.baseAppResource.*; -import com.olivia.peanut.base.service.BaseAppResourceService; -import com.olivia.peanut.base.model.*; -import com.baomidou.mybatisplus.core.conditions.query.*; -import com.github.yulichang.wrapper.MPJLambdaWrapper; -import org.springframework.web.bind.annotation.*; -import com.olivia.peanut.base.api.BaseAppResourceApi; - -import com.olivia.peanut.base.api.impl.listener.*; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; /** @@ -45,6 +37,15 @@ public class BaseAppResourceApiImpl implements BaseAppResourceApi { return new BaseAppResourceInsertRes().setCount(1); } + @Override + @Transactional + public BaseAppResourceInsertListRes insertList(BaseAppResourceInsertListReq req) { + this.baseAppResourceService.remove(new LambdaQueryWrapper().eq(BaseAppResource::getAppId, req.getAppId())); + baseAppResourceService.saveBatch( + req.getAppResourceIdList().stream().map(appResourceId -> new BaseAppResource().setAppId(req.getAppId()).setResourceId(appResourceId)).toList()); + return new BaseAppResourceInsertListRes().setSize(req.getAppResourceIdList().size()); + } + /**** * deleteByIds * diff --git a/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java index ecbc226..b12e897 100644 --- a/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java +++ b/src/main/java/com/olivia/peanut/base/model/BaseAppResource.java @@ -30,26 +30,6 @@ public class BaseAppResource extends BaseEntity { * 资源ID */ private Long resourceId; - /*** - * 是否按钮 0 否,1 是 - */ - private Boolean isButton; - /*** - * 是否隐藏 0 否,1 是 - */ - private Boolean isHidden; - /*** - * 文件路径 - */ - private String filePath; - /*** - * 父菜单ID - */ - private Long parentId; - /*** - * 菜单路径 - */ - private String path; } diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java index f351471..dd0737a 100644 --- a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java @@ -95,12 +95,6 @@ public class BaseAppResourceServiceImpl extends MPJBaseServiceImpl Date: Wed, 7 Aug 2024 17:40:33 +0800 Subject: [PATCH 22/27] =?UTF-8?q?feat(task):=20=E5=BE=85=E5=8A=9E=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- second-develop.md => doc/second-develop.md | 0 .../impl/ApsProcessPathServiceImpl.java | 26 +++++++----- .../baseAppResource/BaseAppResourceDto.java | 3 ++ .../impl/BaseAppResourceServiceImpl.java | 41 +++++++++++-------- .../com/olivia/peanut/flow/api/FlowApi.java | 2 + .../peanut/flow/api/entity/TaskDoneReq.java | 21 ++++++++++ .../peanut/flow/api/entity/TaskDoneRes.java | 30 ++++++++++++++ .../peanut/flow/api/impl/FlowApiImpl.java | 36 +++++++++++++++- .../service/impl/PropertyServiceImpl.java | 2 +- 10 files changed, 132 insertions(+), 31 deletions(-) rename second-develop.md => doc/second-develop.md (100%) create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneReq.java create mode 100644 src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java diff --git a/README.md b/README.md index 43facc5..bbfb807 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [用户安装手册](doc/install.md) -[二开手册](second-develop.md) +[二开手册](doc/second-develop.md) [工作流相关](doc/workflow.md) diff --git a/second-develop.md b/doc/second-develop.md similarity index 100% rename from second-develop.md rename to doc/second-develop.md diff --git a/src/main/java/com/olivia/peanut/aps/service/impl/ApsProcessPathServiceImpl.java b/src/main/java/com/olivia/peanut/aps/service/impl/ApsProcessPathServiceImpl.java index 2e148e8..d388904 100644 --- a/src/main/java/com/olivia/peanut/aps/service/impl/ApsProcessPathServiceImpl.java +++ b/src/main/java/com/olivia/peanut/aps/service/impl/ApsProcessPathServiceImpl.java @@ -105,6 +105,8 @@ public class ApsProcessPathServiceImpl extends MPJBaseServiceImpl runnableList = new ArrayList<>(); + List runnableSubList = new ArrayList<>(); + apsProcessPathDtoList.forEach(t -> { runnableList.add(() -> { @@ -113,21 +115,23 @@ public class ApsProcessPathServiceImpl extends MPJBaseServiceImpl { - List roomConfigList = apsRoomConfigService.list(new LambdaQueryWrapper().eq(ApsRoomConfig::getRoomId, tr.getRoomId())); - - if (CollUtil.isNotEmpty(roomConfigList)) { - Map idNameMap = this.apsRoomService.listByIds(roomConfigList.stream().map(ApsRoomConfig::getRoomId).toList()).stream() - .collect(Collectors.toMap(BaseEntity::getId, ApsRoom::getRoomName)); - List apsRoomConfigList = $.copyList(roomConfigList, ApsRoomConfigDto.class); - apsRoomConfigList.forEach(ar -> ar.setRoomName(idNameMap.get(ar.getRoomId()))); - tr.setApsRoomConfigList(apsRoomConfigList); - }else { - tr.setApsRoomConfigList(List.of()); - } + runnableSubList.add(() -> { + List roomConfigList = apsRoomConfigService.list(new LambdaQueryWrapper().eq(ApsRoomConfig::getRoomId, tr.getRoomId())); + if (CollUtil.isNotEmpty(roomConfigList)) { + Map idNameMap = this.apsRoomService.listByIds(roomConfigList.stream().map(ApsRoomConfig::getRoomId).toList()).stream() + .collect(Collectors.toMap(BaseEntity::getId, ApsRoom::getRoomName)); + List apsRoomConfigList = $.copyList(roomConfigList, ApsRoomConfigDto.class); + apsRoomConfigList.forEach(ar -> ar.setRoomName(idNameMap.get(ar.getRoomId()))); + tr.setApsRoomConfigList(apsRoomConfigList); + } else { + tr.setApsRoomConfigList(List.of()); + } + }); }); }); }); RunUtils.run("apsProcessPathService ", runnableList); + RunUtils.run("apsProcessPathService SUB", runnableSubList); } @Override diff --git a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java index 314098e..922e30d 100644 --- a/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java +++ b/src/main/java/com/olivia/peanut/base/api/entity/baseAppResource/BaseAppResourceDto.java @@ -31,11 +31,14 @@ public class BaseAppResourceDto extends BaseEntityDto { */ @NotNull(message = "应用ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long appId; + + private String appCode; /*** * 资源ID */ @NotNull(message = "资源ID不能为空", groups = {InsertCheck.class, UpdateCheck.class}) private Long resourceId; + private String resourceUrl; } diff --git a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java index dd0737a..d85e38e 100644 --- a/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java +++ b/src/main/java/com/olivia/peanut/base/service/impl/BaseAppResourceServiceImpl.java @@ -1,31 +1,33 @@ package com.olivia.peanut.base.service.impl; -import org.springframework.aop.framework.AopContext; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import jakarta.annotation.Resource; +import com.olivia.peanut.base.api.entity.baseAppResource.*; +import com.olivia.peanut.base.mapper.BaseAppResourceMapper; +import com.olivia.peanut.base.model.BaseApp; +import com.olivia.peanut.base.model.BaseAppResource; +import com.olivia.peanut.base.service.BaseAppResourceService; +import com.olivia.peanut.base.service.BaseAppService; +import com.olivia.peanut.base.service.BaseResourceService; +import com.olivia.peanut.portal.service.BaseTableHeaderService; +import com.olivia.peanut.util.SetNamePojoUtils; +import com.olivia.sdk.service.SetNameService; import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; +import jakarta.annotation.Resource; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; +import org.springframework.aop.framework.AopContext; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.olivia.peanut.base.mapper.BaseAppResourceMapper; -import com.olivia.peanut.base.model.BaseAppResource; -import com.olivia.peanut.base.service.BaseAppResourceService; -import cn.hutool.core.collection.CollUtil; -//import com.olivia.peanut.base.service.BaseTableHeaderService; -import com.olivia.peanut.portal.service.BaseTableHeaderService; -import com.olivia.peanut.base.api.entity.baseAppResource.*; -import com.olivia.peanut.util.SetNamePojoUtils; -import com.olivia.sdk.service.SetNameService; /** * 资源(BaseAppResource)表服务实现类 @@ -43,7 +45,8 @@ public class BaseAppResourceServiceImpl extends MPJBaseServiceImpl queryPageList(BaseAppResourceExportQueryPageListReq req) { @@ -79,21 +83,26 @@ public class BaseAppResourceServiceImpl extends MPJBaseServiceImpl list) { - // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME); + setNameService.setName(list, SetNamePojoUtils + .getSetNamePojo(BaseResourceService.class,"resourceUrl","resourceId","resourceUrl")); } - private MPJLambdaWrapper getWrapper(BaseAppResourceDto obj) { MPJLambdaWrapper q = new MPJLambdaWrapper<>(); if (Objects.nonNull(obj)) { + if (Objects.isNull(obj.getAppId()) && StringUtils.isNotBlank(obj.getAppCode())) { + BaseApp one = baseAppService.getOne(new LambdaQueryWrapper().eq(BaseApp::getAppCode, obj.getAppCode())); + if (Objects.nonNull(one)) { + obj.setAppId(one.getId()); + } + } q .eq(Objects.nonNull(obj.getAppId()), BaseAppResource::getAppId, obj.getAppId()) + .eq(Objects.nonNull(obj.getResourceId()), BaseAppResource::getResourceId, obj.getResourceId()) ; } diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java index 1e212af..dcf7a33 100644 --- a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java +++ b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java @@ -25,6 +25,8 @@ public interface FlowApi { @PostMapping("/task/undone") DynamicsPage taskUndone(@RequestBody @Valid TaskUndoneReq req); + @PostMapping("/task/done") + DynamicsPage taskDone(@RequestBody @Valid TaskDoneReq req); @PostMapping("/task/undone/home") DynamicsPage taskUndoneHome(@RequestBody @Valid TaskUndoneReq req); diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneReq.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneReq.java new file mode 100644 index 0000000..5be6aaa --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneReq.java @@ -0,0 +1,21 @@ +package com.olivia.peanut.flow.api.entity; + +import jakarta.validation.constraints.NotBlank; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskDoneReq { + + private Integer pageNum; + private Integer pageSize; + @NotBlank(message = "流程key不能为空") + private String flowKey; + +} diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java new file mode 100644 index 0000000..403a81f --- /dev/null +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java @@ -0,0 +1,30 @@ +package com.olivia.peanut.flow.api.entity; + +import java.util.Date; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/*** + * + */ +@Setter +@Getter +@Accessors(chain = true) +public class TaskDoneRes { + + String taskId; + String assignee; + String owner; + String name; + String description; + Date dueDate; + Date followUpDate; + int priority; + String parentTaskId; + String deleteReason; + String taskDefinitionKey; + String activityInstanceId; + String tenantId; + String flowFormId; +} diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index 6e160b7..aafbeee 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -28,6 +28,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.camunda.bpm.engine.*; import org.camunda.bpm.engine.history.HistoricTaskInstance; +import org.camunda.bpm.engine.history.HistoricTaskInstanceQuery; import org.camunda.bpm.engine.repository.Deployment; import org.camunda.bpm.engine.runtime.ActivityInstance; import org.camunda.bpm.engine.runtime.ProcessInstance; @@ -104,6 +105,37 @@ public class FlowApiImpl implements FlowApi { return getTaskUndoneResDynamicsPage(active, req); } + @Override + public DynamicsPage taskDone(TaskDoneReq req) { + HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery().processDefinitionKey(req.getFlowKey()) + .taskAssignee(LoginUserContext.getLoginUser().getIdStr()).orderByHistoricActivityInstanceStartTime().desc(); + List taskInstanceList = historicTaskInstanceQuery.listPage((req.getPageNum() - 1) * req.getPageNum(), req.getPageSize()); + + List taskDoneRes = new ArrayList<>(); + if (CollUtil.isNotEmpty(taskInstanceList)) { +// Set processInstanceIdArr = taskInstanceList.stream().map(HistoricTaskInstance::getProcessInstanceId).collect(Collectors.toSet())(); + + List runnableList = new ArrayList<>(); + taskInstanceList.forEach(t -> { + + TaskDoneRes doneRes = $.copy(t, TaskDoneRes.class); + taskDoneRes.add(doneRes); + runnableList.add(() -> { + String processInstanceId = t.getProcessInstanceId(); + String formId = (String) runtimeService.getVariable(processInstanceId, FLOW_FORM_ID); + doneRes.setFlowFormId(formId); + }); + }); + RunUtils.run("Task done get formId", runnableList); +// taskDoneRes.add($.copy(taskIdList, (Function) taskId -> {)) + } + DynamicsPage page = new DynamicsPage<>(); + page.setTotal(historicTaskInstanceQuery.count()); + page.setDataList(taskDoneRes); + + return page; + } + @Override public DynamicsPage taskUndoneHome(TaskUndoneReq req) { String userId = LoginUserContext.getLoginUser().getIdStr(); @@ -149,7 +181,7 @@ public class FlowApiImpl implements FlowApi { @Override public RejectRes reject(RejectReq req) { List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); - $.requireNonNullCanIgnoreException(taskList, "任务不存在"); + $.requireNonNullCanIgnoreException(taskList, "任务不存在,或已结束"); Task task = taskList.get(0); String processInstanceId = task.getProcessInstanceId(); taskService.createComment(req.getTaskId(), processInstanceId, req.getMessage()); @@ -172,7 +204,7 @@ public class FlowApiImpl implements FlowApi { @Transactional public CompleteRes complete(CompleteReq req) { List taskList = taskService.createTaskQuery().taskId(req.getTaskId()).active().list(); - $.requireNonNullCanIgnoreException(taskList, "任务不存在"); + $.requireNonNullCanIgnoreException(taskList, "任务不存在,或已结束"); String processInstanceId = taskList.get(0).getProcessInstanceId(); Map flowValueMap = this.flowFormUserValueService.list( new LambdaQueryWrapper().eq(FlowFormUserValue::getProcessInstanceId, processInstanceId).eq(FlowFormUserValue::getIsAddFlowValue, true)).stream() diff --git a/src/main/java/com/olivia/peanut/portal/service/impl/PropertyServiceImpl.java b/src/main/java/com/olivia/peanut/portal/service/impl/PropertyServiceImpl.java index c999fd7..f78da19 100644 --- a/src/main/java/com/olivia/peanut/portal/service/impl/PropertyServiceImpl.java +++ b/src/main/java/com/olivia/peanut/portal/service/impl/PropertyServiceImpl.java @@ -76,7 +76,7 @@ public class PropertyServiceImpl extends MPJBaseServiceImpl objMap = (this.roomService.listByIds(idSet).stream().collect(Collectors.toMap(Room::getId, Room::getRoomName))); list.forEach(t -> t.setRoomName(objMap.get(t.getRoomId()))); }); - RunUtils.run("setAllName", runnableList.size(), runnableList); + RunUtils.run("setAllName", runnableList); } } -- Gitee From 20ba2fe6356fb09ff3500e5fee4aa0af971530a2 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 7 Aug 2024 17:52:12 +0800 Subject: [PATCH 23/27] =?UTF-8?q?docs(sql):=20=E6=9B=B4=E6=96=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93sql,=E5=90=8C=E6=AD=A5=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/{dml.sql => data/base_table_header.sql} | 105 ++++++- sql/data/t_login_account.sql | 3 + sql/ddl.sql | 319 +++++++++++++++++++- 3 files changed, 418 insertions(+), 9 deletions(-) rename sql/{dml.sql => data/base_table_header.sql} (59%) create mode 100644 sql/data/t_login_account.sql diff --git a/sql/dml.sql b/sql/data/base_table_header.sql similarity index 59% rename from sql/dml.sql rename to sql/data/base_table_header.sql index ff69524..797e8c6 100644 --- a/sql/dml.sql +++ b/sql/data/base_table_header.sql @@ -1,11 +1,3 @@ - - - - -INSERT INTO t_login_account (id, user_name, login_phone, pwd, is_delete, create_time, create_by, update_time, update_by, trace_id, tenant_id, version_num, user_pwd) VALUES (2, 'admin', 18600000000, null, 0, '2024-05-31 19:23:34', null, '2024-06-03 16:41:05', null, null, 1001, 0, '21232F297A57A5A743894A0E4A801FC3'); - - - INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1, 'JcxBuyPlanService#queryPageList', 'planName', '计划名称', '200', 1, null, null, 0, null, null, '2024-05-31 21:35:52', null, null, null, 1002); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (2, 'JcxBuyPlanService#queryPageList', 'createTime', '创建时间', '170', 10, null, null, 0, null, null, '2024-05-31 21:35:52', null, null, null, 1002); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (3, 'JcxBuyPlanService#queryPageList', 'updateTime', '修改时间', '170', 20, null, null, 1, null, null, '2024-05-31 21:35:52', null, null, null, 1002); @@ -161,3 +153,100 @@ INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sor INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (158, 'BaseTableHeaderService#queryPageList', 'sortIndex', '排序', '100', 2, '0', null, 0, '2024-07-05 11:28:42', null, '2024-07-05 12:03:10', '2', '1809075519722479617', 0, null); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395778, 'ApsOrderService#queryPageList', 'urgencyLevel', '紧急度', '80', 12, '12', null, 0, '2024-07-09 14:58:55', null, '2024-07-13 18:14:50', null, null, 0, null); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395779, 'ApsOrderService#queryPageList', 'orderStatus', '订单状态', '150', 3, null, null, 0, '2024-07-13 18:14:50', null, '2024-07-13 18:23:59', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395780, 'ApsOrderRollingForecastService#queryPageList', 'id', '序号', '200', null, null, null, 0, '2024-07-14 19:56:52', null, '2024-07-14 19:56:52', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395781, 'ApsOrderRollingForecastService#queryPageList', 'rollCode', '编号', '250', null, null, null, 0, '2024-07-14 19:56:52', null, '2024-07-14 20:08:55', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395782, 'ApsOrderRollingForecastService#queryPageList', 'rollName', '名称', '300', null, null, null, 0, '2024-07-14 19:56:52', null, '2024-07-14 20:08:55', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395783, 'ApsOrderRollingForecastService#queryPageList', 'beginTime', '开始时间', '150', null, null, null, 0, '2024-07-14 19:56:52', null, '2024-07-14 19:58:39', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395784, 'ApsOrderRollingForecastService#queryPageList', 'endTime', '结束时间', '150', null, null, null, 0, '2024-07-14 19:56:52', null, '2024-07-14 19:58:39', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395785, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'factoryName', '工厂', '150', 1, null, null, 0, '2024-07-14 22:26:43', null, '2024-07-14 22:37:07', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395786, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'year', '年份', '100', 2, null, null, 0, '2024-07-14 22:27:39', null, '2024-07-14 22:37:08', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395787, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'month', '月份', '80', 3, null, null, 0, '2024-07-14 22:27:39', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395788, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day01', '1日', '80', 101, null, null, 0, '2024-07-14 22:27:39', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395789, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day02', '2日', '80', 102, null, null, 0, '2024-07-14 22:27:39', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395790, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day03', '3日', '80', 103, null, null, 0, '2024-07-14 22:27:39', null, '2024-07-14 22:37:49', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395791, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day04', '4日', '80', 104, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395792, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day05', '5日', '80', 105, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395793, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day06', '6日', '80', 106, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395794, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day07', '7日', '80', 107, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395795, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day08', '8日', '80', 108, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395796, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day09', '9日', '80', 109, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:49', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395797, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day10', '10日', '80', 110, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395798, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day11', '11日', '80', 111, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:47', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395799, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day12', '12日', '80', 112, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395800, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day13', '13日', '80', 113, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:47', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395801, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day14', '14日', '80', 114, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395802, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day15', '15日', '80', 115, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395803, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day16', '16日', '80', 116, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395804, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day17', '17日', '80', 117, null, null, 0, '2024-07-14 22:33:54', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395805, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day18', '18日', '80', 118, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395806, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day19', '19日', '80', 119, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395807, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day20', '20日', '80', 120, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395808, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day21', '21日', '80', 121, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395809, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day22', '22日', '80', 122, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:49', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395810, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day23', '23日', '80', 123, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395811, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day24', '24日', '80', 124, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:49', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395812, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day25', '25日', '80', 125, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395813, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day26', '26日', '80', 126, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395814, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day27', '27日', '80', 127, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:49', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395815, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day28', '28日', '80', 128, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:49', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395816, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day29', '29日', '80', 129, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395817, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day30', '30日', '80', 130, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:49', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395818, 'ApsRollingForecastFactoryCapacityService#queryPageList', 'day31', '31日', '80', 131, null, null, 0, '2024-07-14 22:33:55', null, '2024-07-14 22:37:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395819, 'ApsOrderService#queryPageList', 'schedulingDate', '排产日期', '150', 3, null, null, 0, '2024-07-15 17:35:44', null, '2024-07-15 17:38:48', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395820, 'ApsRollingForecastOrderService#queryPageList', 'id', '序号', '200', null, null, null, 0, '2024-07-16 11:25:00', null, '2024-07-16 11:25:00', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395821, 'ApsRollingForecastOrderService#queryPageList', 'factoryName', '工厂', '200', null, null, null, 0, '2024-07-16 11:25:00', null, '2024-07-16 11:31:24', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395822, 'ApsRollingForecastOrderService#queryPageList', 'rollCode', '编码', '200', null, null, null, 0, '2024-07-16 11:25:00', null, '2024-07-16 11:25:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395823, 'ApsRollingForecastOrderService#queryPageList', 'rollName', '名称', '200', null, null, null, 0, '2024-07-16 11:25:00', null, '2024-07-16 11:25:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395824, 'ApsRollingForecastOrderService#queryPageList', 'beginTime', '开始日期', '100', null, null, null, 0, '2024-07-16 11:25:01', null, '2024-07-16 11:25:29', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395825, 'ApsRollingForecastOrderService#queryPageList', 'endTime', '结束日期', '100', null, null, null, 0, '2024-07-16 11:25:01', null, '2024-07-16 11:25:30', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395826, 'ApsRollingForecastOrderService#queryPageList', 'beginStatusName', '开始节点', '100', null, null, null, 0, '2024-07-16 11:25:01', null, '2024-07-16 22:07:05', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395827, 'ApsRollingForecastOrderService#queryPageList', 'endStatusName', '结束节点', '100', null, null, null, 0, '2024-07-16 11:25:01', null, '2024-07-16 22:07:05', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395828, 'ApsLogisticsPathService#queryPageList', 'id', '序号', '200', null, null, null, 0, '2024-07-18 23:06:07', null, '2024-07-18 23:06:07', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395829, 'ApsLogisticsPathService#queryPageList', 'factoryName', '工厂', '200', null, null, null, 0, '2024-07-18 23:06:07', null, '2024-07-18 23:06:07', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395830, 'ApsLogisticsPathService#queryPageList', 'logisticsPathCode', '编号', '200', null, null, null, 0, '2024-07-18 23:06:07', null, '2024-07-18 23:06:07', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395831, 'ApsLogisticsPathService#queryPageList', 'logisticsPathName', '名称', '200', null, null, null, 0, '2024-07-18 23:06:07', null, '2024-07-18 23:06:07', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395832, 'ApsLogisticsPathService#queryPageList', 'logisticsPathRemark', '备注', '200', null, null, null, 0, '2024-07-18 23:06:07', null, '2024-07-18 23:06:07', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395833, 'ApsSchedulingDayConfigService#queryPageList', 'id', '序号', '200', 1, null, null, 0, '2024-07-19 23:24:17', null, '2024-07-19 23:24:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395834, 'ApsSchedulingDayConfigService#queryPageList', 'factoryName', '工厂', '200', 2, null, null, 0, '2024-07-19 23:24:17', null, '2024-07-19 23:24:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395835, 'ApsSchedulingDayConfigService#queryPageList', 'processName', '流水线名称', '200', 5, null, null, 0, '2024-07-19 23:24:17', null, '2024-07-19 23:24:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395836, 'ApsSchedulingDayConfigService#queryPageList', 'isDefault', '是否默认', '200', 6, null, null, 0, '2024-07-19 23:24:17', null, '2024-07-19 23:24:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395837, 'ApsSchedulingDayConfigService#queryPageList', 'schedulingDayNo', '排程编号', '200', 3, null, null, 0, '2024-07-19 23:24:17', null, '2024-07-19 23:24:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395838, 'ApsSchedulingDayConfigService#queryPageList', 'schedulingDayName', '排程名称', '200', 4, null, null, 0, '2024-07-19 23:24:17', null, '2024-07-19 23:24:17', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395839, 'ApsSchedulingDayConfigVersionService#queryPageList', 'id', '序号', '200', 1, null, null, 0, '2024-07-20 12:16:10', null, '2024-07-20 21:38:58', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395840, 'ApsSchedulingDayConfigVersionService#queryPageList', 'factoryName', '工厂', '200', 2, null, null, 0, '2024-07-20 12:16:10', null, '2024-07-20 21:38:58', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395841, 'ApsSchedulingDayConfigVersionService#queryPageList', 'schedulingDayVersionNo', '排程编号', '200', 4, null, null, 0, '2024-07-20 12:16:11', null, '2024-07-20 21:38:58', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395843, 'ApsSchedulingDayConfigVersionService#queryPageList', 'schedulingDay', '排程日期', '200', 5, null, null, 0, '2024-07-20 12:16:11', null, '2024-07-20 21:38:58', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395844, 'ApsSchedulingDayConfigVersionService#queryPageList', 'isIssuedThirdStr', '是否下发', '200', 6, null, null, 0, '2024-07-20 12:16:11', null, '2024-07-20 21:38:58', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395845, 'ApsSchedulingDayConfigVersionService#queryPageList', 'processName', '工艺路径', '200', 3, null, null, 0, '2024-07-20 21:38:58', null, '2024-07-20 21:38:58', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395846, 'BaseRoleService#queryPageList', 'id', '序号', '300', null, null, null, 0, '2024-07-31 14:47:23', null, '2024-07-31 14:47:34', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395847, 'BaseRoleService#queryPageList', 'roleCode', '编码', '300', null, null, null, 0, '2024-07-31 14:47:23', null, '2024-07-31 14:47:34', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395848, 'BaseRoleService#queryPageList', 'roleName', '名称', '300', null, null, null, 0, '2024-07-31 14:47:23', null, '2024-07-31 14:47:34', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395849, 'BaseRoleGroupService#queryPageList', 'id', '序号', '300', null, null, null, 0, '2024-07-31 14:50:10', null, '2024-07-31 14:50:10', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395850, 'BaseRoleGroupService#queryPageList', 'roleGroupCode', '编码', '300', null, null, null, 0, '2024-07-31 14:50:10', null, '2024-07-31 14:50:10', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395851, 'BaseRoleGroupService#queryPageList', 'roleGroupName', '名称', '300', null, null, null, 0, '2024-07-31 14:50:10', null, '2024-07-31 14:50:10', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395852, 'BaseRoleService#queryPageList', 'roleGroupName', '组名称', '300', null, null, null, 0, '2024-07-31 14:51:35', null, '2024-07-31 14:51:35', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395853, 'FlowRepositoryServiceImpl#queryTaskPageList', 'id', '序号', '300', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:59:14', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395854, 'FlowRepositoryServiceImpl#queryTaskPageList', 'name', '任务名称', '200', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:16:06', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395855, 'FlowRepositoryServiceImpl#queryTaskPageList', 'packageName', '名称', '200', null, null, null, 1, '2024-08-01 16:14:49', null, '2024-08-01 16:59:22', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395856, 'FlowRepositoryServiceImpl#queryTaskPageList', 'createTime', '创建时间', '200', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:16:06', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395857, 'FlowRepositoryServiceImpl#queryTaskPageList', 'lastUpdated', '最后更新时间', '200', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:16:06', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395858, 'FlowRepositoryServiceImpl#queryTaskPageList', 'dueDate', '超时时间', '200', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:16:06', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395859, 'FlowRepositoryServiceImpl#queryTaskPageList', 'followUpDate', '流程更新时间', '200', null, null, null, 1, '2024-08-01 16:15:07', null, '2024-08-01 16:59:32', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395860, 'FlowFormService#queryPageList', 'id', '序号', '300', null, null, null, 0, '2024-08-02 23:29:54', null, '2024-08-02 23:30:04', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395861, 'FlowFormService#queryPageList', 'formCode', '编码', '300', null, null, null, 0, '2024-08-02 23:29:54', null, '2024-08-02 23:30:04', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395862, 'FlowFormService#queryPageList', 'formName', '名称', '300', null, null, null, 0, '2024-08-02 23:29:54', null, '2024-08-02 23:30:04', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395863, 'BaseAppService#queryPageList', 'id', '序号', '300', null, null, null, 0, '2024-08-05 11:28:55', null, '2024-08-05 11:29:06', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395864, 'BaseAppService#queryPageList', 'appCode', '编号', '300', null, null, null, 0, '2024-08-05 11:28:55', null, '2024-08-05 11:29:06', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395865, 'BaseAppService#queryPageList', 'appName', '名称', '300', null, null, null, 0, '2024-08-05 11:28:55', null, '2024-08-05 11:29:06', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395866, 'BaseAppResourceService#queryPageList', 'id', '序号', '200', null, null, null, 0, '2024-08-06 13:58:40', null, '2024-08-06 14:00:03', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395868, 'BaseAppResourceService#queryPageList', 'appName', 'app名称', '100', null, null, null, 0, '2024-08-06 13:58:40', null, '2024-08-06 14:01:28', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395869, 'BaseAppResourceService#queryPageList', 'isButtonStr', '按钮', '50', null, null, null, 0, '2024-08-06 13:58:41', null, '2024-08-06 14:01:51', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395870, 'BaseAppResourceService#queryPageList', 'isHiddenStr', '是否', '100', null, null, null, 0, '2024-08-06 13:58:41', null, '2024-08-06 14:01:51', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395871, 'BaseAppResourceService#queryPageList', 'parentId', '上级序号', '200', null, null, null, 0, '2024-08-06 13:58:41', null, '2024-08-06 14:00:03', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395872, 'BaseAppResourceService#queryPageList', 'resourceUrl', '请求地址', '400', null, null, null, 0, '2024-08-06 13:58:41', null, '2024-08-06 14:00:40', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395873, 'BaseAppResourceService#queryPageList', 'resourceCode', '编码', '100', null, null, null, 0, '2024-08-06 14:07:36', null, '2024-08-06 14:07:36', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395874, 'BaseResourceService#queryPageList', 'id', '序号', '200', null, null, null, 0, '2024-08-06 17:47:03', null, '2024-08-06 17:48:33', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395875, 'BaseResourceService#queryPageList', 'resourceCode', '编码', '200', null, null, null, 0, '2024-08-06 17:47:03', null, '2024-08-06 17:48:33', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395876, 'BaseResourceService#queryPageList', 'resourceName', '名称', '200', null, null, null, 0, '2024-08-06 17:47:03', null, '2024-08-06 17:48:33', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395877, 'BaseResourceService#queryPageList', 'resourceUrl', '路径', '400', null, null, null, 0, '2024-08-06 17:47:03', null, '2024-08-06 17:48:41', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395878, 'BaseResourceService#queryPageList', 'parentId', '上级', '200', null, null, null, 0, '2024-08-06 17:47:03', null, '2024-08-06 17:48:33', null, null, 0, null); diff --git a/sql/data/t_login_account.sql b/sql/data/t_login_account.sql new file mode 100644 index 0000000..a03db9a --- /dev/null +++ b/sql/data/t_login_account.sql @@ -0,0 +1,3 @@ + +INSERT INTO t_login_account (id, user_name, login_phone, pwd, is_delete, create_time, create_by, update_time, update_by, trace_id, tenant_id, version_num, user_pwd) VALUES (2, 'admin', 18600000000, null, 0, '2024-05-31 19:23:34', null, '2024-06-03 16:41:05', null, null, 1001, 0, '21232F297A57A5A743894A0E4A801FC3'); + diff --git a/sql/ddl.sql b/sql/ddl.sql index 8ccc1f3..9c14f1b 100644 --- a/sql/ddl.sql +++ b/sql/ddl.sql @@ -3516,6 +3516,141 @@ create table if not exists aps_workshop_station create index idx_aps_workshop_station_tenant_id on aps_workshop_station (tenant_id); +create table if not exists base_app +( + id bigint auto_increment comment 'ID 自增' + primary key, + app_code varchar(64) null comment 'app编码', + app_name varchar(64) null comment 'app名称', + tenant_id bigint null comment '租户ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) + comment '应用表'; + +create index idx_app_code + on base_app (app_code); + +create table if not exists base_app_resource +( + id bigint auto_increment comment 'ID 自增' + primary key, + app_id bigint null comment '应用ID', + resource_id bigint null comment '资源ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '资源'; + +create index idx_app_id + on base_app_resource (app_id); + +create table if not exists base_dept +( + id bigint auto_increment comment 'ID 自增' + primary key, + dept_code varchar(64) null comment '部门编码', + dept_name varchar(64) null comment '部门名称', + parent_id bigint null comment '父部门ID', + path varchar(512) null comment '部门路径', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '部门表'; + +create table if not exists base_resource +( + id bigint auto_increment comment 'ID 自增' + primary key, + resource_code varchar(64) null comment '菜单编码', + resource_name varchar(64) null comment '菜单名称', + resource_url varchar(512) null comment '菜单URL', + resource_icon varchar(64) null comment '菜单图标', + resource_type varchar(64) null comment '菜单类型', + is_button tinyint(1) default 0 null comment '是否按钮 0 否,1 是', + is_hidden tinyint null comment '是否因此 0否,1是', + parent_id bigint null comment '父菜单ID', + path varchar(512) null comment '菜单路径', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '资源'; + +create table if not exists base_role +( + id bigint auto_increment comment 'ID 自增' + primary key, + role_code varchar(64) null comment '角色编码', + role_name varchar(64) null comment '角色名称', + role_group_id bigint null comment '角色组', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '角色表'; + +create table if not exists base_role_group +( + id bigint auto_increment comment 'ID 自增' + primary key, + role_group_code varchar(64) null comment '角色组编码', + role_group_name varchar(64) null comment '角色组名称', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '角色组表'; + +create table if not exists base_role_resource +( + id bigint auto_increment comment 'ID 自增' + primary key, + role_id bigint null comment '角色ID', + resource_id bigint null comment '菜单ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '角色资源表'; + create table if not exists base_supplier ( id bigint auto_increment comment 'ID 自增' @@ -3569,6 +3704,187 @@ create index idx_base_table_header_tenant_id create index idx_biz_key on base_table_header (biz_key); +create table if not exists base_user_dept +( + id bigint auto_increment comment 'ID 自增' + primary key, + user_id bigint null comment '用户ID', + dept_id bigint null comment '部门ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '用户部门表'; + +create index idx_user_id_dept_id + on base_user_dept (user_id, dept_id); + +create table if not exists base_user_role +( + id bigint auto_increment comment 'ID 自增' + primary key, + user_id bigint null comment '用户ID', + role_id bigint null comment '角色ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '用户角色表'; + +create index idx_user_id + on base_user_role (user_id); + +create table if not exists base_user_role_group +( + id bigint auto_increment comment 'ID 自增' + primary key, + user_id bigint null comment '用户ID', + role_group_id bigint null comment '角色组ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '用户角色组表'; + +create index idx_user_id + on base_user_role_group (user_id); + +create table if not exists flow_definition +( + id bigint auto_increment comment 'ID 自增' + primary key, + flow_name varchar(64) null comment '工作流名称', + flow_group_id bigint null comment '工作流组ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + flow_key varchar(64) null comment '流程key', + tenant_id bigint null comment '租户ID', + flow_form_id bigint null comment '流程表单id' +) + comment '工作定义表'; + +create table if not exists flow_form +( + id bigint auto_increment comment 'ID 自增' + primary key, + form_name varchar(64) null comment '表单名称', + form_code varchar(64) null comment '表单编码', + tenant_id bigint null comment '租户ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) + comment '工作流表单表'; + +create index idx_flow_form_code + on flow_form (form_code); + +create index idx_form_code + on flow_form (form_code); + +create table if not exists flow_form_item +( + id bigint auto_increment comment 'ID 自增' + primary key, + form_id bigint null comment '表单ID', + form_item_name varchar(64) null comment '表单项名称', + form_item_filed varchar(64) null comment '表单项字段', + form_item_value varchar(512) null comment '表单项类型', + form_item_default_value varchar(512) null comment '表单项默认值', + form_item_value_type varchar(64) null comment '表单值类型 text , date , dateTime ,array', + is_add_flow_value tinyint(1) default 0 null comment '是否添加流程变量 0 否,1 是', + is_required tinyint(1) default 0 null comment '是否必填 0 否,1 是', + sort_index int default 0 null comment '排序', + lose_focus_event varchar(512) null comment '失去焦点事件', + tenant_id bigint null comment '租户ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) + comment '工作流表单项表'; + +create index idx_form_id + on flow_form_item (form_id); + +create table if not exists flow_form_user_value +( + id bigint auto_increment comment 'ID 自增' + primary key, + process_instance_id varchar(255) null comment '流程实例ID', + business_key varchar(64) null comment '业务主键', + form_id bigint null comment '表单ID', + form_item_default_value varchar(255) null comment '表单默认值', + form_item_filed varchar(255) null comment '表单字段', + form_item_name varchar(255) null comment '表单名称', + form_item_value varchar(255) null comment '表单值', + form_item_value_type varchar(255) null comment '表单值类型', + is_add_flow_value tinyint(1) default 0 null comment '是否添加流程表单值 0 否,1 是', + is_required tinyint(1) default 0 null comment '是否必填 0 否,1 是', + lose_focus_event varchar(255) null comment '失去焦点事件', + sort_index int null comment '排序', + user_value varchar(255) null comment '用户值', + tenant_id bigint null comment '租户ID', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号' +) + comment '工作流表单用户数据表'; + +create index idx_business_key + on flow_form_user_value (business_key); + +create index idx_process_instance_id + on flow_form_user_value (process_instance_id); + +create table if not exists flow_group +( + id bigint auto_increment comment 'ID 自增' + primary key, + flow_group_code varchar(64) null comment '工作流组编码', + flow_group_name varchar(64) null comment '工作流组名称', + is_delete tinyint(1) default 0 null comment '是否删除 0 否,1 是', + create_time datetime default CURRENT_TIMESTAMP null comment '创建时间', + create_by bigint null comment '创建人', + update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间', + update_by bigint null comment '修改人', + trace_id varchar(64) null comment '调用链路', + version_num int default 0 null comment '版本号', + tenant_id bigint null comment '租户ID' +) + comment '工作流组表'; + create table if not exists jcx_buy_order ( id bigint auto_increment comment 'ID 自增' @@ -4149,7 +4465,8 @@ create table if not exists t_login_account trace_id varchar(64) null comment '调用链路', tenant_id bigint null comment '租户ID', version_num int default 0 null comment '版本号', - user_pwd varchar(255) null + user_pwd varchar(255) null, + is_admin tinyint(1) default 0 null comment '是否是管理员' ) comment '登录账号表'; -- Gitee From 5bdf483d2e9642d5eaf244c095e322cd85e24db7 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Wed, 7 Aug 2024 17:57:19 +0800 Subject: [PATCH 24/27] =?UTF-8?q?docs(doc):=20=E5=A2=9E=E5=8A=A0camunda=20?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../olivia/peanut/flow/api/impl/FlowApiImpl.java | 14 +++++++------- .../flow/service/impl/FlowConfigServiceImpl.java | 12 ++++++------ src/main/resources/application.yml | 3 +++ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index aafbeee..9655da4 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -18,7 +18,6 @@ import com.olivia.sdk.filter.LoginUserContext; import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; import com.olivia.sdk.utils.RunUtils; -import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.function.Function; @@ -36,6 +35,7 @@ import org.camunda.bpm.engine.task.Comment; import org.camunda.bpm.engine.task.Task; import org.camunda.bpm.engine.task.TaskQuery; import org.jetbrains.annotations.NotNull; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RestController; @@ -47,18 +47,18 @@ import org.springframework.web.bind.annotation.RestController; public class FlowApiImpl implements FlowApi { - @Resource + @Autowired(required = false) FlowDefinitionService flowDefinitionService; - @Resource + @Autowired(required = false) TaskService taskService; - @Resource + @Autowired(required = false) RepositoryService repositoryService; - @Resource + @Autowired(required = false) HistoryService historyService; - @Resource + @Autowired(required = false) FlowFormUserValueService flowFormUserValueService; - @Resource + @Autowired(required = false) private RuntimeService runtimeService; @SneakyThrows diff --git a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java index a0b6990..3f3029b 100644 --- a/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java +++ b/src/main/java/com/olivia/peanut/flow/service/impl/FlowConfigServiceImpl.java @@ -16,7 +16,6 @@ import com.olivia.peanut.flow.core.listener.DelegateTaskInfo; import com.olivia.peanut.flow.service.FlowConfigService; import com.olivia.sdk.filter.LoginUserContext; import com.olivia.sdk.utils.$; -import jakarta.annotation.Resource; import java.time.Duration; import java.util.*; import java.util.stream.Collectors; @@ -25,6 +24,7 @@ import org.apache.commons.lang3.StringUtils; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.DelegateTask; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /*** @@ -34,14 +34,14 @@ import org.springframework.stereotype.Service; @Service public class FlowConfigServiceImpl implements FlowConfigService { - @Resource + @Autowired(required = false) BaseUserRoleService userRoleService; - @Resource + @Autowired(required = false) BaseRoleService roleService; - @Resource + @Autowired(required = false) RuntimeService runtimeService; - @Resource + @Autowired(required = false) BaseUserDeptService baseUserDeptService; @Override @@ -57,7 +57,7 @@ public class FlowConfigServiceImpl implements FlowConfigService { } Map copyAssigneeMap = (Map) variableMap.get("copyAssignee"); List copyUserIdList = getUserIdList(addVariableMap, delegateTaskInfo, copyAssigneeMap); - if (Objects.nonNull(delegateTask)){ + if (Objects.nonNull(delegateTask)) { if (CollUtil.isNotEmpty(copyUserIdList)) { delegateTask.addCandidateUsers(copyUserIdList); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index d5c4d43..b1d7dc1 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -111,9 +111,12 @@ logging: camunda: bpm: + # 是否开启 + enabled: false auto-deployment-enabled: true admin-user: id: demo + # admin 账户必须修改 password: demo firstName: Demo webapp: -- Gitee From 48f28c9ce44789052ca6587ba12973fc335ae838 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Thu, 8 Aug 2024 10:38:39 +0800 Subject: [PATCH 25/27] =?UTF-8?q?fix(runutils):=20=E5=85=A5=E5=8F=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=87=B4=E7=BC=96=E8=AF=91=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/workflow.md | 26 ++++++++++++++----- .../impl/ApsGoodsForecastMakeServiceImpl.java | 2 +- .../ApsRollingForecastOrderServiceImpl.java | 2 +- .../impl/ApsSchedulingVersionServiceImpl.java | 2 +- .../peanut/flow/api/entity/FlowStr.java | 2 +- .../peanut/flow/api/entity/TaskDoneRes.java | 1 + .../peanut/flow/api/impl/FlowApiImpl.java | 16 ++++++++++-- .../portal/api/impl/CheckReportApiImpl.java | 2 +- .../api/impl/CheckReportListApiImpl.java | 2 +- .../service/impl/CheckReportServiceImpl.java | 2 +- .../service/impl/JcxBuyPlanServiceImpl.java | 2 +- .../service/impl/JcxOrderServiceImpl.java | 2 +- 12 files changed, 43 insertions(+), 18 deletions(-) diff --git a/doc/workflow.md b/doc/workflow.md index b48d7d1..29c1c46 100644 --- a/doc/workflow.md +++ b/doc/workflow.md @@ -46,24 +46,36 @@ | userIdList | 抄送用户列表 | userAssignee | ["userId1","userId2"] | | userId | 抄送用户列表 | userAssignee | userId: userIdList列表第一个用户ID | +## 流程变量流转 + +| 变量名称 | 流程环节 | 描述 | +|---------------------|---------|---------------------------| +| businessKey | 流程创建 | flow_form_user_value 中ID | +| FLOW_FORM_ID | 流程创建 | 流程引用表单ID | +| FLOW_NAME | 流程创建 | 流程名称 | +| FLOW_CREATE_USER_ID | 流程创建 | 流程实例创建人 | +| IS_FIRST_TASK | 流程创建 | 是否第一个任务 | +| userId | 流程任务开始前 | 用户在inputs放入的用户配置第一个人 | +| userIdList | 流程任务开始前 | 用户在inputs放入的用户配置的所有人 | + ## 多人处理 先了解到,对于“多实例任务”, task 会自动生成以下几个流程变量: -> nrOfActiviteInstances:当前活动的实例数量,即还没有完成的实例数量 -> loopCounter :循环计数器,办理人在列表中的索引 -> nrOfInstances:会签中总共的实例数 -> nrOfCompletedInstances:已经完成的实例数量 +> nrOfActiviteInstances:当前活动的实例数量,即还没有完成的实例数量 +> loopCounter :循环计数器,办理人在列表中的索引 +> nrOfInstances:会签中总共的实例数 +> nrOfCompletedInstances:已经完成的实例数量 那么,在 Completion condition 中 可以这么填写: -> $ {nrOfInstances == nrOfCompletedInstances} 表示所有人员审批完成后会签结束。 -> ${ nrOfCompletedInstances == 1} 表示一个人完成审批。 +> $ {nrOfInstances == nrOfCompletedInstances} 表示所有人员审批完成后会签结束。 +> ${ nrOfCompletedInstances == 1} 表示一个人完成审批。 ## 问题 1. 流程TTL应该配置 -> 流程配置 history cleanup 中: time to live 必填,单位 天 +> 流程配置 history cleanup 中: time to live 必填,单位 天 2. 2 diff --git a/src/main/java/com/olivia/peanut/aps/service/impl/ApsGoodsForecastMakeServiceImpl.java b/src/main/java/com/olivia/peanut/aps/service/impl/ApsGoodsForecastMakeServiceImpl.java index 24fbb60..3c1fe66 100644 --- a/src/main/java/com/olivia/peanut/aps/service/impl/ApsGoodsForecastMakeServiceImpl.java +++ b/src/main/java/com/olivia/peanut/aps/service/impl/ApsGoodsForecastMakeServiceImpl.java @@ -249,7 +249,7 @@ public class ApsGoodsForecastMakeServiceImpl extends MPJBaseServiceImpl projectDataMap = new HashMap<>(); diff --git a/src/main/java/com/olivia/peanut/aps/service/impl/ApsRollingForecastOrderServiceImpl.java b/src/main/java/com/olivia/peanut/aps/service/impl/ApsRollingForecastOrderServiceImpl.java index 1f406e2..0e96d3c 100644 --- a/src/main/java/com/olivia/peanut/aps/service/impl/ApsRollingForecastOrderServiceImpl.java +++ b/src/main/java/com/olivia/peanut/aps/service/impl/ApsRollingForecastOrderServiceImpl.java @@ -173,7 +173,7 @@ public class ApsRollingForecastOrderServiceImpl extends MPJBaseServiceImpl runnableList = getBomRunList(schedulingVersion, apsSchedulingVersionCapacityList, goodsMap, apsProcessPathDtoMap, factoryWeekListMap, dayWorkSecondMap, goodsBomMap, apsSchedulingGoodsBomList, apsOrderGoodsStatusDateList); - Boolean schedulingBom = RunUtils.run("scheduling bom " + req.getId(), 5, runnableList); + Boolean schedulingBom = RunUtils.run("scheduling bom " + req.getId(), runnableList); $.assertTrueCanIgnoreException(schedulingBom, "零件计算失败"); } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java index 1ed6501..a4383b4 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/FlowStr.java @@ -6,7 +6,7 @@ package com.olivia.peanut.flow.api.entity; public interface FlowStr { String FLOW_FORM_ID = "FLOW_FORM_ID"; - String FLOW_FORM_NAME = "FLOW_FORM_NAME"; + String FLOW_NAME = "FLOW_NAME"; String FLOW_CREATE_USER_ID = "FLOW_CREATE_USER_ID"; String IS_FIRST_TASK = "FIRST_TASK"; String FLOW_USER_ID = "userId"; diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java index 403a81f..6360b00 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java @@ -26,5 +26,6 @@ public class TaskDoneRes { String taskDefinitionKey; String activityInstanceId; String tenantId; + String businessKey; String flowFormId; } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index 9655da4..676bfa8 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -9,8 +9,10 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.olivia.peanut.flow.api.FlowApi; import com.olivia.peanut.flow.api.entity.*; import com.olivia.peanut.flow.model.FlowDefinition; +import com.olivia.peanut.flow.model.FlowFormItem; import com.olivia.peanut.flow.model.FlowFormUserValue; import com.olivia.peanut.flow.service.FlowDefinitionService; +import com.olivia.peanut.flow.service.FlowFormItemService; import com.olivia.peanut.flow.service.FlowFormUserValueService; import com.olivia.sdk.comment.ServiceComment; import com.olivia.sdk.filter.LoginUser; @@ -18,6 +20,7 @@ import com.olivia.sdk.filter.LoginUserContext; import com.olivia.sdk.utils.$; import com.olivia.sdk.utils.DynamicsPage; import com.olivia.sdk.utils.RunUtils; +import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.function.Function; @@ -26,6 +29,7 @@ import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.camunda.bpm.engine.*; +import org.camunda.bpm.engine.history.HistoricProcessInstance; import org.camunda.bpm.engine.history.HistoricTaskInstance; import org.camunda.bpm.engine.history.HistoricTaskInstanceQuery; import org.camunda.bpm.engine.repository.Deployment; @@ -57,7 +61,8 @@ public class FlowApiImpl implements FlowApi { HistoryService historyService; @Autowired(required = false) FlowFormUserValueService flowFormUserValueService; - + @Resource + FlowFormItemService flowFormItemService; @Autowired(required = false) private RuntimeService runtimeService; @@ -78,13 +83,17 @@ public class FlowApiImpl implements FlowApi { } @Override + @Transactional public StartRes start(StartReq req) { FlowDefinition flowDefinition = flowDefinitionService.getOne(new LambdaQueryWrapper().eq(FlowDefinition::getFlowKey, req.getFlowKey())); $.requireNonNullCanIgnoreException(flowDefinition, "流程不存在"); Map map = new HashMap<>(Map.of(FLOW_FORM_ID, flowDefinition.getFlowFormId() + "", IS_FIRST_TASK, "1")); map.put(FLOW_CREATE_USER_ID, LoginUserContext.getLoginUser().getIdStr()); - map.put(FLOW_FORM_NAME, flowDefinition.getFlowName()); + map.put(FLOW_NAME, flowDefinition.getFlowName()); String businessKey = IdWorker.getIdStr(); + List flowFormUserValueList = flowFormItemService.list(new LambdaQueryWrapper().eq(FlowFormItem::getFormId, flowDefinition.getFlowFormId())) + .stream().map(t -> $.copy(t, FlowFormUserValue.class).setBusinessKey(businessKey)).toList(); + this.flowFormUserValueService.saveBatch(flowFormUserValueList); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(req.getFlowKey(), businessKey, map); String processInstanceId = processInstance.getProcessInstanceId(); return new StartRes().setProcessInstanceId(processInstanceId).setFlowKey(req.getFlowKey()).setFlowFormId(flowDefinition.getFlowFormId()).setBusinessKey(businessKey); @@ -122,8 +131,11 @@ public class FlowApiImpl implements FlowApi { taskDoneRes.add(doneRes); runnableList.add(() -> { String processInstanceId = t.getProcessInstanceId(); + HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + String businessKey = processInstance.getBusinessKey(); String formId = (String) runtimeService.getVariable(processInstanceId, FLOW_FORM_ID); doneRes.setFlowFormId(formId); + doneRes.setBusinessKey(businessKey); }); }); RunUtils.run("Task done get formId", runnableList); diff --git a/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportApiImpl.java b/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportApiImpl.java index 67f5ccb..2ac58e5 100644 --- a/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportApiImpl.java +++ b/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportApiImpl.java @@ -145,7 +145,7 @@ public class CheckReportApiImpl implements CheckReportApi { }); }); - RunUtils.run("downLoad", runnableList.size() / 3, runnableList); + RunUtils.run("downLoad" ,runnableList); PoiExcelUtil.exportMultipleData(exportMultipleData.setSheetDataList(sheetDataList).setFileName(report.getReportName() + "盘点报表")); } } diff --git a/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportListApiImpl.java b/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportListApiImpl.java index 31ad0c6..ac29d03 100644 --- a/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportListApiImpl.java +++ b/src/main/java/com/olivia/peanut/portal/api/impl/CheckReportListApiImpl.java @@ -168,7 +168,7 @@ public class CheckReportListApiImpl implements CheckReportListApi { } })); - RunUtils.run("查询报表", runnableList.size() / 3, runnableList); + RunUtils.run("查询报表" ,runnableList); dataList.sort(Comparator.comparingInt(Info::getStoreySort).thenComparingInt(Info::getRoomSort)); return new CheckReportListFactoryDataRes().setDataList(dataList); } diff --git a/src/main/java/com/olivia/peanut/portal/service/impl/CheckReportServiceImpl.java b/src/main/java/com/olivia/peanut/portal/service/impl/CheckReportServiceImpl.java index 580bf10..0759446 100644 --- a/src/main/java/com/olivia/peanut/portal/service/impl/CheckReportServiceImpl.java +++ b/src/main/java/com/olivia/peanut/portal/service/impl/CheckReportServiceImpl.java @@ -61,7 +61,7 @@ public class CheckReportServiceImpl extends MPJBaseServiceImpl checkReportDtoList.forEach(t -> t.setIsOverStr(Str.booleanToStr(t.getIsOver()))) ); - RunUtils.run("设置名称", 1, runnableList); + RunUtils.run("设置名称", runnableList); } } diff --git a/src/main/java/com/olivia/peanut/portal/service/impl/JcxBuyPlanServiceImpl.java b/src/main/java/com/olivia/peanut/portal/service/impl/JcxBuyPlanServiceImpl.java index 0576658..43f2586 100644 --- a/src/main/java/com/olivia/peanut/portal/service/impl/JcxBuyPlanServiceImpl.java +++ b/src/main/java/com/olivia/peanut/portal/service/impl/JcxBuyPlanServiceImpl.java @@ -101,7 +101,7 @@ public class JcxBuyPlanServiceImpl extends MPJBaseServiceImpl g.setGoodsName(idNameMap.get(g.getGoodsId()))); t.setPlanStatusName(JcxBuyPlanStatusEnum.codeMsg.get(t.getPlanStatus())); }); - RunUtils.run("JcxBuyPlanServiceImpl#setName", jcxBuyPlanDtoList.size() / 5, runnableList); + RunUtils.run("JcxBuyPlanServiceImpl#setName", runnableList); } private MPJLambdaWrapper getWrapper(JcxBuyPlanDto obj) { diff --git a/src/main/java/com/olivia/peanut/portal/service/impl/JcxOrderServiceImpl.java b/src/main/java/com/olivia/peanut/portal/service/impl/JcxOrderServiceImpl.java index 57cb810..e0a2347 100644 --- a/src/main/java/com/olivia/peanut/portal/service/impl/JcxOrderServiceImpl.java +++ b/src/main/java/com/olivia/peanut/portal/service/impl/JcxOrderServiceImpl.java @@ -152,7 +152,7 @@ public class JcxOrderServiceImpl extends MPJBaseServiceImpl Date: Thu, 8 Aug 2024 16:14:29 +0800 Subject: [PATCH 26/27] =?UTF-8?q?feat(app):=20=E4=BB=BB=E5=8A=A1=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/olivia/peanut/flow/api/FlowApi.java | 2 +- .../peanut/flow/api/entity/StartRes.java | 1 + .../peanut/flow/api/entity/TaskDoneRes.java | 1 + .../flow/api/entity/TaskHistoryListRes.java | 30 +++++++++-------- .../peanut/flow/api/impl/FlowApiImpl.java | 32 +++++++++++-------- .../api/impl/FlowFormUserValueApiImpl.java | 9 ++++-- 6 files changed, 45 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java index dcf7a33..a2684db 100644 --- a/src/main/java/com/olivia/peanut/flow/api/FlowApi.java +++ b/src/main/java/com/olivia/peanut/flow/api/FlowApi.java @@ -39,7 +39,7 @@ public interface FlowApi { @PostMapping("/task/complete") CompleteRes complete(@RequestBody @Valid CompleteReq req); - //copy + //抄送我的 @PostMapping("/task/copy") DynamicsPage selectTaskCopy(@RequestBody @Valid SelectTaskCopyReq req); diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java index b227c3a..1d162d8 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/StartRes.java @@ -16,4 +16,5 @@ public class StartRes { private String processInstanceId; private Long flowFormId; private String businessKey; + private String taskId; } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java index 6360b00..0ee5c15 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskDoneRes.java @@ -28,4 +28,5 @@ public class TaskDoneRes { String tenantId; String businessKey; String flowFormId; + String processInstanceId; } diff --git a/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java b/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java index 4bcd655..f740bf5 100644 --- a/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java +++ b/src/main/java/com/olivia/peanut/flow/api/entity/TaskHistoryListRes.java @@ -4,7 +4,6 @@ import java.util.Date; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; -import org.camunda.bpm.engine.task.Comment; /*** * @@ -14,18 +13,21 @@ import org.camunda.bpm.engine.task.Comment; @Accessors(chain = true) public class TaskHistoryListRes { - protected String taskId; - protected String assignee; - protected String owner; - protected String name; - protected String description; - protected Date dueDate; - protected Date followUpDate; - protected int priority; - protected String parentTaskId; - protected String deleteReason; - protected String taskDefinitionKey; - protected String activityInstanceId; + private String id; + private String taskId; + private String assignee; + private String owner; + private String name; + private String description; + private Date dueDate; + private Date followUpDate; + private int priority; + private String parentTaskId; + private String deleteReason; + private String taskDefinitionKey; + private String activityInstanceId; + + // private Comment messageComment; + private String message; - private Comment messageComment; } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java index 676bfa8..73f8220 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowApiImpl.java @@ -23,7 +23,6 @@ import com.olivia.sdk.utils.RunUtils; import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.*; -import java.util.function.Function; import java.util.stream.Collectors; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -91,12 +90,15 @@ public class FlowApiImpl implements FlowApi { map.put(FLOW_CREATE_USER_ID, LoginUserContext.getLoginUser().getIdStr()); map.put(FLOW_NAME, flowDefinition.getFlowName()); String businessKey = IdWorker.getIdStr(); - List flowFormUserValueList = flowFormItemService.list(new LambdaQueryWrapper().eq(FlowFormItem::getFormId, flowDefinition.getFlowFormId())) - .stream().map(t -> $.copy(t, FlowFormUserValue.class).setBusinessKey(businessKey)).toList(); - this.flowFormUserValueService.saveBatch(flowFormUserValueList); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(req.getFlowKey(), businessKey, map); String processInstanceId = processInstance.getProcessInstanceId(); - return new StartRes().setProcessInstanceId(processInstanceId).setFlowKey(req.getFlowKey()).setFlowFormId(flowDefinition.getFlowFormId()).setBusinessKey(businessKey); + List flowFormUserValueList = flowFormItemService.list(new LambdaQueryWrapper().eq(FlowFormItem::getFormId, flowDefinition.getFlowFormId())) + .stream().map(t -> $.copy(t, FlowFormUserValue.class).setBusinessKey(businessKey).setProcessInstanceId(processInstanceId)).toList(); + flowFormUserValueList.forEach(t -> t.setId(null)); + this.flowFormUserValueService.saveBatch(flowFormUserValueList); + Task task = this.taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult(); + return new StartRes().setProcessInstanceId(processInstanceId).setTaskId(task.getId()).setFlowKey(req.getFlowKey()).setFlowFormId(flowDefinition.getFlowFormId()) + .setBusinessKey(businessKey); } @Override @@ -128,6 +130,7 @@ public class FlowApiImpl implements FlowApi { taskInstanceList.forEach(t -> { TaskDoneRes doneRes = $.copy(t, TaskDoneRes.class); + doneRes.setProcessInstanceId(t.getProcessInstanceId()); taskDoneRes.add(doneRes); runnableList.add(() -> { String processInstanceId = t.getProcessInstanceId(); @@ -246,16 +249,19 @@ public class FlowApiImpl implements FlowApi { List taskInstanceList = historyService.createHistoricTaskInstanceQuery().processInstanceId(req.getProcessInstanceId()).list(); taskInstanceList.sort(Comparator.comparing(HistoricTaskInstance::getStartTime)); - List taskList = taskService.createTaskQuery().processInstanceId(req.getProcessInstanceId()).list(); - if (CollUtil.isEmpty(taskList)) { - return List.of(); - } - Map taskCommentMap = taskService.getProcessInstanceComments(req.getProcessInstanceId()).stream() - .collect(Collectors.toMap(Comment::getTaskId, Function.identity(), (o, o2) -> o2)); - List resList = $.copyList(taskList, TaskHistoryListRes.class); + + + List resList = $.copyList(taskInstanceList, TaskHistoryListRes.class); + List runnableList = new ArrayList<>(); resList.forEach(taskInstance -> { - taskInstance.setMessageComment(taskCommentMap.get(taskInstance.getTaskId())); + runnableList.add(() -> { + List taskComments = taskService.getTaskComments(taskInstance.getId()); + if (Objects.nonNull(taskComments)) { + taskInstance.setMessage(taskComments.stream().map(Comment::getFullMessage).collect(Collectors.joining(","))); + } + }); }); + RunUtils.run("taskHistoryList", runnableList); return resList; } } diff --git a/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java index f06b51f..5c42d2e 100644 --- a/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java +++ b/src/main/java/com/olivia/peanut/flow/api/impl/FlowFormUserValueApiImpl.java @@ -39,9 +39,14 @@ public class FlowFormUserValueApiImpl implements FlowFormUserValueApi { @Override public FlowFormUserValueInsertRes insertBadBatch(List req) { $.requireNonNullCanIgnoreException(req, "用户值不能为空"); - req.forEach(t->t.setId(IdWorker.getId())); - this.flowFormUserValueService.saveBatch($.copyList(req, FlowFormUserValue.class)); + if (req.get(0).getId() == null) { + req.forEach(t -> t.setId(IdWorker.getId())); + this.flowFormUserValueService.saveBatch($.copyList(req, FlowFormUserValue.class)); + } else { + this.flowFormUserValueService.updateBatchById($.copyList(req, FlowFormUserValue.class)); + } return new FlowFormUserValueInsertRes().setCount(req.size()); + } /**** -- Gitee From 815b37b7ce7f13dfed966b37b65dc2806277d882 Mon Sep 17 00:00:00 2001 From: wangbao <197235339@qq.com> Date: Thu, 8 Aug 2024 16:18:46 +0800 Subject: [PATCH 27/27] =?UTF-8?q?feat(doc):=20sql=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/data/base_table_header.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/data/base_table_header.sql b/sql/data/base_table_header.sql index 797e8c6..5c12680 100644 --- a/sql/data/base_table_header.sql +++ b/sql/data/base_table_header.sql @@ -225,7 +225,7 @@ INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sor INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395850, 'BaseRoleGroupService#queryPageList', 'roleGroupCode', '编码', '300', null, null, null, 0, '2024-07-31 14:50:10', null, '2024-07-31 14:50:10', null, null, 0, null); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395851, 'BaseRoleGroupService#queryPageList', 'roleGroupName', '名称', '300', null, null, null, 0, '2024-07-31 14:50:10', null, '2024-07-31 14:50:10', null, null, 0, null); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395852, 'BaseRoleService#queryPageList', 'roleGroupName', '组名称', '300', null, null, null, 0, '2024-07-31 14:51:35', null, '2024-07-31 14:51:35', null, null, 0, null); -INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395853, 'FlowRepositoryServiceImpl#queryTaskPageList', 'id', '序号', '300', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:59:14', null, null, 0, null); +INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395853, 'FlowRepositoryServiceImpl#queryTaskPageList', 'taskId', '序号', '300', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-08 15:44:47', null, null, 0, null); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395854, 'FlowRepositoryServiceImpl#queryTaskPageList', 'name', '任务名称', '200', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:16:06', null, null, 0, null); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395855, 'FlowRepositoryServiceImpl#queryTaskPageList', 'packageName', '名称', '200', null, null, null, 1, '2024-08-01 16:14:49', null, '2024-08-01 16:59:22', null, null, 0, null); INSERT INTO base_table_header (id, biz_key, field_name, show_name, width_px, sort_index, is_picture, plan_status, is_delete, create_time, create_by, update_time, update_by, trace_id, version_num, tenant_id) VALUES (1809073379096395856, 'FlowRepositoryServiceImpl#queryTaskPageList', 'createTime', '创建时间', '200', null, null, null, 0, '2024-08-01 16:14:49', null, '2024-08-01 16:16:06', null, null, 0, null); -- Gitee