Search in sources :

Example 96 with PageInfo

use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.

the class MachineTypeController method selectAfterN.

/**
 * 查询机器类型,从第N个开始的机器类型
 * 机型名称改了,之前的名称以后不用了,但是在旧订单里还要用所以无法删除。
 * 返回N个之后的机型(即所有新的机型名称)用于新订单
 */
@PostMapping("/selectAfterN")
public Result selectAfterN(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
    // PageHelper.startPage(page, size);// 这一行加了,会出错:IndexOutOfBoundsException: Index: 0, Size: 0
    // PageHelper.startPage(page, 20);
    // 
    List<MachineType> list = machineTypeService.selectAfterN(23);
    PageInfo pageInfo = new PageInfo(list);
    return ResultGenerator.genSuccessResult(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) MachineType(com.eservice.api.model.machine_type.MachineType) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Example 97 with PageInfo

use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.

the class OrderChangeRecordController method list.

@PostMapping("/list")
public Result list(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
    PageHelper.startPage(page, size);
    List<OrderChangeRecord> list = orderChangeRecordService.findAll();
    PageInfo pageInfo = new PageInfo(list);
    return ResultGenerator.genSuccessResult(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) OrderChangeRecord(com.eservice.api.model.order_change_record.OrderChangeRecord) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Example 98 with PageInfo

use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.

the class OrderChangeRecordController method getChangeRecordList.

@PostMapping("/getChangeRecordList")
public Result getChangeRecordList(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size, @RequestParam Integer id, @RequestParam Integer orderId) {
    PageHelper.startPage(page, size);
    List<OrderChangeRecordView> list = orderChangeRecordService.getChangeRecordList(id, orderId);
    PageInfo pageInfo = new PageInfo(list);
    return ResultGenerator.genSuccessResult(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) OrderChangeRecordView(com.eservice.api.model.order_change_record.OrderChangeRecordView) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Example 99 with PageInfo

use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.

the class OrderSignController method getOrderSignListByOrderId.

/**
 * 根据orderId获取签核信息
 *
 * @param orderId
 * @return  订单的签核记录只有在新增合同-订单时,才创建订单的签核记录,所以这里其实只返回一个签核记录,先保留这样用list
 *          (之前考虑过比如驳回造成的多次签核的分别放在不同的签核记录里,最后其实是放在同个签核记录里)
 */
@PostMapping("/getOrderSignListByOrderId")
public Result getOrderSignListByOrderId(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size, @RequestParam Integer orderId) {
    PageHelper.startPage(page, size);
    List<OrderSign> list = orderSignService.getOrderSignListByOrderId(orderId);
    PageInfo pageInfo = new PageInfo(list);
    return ResultGenerator.genSuccessResult(pageInfo);
}
Also used : OrderSign(com.eservice.api.model.order_sign.OrderSign) PageInfo(com.github.pagehelper.PageInfo) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Example 100 with PageInfo

use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.

the class ProcessController method list.

@PostMapping("/list")
public Result list(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
    PageHelper.startPage(page, size);
    List<Process> list = processService.findAll();
    PageInfo pageInfo = new PageInfo(list);
    return ResultGenerator.genSuccessResult(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) Process(com.eservice.api.model.process.Process) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Aggregations

PageInfo (com.github.pagehelper.PageInfo)273 PostMapping (org.springframework.web.bind.annotation.PostMapping)96 EUDataGridResult (com.megagao.production.ssm.domain.customize.EUDataGridResult)90 Test (org.junit.Test)21 UserMapper (com.github.pagehelper.mapper.UserMapper)17 User (com.github.pagehelper.model.User)17 SqlSession (org.apache.ibatis.session.SqlSession)17 ApiOperation (io.swagger.annotations.ApiOperation)14 TaskRecordDetail (com.eservice.api.model.task_record.TaskRecordDetail)11 Condition (tk.mybatis.mapper.entity.Condition)9 DataTablesResult (cn.exrick.common.pojo.DataTablesResult)7 ArrayList (java.util.ArrayList)7 Criteria (tk.mybatis.mapper.entity.Example.Criteria)6 TaskRecord (com.eservice.api.model.task_record.TaskRecord)4 Product (com.megagao.production.ssm.domain.Product)4 Task (com.megagao.production.ssm.domain.Task)4 ManufactureVO (com.megagao.production.ssm.domain.vo.ManufactureVO)4 WorkVO (com.megagao.production.ssm.domain.vo.WorkVO)4 MachineInfo (com.eservice.api.model.machine.MachineInfo)3 User (com.eservice.api.model.user.User)3