This commit is contained in:
wangliwen 2022-12-15 13:52:34 +08:00
parent 022b0d15e3
commit 274cbd9de8
2 changed files with 5 additions and 0 deletions

View File

@ -141,6 +141,7 @@ public class ActTaskController {
if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) { if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) {
List<Long> useIds = sysRoleUserService.getUserIdListByRoleId(Long.parseLong(defaultAssigneeRoleId)); List<Long> useIds = sysRoleUserService.getUserIdListByRoleId(Long.parseLong(defaultAssigneeRoleId));
if (useIds.stream().filter(index -> index == SecurityUser.getUserId()).findFirst().isPresent()) { // 拥有会客厅审核权限 if (useIds.stream().filter(index -> index == SecurityUser.getUserId()).findFirst().isPresent()) { // 拥有会客厅审核权限
logger.info(SecurityUser.getUserId() + " 拥有会客厅权限");
int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state = 1;", Integer.class); int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state = 1;", Integer.class);
page.setTotal(page.getTotal() + meetingroom_book); page.setTotal(page.getTotal() + meetingroom_book);
Integer limit = 10; Integer limit = 10;

View File

@ -38,6 +38,8 @@ import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.history.HistoricProcessInstanceQuery; import org.activiti.engine.history.HistoricProcessInstanceQuery;
import org.activiti.engine.task.Task; import org.activiti.engine.task.Task;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
@ -63,6 +65,7 @@ import java.util.stream.Collectors;
@RequestMapping("/act/his") @RequestMapping("/act/his")
@Api(tags = "流程历史") @Api(tags = "流程历史")
public class HistoryController { public class HistoryController {
private static final Logger logger = LoggerFactory.getLogger(HistoryController.class);
@Autowired @Autowired
protected HistoryService historyService_; protected HistoryService historyService_;
@ -143,6 +146,7 @@ public class HistoryController {
List<Long> useIds = sysRoleUserService.getUserIdListByRoleId(Long.parseLong(defaultAssigneeRoleId)); List<Long> useIds = sysRoleUserService.getUserIdListByRoleId(Long.parseLong(defaultAssigneeRoleId));
if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) { if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) {
if (useIds.stream().filter(index -> index == SecurityUser.getUserId()).findFirst().isPresent()) { // 拥有会客厅审核权限 if (useIds.stream().filter(index -> index == SecurityUser.getUserId()).findFirst().isPresent()) { // 拥有会客厅审核权限
logger.info(SecurityUser.getUserId() + " 拥有会客厅权限");
int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state != 1;", Integer.class); int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state != 1;", Integer.class);
page.setTotal(page.getTotal() + meetingroom_book); page.setTotal(page.getTotal() + meetingroom_book);
Integer limit = 10; Integer limit = 10;