/*
 * Author: Zev
 * 生成controller
 */
package com.tofly.gpsboot.controller.sign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.common.core.entity.ResultRespone;

import com.tofly.common.log.annotation.ToFlyAppLog;
import com.tofly.gpsboot.controller.BaseController;
import com.tofly.pojo.plan.dto.PdasignhisDto;
import com.tofly.pojo.plan.vo.PdasignhisVo;
import com.tofly.pojo.plan.Pdasignhis;
import com.tofly.gpsboot.service.sign.PdasignhisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.ModelAttribute;

/**
 * 上下班签到历史信息
 *
 * @author admin
 * @date Thu Mar 18 00:00:00 CST 2021
 */
@RestController
@RequestMapping("/pdasignhis")
@Api(tags="上下班签到历史信息")
public class PdasignhisController extends BaseController<Pdasignhis, PdasignhisVo> {
    @Autowired
    private PdasignhisService service;
    @Autowired
    public PdasignhisController(PdasignhisService service) {
        init(service);
    }

    @GetMapping("/page")
    @ApiOperation(value = "分页查询")
    @ToFlyAppLog(title = "分页查询上下班签到历史信息")
    public ResultRespone<Page<PdasignhisVo>> getPdasignhisPage(Page page, @ModelAttribute PdasignhisDto parDto) {
        ResultRespone<Page<PdasignhisVo>> rest = new ResultRespone<>();
        Page<PdasignhisVo> buildPage = service.getPdaSignHisPage(page, parDto);
        rest.setResult(buildPage);
        return rest;
    }
}
