package com.diagbot.web;

import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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 com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.dto.UserInfoDTO;
import com.diagbot.dto.UserInfoExportDTO;
import com.diagbot.facade.UserFacade;
import com.diagbot.util.DateUtil;
import com.diagbot.util.ExportBeanExcelUtil;
import com.diagbot.util.GsonUtil;
import com.diagbot.vo.UserExportVO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author wangfeng
 * @Description: 客户中心导出功能
 * @date 2018年9月25日 上午9:45:56
 */
@RestController
@Api(value = "客户中心导出功能API", tags = { "客户中心导出功能API" })
@RequestMapping("/report")
@SuppressWarnings("unchecked")
public class ReportFormController {

    @Autowired
    private UserFacade userFacade;

    @ApiOperation(value = "导出用户信息和机构信息:[by:wangfeng]", notes = "根据时间 导出用户信息和机构信息")
    @PostMapping("/exportUserInfo")
    @SysLogger("exportUserInfo")
    @Transactional
    public RespDTO export(@RequestBody UserExportVO userExportVO)
            throws Exception {
        RespDTO resul = userFacade.export(userExportVO);
        return resul;
    }
}
