Merge branch 'master' into docker_package
This commit is contained in:
commit
decb64f58f
|
@ -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;
|
||||||
|
@ -30,6 +31,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务管理
|
* 任务管理
|
||||||
|
@ -98,6 +100,34 @@ public class ActTaskController {
|
||||||
taskDTO.setAssigneeName(userDTO.getRealName());
|
taskDTO.setAssigneeName(userDTO.getRealName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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 `taskId`, " +
|
||||||
|
" t_meetingroom_book.dept AS `userDeptName`, " +
|
||||||
|
" t_meetingroom.`name` AS `userName`, " +
|
||||||
|
" '会议室审核' AS `taskName `, " +
|
||||||
|
" t_meetingroom.create_date AS `createTime` " +
|
||||||
|
"FROM " +
|
||||||
|
" t_meetingroom_book " +
|
||||||
|
" LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " +
|
||||||
|
"WHERE " +
|
||||||
|
" state = 1;");
|
||||||
|
List<TaskDTO> meetingroom_bookTaskDto = meetingroom_bookTask
|
||||||
|
.stream().map(index -> {
|
||||||
|
TaskDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), TaskDTO.class);
|
||||||
|
return taskDTO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
page.getList().addAll(meetingroom_bookTaskDto);
|
||||||
|
page.setList(page.getList());
|
||||||
|
}
|
||||||
|
}
|
||||||
return new Result<PageData<TaskDTO>>().ok(page);
|
return new Result<PageData<TaskDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue