Merge remote-tracking branch 'origin/master'
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:
commit
fee01d624f
@ -91,5 +91,12 @@ public class FormProcessMappingController {
|
||||
ExcelUtils.write(response, "BPM 表单工作流对应.xls", "数据", FormProcessMappingRespVO.class,
|
||||
BeanUtils.toBean(list, FormProcessMappingRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/get-form-view-path")
|
||||
public CommonResult<String> getFormViewPath(@RequestParam("processKey") String processKey) {
|
||||
return success(formProcessMappingService.selectFormViewPathByProcessKey(processKey));
|
||||
}
|
||||
@GetMapping("/get-form-create-path")
|
||||
public CommonResult<String> getFormCreatePath(@RequestParam("processKey") String processKey) {
|
||||
return success(formProcessMappingService.selectFormCreatePathByProcessKey(processKey));
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,9 @@ public interface FormProcessMappingMapper extends BaseMapperX<FormProcessMapping
|
||||
.betweenIfPresent(FormProcessMappingDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(FormProcessMappingDO::getId));
|
||||
}
|
||||
@Select("SELECT form_custom_view_path FROM bpm_process_definition_info WHERE process_key = #{processKey}")
|
||||
@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_create_path FROM bpm_form_process_mapping WHERE process_key = #{processKey}")
|
||||
String selectFormCreatePathByProcessKey(@Param("processKey") String processKey);
|
||||
}
|
||||
|
@ -55,7 +55,14 @@ public interface FormProcessMappingService {
|
||||
* 通过 processKey 查询 formViewPath
|
||||
*
|
||||
* @param processKey 流程信息的键
|
||||
* @return formCustomCreatePath 表单的提交路径
|
||||
* @return formCustomViewPath 表单的提交路径
|
||||
*/
|
||||
String selectFormViewPathByProcessKey(String processKey);
|
||||
/**
|
||||
* 通过 processKey 查询 formViewPath
|
||||
*
|
||||
* @param processKey 流程信息的键
|
||||
* @return formCustomCreatePath 表单的提交路径
|
||||
*/
|
||||
String selectFormCreatePathByProcessKey(String processKey);
|
||||
}
|
||||
|
@ -75,10 +75,21 @@ public class FormProcessMappingServiceImpl implements FormProcessMappingService
|
||||
if (StringUtils.isBlank(processKey)) {
|
||||
throw exception(PROCESS_KEY_NOT_PROVIDED); // 可自定义异常
|
||||
}
|
||||
String formCustomCreatePath = formProcessMappingMapper.selectFormViewPathByProcessKey(processKey);
|
||||
if (formCustomCreatePath == null) {
|
||||
String formCustomViewPath = formProcessMappingMapper.selectFormViewPathByProcessKey(processKey);
|
||||
if (formCustomViewPath == null) {
|
||||
throw exception(FORM_PROCESS_MAPPING_NOT_EXISTS); // 如果不存在对应记录
|
||||
}
|
||||
return formCustomCreatePath;
|
||||
return formCustomViewPath;
|
||||
}
|
||||
@Override
|
||||
public String selectFormCreatePathByProcessKey(String processKey) {
|
||||
if (StringUtils.isBlank(processKey)) {
|
||||
throw exception(PROCESS_KEY_NOT_PROVIDED); // 可自定义异常
|
||||
}
|
||||
String formCustomViewPath = formProcessMappingMapper.selectFormCreatePathByProcessKey(processKey);
|
||||
if (formCustomViewPath == null) {
|
||||
throw exception(FORM_PROCESS_MAPPING_NOT_EXISTS); // 如果不存在对应记录
|
||||
}
|
||||
return formCustomViewPath;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user