|
|
@ -52,6 +52,7 @@ import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author ysj |
|
|
|
* @author ysj |
|
|
@ -272,7 +273,26 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<AccessTicketPageRspDTO> pageCondition(AccessTicketPageReqDTO param, Query query) { |
|
|
|
public IPage<AccessTicketPageRspDTO> pageCondition(AccessTicketPageReqDTO param, Query query) { |
|
|
|
return super.baseMapper.pageCondition(Condition.getPage(query),param); |
|
|
|
IPage<AccessTicketPageRspDTO> ipage = super.baseMapper.pageCondition(Condition.getPage(query),param); |
|
|
|
|
|
|
|
if(CollectionUtil.isEmpty(ipage.getRecords())){ |
|
|
|
|
|
|
|
return ipage; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<AccessTicketPageRspDTO> records = ipage.getRecords(); |
|
|
|
|
|
|
|
ipage.setRecords(records.stream().peek(record->{ |
|
|
|
|
|
|
|
List<User> users = new ArrayList<>(); |
|
|
|
|
|
|
|
Arrays.stream(record.getNextStepExecutor().split(",")).forEach(account->{ |
|
|
|
|
|
|
|
User user = UserCache.getUser(Long.valueOf(account)); |
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(user)){ |
|
|
|
|
|
|
|
users.add(user); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if(CollectionUtil.isEmpty(users)){ |
|
|
|
|
|
|
|
record.setExecutors(new ArrayList<>()); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
record.setExecutors(users); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).collect(Collectors.toList())); |
|
|
|
|
|
|
|
return ipage; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -537,27 +557,4 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc |
|
|
|
task.setTaskIncomplete((int) entitys.stream().filter(o->!"流程结束".equals(o.getTaskName())).count()); |
|
|
|
task.setTaskIncomplete((int) entitys.stream().filter(o->!"流程结束".equals(o.getTaskName())).count()); |
|
|
|
return task; |
|
|
|
return task; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 阶段执行人查询 |
|
|
|
|
|
|
|
* @param processInstanceId |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public List<User> stageExecutor(String processInstanceId) { |
|
|
|
|
|
|
|
AccessTicketEntity entity = this.getOne(Wrappers.<AccessTicketEntity>lambdaQuery() |
|
|
|
|
|
|
|
.eq(AccessTicketEntity::getProcessInstanceId,processInstanceId) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if(ObjectUtil.isEmpty(entity) || StringUtils.isEmpty(entity.getNextStepExecutor())){ |
|
|
|
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<User> users = new ArrayList<>(); |
|
|
|
|
|
|
|
Arrays.stream(entity.getNextStepExecutor().split(",")).forEach(account->{ |
|
|
|
|
|
|
|
User user = UserCache.getUser(Long.valueOf(account)); |
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(user)){ |
|
|
|
|
|
|
|
users.add(user); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return users; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |