package com.diagbot.web;


import com.diagbot.annotation.SysLoggerExport;
import com.diagbot.facade.ProductOrderFacade;
import com.diagbot.vo.ProductOrderExportVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description: Excel导出API Excel导出API
 * @Author: wangyu
 * @Date: 15:46 2018/9/17
 */
@RestController
@Api(value = "Excel导出API", tags = { "Excel导出API" })
@RequestMapping("/reporExcel")
@SuppressWarnings("unchecked")
public class ReporExcelController {
    @Autowired
    ProductOrderFacade productOrderFacade;

    @ApiOperation(value = "导出产品订单相关信息:[by:wangyu]", notes = "根据时间 导出产品订单相关信息" +
            "startTime: 开始时间<br>" +
            "endTime: 结束时间<br>" +
            "auditStatus: 审核状态<br>" +
            "num: 订单编号<br>" +
            "orgName: 机构名称<br>")
    @PostMapping("/exportProductOrderInfo")
    @SysLoggerExport("exportProductOrderInfo")
    @ResponseBody
    public void export(@RequestBody ProductOrderExportVO productOrderExportVO, HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        productOrderFacade.export(productOrderExportVO,response);
    }
}

