Search in sources :

Example 81 with PageInfo

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);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) IotMachine(com.eservice.api.model.iot_machine.IotMachine)

Example 82 with 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);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) MachineOrder(com.eservice.api.model.machine_order.MachineOrder) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Example 83 with 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);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) MachineOrderDetail(com.eservice.api.model.machine_order.MachineOrderDetail) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Example 84 with 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);
}
Also used : Condition(tk.mybatis.mapper.entity.Condition) PageInfo(com.github.pagehelper.PageInfo) MachineOrder(com.eservice.api.model.machine_order.MachineOrder) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Example 85 with 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);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) MarketGroup(com.eservice.api.model.market_group.MarketGroup) 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