package com.fjhx.common.controller.employee;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.common.entity.employee.dto.EmployeeHandoverDto;
import com.fjhx.common.entity.employee.dto.EmployeeHandoverSelectDto;
import com.fjhx.common.entity.employee.vo.EmployeeHandoverVo;
import com.fjhx.common.service.employee.EmployeeHandoverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 员工交接 前端控制器
 * </p>
 *
 * @author
 * @since 2023-07-17
 */
@RestController
@RequestMapping("/employeeHandover")
public class EmployeeHandoverController {

    @Autowired
    private EmployeeHandoverService employeeHandoverService;

    /**
     * 员工交接分页
     */
    @PostMapping("/page")
    public Page<EmployeeHandoverVo> page(@RequestBody EmployeeHandoverSelectDto dto) {
        return employeeHandoverService.getPage(dto);
    }

    /**
     * 员工交接新增
     */
    @PostMapping("/add")
    public void add(@RequestBody EmployeeHandoverDto employeeHandoverDto) {
        employeeHandoverService.add(employeeHandoverDto);
    }

}
