update 流程详情查询鉴权

This commit is contained in:
liao
2023-11-23 10:59:41 +08:00
parent df0c5535d0
commit cd8deaf96b
9 changed files with 34 additions and 16 deletions
@@ -38,11 +38,12 @@ public class ProcessFbEntryChangeController extends JeroController<ProcessFbEntr
@AutoLog(value = "标准法规入库_变更流程-查询流程信息") @AutoLog(value = "标准法规入库_变更流程-查询流程信息")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "draftId", value = "草稿id"), @ApiImplicitParam(name = "draftId", value = "草稿id"),
@ApiImplicitParam(name = "processInstanceId", value = "流程实例id") @ApiImplicitParam(name = "processInstanceId", value = "流程实例id"),
@ApiImplicitParam(name = "taskId", value = "任务id")
}) })
@ApiOperation("标准法规入库_变更流程-查询流程信息") @ApiOperation("标准法规入库_变更流程-查询流程信息")
public Result<ProcessInfoVO<ProcessFbEntryChange>> queryProcessInfoVO(String draftId, String processInstanceId){ public Result<ProcessInfoVO<ProcessFbEntryChange>> queryProcessInfoVO(String draftId, String processInstanceId, String taskId){
ProcessInfoVO<ProcessFbEntryChange> processInfoVO = processFbEntryChangeService.queryProcessInfoVO(draftId, processInstanceId); ProcessInfoVO<ProcessFbEntryChange> processInfoVO = processFbEntryChangeService.queryProcessInfoVO(draftId, processInstanceId, taskId);
return Result.OK(processInfoVO); return Result.OK(processInfoVO);
} }
@@ -39,11 +39,12 @@ public class ProcessFbStandardPurchaseController extends JeroController<ProcessF
@AutoLog(value = "法规采购流程表-查询流程信息") @AutoLog(value = "法规采购流程表-查询流程信息")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "draftId", value = "草稿id"), @ApiImplicitParam(name = "draftId", value = "草稿id"),
@ApiImplicitParam(name = "processInstanceId", value = "流程实例id") @ApiImplicitParam(name = "processInstanceId", value = "流程实例id"),
@ApiImplicitParam(name = "taskId", value = "任务id")
}) })
@ApiOperation("法规采购流程表-查询流程信息") @ApiOperation("法规采购流程表-查询流程信息")
public Result<ProcessInfoVO<List<ProcessFbStandardPurchase>>> queryProcessInfoVO(String draftId, String processInstanceId){ public Result<ProcessInfoVO<List<ProcessFbStandardPurchase>>> queryProcessInfoVO(String draftId, String processInstanceId, String taskId){
ProcessInfoVO<List<ProcessFbStandardPurchase>> processInfoVO = processFbStandardPurchaseService.queryProcessInfoVO(draftId, processInstanceId); ProcessInfoVO<List<ProcessFbStandardPurchase>> processInfoVO = processFbStandardPurchaseService.queryProcessInfoVO(draftId, processInstanceId, taskId);
return Result.OK(processInfoVO); return Result.OK(processInfoVO);
} }
@@ -58,5 +58,5 @@ public interface IProcessFbEntryChangeService extends IService<ProcessFbEntryCha
* @Date: 2023/11/8 11:12 * @Date: 2023/11/8 11:12
* @Description: 查询流程信息 * @Description: 查询流程信息
**/ **/
ProcessInfoVO<ProcessFbEntryChange> queryProcessInfoVO(String draftId, String processInstanceId); ProcessInfoVO<ProcessFbEntryChange> queryProcessInfoVO(String draftId, String processInstanceId, String taskId);
} }
@@ -20,7 +20,7 @@ public interface IProcessFbStandardPurchaseService extends IService<ProcessFbSta
* @Date: 2023/11/14 14:07 * @Date: 2023/11/14 14:07
* @Description: 查询流程信息 * @Description: 查询流程信息
**/ **/
ProcessInfoVO<List<ProcessFbStandardPurchase>> queryProcessInfoVO(String draftId, String processInstanceId); ProcessInfoVO<List<ProcessFbStandardPurchase>> queryProcessInfoVO(String draftId, String processInstanceId, String taskId);
/** /**
* @Author: liao * @Author: liao
@@ -95,7 +95,7 @@ public interface IProcessHandleService {
* @Date: 2023/11/8 11:16 * @Date: 2023/11/8 11:16
* @Description: 查询流程信息 * @Description: 查询流程信息
**/ **/
ProcessInfoVO queryProcessInfoVO(String draftId, String processInstanceId); ProcessInfoVO queryProcessInfoVO(String draftId, String processInstanceId, String taskId);
/** /**
* @Author: liao * @Author: liao
@@ -217,8 +217,8 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
* @Description: 查询流程信息 * @Description: 查询流程信息
**/ **/
@Override @Override
public ProcessInfoVO<ProcessFbEntryChange> queryProcessInfoVO(String draftId, String processInstanceId) { public ProcessInfoVO<ProcessFbEntryChange> queryProcessInfoVO(String draftId, String processInstanceId, String taskId) {
ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId); ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId, taskId);
ProcessFbEntryChange processFbEntryChange = getById(processInfoVO.getBusinessId()); ProcessFbEntryChange processFbEntryChange = getById(processInfoVO.getBusinessId());
Map<String, Object> map = JSON.parseObject(processFbEntryChange.getBusinessJson(), Map.class); Map<String, Object> map = JSON.parseObject(processFbEntryChange.getBusinessJson(), Map.class);
@@ -264,12 +264,18 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
**/ **/
@Override @Override
public ProcessInfoVO<ProcessFbStandardConsultationVO> queryProcessInfoVO(String draftId, String processInstanceId, String taskId) { public ProcessInfoVO<ProcessFbStandardConsultationVO> queryProcessInfoVO(String draftId, String processInstanceId, String taskId) {
ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId); ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId, taskId);
ProcessFbStandardConsultationVO processFbStandardConsultationVO = new ProcessFbStandardConsultationVO(); ProcessFbStandardConsultationVO processFbStandardConsultationVO = new ProcessFbStandardConsultationVO();
ProcessFbStandardConsultation processFbStandardConsultation = getById(processInfoVO.getBusinessId()); String businessId = processInfoVO.getBusinessId();
ProcessFbStandardConsultation processFbStandardConsultation = getById(businessId);
processFbStandardConsultationVO.setProcessFbStandardConsultation(processFbStandardConsultation); // 业务基本信息 processFbStandardConsultationVO.setProcessFbStandardConsultation(processFbStandardConsultation); // 业务基本信息
LambdaQueryWrapper<ProcessFbConsultationList> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ProcessFbConsultationList::getBusinessId, businessId);
List<ProcessFbConsultationList> consultationLists = processFbConsultationListService.list(queryWrapper);
processFbStandardConsultationVO.setProcessFbConsultationLists(consultationLists);
processInfoVO.setBusinessInfoDTO(processFbStandardConsultationVO); processInfoVO.setBusinessInfoDTO(processFbStandardConsultationVO);
return processInfoVO; return processInfoVO;
} }
@@ -54,8 +54,8 @@ public class ProcessFbStandardPurchaseServiceImpl extends ServiceImpl<ProcessFbS
* @Description: 查询流程信息 * @Description: 查询流程信息
**/ **/
@Override @Override
public ProcessInfoVO<List<ProcessFbStandardPurchase>> queryProcessInfoVO(String draftId, String processInstanceId) { public ProcessInfoVO<List<ProcessFbStandardPurchase>> queryProcessInfoVO(String draftId, String processInstanceId, String taskId) {
ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId); ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId, taskId);
LambdaQueryWrapper<ProcessFbStandardPurchase> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ProcessFbStandardPurchase> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ProcessFbStandardPurchase::getBusinessId, processInfoVO.getBusinessId()); queryWrapper.eq(ProcessFbStandardPurchase::getBusinessId, processInfoVO.getBusinessId());
@@ -331,7 +331,14 @@ public class ProcessHandleServiceImpl implements IProcessHandleService {
* @Description: 查询流程信息 * @Description: 查询流程信息
**/ **/
@Override @Override
public ProcessInfoVO queryProcessInfoVO(String draftId, String processInstanceId) { public ProcessInfoVO queryProcessInfoVO(String draftId, String processInstanceId, String taskId) {
if (StringUtils.isBlank(draftId) && StringUtils.isBlank(taskId)) {
throw new JeroBootException(ResultCommon.NO_PERMISSION);
}
if (StringUtils.isNotBlank(taskId)) {
isMyTask(taskId);
}
ProcessInfoVO processInfoVO = new ProcessInfoVO(); ProcessInfoVO processInfoVO = new ProcessInfoVO();
// 流程信息 // 流程信息
BasicProcessInfoDTO basicProcessInfoDTO = new BasicProcessInfoDTO(); BasicProcessInfoDTO basicProcessInfoDTO = new BasicProcessInfoDTO();
@@ -356,6 +363,9 @@ public class ProcessHandleServiceImpl implements IProcessHandleService {
// 审批信息 // 审批信息
if (StringUtils.isNotBlank(draftId)) { if (StringUtils.isNotBlank(draftId)) {
ProcessDraft processDraft = processDraftService.getById(draftId); ProcessDraft processDraft = processDraftService.getById(draftId);
if (!CurrentUserUtil.getId().equals(processDraft.getUserId())) {
throw new JeroBootException(ResultCommon.NO_PERMISSION);
}
if (!Objects.isNull(processDraft)) { if (!Objects.isNull(processDraft)) {
basicTaskInfoDTO.setTaskId(processDraft.getTaskId()); basicTaskInfoDTO.setTaskId(processDraft.getTaskId());
basicTaskInfoDTO.setHandleText(processDraft.getHandleText()); basicTaskInfoDTO.setHandleText(processDraft.getHandleText());