Commit d0c84abd authored by kongfm's avatar kongfm

ES 放电梯数据

parent 82c47d75
......@@ -393,8 +393,18 @@ public class ElevatorController extends BaseController {
public void init(Integer num) {
IPage<Elevator> elevatorPage = new Page<>();
Integer count = elevatorService.count();
Integer times = 0;
if(ValidationUtil.isEmpty(num) && count != 0) {
times = count/500;
int last = count%500;
if(last > 0 ) {
times ++;
}
} else if(count != 0) {
times = num;
}
for(int i = 0; i <= (ValidationUtil.isEmpty(num) ? count%500 : num); ++i ) {
for(int i = 0; i <= times ; i ++ ) {
elevatorPage.setCurrent(i);
elevatorPage.setSize(500);
elevatorPage = elevatorService.page(elevatorPage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment