package org.security.trans.dataStatistics.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.security.trans.dataStatistics.dto.InspectionDataDTO;
import org.security.trans.dataStatistics.dto.StatisticsDataDTO;
import org.security.trans.dataStatistics.service.InspectionDataService;
import org.security.trans.dataStatistics.vo.InspectionDataVO;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
/**
 * @author ：wzf
 * @apiNote ：数据统计-现场检查
 * @since ：Created in 2022/10/27 17:14
 */
@RestController
@AllArgsConstructor
@RequestMapping("/statistics/inspection")
public class InspectionDataController {

	private final InspectionDataService inspectionDataService;

	/**
	 * 统计列表
	 */
	@PostMapping("/table")
	@ApiOperationSupport(order = 1)
	@ApiOperation(value = "统计列表", notes = "statisticsDataDTO")
	public R<IPage<InspectionDataVO>> getTableData(@RequestBody InspectionDataDTO inspectionDataDTO, Query query) {
		return R.data(inspectionDataService.getTableData(inspectionDataDTO, Condition.getPage(query)));
	}
}
