|
@@ -69,15 +69,6 @@ public class ItdmRunFlowPathController extends JeecgController<ItdmRunFlowPath,
|
|
|
private SysBaseApiImpl sysBaseApi;
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 分页列表查询
|
|
|
- *
|
|
|
- * @param itdmRunFlowPath
|
|
|
- * @param pageNo
|
|
|
- * @param pageSize
|
|
|
- * @param req
|
|
|
- * @return
|
|
|
- */
|
|
|
//@AutoLog(value = "运行流程表-分页列表查询")
|
|
|
@ApiOperation(value = "运行流程表-分页列表查询", notes = "运行流程表-分页列表查询")
|
|
|
@GetMapping(value = "/list")
|
|
@@ -88,6 +79,30 @@ public class ItdmRunFlowPathController extends JeecgController<ItdmRunFlowPath,
|
|
|
QueryWrapper<ItdmRunFlowPath> queryWrapper = QueryGenerator.initQueryWrapper(itdmRunFlowPath, req.getParameterMap());
|
|
|
Page<ItdmRunFlowPath> page = new Page<ItdmRunFlowPath>(pageNo, pageSize);
|
|
|
IPage<ItdmRunFlowPath> pageList = itdmRunFlowPathService.page(page, queryWrapper);
|
|
|
+ pageList.setRecords(pageList.getRecords().stream().peek(i -> {
|
|
|
+
|
|
|
+ ItdmRunFlowPathStep select = itdmRunFlowPathStepService.getBaseMapper().selectOne(Wrappers.lambdaQuery(ItdmRunFlowPathStep.class)
|
|
|
+ .eq(ItdmRunFlowPathStep::getRunFlowPath, i.getId())
|
|
|
+ .eq(ItdmRunFlowPathStep::getFlowPathSetp, i.getDqSetp())
|
|
|
+
|
|
|
+ );
|
|
|
+
|
|
|
+ LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ List<String> strings = StringUtils.isNotBlank(select.getUserIds()) ?
|
|
|
+ Arrays.stream(select.getUserIds().split(",")).collect(Collectors.toList()) :
|
|
|
+ new ArrayList<>();
|
|
|
+ List<String> roleIds = sysBaseApi.getRoleIdsByUsername(user.getUsername());
|
|
|
+
|
|
|
+ i.setIsokview(strings.contains(user.getUsername()) || roleIds.contains(select.getRoleId()));
|
|
|
+
|
|
|
+
|
|
|
+ boolean x = iItdmFlowPathStepService.getBaseMapper().exists(Wrappers.lambdaQuery(ItdmFlowPathStep.class)
|
|
|
+ .eq(ItdmFlowPathStep::getId, i.getDqSetp())
|
|
|
+ .eq(ItdmFlowPathStep::getSort, "1")
|
|
|
+
|
|
|
+ );
|
|
|
+ i.setIsbohuiview(!x && (strings.contains(user.getUsername()) || roleIds.contains(select.getRoleId())));
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
|