Merge branch 'dev'
This commit is contained in:
commit
11ed5a0ba7
|
@ -16,6 +16,7 @@ import io.renren.modules.audit_team.service.SysAuditTeamService;
|
||||||
import io.renren.modules.security.user.SecurityUser;
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.renren.modules.security.user.UserDetail;
|
import io.renren.modules.security.user.UserDetail;
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
|
import io.renren.modules.sys.service.SysRoleUserService;
|
||||||
import io.renren.modules.sys.service.SysUserService;
|
import io.renren.modules.sys.service.SysUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
@ -29,8 +30,8 @@ import org.activiti.engine.task.TaskQuery;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.dao.DataAccessException;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -73,6 +74,12 @@ public class ActTaskController {
|
||||||
@Value("#{new Boolean(${auditteam.enable})}")
|
@Value("#{new Boolean(${auditteam.enable})}")
|
||||||
private Boolean auditteam; // 是否进行审核组
|
private Boolean auditteam; // 是否进行审核组
|
||||||
|
|
||||||
|
@Value("${big_date.assignee_meet_role_id}")
|
||||||
|
private String defaultAssigneeRoleId; // 会客厅审核人角色
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRoleUserService sysRoleUserService;
|
||||||
|
|
||||||
private JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
private JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,6 +139,8 @@ 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));
|
||||||
|
if (useIds.stream().filter(index -> index == SecurityUser.getUserId()).findFirst().isPresent()) { // 拥有会客厅审核权限
|
||||||
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;
|
||||||
|
@ -162,6 +171,7 @@ public class ActTaskController {
|
||||||
page.setList(temp);
|
page.setList(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return new Result<PageData<TaskDTO>>().ok(page);
|
return new Result<PageData<TaskDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,12 @@ import io.renren.modules.resource.dto.ResourceDTO;
|
||||||
import io.renren.modules.resource.service.ResourceService;
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
||||||
import io.renren.modules.resourceMountApply.service.TResourceMountApplyService;
|
import io.renren.modules.resourceMountApply.service.TResourceMountApplyService;
|
||||||
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.renren.modules.sys.dao.SysUserDao;
|
import io.renren.modules.sys.dao.SysUserDao;
|
||||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
import io.renren.modules.sys.service.SysDeptService;
|
import io.renren.modules.sys.service.SysDeptService;
|
||||||
|
import io.renren.modules.sys.service.SysRoleUserService;
|
||||||
import io.renren.modules.sys.service.SysUserService;
|
import io.renren.modules.sys.service.SysUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
@ -37,6 +39,7 @@ 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.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -89,10 +92,15 @@ public class HistoryController {
|
||||||
private SysDeptService sysDeptService;
|
private SysDeptService sysDeptService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private JdbcTemplate jdbcTemplate;
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
@Autowired
|
||||||
|
private SysRoleUserService sysRoleUserService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserDao sysUserDao;
|
private SysUserDao sysUserDao;
|
||||||
|
|
||||||
|
@Value("${big_date.assignee_meet_role_id}")
|
||||||
|
private String defaultAssigneeRoleId; // 会客厅审核人角色
|
||||||
|
|
||||||
@GetMapping("getInstImage")
|
@GetMapping("getInstImage")
|
||||||
@ApiOperation(value = "获取流程活动图", produces = "application/octet-stream")
|
@ApiOperation(value = "获取流程活动图", produces = "application/octet-stream")
|
||||||
@LogOperation("获取流程活动图")
|
@LogOperation("获取流程活动图")
|
||||||
|
@ -132,7 +140,9 @@ public class HistoryController {
|
||||||
params.replace("processDefinitionKey", params.get("processDefinitionKey").toString() + "%");
|
params.replace("processDefinitionKey", params.get("processDefinitionKey").toString() + "%");
|
||||||
}
|
}
|
||||||
PageData<ProcessActivityDTO> page = activitiService.getMyProcessInstancePage(params);
|
PageData<ProcessActivityDTO> page = activitiService.getMyProcessInstancePage(params);
|
||||||
|
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()) { // 拥有会客厅审核权限
|
||||||
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;
|
||||||
|
@ -163,6 +173,7 @@ public class HistoryController {
|
||||||
page.setList(temp);
|
page.setList(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
setExtraProcessProperties(Optional.ofNullable(page.getList()).orElse(new ArrayList<>()));
|
setExtraProcessProperties(Optional.ofNullable(page.getList()).orElse(new ArrayList<>()));
|
||||||
return new Result().ok(page);
|
return new Result().ok(page);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue