修复flow查询数据不正确问题

dev_xd
lj7788 2025-08-27 12:29:56 +08:00
parent 1971dec0e6
commit 16bbcdc3e3
2 changed files with 12 additions and 8 deletions

View File

@ -166,6 +166,7 @@ public class FlowBusinessKeyController extends BaseController {
@GetMapping(value = "/myAwaitFlowTaskList") @GetMapping(value = "/myAwaitFlowTaskList")
public TableDataInfo myAwaitFlowTaskList(FlowTaskEntity flowTaskEntity) { public TableDataInfo myAwaitFlowTaskList(FlowTaskEntity flowTaskEntity) {
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
Long projectId=loginUser.getSysUser().getActiveProjectId();
if(StringUtils.isNotEmpty(flowTaskEntity.getStartProId())){ if(StringUtils.isNotEmpty(flowTaskEntity.getStartProId())){
// 小程序查询会走这里 // 小程序查询会走这里
flowTaskEntity.setAssigneeId(SecurityUtils.getUserId()); flowTaskEntity.setAssigneeId(SecurityUtils.getUserId());
@ -179,21 +180,21 @@ public class FlowBusinessKeyController extends BaseController {
}else{ }else{
if(SecurityUtils.isAdmin(loginUser.getUserid())){ if(SecurityUtils.isAdmin(loginUser.getUserid())){
// 超管查询所有申请... // 超管查询所有申请...
if(Objects.nonNull(loginUser.getProjectDeptId())){ if(Objects.nonNull(projectId)){
flowTaskEntity.setStartComId(Convert.toStr(loginUser.getProjectDeptId())); flowTaskEntity.setStartComId(Convert.toStr(projectId));
} }
if(Objects.nonNull(loginUser.getProjectId())){ if(Objects.nonNull(projectId)){
flowTaskEntity.setStartProId(Convert.toStr(loginUser.getProjectId())); flowTaskEntity.setStartProId(Convert.toStr(projectId));
} }
}else if(SecurityUtils.isGSAdmin()){ }else if(SecurityUtils.isGSAdmin()){
// 公司管理员查询公司内的所有申请... // 公司管理员查询公司内的所有申请...
flowTaskEntity.setStartComId(Convert.toStr(loginUser.getProjectDeptId())); flowTaskEntity.setStartComId(Convert.toStr(loginUser.getProjectDeptId()));
if(Objects.nonNull(loginUser.getProjectId())){ if(Objects.nonNull(projectId)){
flowTaskEntity.setStartProId(Convert.toStr(loginUser.getProjectId())); flowTaskEntity.setStartProId(Convert.toStr(projectId));
} }
}else if(SecurityUtils.isXMAdmin()){ }else if(SecurityUtils.isXMAdmin()){
// 公司管理员查询公司内的所有申请... // 公司管理员查询公司内的所有申请...
flowTaskEntity.setStartProId(Convert.toStr(loginUser.getProjectId())); flowTaskEntity.setStartProId(Convert.toStr(projectId));
}else{ }else{
flowTaskEntity.setAssigneeId(SecurityUtils.getUserId()); flowTaskEntity.setAssigneeId(SecurityUtils.getUserId());
if(loginUser.getSysUser().getRoles().size()>0){ if(loginUser.getSysUser().getRoles().size()>0){
@ -218,6 +219,9 @@ public class FlowBusinessKeyController extends BaseController {
public TableDataInfo myFinishedFlowTaskList(FlowTaskEntity flowTaskEntity) { public TableDataInfo myFinishedFlowTaskList(FlowTaskEntity flowTaskEntity) {
startPage(); startPage();
flowTaskEntity.setAssigneeId(SecurityUtils.getUserId()); flowTaskEntity.setAssigneeId(SecurityUtils.getUserId());
LoginUser loginUser = SecurityUtils.getLoginUser();
Long projectId=loginUser.getSysUser().getActiveProjectId();
flowTaskEntity.setStartProId(Convert.toStr(projectId));
return getDataTable(flowBusinessKeyService.selectMyFinishedFlowTask(flowTaskEntity)); return getDataTable(flowBusinessKeyService.selectMyFinishedFlowTask(flowTaskEntity));
} }

View File

@ -58,7 +58,7 @@
</appender> </appender>
<!-- 系统模块日志级别控制 --> <!-- 系统模块日志级别控制 -->
<logger name="com.yanzhu" level="info" /> <logger name="com.yanzhu" level="debug" />
<!-- Spring日志级别控制 --> <!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" /> <logger name="org.springframework" level="warn" />