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.AssessmentDataDTO;
import org.security.trans.dataStatistics.dto.DeviceInspectionDataDTO;
import org.security.trans.dataStatistics.service.DeviceInspectionDataService;
import org.security.trans.dataStatistics.vo.AssessmentDataVO;
import org.security.trans.dataStatistics.vo.DeviceInspectionDataVO;
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/24 19:41
 */
@RestController
@AllArgsConstructor
@RequestMapping("/statistics/device-inspection")
public class DeviceInspectionDataController {

	private final DeviceInspectionDataService deviceInspectionDataService;

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