use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class IotMachineController method selectIotMachine.
/**
* 根据账户、铭牌号 获取该账户名下对应的机器IOT信息
* 比如用户可以以此查看自己的机器
*/
@PostMapping("/selectIotMachine")
public Result selectIotMachine(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size, String account, String nameplate) {
PageHelper.startPage(page, size);
List<IotMachine> list = iotMachineService.selectIotMachine(account, nameplate);
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class MachineOrderController method list.
@PostMapping("/list")
public Result list(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
PageHelper.startPage(page, size);
List<MachineOrder> list = machineOrderService.findAll();
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class MachineOrderController method selectOrders.
/**
* 根据条件查询订单。
* 比如 查询 建立时间create_time在传入的参数 query_start_time 和 query_finish_time 之间的订单
* @param id
* @param contract_id
* @param order_num
* @param contract_num
* @param status 支持多个状态用逗号隔开, "2,3,4"
* @param sellman
* @param customer
* @param marketGroupName
* @param query_start_time
* @param query_finish_time
* @param queryStartTimeSign
* @param queryFinishTimeSign
* @param machine_name
* @param is_fuzzy
* @return
*/
// 注意这个接口在不带参数时查询全部数据会有一定耗时,加了联系单查询。
@PostMapping("/selectOrders")
public Result selectOrders(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size, Integer id, Integer contract_id, String order_num, String contract_num, String status, String sellman, String customer, // 订单归属部门 这个是自动限制的,根据角色自动限制查看哪些订单可见
String marketGroupName, // 这个是查询创建日期
String query_start_time, // 这个是查询创建日期
String query_finish_time, // 这个是查询审核日期
String queryStartTimeSign, // 这个是查询审核日期
String queryFinishTimeSign, // 这个其实是机型
String machine_name, // 订单签核的当前步骤
String oderSignCurrentStep, // 查询框里 查询部门,注意,这个和marketGroupName互不干涉
String searchDepartment, @RequestParam(defaultValue = "true") Boolean is_fuzzy) {
PageHelper.startPage(page, size);
// workaround
// 外贸经理:看外贸一部、二部订单,查询用词"外贸“ 两个字,后台已经模糊查询,匹配“外贸一部”和“外贸二部”
// 外贸总监:看外贸一部、二部订单,查询用词"外贸“ 两个字,后台已经模糊查询,匹配“外贸一部”和“外贸二部”
// if (marketGroupName != null && !marketGroupName.isEmpty()) {
// if (marketGroupName.equals(Constant.STR_DEPARTMENT_FOREIGN_FUZZY)) {
// marketGroupName = Constant.STR_DEPARTMENT_FOREIGN_FUZZY;
// }
// }
List<MachineOrderDetail> list = machineOrderService.selectOrder(id, contract_id, order_num, contract_num, status, sellman, customer, marketGroupName, query_start_time, query_finish_time, queryStartTimeSign, queryFinishTimeSign, machine_name, oderSignCurrentStep, searchDepartment, is_fuzzy);
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class MachineOrderController method getValidList.
@PostMapping("/getValidList")
public Result getValidList(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
PageHelper.startPage(page, size);
Condition condition = new Condition(MachineOrder.class);
condition.createCriteria().andCondition("valid = ", 1);
List<MachineOrder> list = machineOrderService.findByCondition(condition);
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class MarketGroupController method list.
@PostMapping("/list")
public Result list(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
PageHelper.startPage(page, size);
List<MarketGroup> list = marketGroupService.findAll();
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
Aggregations