【同步】BOOT 和 CLOUD 的功能
parent
282be0b4f0
commit
2a01d1a970
|
@ -14,7 +14,7 @@ import java.util.function.Consumer;
|
||||||
* 拓展 MyBatis Plus Join QueryWrapper 类,主要增加如下功能:
|
* 拓展 MyBatis Plus Join QueryWrapper 类,主要增加如下功能:
|
||||||
* <p>
|
* <p>
|
||||||
* 1. 拼接条件的方法,增加 xxxIfPresent 方法,用于判断值不存在的时候,不要拼接到条件中。
|
* 1. 拼接条件的方法,增加 xxxIfPresent 方法,用于判断值不存在的时候,不要拼接到条件中。
|
||||||
* SFunction<S, ?> column + <S> 泛型 支持任意类字段(主表、子表、三表) 推荐写法, 让编译器自动推断 S 类型
|
* 2. SFunction<S, ?> column + <S> 泛型:支持任意类字段(主表、子表、三表),推荐写法, 让编译器自动推断 S 类型
|
||||||
* @param <T> 数据类型
|
* @param <T> 数据类型
|
||||||
*/
|
*/
|
||||||
public class MPJLambdaWrapperX<T> extends MPJLambdaWrapper<T> {
|
public class MPJLambdaWrapperX<T> extends MPJLambdaWrapper<T> {
|
||||||
|
|
|
@ -14,6 +14,7 @@ import org.flowable.bpmn.model.UserTask;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.DelegateExecution;
|
||||||
import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
|
import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
|
||||||
import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior;
|
import org.flowable.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior;
|
||||||
|
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -82,4 +83,13 @@ public class BpmSequentialMultiInstanceBehavior extends SequentialMultiInstanceB
|
||||||
return super.resolveNrOfInstances(execution);
|
return super.resolveNrOfInstances(execution);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void executeOriginalBehavior(DelegateExecution execution, ExecutionEntity multiInstanceRootExecution, int loopCounter) {
|
||||||
|
// 参见 https://gitee.com/zhijiantianya/yudao-cloud/issues/IC239F
|
||||||
|
super.collectionExpression = null;
|
||||||
|
super.collectionVariable = FlowableUtils.formatExecutionCollectionVariable(execution.getCurrentActivityId());
|
||||||
|
super.collectionElementVariable = FlowableUtils.formatExecutionCollectionElementVariable(execution.getCurrentActivityId());
|
||||||
|
super.executeOriginalBehavior(execution, multiInstanceRootExecution, loopCounter);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -597,6 +597,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||||
* @param nextAssignees 下一个节点审批人集合(参数)
|
* @param nextAssignees 下一个节点审批人集合(参数)
|
||||||
* @param processInstance 流程实例
|
* @param processInstance 流程实例
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private Map<String, Object> validateAndSetNextAssignees(String taskDefinitionKey, Map<String, Object> variables, BpmnModel bpmnModel,
|
private Map<String, Object> validateAndSetNextAssignees(String taskDefinitionKey, Map<String, Object> variables, BpmnModel bpmnModel,
|
||||||
Map<String, List<Long>> nextAssignees, ProcessInstance processInstance) {
|
Map<String, List<Long>> nextAssignees, ProcessInstance processInstance) {
|
||||||
// simple 设计器第一个节点默认为发起人节点,不校验是否存在审批人
|
// simple 设计器第一个节点默认为发起人节点,不校验是否存在审批人
|
||||||
|
@ -646,6 +647,11 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||||
approveUserSelectAssignees = new HashMap<>();
|
approveUserSelectAssignees = new HashMap<>();
|
||||||
}
|
}
|
||||||
approveUserSelectAssignees.put(nextFlowNode.getId(), assignees);
|
approveUserSelectAssignees.put(nextFlowNode.getId(), assignees);
|
||||||
|
Map<String,List<Long>> existingApproveUserSelectAssignees = (Map<String,List<Long>>) variables.get(
|
||||||
|
BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES);
|
||||||
|
if (CollUtil.isNotEmpty(existingApproveUserSelectAssignees)) {
|
||||||
|
approveUserSelectAssignees.putAll(existingApproveUserSelectAssignees);
|
||||||
|
}
|
||||||
variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES, approveUserSelectAssignees);
|
variables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES, approveUserSelectAssignees);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||||
import type { VxeTableInstance } from 'vxe-table';
|
import type { VxeTableInstance } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import { cloneDeep, formatDateTime } from '@vben/utils';
|
||||||
|
@ -9,9 +9,10 @@ import { DictTag } from '#/components/dict-tag';
|
||||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||||
import ${simpleClassName}Form from './modules/form.vue';
|
import ${simpleClassName}Form from './modules/form.vue';
|
||||||
import { Download, Plus, RefreshCw, Search } from '@vben/icons';
|
import { Download, Plus, RefreshCw, Search } from '@vben/icons';
|
||||||
import { ContentWrap } from "#/components/content-wrap";
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { VxeColumn, VxeTable } from 'vxe-table';
|
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
|
import { useTableToolbar } from '#/hooks';
|
||||||
|
|
||||||
## 特殊:主子表专属逻辑
|
## 特殊:主子表专属逻辑
|
||||||
#if ( $table.templateType == 11 || $table.templateType == 12 )
|
#if ( $table.templateType == 11 || $table.templateType == 12 )
|
||||||
|
@ -167,11 +168,6 @@ try {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 隐藏搜索栏 */
|
|
||||||
const hiddenSearchBar = ref(false);
|
|
||||||
const tableToolbarRef = ref<InstanceType<typeof TableToolbar>>();
|
|
||||||
const tableRef = ref<VxeTableInstance>();
|
|
||||||
|
|
||||||
#if (${table.templateType} == 2)
|
#if (${table.templateType} == 2)
|
||||||
/** 切换树形展开/收缩状态 */
|
/** 切换树形展开/收缩状态 */
|
||||||
const isExpanded = ref(true);
|
const isExpanded = ref(true);
|
||||||
|
@ -182,15 +178,9 @@ function toggleExpand() {
|
||||||
#end
|
#end
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
onMounted(async () => {
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
await getList();
|
onMounted(() => {
|
||||||
await nextTick();
|
getList();
|
||||||
// 挂载 toolbar 工具栏
|
|
||||||
const table = tableRef.value;
|
|
||||||
const tableToolbar = tableToolbarRef.value;
|
|
||||||
if (table && tableToolbar) {
|
|
||||||
await table.connect(tableToolbar.getToolbarRef()!);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils';
|
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||||
|
|
||||||
#if ($subTable.subJoinMany) ## 一对多
|
#if ($subTable.subJoinMany) ## 一对多
|
||||||
import type { VxeTableInstance } from 'vxe-table';
|
import type { VxeTableInstance } from '#/adapter/vxe-table';
|
||||||
import { Plus } from "@vben/icons";
|
import { Plus } from "@vben/icons";
|
||||||
import { VxeColumn, VxeTable } from 'vxe-table';
|
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||||
import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||||
#else
|
#else
|
||||||
import type { Rule } from 'ant-design-vue/es/form';
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||||
import type { VxeTableInstance } from 'vxe-table';
|
import type { VxeTableInstance } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils';
|
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||||
import { VxeColumn, VxeTable } from 'vxe-table';
|
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||||
import { reactive,ref, h, nextTick,watch,onMounted } from 'vue';
|
import { reactive,ref, h, nextTick,watch,onMounted } from 'vue';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import { cloneDeep, formatDateTime } from '@vben/utils';
|
||||||
import { ContentWrap } from "#/components/content-wrap";
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
|
|
||||||
#if ($table.templateType == 11) ## erp
|
#if ($table.templateType == 11) ## erp
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
|
import { useTableToolbar } from '#/hooks';
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#if ($table.templateType == 11) ## erp
|
#if ($table.templateType == 11) ## erp
|
||||||
|
@ -165,21 +166,10 @@ const resetQuery = () => {
|
||||||
);
|
);
|
||||||
|
|
||||||
#if ($table.templateType == 11) ## erp
|
#if ($table.templateType == 11) ## erp
|
||||||
/** 隐藏搜索栏 */
|
|
||||||
const hiddenSearchBar = ref(false);
|
|
||||||
const tableToolbarRef = ref<InstanceType<typeof TableToolbar>>();
|
|
||||||
const tableRef = ref<VxeTableInstance>();
|
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
onMounted(async () => {
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
await getList();
|
onMounted(() => {
|
||||||
await nextTick();
|
getList();
|
||||||
// 挂载 toolbar 工具栏
|
|
||||||
const table = tableRef.value;
|
|
||||||
const tableToolbar = tableToolbarRef.value;
|
|
||||||
if (table && tableToolbar) {
|
|
||||||
await table.connect(tableToolbar.getToolbarRef()!);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
#end
|
#end
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -92,6 +92,7 @@ public class KeFuMessageServiceImpl implements KeFuMessageService {
|
||||||
MemberUserRespDTO user = memberUserApi.getUser(kefuMessage.getSenderId()).getCheckedData();
|
MemberUserRespDTO user = memberUserApi.getUser(kefuMessage.getSenderId()).getCheckedData();
|
||||||
KeFuMessageRespVO message = BeanUtils.toBean(kefuMessage, KeFuMessageRespVO.class).setSenderAvatar(user.getAvatar());
|
KeFuMessageRespVO message = BeanUtils.toBean(kefuMessage, KeFuMessageRespVO.class).setSenderAvatar(user.getAvatar());
|
||||||
getSelf().sendAsyncMessageToAdmin(KEFU_MESSAGE_TYPE, message);
|
getSelf().sendAsyncMessageToAdmin(KEFU_MESSAGE_TYPE, message);
|
||||||
|
getSelf().sendAsyncMessageToMember(conversation.getUserId(), KEFU_MESSAGE_TYPE, message);
|
||||||
return kefuMessage.getId();
|
return kefuMessage.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue