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.EduAndDrillDataDTO;
import org.security.trans.dataStatistics.dto.StatisticsDataDTO;
import org.security.trans.dataStatistics.service.EduAndDrillDataService;
import org.security.trans.dataStatistics.vo.EduAndDrillDataVO;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：wzf
 * @apiNote ：应急演练和教育培训统计数据获取
 * @since ：Created in 2022/11/23 9:42
 */
@RestController
@AllArgsConstructor
@RequestMapping("/statistics/edu-drill")
public class EduAndDrillDataController {


	private final EduAndDrillDataService eduAndDrillDataService;

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