Browse Source
1) 支持回退时返回给原处理人, 提交时选择任务候选处理人 2) 支持定性选项补录控件的配置 3)支持参数属性 MODIFY_IF 补录控件配置 4)修改流程创建时,更新流程实例扩展表的机制,采用 start 监听 前端核心发布: 8.2.123 1) 首页任务列表增加按日期倒序 2)修改了用户选择机构的操作模式main
59 changed files with 1348 additions and 431 deletions
@ -1,3 +1,15 @@ |
|||||
. 用户管理功能中,设置用户机构时,机构树直接展示已经选择的机构,新增“选入”、“选出”功能,用于修改机构 |
. 用户管理功能中,设置用户机构时,机构树直接展示已经选择的机构,新增“选入”、“选出”功能,用于修改机构 |
||||
. 用户管理功能中,可修改设置用户所属默认机构,默认角色等 |
. 用户管理功能中,可修改设置用户所属默认机构,默认角色等 |
||||
. |
. |
||||
|
|
||||
|
|
||||
|
|
||||
|
DDL: |
||||
|
1. 给 RE_MODEL_PARAMETER_ADDITION 表增加字段 |
||||
|
ALTER TABLE RE_MODEL_PARAMETER_ADDITION ADD LABEL_ varchar(255) NULL COMMENT '组件标题'; |
||||
|
ALTER TABLE RE_MODEL_PARAMETER_ADDITION ADD VALUE_SCALE_ SMALLINT NULL COMMENT '精度(小数位数)'; |
||||
|
ALTER TABLE RE_MODEL_PARAMETER_ADDITION ADD MIN_VALUE_ varchar(255) NULL COMMENT '最小值(包含)'; |
||||
|
ALTER TABLE RE_MODEL_PARAMETER_ADDITION ADD MAX_VALUE_ varchar(255) NULL COMMENT '最大值(包含)'; |
||||
|
|
||||
|
2. 给 RE_MODEL_PARAMETER 表增加字段 |
||||
|
ALTER TABLE RE_MODEL_PARAMETER ADD DISABLE_ON_AUTO_SELECTED_ SMALLINT NULL COMMENT '当系统自动选择了输入选项中某一项时, 是否禁止用户选择其他项'; |
@ -0,0 +1,69 @@ |
|||||
|
package io.sc.platform.flowable.extension.listener.start; |
||||
|
|
||||
|
import io.sc.platform.flowable.enums.ProcessStatus; |
||||
|
import io.sc.platform.flowable.jpa.entity.ProcessEntity; |
||||
|
import io.sc.platform.flowable.service.ProcessEntityService; |
||||
|
import io.sc.platform.flowable.support.BusinessKeyAndDescriptionWrapper; |
||||
|
import io.sc.platform.flowable.support.BusinessKeyAndDescriptionWrapperMapper; |
||||
|
import io.sc.platform.util.StringUtil; |
||||
|
import org.flowable.engine.delegate.DelegateExecution; |
||||
|
import org.flowable.engine.delegate.ExecutionListener; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.jdbc.core.JdbcTemplate; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.util.StringUtils; |
||||
|
|
||||
|
import java.util.HashMap; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service("processStartListener") |
||||
|
public class ProcessStartListener implements ExecutionListener { |
||||
|
@Autowired private ProcessEntityService processEntityService; |
||||
|
@Autowired private JdbcTemplate jdbcTemplate; |
||||
|
|
||||
|
@Override |
||||
|
public void notify(DelegateExecution execution) { |
||||
|
insertProcInsExtByDefinitionId(execution.getProcessDefinitionId(),execution.getProcessInstanceId(),execution.getProcessInstanceBusinessKey()); |
||||
|
} |
||||
|
|
||||
|
private void insertProcInsExtByDefinitionId(String processDefinitionId, String processInstanceId, String businessKey){ |
||||
|
if(!StringUtils.hasText(processDefinitionId) || !StringUtils.hasText(processInstanceId) || !StringUtils.hasText(businessKey)){ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ProcessEntity entity =processEntityService.getRepository().findByDeployedId(processDefinitionId); |
||||
|
if(entity==null || !StringUtils.hasText(entity.getBusinessDescriptionSql())){ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Map<String,Object> variables =new HashMap<>(); |
||||
|
variables.put("businessKey", StringUtil.escapeSqlSpecialChar(businessKey)); |
||||
|
|
||||
|
String sql =StringUtil.format(entity.getBusinessDescriptionSql(),variables); |
||||
|
BusinessKeyAndDescriptionWrapper wrapper =jdbcTemplate.queryForObject(sql,new BusinessKeyAndDescriptionWrapperMapper()); |
||||
|
if(wrapper==null){ |
||||
|
return; |
||||
|
} |
||||
|
jdbcTemplate.update("insert into SYS_PROCESS_INST_EXT(PROC_INST_ID_,CUST_NO_,CUST_NAME_) values(?,?,?)",processInstanceId,wrapper.getCustNo(),wrapper.getCustName()); |
||||
|
} |
||||
|
|
||||
|
private void insertProcInsExtByDefinitionKey(String processDefinitionKey,String processInstanceId,String businessKey){ |
||||
|
if(!StringUtils.hasText(processDefinitionKey) || !StringUtils.hasText(processInstanceId) || !StringUtils.hasText(businessKey)){ |
||||
|
return; |
||||
|
} |
||||
|
ProcessEntity entity =processEntityService.getRepository().findByKeyAndStatus(processDefinitionKey, ProcessStatus.RELEASE); |
||||
|
if(entity==null || !StringUtils.hasText(entity.getBusinessDescriptionSql())){ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Map<String,Object> variables =new HashMap<>(); |
||||
|
variables.put("businessKey",StringUtil.escapeSqlSpecialChar(businessKey)); |
||||
|
|
||||
|
String sql =StringUtil.format(entity.getBusinessDescriptionSql(),variables); |
||||
|
BusinessKeyAndDescriptionWrapper wrapper =jdbcTemplate.queryForObject(sql,new BusinessKeyAndDescriptionWrapperMapper()); |
||||
|
if(wrapper==null){ |
||||
|
return; |
||||
|
} |
||||
|
jdbcTemplate.update("insert into SYS_PROCESS_INST_EXT(PROC_INST_ID_,CUST_NO_,CUST_NAME_) values(?,?,?)",processInstanceId,wrapper.getCustNo(),wrapper.getCustName()); |
||||
|
} |
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
<template> |
||||
|
<w-dialog |
||||
|
ref="dialogRef" |
||||
|
:title="$t('system.shared.selectOrg.dialog.title')" |
||||
|
width="800px" |
||||
|
height="600px" |
||||
|
:can-maximize="false" |
||||
|
:buttons="[ |
||||
|
{ |
||||
|
label: $t('confirm'), |
||||
|
click: () => { |
||||
|
const ids = Tools.extractProperties(treeGridRef.getSelectedRows(), 'id'); |
||||
|
emit('afterSelected', ids, dialogRef); |
||||
|
}, |
||||
|
}, |
||||
|
]" |
||||
|
> |
||||
|
<w-grid |
||||
|
ref="treeGridRef" |
||||
|
:title="$t('system.shared.selectOrg.dialog.grid.title')" |
||||
|
hide-bottom |
||||
|
:config-button="false" |
||||
|
:tree="true" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="true" |
||||
|
tree-tick-strategy="strict" |
||||
|
ticked-field="selected" |
||||
|
:tree-icon=" |
||||
|
(row) => { |
||||
|
return { name: 'folder', color: 'amber' }; |
||||
|
} |
||||
|
" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/system/org/listAllOrgsWithSelectedStatusByUser')" |
||||
|
:auto-fetch-data="true" |
||||
|
:pageable="false" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="['refresh', 'separator', 'expand', 'separator', 'view']" |
||||
|
:columns="[ |
||||
|
{ width: '100%', name: 'name', label: $t('name') }, |
||||
|
{ width: 100, name: 'code', label: $t('code') }, |
||||
|
{ width: 80, name: 'enable', label: $t('status'), format: Formater.enableTag(), sortable: false }, |
||||
|
]" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'enable', label: $t('enable') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate') }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
</w-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { Environment, Formater, Tools } from 'platform-core'; |
||||
|
|
||||
|
const emit = defineEmits<{ |
||||
|
(e: 'afterSelected', ids: string[], dialogComponent: any): void; |
||||
|
}>(); |
||||
|
|
||||
|
const dialogRef = ref(); |
||||
|
const treeGridRef = ref(); |
||||
|
|
||||
|
const open = (foreignKey: string) => { |
||||
|
dialogRef.value.show(); |
||||
|
}; |
||||
|
|
||||
|
const close = () => { |
||||
|
dialogRef.value.hide(); |
||||
|
}; |
||||
|
|
||||
|
defineExpose({ |
||||
|
open, |
||||
|
close, |
||||
|
}); |
||||
|
</script> |
Loading…
Reference in new issue