Merge branch 'dev' of http://192.168.124.50:3000/wangliwen/share-platform into dev
This commit is contained in:
commit
e331fffaa5
|
@ -75,15 +75,35 @@ public class InitiatorDataEntryListener implements TaskListener {
|
||||||
} else if (kv.containsKey("userId")) {
|
} else if (kv.containsKey("userId")) {
|
||||||
creator = kv.get("userId").toString();
|
creator = kv.get("userId").toString();
|
||||||
}
|
}
|
||||||
|
Integer type = 10;
|
||||||
|
String flowType = kv.getOrDefault("flowType", "").toString();
|
||||||
|
switch (flowType) {
|
||||||
|
case "能力申请":
|
||||||
|
type = 0;
|
||||||
|
break;
|
||||||
|
case "能力需求申请":
|
||||||
|
type = 6;
|
||||||
|
break;
|
||||||
|
case "评论审核":
|
||||||
|
type = 8;
|
||||||
|
break;
|
||||||
|
case "资源上架":
|
||||||
|
type = 2;
|
||||||
|
break;
|
||||||
|
case "资源下架":
|
||||||
|
type = 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
String result = "被驳回";
|
String result = "被驳回";
|
||||||
String finalCreator = creator;
|
String finalCreator = creator;
|
||||||
String finalResult = result;
|
String finalResult = result;
|
||||||
|
Integer finalType = type;
|
||||||
CompletableFuture.runAsync(() -> { // 发起人
|
CompletableFuture.runAsync(() -> { // 发起人
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||||
String content = "【通知】" + userDTO.getRealName() + ",您发起的流程 " + kv.getOrDefault("flowType", "") + finalResult;
|
String content = "【通知】" + userDTO.getRealName() + ",您发起的流程 " + kv.getOrDefault("flowType", "") + finalResult;
|
||||||
SysNoticeDTO dto = new SysNoticeDTO();
|
SysNoticeDTO dto = new SysNoticeDTO();
|
||||||
dto.setType(2);
|
dto.setType(finalType);
|
||||||
dto.setTitle("流程节点系统通知");
|
dto.setTitle("流程节点系统通知");
|
||||||
dto.setContent(content); // 通知内容
|
dto.setContent(content); // 通知内容
|
||||||
dto.setReceiverType(1);
|
dto.setReceiverType(1);
|
||||||
|
|
|
@ -105,14 +105,24 @@ public class ActTaskController {
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("sys:task:all")
|
// @RequiresPermissions("sys:task:all")
|
||||||
public Result<PageData<TaskDTO>> myToDoTaskPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<TaskDTO>> myToDoTaskPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
params.put("userId", SecurityUser.getUserId().toString());
|
String userId = SecurityUser.getUserId().toString();
|
||||||
|
params.put("userId", userId);
|
||||||
PageData<TaskDTO> page = actTaskService.page(params);
|
PageData<TaskDTO> page = actTaskService.page(params);
|
||||||
for (TaskDTO taskDTO : page.getList()) {
|
for (TaskDTO taskDTO : page.getList()) {
|
||||||
if (!StringUtils.isEmpty(taskDTO.getAssignee())) {
|
if (!StringUtils.isEmpty(taskDTO.getAssignee())) {
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(taskDTO.getAssignee()));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(taskDTO.getAssignee()));
|
||||||
taskDTO.setAssigneeName(userDTO.getRealName());
|
taskDTO.setAssigneeName(userDTO.getRealName());
|
||||||
|
if (userId.equals(taskDTO.getAssignee())) {
|
||||||
|
taskDTO.setSynergism(Boolean.FALSE);
|
||||||
|
} else {
|
||||||
|
taskDTO.setSynergism(Boolean.FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当未指定流程类型时 补充一下会客厅的待办
|
||||||
|
*/
|
||||||
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()))) {
|
||||||
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);
|
||||||
|
@ -508,7 +518,7 @@ public class ActTaskController {
|
||||||
@ApiOperation("根据政务云资源申请业务ID查询详情")
|
@ApiOperation("根据政务云资源申请业务ID查询详情")
|
||||||
@LogOperation("根据政务云资源申请业务ID查询详情")
|
@LogOperation("根据政务云资源申请业务ID查询详情")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query",required = true, dataType = "String")
|
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String")
|
||||||
})
|
})
|
||||||
public Result getZwyBusinessInfoById(String id) {
|
public Result getZwyBusinessInfoById(String id) {
|
||||||
try {
|
try {
|
||||||
|
@ -570,7 +580,7 @@ public class ActTaskController {
|
||||||
@ApiOperation("根据政务云视频申请业务ID查询详情")
|
@ApiOperation("根据政务云视频申请业务ID查询详情")
|
||||||
@LogOperation("根据政务云视频申请业务ID查询详情")
|
@LogOperation("根据政务云视频申请业务ID查询详情")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query",required = true, dataType = "String")
|
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String")
|
||||||
})
|
})
|
||||||
public Result getZwyVideoInfoById(String id) {
|
public Result getZwyVideoInfoById(String id) {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package io.renren.modules.activiti.controller;
|
package io.renren.modules.activiti.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.renren.common.annotation.LogOperation;
|
import io.renren.common.annotation.LogOperation;
|
||||||
import io.renren.common.constant.Constant;
|
import io.renren.common.constant.Constant;
|
||||||
|
@ -36,6 +37,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.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;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
@ -85,6 +87,8 @@ public class HistoryController {
|
||||||
protected RuntimeService runtimeService;
|
protected RuntimeService runtimeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDeptService sysDeptService;
|
private SysDeptService sysDeptService;
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserDao sysUserDao;
|
private SysUserDao sysUserDao;
|
||||||
|
@ -128,6 +132,37 @@ 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);
|
||||||
|
if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) {
|
||||||
|
int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state != 1;", Integer.class);
|
||||||
|
page.setTotal(page.getTotal() + meetingroom_book);
|
||||||
|
Integer limit = 10;
|
||||||
|
if (params.get(Constant.LIMIT) != null) {
|
||||||
|
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
|
||||||
|
}
|
||||||
|
if (page.getList().size() < limit) {
|
||||||
|
List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " +
|
||||||
|
" t_meetingroom_book.id AS `businessKey`, " +
|
||||||
|
" t_meetingroom_book.dept AS `startUserDeptName`, " +
|
||||||
|
" '会客厅' AS `resourceName`, " +
|
||||||
|
" '青岛市大数据发展管理局' AS `provideDept`, " +
|
||||||
|
" t_meetingroom.`name` AS `userName`, " +
|
||||||
|
" '会客厅审核' AS `processDefinitionName `, " +
|
||||||
|
" t_meetingroom.create_date AS `startTime` " +
|
||||||
|
"FROM " +
|
||||||
|
" t_meetingroom_book " +
|
||||||
|
" LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " +
|
||||||
|
"WHERE " +
|
||||||
|
" state != 1 ;");
|
||||||
|
List<ProcessActivityDTO> meetingroom_bookTaskDto = meetingroom_bookTask
|
||||||
|
.stream().map(index -> {
|
||||||
|
ProcessActivityDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), ProcessActivityDTO.class);
|
||||||
|
return taskDTO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
List<ProcessActivityDTO> temp = page.getList();
|
||||||
|
temp.addAll(meetingroom_bookTaskDto);
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
@ -210,7 +245,9 @@ public class HistoryController {
|
||||||
TResourceMountApplyDTO tResourceMountApplyDTO = null;
|
TResourceMountApplyDTO tResourceMountApplyDTO = null;
|
||||||
TDemandDataDTO tDemandDataDTO = null;
|
TDemandDataDTO tDemandDataDTO = null;
|
||||||
ResourceDTO resourceDTO = null;
|
ResourceDTO resourceDTO = null;
|
||||||
if (!activityDTO.getBusinessKey().startsWith("[") && !activityDTO.getBusinessKey().startsWith("{")) { // json 内容(批量申请)
|
if (StringUtils.isNotEmpty(activityDTO.getBusinessKey())
|
||||||
|
&& !activityDTO.getBusinessKey().startsWith("[")
|
||||||
|
&& !activityDTO.getBusinessKey().startsWith("{")) { // json 内容(批量申请)
|
||||||
tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||||
tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||||
resourceDTO = resourceService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
resourceDTO = resourceService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||||
|
|
|
@ -100,6 +100,8 @@ public class TaskDTO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "提供部门")
|
@ApiModelProperty(value = "提供部门")
|
||||||
private String provideDept;
|
private String provideDept;
|
||||||
|
@ApiModelProperty(value = "是否为审核组内协助任务")
|
||||||
|
private Boolean synergism;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class ActHistoryService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TRemindersService tRemindersService;
|
private TRemindersService tRemindersService;
|
||||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||||
private Integer interval;
|
private Integer interval;
|
||||||
|
|
||||||
|
|
||||||
|
@ -397,6 +397,7 @@ public class ActHistoryService {
|
||||||
Optional<Task> nowTask = taskService.createTaskQuery().processInstanceId(index.getProcessInstanceId())
|
Optional<Task> nowTask = taskService.createTaskQuery().processInstanceId(index.getProcessInstanceId())
|
||||||
.orderByTaskCreateTime().desc().active().list().stream().findFirst(); // 尝试获取当前task
|
.orderByTaskCreateTime().desc().active().list().stream().findFirst(); // 尝试获取当前task
|
||||||
if (nowTask.isPresent()) { // 存在正在进行的任务
|
if (nowTask.isPresent()) { // 存在正在进行的任务
|
||||||
|
logger.info("当前任务id:" + nowTask.get().getId());
|
||||||
LocalDate localDate = tRemindersService.selectRemindersTime(nowTask.get().getId());
|
LocalDate localDate = tRemindersService.selectRemindersTime(nowTask.get().getId());
|
||||||
if (localDate == null) { // 未进行过催办
|
if (localDate == null) { // 未进行过催办
|
||||||
LocalDate taskCreateDate = nowTask.get().getCreateTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
LocalDate taskCreateDate = nowTask.get().getCreateTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||||
|
@ -424,6 +425,7 @@ public class ActHistoryService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
logger.info("不存在正在进行流程节点");
|
||||||
index.setAllowReminders(Boolean.FALSE);
|
index.setAllowReminders(Boolean.FALSE);
|
||||||
index.setDoneReminders(Boolean.FALSE);
|
index.setDoneReminders(Boolean.FALSE);
|
||||||
index.setNextRemindersDays(0);
|
index.setNextRemindersDays(0);
|
||||||
|
|
|
@ -19,8 +19,6 @@ import io.renren.modules.notice.service.SysNoticeService;
|
||||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||||
import io.renren.modules.resource.dao.ResourceDao;
|
import io.renren.modules.resource.dao.ResourceDao;
|
||||||
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
|
|
||||||
import io.renren.modules.resource.dto.GetDataResourceListDto;
|
|
||||||
import io.renren.modules.resource.dto.ResourceDTO;
|
import io.renren.modules.resource.dto.ResourceDTO;
|
||||||
import io.renren.modules.resource.entity.ResourceEntity;
|
import io.renren.modules.resource.entity.ResourceEntity;
|
||||||
import io.renren.modules.resource.service.ResourceService;
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
|
@ -53,6 +51,7 @@ import org.activiti.engine.impl.pvm.process.TransitionImpl;
|
||||||
import org.activiti.engine.impl.task.TaskDefinition;
|
import org.activiti.engine.impl.task.TaskDefinition;
|
||||||
import org.activiti.engine.repository.ProcessDefinition;
|
import org.activiti.engine.repository.ProcessDefinition;
|
||||||
import org.activiti.engine.runtime.ProcessInstance;
|
import org.activiti.engine.runtime.ProcessInstance;
|
||||||
|
import org.activiti.engine.task.NativeTaskQuery;
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
import org.activiti.engine.task.TaskInfo;
|
import org.activiti.engine.task.TaskInfo;
|
||||||
import org.activiti.engine.task.TaskQuery;
|
import org.activiti.engine.task.TaskQuery;
|
||||||
|
@ -135,6 +134,10 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public PageData<TaskDTO> page(Map<String, Object> params) {
|
public PageData<TaskDTO> page(Map<String, Object> params) {
|
||||||
|
// TODO 同一审核组内成员
|
||||||
|
List<String> groupUserId = new ArrayList<String>() {{ // 测试
|
||||||
|
|
||||||
|
}};
|
||||||
String userId = (String) params.get("userId");
|
String userId = (String) params.get("userId");
|
||||||
Integer curPage = 1;
|
Integer curPage = 1;
|
||||||
Integer limit = 10;
|
Integer limit = 10;
|
||||||
|
@ -144,32 +147,86 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
if (params.get(Constant.LIMIT) != null) {
|
if (params.get(Constant.LIMIT) != null) {
|
||||||
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
|
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
|
||||||
}
|
}
|
||||||
TaskQuery taskQuery = taskService.createTaskQuery();
|
String taskSql = "SELECT " +
|
||||||
|
" RES.* " +
|
||||||
|
"FROM " +
|
||||||
|
" ACT_RU_TASK RES " +
|
||||||
|
" INNER JOIN ACT_RE_PROCDEF D ON RES.PROC_DEF_ID_ = D.ID_ ";
|
||||||
|
String countSql = "SELECT " +
|
||||||
|
" COUNT(RES.ID_) " +
|
||||||
|
"FROM " +
|
||||||
|
" ACT_RU_TASK RES " +
|
||||||
|
" INNER JOIN ACT_RE_PROCDEF D ON RES.PROC_DEF_ID_ = D.ID_ ";
|
||||||
|
StringBuffer where = new StringBuffer(" WHERE 1 =1 ");
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
taskQuery.taskAssignee(userId);
|
where.append("AND ( RES.ASSIGNEE_ = #{userId} ");
|
||||||
|
// 处理同一工作组内
|
||||||
|
groupUserId.stream().forEach(index -> {
|
||||||
|
where.append(String.format(" OR RES.ASSIGNEE_ = '%s' ", index));
|
||||||
|
});
|
||||||
|
where.append(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty((String) params.get("taskName"))) {
|
if (StringUtils.isNotEmpty((String) params.get("taskName"))) {
|
||||||
taskQuery.taskNameLike("%" + params.get("taskName") + "%");
|
where.append(" AND RES.NAME_ = #{taskName}");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
||||||
taskQuery.processDefinitionKey((String) params.get("processDefinitionKey"));
|
where.append(" AND D.KEY_ = #{processDefinitionKey} ");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty((String) params.get("isRoleGroup")) && "1".equals(params.get("isRoleGroup"))) {
|
where.append(" AND RES.SUSPENSION_STATE_ = 1 ");
|
||||||
List<Long> listRoles = sysRoleUserService.getRoleIdList(SecurityUser.getUserId());
|
|
||||||
List<String> listStr = new ArrayList<>();
|
String order = " ORDER BY " +
|
||||||
for (Long role : listRoles) {
|
" RES.CREATE_TIME_ DESC ";
|
||||||
listStr.add(role.toString());
|
NativeTaskQuery nativeTaskQuery = taskService.createNativeTaskQuery().sql(taskSql + where + order);
|
||||||
}
|
NativeTaskQuery nativeCountTaskQuery = taskService.createNativeTaskQuery().sql(countSql + where + order);
|
||||||
listStr.add(SecurityUser.getUserId().toString());
|
if (StringUtils.isNotEmpty(userId)) { // 分配审核员
|
||||||
if (!listStr.isEmpty()) {
|
nativeTaskQuery.parameter("userId", userId);
|
||||||
taskQuery.taskCandidateGroupIn(listStr);
|
nativeCountTaskQuery.parameter("userId", userId);
|
||||||
} else {
|
|
||||||
return new PageData<>(new ArrayList<>(), 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
taskQuery.orderByTaskCreateTime().desc();
|
if (StringUtils.isNotEmpty((String) params.get("taskName"))) { // 任务名称
|
||||||
List<Task> list = taskQuery.active().includeProcessVariables().listPage((curPage - 1) * limit, limit);
|
nativeTaskQuery.parameter("taskName", params.get("taskName"));
|
||||||
return new PageData<>(tasks2TaskDtos(list), (int) taskQuery.count());
|
nativeCountTaskQuery.parameter("taskName", params.get("taskName"));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
||||||
|
nativeTaskQuery.parameter("processDefinitionKey", params.get("processDefinitionKey"));
|
||||||
|
nativeCountTaskQuery.parameter("processDefinitionKey", params.get("processDefinitionKey"));
|
||||||
|
}
|
||||||
|
List<Task> tasks = nativeTaskQuery.listPage((curPage - 1) * limit, limit);
|
||||||
|
long count = nativeCountTaskQuery.count();
|
||||||
|
List<Task> list_ = tasks.stream().map(index -> {
|
||||||
|
TaskQuery taskQuery = taskService.createTaskQuery();
|
||||||
|
Task temp = taskQuery.taskId(index.getId()).includeProcessVariables().singleResult();
|
||||||
|
return temp;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
return new PageData<>(tasks2TaskDtos(list_), (int) count);
|
||||||
|
// 以下注释为原实现方案
|
||||||
|
// TaskQuery taskQuery = taskService.createTaskQuery();
|
||||||
|
// if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
// taskQuery.taskAssignee(userId);
|
||||||
|
// }
|
||||||
|
// if (StringUtils.isNotEmpty((String) params.get("taskName"))) {
|
||||||
|
// taskQuery.taskNameLike("%" + params.get("taskName") + "%");
|
||||||
|
// }
|
||||||
|
// if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
||||||
|
// taskQuery.processDefinitionKey((String) params.get("processDefinitionKey"));
|
||||||
|
// }
|
||||||
|
// if (StringUtils.isNotEmpty((String) params.get("isRoleGroup")) && "1".equals(params.get("isRoleGroup"))) {
|
||||||
|
// List<Long> listRoles = sysRoleUserService.getRoleIdList(SecurityUser.getUserId());
|
||||||
|
// List<String> listStr = new ArrayList<>();
|
||||||
|
// for (Long role : listRoles) {
|
||||||
|
// listStr.add(role.toString());
|
||||||
|
// }
|
||||||
|
// listStr.add(SecurityUser.getUserId().toString());
|
||||||
|
// if (!listStr.isEmpty()) {
|
||||||
|
// taskQuery.taskCandidateGroupIn(listStr);
|
||||||
|
// } else {
|
||||||
|
// return new PageData<>(new ArrayList<>(), 0);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// taskQuery.orderByTaskCreateTime().desc();
|
||||||
|
// List<Task> list = taskQuery.active()
|
||||||
|
// .includeProcessVariables().listPage((curPage - 1) * limit, limit);
|
||||||
|
// return new PageData<>(tasks2TaskDtos(list), (int) taskQuery.count());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,11 +11,13 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
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.beans.factory.annotation.Value;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
import sw.vc3term.contingencyplan.ContingencyPlanUtil;
|
import sw.vc3term.contingencyplan.ContingencyPlanUtil;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
@ -39,19 +41,27 @@ public class EnkeController {
|
||||||
private static final String videoConfernceIp = "35.1.190.62";
|
private static final String videoConfernceIp = "35.1.190.62";
|
||||||
private static final int videoConferncePort = 8756;
|
private static final int videoConferncePort = 8756;
|
||||||
|
|
||||||
private static final ContingencyPlanUtil cp;
|
private static ContingencyPlanUtil cp = null;
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(ActHistoryService.class);
|
private static final Logger logger = LoggerFactory.getLogger(ActHistoryService.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EnkeService enkeService;
|
private EnkeService enkeService;
|
||||||
|
@Value("#{new Boolean(${enke.enable})}")
|
||||||
|
private Boolean enke; // 是否进行恩科会议组会
|
||||||
|
|
||||||
static {
|
@PostConstruct
|
||||||
cp = ContingencyPlanUtil.getInstance();
|
public void init() {
|
||||||
// 初始化会议
|
if (enke) {
|
||||||
cp.init(videoConfernceIp, videoConferncePort);
|
cp = ContingencyPlanUtil.getInstance();
|
||||||
List<String> ips = getLocalIP();
|
// 初始化会议
|
||||||
cp.setLocalAddress(CollectionUtils.isEmpty(ips) ? "0.0.0.0" : ips.get(0), ContingencyPlanUtil.LOCAL_PORT);
|
cp.init(videoConfernceIp, videoConferncePort);
|
||||||
|
List<String> ips = getLocalIP();
|
||||||
|
cp.setLocalAddress(CollectionUtils.isEmpty(ips) ? "0.0.0.0" : ips.get(0), ContingencyPlanUtil.LOCAL_PORT);
|
||||||
|
logger.info("开启组会功能成功!");
|
||||||
|
} else {
|
||||||
|
logger.info("不开启组会功能");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,6 +122,7 @@ public class EnkeController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logger.info("本机ip:" + ips);
|
||||||
return ips;
|
return ips;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class TAbilityApplicationController {
|
||||||
@Value("${infrastructure.dept-can-apply-max}")
|
@Value("${infrastructure.dept-can-apply-max}")
|
||||||
private Integer infrastructureMax;
|
private Integer infrastructureMax;
|
||||||
|
|
||||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||||
private Integer interval;
|
private Integer interval;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class TRemindersController {
|
||||||
@Autowired
|
@Autowired
|
||||||
protected TaskService taskService;
|
protected TaskService taskService;
|
||||||
|
|
||||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||||
private Integer interval;
|
private Integer interval;
|
||||||
|
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class TRemindersServiceImpl extends CrudServiceImpl<TRemindersDao, TRemin
|
||||||
@Value("#{new Boolean(${notice.yawei})}")
|
@Value("#{new Boolean(${notice.yawei})}")
|
||||||
private Boolean noticeYaWei; // 是否发送消息到亚微中心
|
private Boolean noticeYaWei; // 是否发送消息到亚微中心
|
||||||
|
|
||||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||||
private Integer interval;
|
private Integer interval;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -524,7 +524,7 @@ public class ResourceController {
|
||||||
|
|
||||||
SysUserEntity sysUser = sysUserDao.getById(userId);
|
SysUserEntity sysUser = sysUserDao.getById(userId);
|
||||||
if (sysUser == null || sysUser.getGuid() == null) {
|
if (sysUser == null || sysUser.getGuid() == null) {
|
||||||
return new Result<>().error("该账号没有权限");
|
return new Result<>().error("该账号没有权限获取资源列表");
|
||||||
}
|
}
|
||||||
|
|
||||||
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx?op=ZySPPort";
|
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx?op=ZySPPort";
|
||||||
|
@ -553,8 +553,13 @@ public class ResourceController {
|
||||||
|
|
||||||
return new Result().ok(result);
|
return new Result().ok(result);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
logger.error("资源列表转发异常", e);
|
||||||
return new Result().ok(new ArrayList(0));
|
Map<String, Object> result = new LinkedHashMap<String, Object>() {{
|
||||||
|
put("PageCount", "0");
|
||||||
|
put("data", new ArrayList<>());
|
||||||
|
put("rows", "0");
|
||||||
|
}};
|
||||||
|
return new Result().ok(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class SecurityUser {
|
||||||
*/
|
*/
|
||||||
public static UserDetail getUser() {
|
public static UserDetail getUser() {
|
||||||
|
|
||||||
logger.error("————————————————————————————当前调用的方法为{}", getMyGrandpaStackTrace());
|
// logger.error("————————————————————————————当前调用的方法为{}", getMyGrandpaStackTrace());
|
||||||
|
|
||||||
Subject subject = getSubject();
|
Subject subject = getSubject();
|
||||||
if (subject == null) {
|
if (subject == null) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package io.renren.modules.sys.service.impl;
|
package io.renren.modules.sys.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
@ -28,12 +27,12 @@ import io.renren.modules.sys.enums.JhDeptsEnum;
|
||||||
import io.renren.modules.sys.enums.SuperAdminEnum;
|
import io.renren.modules.sys.enums.SuperAdminEnum;
|
||||||
import io.renren.modules.sys.service.*;
|
import io.renren.modules.sys.service.*;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
|
||||||
import org.h2.util.StringUtils;
|
import org.h2.util.StringUtils;
|
||||||
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.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@ -78,6 +77,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
@Value("${spring.datasource.druid.password}")
|
@Value("${spring.datasource.druid.password}")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
static final String sysUserDTOByIdKey = "SysUserDTOById";
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SysUserController.class);
|
private static final Logger logger = LoggerFactory.getLogger(SysUserController.class);
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,6 +126,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = sysUserDTOByIdKey, key = "#p0")
|
||||||
public SysUserDTO get(Long id) {
|
public SysUserDTO get(Long id) {
|
||||||
SysUserEntity entity = baseDao.getById(id);
|
SysUserEntity entity = baseDao.getById(id);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
@ -29,14 +28,14 @@ import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告管理
|
* 公告管理
|
||||||
*
|
*
|
||||||
* @author dg 2498628697@qq.com
|
* @author dg 2498628697@qq.com
|
||||||
* @since 1.0 2022-12-01
|
* @since 1.0 2022-12-01
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sysnoticemanagement")
|
@RequestMapping("/sysnoticemanagement")
|
||||||
@Api(tags="公告管理")
|
@Api(tags = "公告管理")
|
||||||
public class SysNoticeManagementController {
|
public class SysNoticeManagementController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysNoticeManagementService sysNoticeManagementService;
|
private SysNoticeManagementService sysNoticeManagementService;
|
||||||
|
@ -44,15 +43,15 @@ public class SysNoticeManagementController {
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@ApiOperation("分页")
|
@ApiOperation("分页")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = "days", value = "公告显示周期", paramType = "query", dataType="int") ,
|
@ApiImplicitParam(name = "days", value = "公告显示周期", paramType = "query", dataType = "int"),
|
||||||
@ApiImplicitParam(name = "content", value = "公告内容", paramType = "query", dataType="int") ,
|
@ApiImplicitParam(name = "content", value = "公告内容", paramType = "query", dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String")
|
||||||
})
|
})
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:page")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:page")
|
||||||
public Result<PageData<SysNoticeManagementDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<SysNoticeManagementDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
PageData<SysNoticeManagementDTO> page = sysNoticeManagementService.page(params);
|
PageData<SysNoticeManagementDTO> page = sysNoticeManagementService.page(params);
|
||||||
|
|
||||||
return new Result<PageData<SysNoticeManagementDTO>>().ok(page);
|
return new Result<PageData<SysNoticeManagementDTO>>().ok(page);
|
||||||
|
@ -61,7 +60,7 @@ public class SysNoticeManagementController {
|
||||||
@GetMapping("{id}")
|
@GetMapping("{id}")
|
||||||
@ApiOperation("信息")
|
@ApiOperation("信息")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:info")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:info")
|
||||||
public Result<SysNoticeManagementDTO> get(@PathVariable("id") Long id){
|
public Result<SysNoticeManagementDTO> get(@PathVariable("id") Long id) {
|
||||||
SysNoticeManagementDTO data = sysNoticeManagementService.get(id);
|
SysNoticeManagementDTO data = sysNoticeManagementService.get(id);
|
||||||
|
|
||||||
return new Result<SysNoticeManagementDTO>().ok(data);
|
return new Result<SysNoticeManagementDTO>().ok(data);
|
||||||
|
@ -71,7 +70,7 @@ public class SysNoticeManagementController {
|
||||||
@ApiOperation("保存")
|
@ApiOperation("保存")
|
||||||
@LogOperation("保存")
|
@LogOperation("保存")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:save")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:save")
|
||||||
public Result save(@RequestBody SysNoticeManagementDTO dto){
|
public Result save(@RequestBody SysNoticeManagementDTO dto) {
|
||||||
//效验数据
|
//效验数据
|
||||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||||
dto.setDelFlag(0);
|
dto.setDelFlag(0);
|
||||||
|
@ -81,11 +80,11 @@ public class SysNoticeManagementController {
|
||||||
return new Result();
|
return new Result();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PostMapping(value = "/update")
|
||||||
@ApiOperation("修改")
|
@ApiOperation("修改")
|
||||||
@LogOperation("修改")
|
@LogOperation("修改")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:update")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:update")
|
||||||
public Result update(@RequestBody SysNoticeManagementDTO dto){
|
public Result update(@RequestBody SysNoticeManagementDTO dto) {
|
||||||
//效验数据
|
//效验数据
|
||||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ public class SysNoticeManagementController {
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@LogOperation("删除")
|
@LogOperation("删除")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:delete")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:delete")
|
||||||
public Result delete(@RequestBody Long[] ids){
|
public Result delete(@RequestBody Long[] ids) {
|
||||||
//效验数据
|
//效验数据
|
||||||
AssertUtils.isArrayEmpty(ids, "id");
|
AssertUtils.isArrayEmpty(ids, "id");
|
||||||
|
|
||||||
|
|
|
@ -179,4 +179,7 @@ shangdongtong:
|
||||||
reminders:
|
reminders:
|
||||||
# 催办间隔天数
|
# 催办间隔天数
|
||||||
interval: 7
|
interval: 7
|
||||||
|
# 恩科会议
|
||||||
|
enke:
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
|
|
@ -100,4 +100,14 @@
|
||||||
diskPersistent="true"
|
diskPersistent="true"
|
||||||
memoryStoreEvictionPolicy="LRU"/>
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
<!-- SysUserDTOById缓存 -->
|
||||||
|
<cache name="SysUserDTOById"
|
||||||
|
maxElementsInMemory="10000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="6"
|
||||||
|
timeToLiveSeconds="30"
|
||||||
|
overflowToDisk="true"
|
||||||
|
diskPersistent="true"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
</ehcache>
|
</ehcache>
|
Loading…
Reference in New Issue