Merge branch 'dev'

This commit is contained in:
wangliwen 2022-12-15 12:33:36 +08:00
commit 81847e3d6e
2 changed files with 4 additions and 2 deletions

View File

@ -147,6 +147,7 @@ public class ActTaskController {
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));
} }
int mettingLimit = limit - page.getList().size();
if (page.getList().size() < limit) { if (page.getList().size() < limit) {
List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " + List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " +
" t_meetingroom_book.id AS `taskId`, " + " t_meetingroom_book.id AS `taskId`, " +
@ -160,7 +161,7 @@ public class ActTaskController {
" t_meetingroom_book " + " t_meetingroom_book " +
" LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " + " LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " +
"WHERE " + "WHERE " +
" state = 1;"); " state = 1 LIMIT " + mettingLimit);
List<TaskDTO> meetingroom_bookTaskDto = meetingroom_bookTask List<TaskDTO> meetingroom_bookTaskDto = meetingroom_bookTask
.stream().map(index -> { .stream().map(index -> {
TaskDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), TaskDTO.class); TaskDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), TaskDTO.class);

View File

@ -149,6 +149,7 @@ public class HistoryController {
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));
} }
int mettingLimit = limit - page.getList().size();
if (page.getList().size() < limit) { if (page.getList().size() < limit) {
List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " + List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " +
" t_meetingroom_book.id AS `businessKey`, " + " t_meetingroom_book.id AS `businessKey`, " +
@ -162,7 +163,7 @@ public class HistoryController {
" t_meetingroom_book " + " t_meetingroom_book " +
" LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " + " LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " +
"WHERE " + "WHERE " +
" state != 1 ;"); " state != 1 LIMIT " + mettingLimit);
List<ProcessActivityDTO> meetingroom_bookTaskDto = meetingroom_bookTask List<ProcessActivityDTO> meetingroom_bookTaskDto = meetingroom_bookTask
.stream().map(index -> { .stream().map(index -> {
ProcessActivityDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), ProcessActivityDTO.class); ProcessActivityDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), ProcessActivityDTO.class);