update 新增根据业务id查询流程实例详细信息
This commit is contained in:
parent
ab8cd10983
commit
d9c0d420a7
@ -117,12 +117,10 @@ public class FlwCategoryController extends BaseController {
|
||||
return toAjax(flwCategoryService.deleteWithValidById(categoryId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取流程分类树列表
|
||||
*
|
||||
* @param categoryBo 参数
|
||||
* @param categoryBo 流程分类
|
||||
*/
|
||||
@GetMapping("/categoryTree")
|
||||
public R<List<Tree<Long>>> categoryTree(FlowCategoryBo categoryBo) {
|
||||
|
@ -55,6 +55,16 @@ public class FlwInstanceController extends BaseController {
|
||||
return flwInstanceService.selectFinishInstanceList(flowInstanceBo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据业务id查询流程实例详细信息
|
||||
*
|
||||
* @param businessId 业务id
|
||||
*/
|
||||
@GetMapping("/getInfo/{businessId}")
|
||||
public R<FlowInstanceVo> getInfo(@PathVariable Long businessId) {
|
||||
return R.ok(flwInstanceService.queryByBusinessId(businessId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照业务id删除流程实例
|
||||
*
|
||||
|
@ -21,8 +21,8 @@ public interface IFlwInstanceService {
|
||||
/**
|
||||
* 分页查询正在运行的流程实例
|
||||
*
|
||||
* @param flowInstanceBo 参数
|
||||
* @param pageQuery 分页
|
||||
* @param flowInstanceBo 流程实例
|
||||
* @param pageQuery 分页
|
||||
* @return 结果
|
||||
*/
|
||||
TableDataInfo<FlowInstanceVo> selectRunningInstanceList(FlowInstanceBo flowInstanceBo, PageQuery pageQuery);
|
||||
@ -30,12 +30,20 @@ public interface IFlwInstanceService {
|
||||
/**
|
||||
* 分页查询已结束的流程实例
|
||||
*
|
||||
* @param flowInstanceBo 参数
|
||||
* @param pageQuery 分页
|
||||
* @param flowInstanceBo 流程实例
|
||||
* @param pageQuery 分页
|
||||
* @return 结果
|
||||
*/
|
||||
TableDataInfo<FlowInstanceVo> selectFinishInstanceList(FlowInstanceBo flowInstanceBo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 根据业务id查询流程实例详细信息
|
||||
*
|
||||
* @param businessId 业务id
|
||||
* @return 结果
|
||||
*/
|
||||
FlowInstanceVo queryByBusinessId(Long businessId);
|
||||
|
||||
/**
|
||||
* 按照业务id查询流程实例
|
||||
*
|
||||
@ -87,7 +95,7 @@ public interface IFlwInstanceService {
|
||||
/**
|
||||
* 获取当前登陆人发起的流程实例
|
||||
*
|
||||
* @param instanceBo 参数
|
||||
* @param instanceBo 流程实例
|
||||
* @param pageQuery 分页
|
||||
* @return 结果
|
||||
*/
|
||||
@ -144,7 +152,7 @@ public interface IFlwInstanceService {
|
||||
/**
|
||||
* 作废流程
|
||||
*
|
||||
* @param bo 参数
|
||||
* @param bo 流程实例
|
||||
* @return 结果
|
||||
*/
|
||||
boolean processInvalid(FlowInvalidBo bo);
|
||||
|
@ -95,6 +95,26 @@ public class FlwInstanceServiceImpl implements IFlwInstanceService {
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据业务id查询流程实例详细信息
|
||||
*
|
||||
* @param businessId 业务id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public FlowInstanceVo queryByBusinessId(Long businessId) {
|
||||
FlowInstance instance = this.selectInstByBusinessId(String.valueOf(businessId));
|
||||
FlowInstanceVo instanceVo = BeanUtil.toBean(instance, FlowInstanceVo.class);
|
||||
Definition definition = defService.getById(instanceVo.getDefinitionId());
|
||||
instanceVo.setFlowName(definition.getFlowName());
|
||||
instanceVo.setFlowCode(definition.getFlowCode());
|
||||
instanceVo.setVersion(definition.getVersion());
|
||||
instanceVo.setFormCustom(definition.getFormCustom());
|
||||
instanceVo.setFormPath(definition.getFormPath());
|
||||
instanceVo.setCategory(definition.getCategory());
|
||||
return instanceVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用查询条件
|
||||
*
|
||||
|
@ -25,7 +25,6 @@
|
||||
fd.flow_name,
|
||||
fd.flow_code,
|
||||
fd.version,
|
||||
fi.create_by,
|
||||
fd.form_custom,
|
||||
fd.form_path,
|
||||
fd.category
|
||||
|
Loading…
x
Reference in New Issue
Block a user