package com.casic.missiles.modular.system.controller;


import com.casic.missiles.modular.system.model.MetaModuleParam;
import com.casic.missiles.modular.system.service.MetaModuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/metaModule")
@Api(tags = "模块配置")
@AllArgsConstructor
public class MetaModuleController {

    private final MetaModuleService metaService;

    /**
     * 显示字段的初始化
     *
     * @return
     */
    @RequestMapping(value = "/query")
    @ApiOperation("字段初始化")
    public Object getDataList(String optionType, String deviceType,Long deptid,
                              String keyWords, String beginTime, String endTime) {
        return metaService.getDataList(optionType, deviceType, keyWords, beginTime, endTime, deptid);
    }

    /**
     * 显示字段的初始化
     *
     * @return
     */
    @RequestMapping(value = "/import")
    @ApiOperation("字段初始化")
    public Object dataListImport(HttpServletResponse response,String optionType, String deviceType,
                                 String keyWords, String beginTime, String endTime) {
        return metaService.dataListImport(response,optionType, deviceType, keyWords, beginTime, endTime);
    }


}
