流程业务表单1:n配置
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
29f38fc2e4
commit
8875c6d0b3
@ -92,16 +92,26 @@ public class FormProcessMappingController {
|
||||
BeanUtils.toBean(list, FormProcessMappingRespVO.class));
|
||||
}
|
||||
@GetMapping("/get-form-view-path")
|
||||
public CommonResult<String> getFormViewPath(@RequestParam("processKey") String processKey) {
|
||||
public CommonResult<List<String>> getFormViewPath(@RequestParam("processKey") String processKey) {
|
||||
return success(formProcessMappingService.selectFormViewPathByProcessKey(processKey));
|
||||
}
|
||||
@GetMapping("/get-form-create-path")
|
||||
public CommonResult<String> getFormCreatePath(@RequestParam("processKey") String processKey) {
|
||||
public CommonResult<List<String>> getFormCreatePath(@RequestParam("processKey") String processKey) {
|
||||
return success(formProcessMappingService.selectFormCreatePathByProcessKey(processKey));
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/get-form-custom-view-path")
|
||||
public CommonResult<String> getFormCustomViewPath(@RequestParam("formCustomCreatePath") String formCustomCreatePath) {
|
||||
String formCustomViewPath = formProcessMappingService.getFormCustomViewPath(formCustomCreatePath);
|
||||
return success(formCustomViewPath);
|
||||
}
|
||||
@GetMapping("/get-process-key")
|
||||
public CommonResult<String> selectProcessKey(@RequestParam("fullpath") String fullpath) {
|
||||
return success(formProcessMappingService.selectProcessKey(fullpath));
|
||||
}
|
||||
@GetMapping("/get-by-process-key")
|
||||
public CommonResult<List<FormProcessMappingRespVO>> getListByProcessKey(@RequestParam("processKey") String processKey) {
|
||||
List<FormProcessMappingDO> result = formProcessMappingService.getListByProcessKey(processKey);
|
||||
return success(BeanUtils.toBean(result, FormProcessMappingRespVO.class));
|
||||
}
|
||||
}
|
||||
|
@ -51,4 +51,7 @@ public class KnowledgeSaveReqVO {
|
||||
|
||||
@Schema(description = "流程定义key")
|
||||
private String processDefinitionKey;
|
||||
|
||||
@Schema(description = "当前创建路径")
|
||||
private String curfullpath;
|
||||
}
|
||||
|
@ -71,6 +71,12 @@ public class ProcessInstanceTodoController {
|
||||
return success(BeanUtils.toBean(processInstanceTodo, ProcessInstanceTodoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/get-form-custom-create-path")
|
||||
public CommonResult<String> getFormCustomCreatePath(@RequestParam("processInstanceId") String processInstanceId) {
|
||||
String path = processInstanceTodoService.getFormCustomCreatePath(processInstanceId);
|
||||
return success(path);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得BPM 流程实例信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:process-instance-todo:query')")
|
||||
|
@ -29,12 +29,19 @@ public interface FormProcessMappingMapper extends BaseMapperX<FormProcessMapping
|
||||
.betweenIfPresent(FormProcessMappingDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(FormProcessMappingDO::getId));
|
||||
}
|
||||
@Select("SELECT form_custom_view_path FROM bpm_form_process_mapping WHERE process_key = #{processKey}")
|
||||
String selectFormViewPathByProcessKey(@Param("processKey") String processKey);
|
||||
@Select("SELECT form_custom_view_path FROM bpm_form_process_mapping WHERE process_key = #{processKey} AND status=0")
|
||||
List<String> selectFormViewPathByProcessKey(@Param("processKey") String processKey);
|
||||
|
||||
@Select("SELECT form_custom_create_path FROM bpm_form_process_mapping WHERE process_key = #{processKey}")
|
||||
String selectFormCreatePathByProcessKey(@Param("processKey") String processKey);
|
||||
@Select("SELECT form_custom_create_path FROM bpm_form_process_mapping WHERE process_key = #{processKey} AND status=0")
|
||||
List<String> selectFormCreatePathByProcessKey(@Param("processKey") String processKey);
|
||||
|
||||
@Select("SELECT process_key FROM bpm_form_process_mapping WHERE form_custom_create_path = #{formCustomCreatePath}")
|
||||
@Select("SELECT process_key FROM bpm_form_process_mapping WHERE form_custom_create_path = #{formCustomCreatePath} AND status=0")
|
||||
String selectProcessKey(@Param("formCustomCreatePath") String formCustomCreatePath);
|
||||
|
||||
@Select("SELECT form_custom_view_path FROM bpm_form_process_mapping WHERE form_custom_create_path = #{formCustomCreatePath} AND status = 0")
|
||||
String selectFormCustomViewPath(@Param("formCustomCreatePath") String formCustomCreatePath);
|
||||
|
||||
// 通过 processKey 查询 FormProcessMappingDO 列表
|
||||
@Select("SELECT * FROM bpm_form_process_mapping WHERE process_key = #{processKey} AND status = 0")
|
||||
List<FormProcessMappingDO> selectListByProcessKey(@Param("processKey") String processKey);
|
||||
}
|
||||
|
@ -38,5 +38,12 @@ public interface ProcessInstanceTodoMapper extends BaseMapperX<ProcessInstanceTo
|
||||
default List<ProcessInstanceTodoDO> selectListByProcessinstandid(Collection<String> proccessinstandids) {
|
||||
return selectList(ProcessInstanceTodoDO::getProcessInstanceId, proccessinstandids);
|
||||
}
|
||||
|
||||
default String selectFormCustomCreatePathByProcessInstanceId(String processInstanceId) {
|
||||
List<ProcessInstanceTodoDO> results = selectList(ProcessInstanceTodoDO::getProcessInstanceId, Collections.singletonList(processInstanceId));
|
||||
// 假设只有一个结果,返回对应字段值
|
||||
if (results.isEmpty()) {
|
||||
return null; // 或者抛出异常,视需求而定
|
||||
}
|
||||
return results.get(0).getFormCustomCreatePath();
|
||||
}
|
||||
}
|
@ -57,14 +57,14 @@ public interface FormProcessMappingService {
|
||||
* @param processKey 流程信息的键
|
||||
* @return formCustomViewPath 表单的查看路径
|
||||
*/
|
||||
String selectFormViewPathByProcessKey(String processKey);
|
||||
List<String> selectFormViewPathByProcessKey(String processKey);
|
||||
/**
|
||||
* 通过 processKey 查询 formCustomCreatePath
|
||||
*
|
||||
* @param processKey 流程信息的键
|
||||
* @return formCustomCreatePath 表单的提交路径
|
||||
*/
|
||||
String selectFormCreatePathByProcessKey(String processKey);
|
||||
List<String> selectFormCreatePathByProcessKey(String processKey);
|
||||
/**
|
||||
* 通过 formCustomCreatePath 查询 processKey
|
||||
*
|
||||
@ -72,4 +72,18 @@ public interface FormProcessMappingService {
|
||||
* @return ProcessKey 流程信息的键
|
||||
*/
|
||||
String selectProcessKey(String formCustomCreatePath);
|
||||
/**
|
||||
* 通过 formCustomCreatePath 查询 formCustomViewPath
|
||||
*
|
||||
* @param formCustomCreatePath 表单的提交路径
|
||||
* @return formCustomViewPath 流程查看表单
|
||||
*/
|
||||
public String getFormCustomViewPath(String formCustomCreatePath);
|
||||
/**
|
||||
* 通过 processKey 查询 FormProcessMappingDO的list
|
||||
*
|
||||
* @param processKey 流程信息的键
|
||||
* @return List<FormProcessMappingDO> 流程表单配置list
|
||||
*/
|
||||
public List<FormProcessMappingDO> getListByProcessKey(String processKey);
|
||||
}
|
||||
|
@ -71,22 +71,22 @@ public class FormProcessMappingServiceImpl implements FormProcessMappingService
|
||||
return formProcessMappingMapper.selectPage(pageReqVO);
|
||||
}
|
||||
@Override
|
||||
public String selectFormViewPathByProcessKey(String processKey) {
|
||||
public List<String> selectFormViewPathByProcessKey(String processKey) {
|
||||
if (StringUtils.isBlank(processKey)) {
|
||||
throw exception(PROCESS_KEY_NOT_PROVIDED); // 可自定义异常
|
||||
}
|
||||
String formCustomViewPath = formProcessMappingMapper.selectFormViewPathByProcessKey(processKey);
|
||||
List<String> formCustomViewPath = formProcessMappingMapper.selectFormViewPathByProcessKey(processKey);
|
||||
if (formCustomViewPath == null) {
|
||||
throw exception(FORM_PROCESS_MAPPING_NOT_EXISTS); // 如果不存在对应记录
|
||||
}
|
||||
return formCustomViewPath;
|
||||
}
|
||||
@Override
|
||||
public String selectFormCreatePathByProcessKey(String processKey) {
|
||||
public List<String> selectFormCreatePathByProcessKey(String processKey) {
|
||||
if (StringUtils.isBlank(processKey)) {
|
||||
throw exception(PROCESS_KEY_NOT_PROVIDED); // 可自定义异常
|
||||
}
|
||||
String formCustomViewPath = formProcessMappingMapper.selectFormCreatePathByProcessKey(processKey);
|
||||
List<String> formCustomViewPath = formProcessMappingMapper.selectFormCreatePathByProcessKey(processKey);
|
||||
if (formCustomViewPath == null) {
|
||||
throw exception(FORM_PROCESS_MAPPING_NOT_EXISTS); // 如果不存在对应记录
|
||||
}
|
||||
@ -104,4 +104,11 @@ public class FormProcessMappingServiceImpl implements FormProcessMappingService
|
||||
}
|
||||
return processKey;
|
||||
}
|
||||
public String getFormCustomViewPath(String formCustomCreatePath) {
|
||||
return formProcessMappingMapper.selectFormCustomViewPath(formCustomCreatePath);
|
||||
}
|
||||
|
||||
public List<FormProcessMappingDO> getListByProcessKey(String processKey) {
|
||||
return formProcessMappingMapper.selectListByProcessKey(processKey);
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +93,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
||||
todo.setTitle( createReqVO.getKnowTitle() );
|
||||
todo.setProcessKey( PROCESS_KEY );
|
||||
todo.setProcessInstanceId( processInstanceId );
|
||||
todo.setFormCustomCreatePath( createReqVO.getCurfullpath() );
|
||||
todo.setStatus( 0 );
|
||||
processInstanceTodoMapper.insert(todo);
|
||||
|
||||
|
@ -46,14 +46,20 @@ public interface ProcessInstanceTodoService {
|
||||
* @return 流程分类 Map
|
||||
*/
|
||||
default Map<String, ProcessInstanceTodoDO> getTitleMap(Collection<String> ids) {
|
||||
return convertMap(getTitleListByProcessinstandid(ids), ProcessInstanceTodoDO::getProcessInstanceId);
|
||||
return convertMap(getListByProcessinstandid(ids), ProcessInstanceTodoDO::getProcessInstanceId);
|
||||
}
|
||||
/**
|
||||
* 获得流程实例标题,基于指定流程实例id
|
||||
*
|
||||
* @return 流程分类列表
|
||||
*/
|
||||
public List<ProcessInstanceTodoDO> getTitleListByProcessinstandid(Collection<String> ids);
|
||||
public List<ProcessInstanceTodoDO> getListByProcessinstandid(Collection<String> ids);
|
||||
/**
|
||||
* 获得流程实例的业务表单,基于指定流程实例id
|
||||
*
|
||||
* @return 流程分类列表
|
||||
*/
|
||||
public String getFormCustomCreatePath(String processInstanceId);
|
||||
/**
|
||||
* 获得BPM 流程实例信息
|
||||
*
|
||||
|
@ -72,10 +72,12 @@ public class ProcessInstanceTodoServiceImpl implements ProcessInstanceTodoServic
|
||||
public PageResult<ProcessInstanceTodoDO> getProcessInstanceTodoPage(ProcessInstanceTodoPageReqVO pageReqVO) {
|
||||
return processInstanceTodoMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
public String getFormCustomCreatePath(String processInstanceId) {
|
||||
return processInstanceTodoMapper.selectFormCustomCreatePathByProcessInstanceId(processInstanceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProcessInstanceTodoDO> getTitleListByProcessinstandid(Collection<String> ids) {
|
||||
public List<ProcessInstanceTodoDO> getListByProcessinstandid(Collection<String> ids) {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
@ -28,5 +28,4 @@ public class homeDataPermissionConfiguration {
|
||||
rule.addUserColumn(QjglDO.class, "user_id");
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,13 +48,13 @@ spring:
|
||||
master:
|
||||
url: jdbc:mysql://192.168.1.28:3306/yudao-vue?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://192.168.1.28:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:mysql://192.168.45.131:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true;useUnicode=true;characterEncoding=utf-8 # SQLServer 连接的示例
|
||||
# url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
||||
# url: jdbc:kingbase8://127.0.0.1:54321/test # 人大金仓 KingbaseES 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例 P@ss1pch
|
||||
username: root
|
||||
password: P@ss1pch
|
||||
# username: sa # SQL Server 连接的示例
|
||||
|
Loading…
Reference in New Issue
Block a user