package com.huatek.busi.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.huatek.busi.dto.LabReportMarkDto;
import com.huatek.busi.dto.cable.BusiCableCirculationStatisticsDto;
import com.huatek.busi.service.ILabReportMarkStatisticService;
import com.huatek.busi.vo.LabReportMarkVo;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Api(tags={"统计实验报告打标与报告数量及可信度管理接口"})
@RestController
@RequestMapping("/api/labReportMarkStatistic")
public class LabReportMarkStatisticController {

    @Reference(check = false)
    ILabReportMarkStatisticService labReportMarkStatisticService;

    @ApiOperation(value = "查询实验报告打标字段信息", response = Map.class)
    @PostMapping(value = "/queryList", produces = {"application/json;charset=utf-8"})
    public Map<String, Object> queryList(){
        return labReportMarkStatisticService.queryList();
    }

    @ApiOperation(value = "删除实验报告打标字段信息", response = Map.class)
    @PostMapping(value = "/delete/{ids}", produces = {"application/json;charset=utf-8"})
    public Map<String, Object> delete(@PathVariable("ids") String ids){
        return labReportMarkStatisticService.delete(ids);
    }

    @ApiOperation(value = "三级界面展示数据", httpMethod="POST", notes= "三级界面展示数据", produces = "application/json;charset=utf-8",response= Map.class)
    @PostMapping(value = "/findList", produces = {"application/json;charset=utf-8"})
    public Map<String, Object> findList(@RequestBody LabReportMarkVo labReportMarkVo){
        return labReportMarkStatisticService.findList(labReportMarkVo);
    }

    @ApiOperation(value = "打标数据趋势图", httpMethod="POST", notes= "打标数据趋势图", produces = "application/json;charset=utf-8",response= Map.class)
    @PostMapping(value = "/getHistoryChart", produces = {"application/json;charset=utf-8"})
    public Map<String, Object> getHistoryTrendChart(@RequestBody LabReportMarkVo vo) {
        return labReportMarkStatisticService.getHistoryChart(vo);
    }
}
