package org.jeecg.modules.mdc.controller;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.modules.mdc.entity.MdcEquipmentPunchRate;
|
import org.jeecg.modules.mdc.service.IMdcEquipmentPunchRateService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.servlet.ModelAndView;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
/**
|
* @Description: mdc_equipment_punch_rate
|
* @Author: jeecg-boot
|
* @Date: 2025-06-09
|
* @Version: V1.0
|
*/
|
@Api(tags = "设备打卡率报表")
|
@RestController
|
@RequestMapping("/mdcEquipmentPunchRate")
|
@Slf4j
|
public class MdcEquipmentPunchRateController extends JeecgController<MdcEquipmentPunchRate, IMdcEquipmentPunchRateService> {
|
@Autowired
|
private IMdcEquipmentPunchRateService mdcEquipmentPunchService;
|
|
|
|
|
|
|
/**
|
* 分页列表查询
|
*
|
* @param mdEquipmentPunch 查询参数
|
* @param pageNo 当前页码
|
* @param pageSize 每页条数
|
* @param req 请求对象
|
* @return
|
*/
|
@ApiOperation(value = "设备打卡率-分页列表查询", notes = "设备打卡率-分页列表查询")
|
@AutoLog(value = "设备打卡率-分页列表查询")
|
@GetMapping(value = "/queryPageList")
|
public Result<IPage<MdcEquipmentPunchRate>> queryPageList(MdcEquipmentPunchRate mdEquipmentPunch,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
HttpServletRequest req) {
|
|
QueryWrapper<MdcEquipmentPunchRate> queryWrapper = QueryGenerator.initQueryWrapper(mdEquipmentPunch, req.getParameterMap());
|
Page<MdcEquipmentPunchRate> page = new Page<MdcEquipmentPunchRate>(pageNo, pageSize);
|
IPage<MdcEquipmentPunchRate> pageList = mdcEquipmentPunchService.page(page, queryWrapper);
|
return Result.OK(pageList);
|
}
|
|
|
/**
|
* 导出excel
|
*
|
* @param request
|
* @param mdcEquipmentPunchRate
|
*/
|
@RequestMapping(value = "/exportXls")
|
public ModelAndView exportXls(HttpServletRequest request, MdcEquipmentPunchRate mdcEquipmentPunchRate) {
|
return super.exportXls(request, mdcEquipmentPunchRate, MdcEquipmentPunchRate.class, "设备打卡率报表");
|
}
|
|
|
|
|
}
|