package cn.com.victorysoft.business.cyyzs.controller;

import cn.com.victorysoft.business.cyyzs.entity.ProductionData;
import cn.com.victorysoft.business.cyyzs.entity.TubularStructure;
import cn.com.victorysoft.business.cyyzs.entity.TubularStructureHome;
import cn.com.victorysoft.business.cyyzs.service.TubularStructureService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author TY
 * @Date: 2022/10/8 9:46
 */
@Api(tags = "管柱结构")
@RestController
@RequestMapping("cyyzs/tubular-structure")
public class TubularStructureController {

    @Autowired
    private TubularStructureService tubularStructureService;

    @GetMapping()
    @ApiOperation("管柱结构首页")
    public List<TubularStructureHome> selectList(String yclx, String cslb, String dwdm, String dydm) {
        return tubularStructureService.selectList(yclx, cslb, dwdm, dydm);
    }

    @GetMapping("getBarData")
    @ApiOperation("管柱结构首页柱状图数据")
    public Map<String, Object> getBarData(String yclx, String cslb, String dwdm, String dydm) {
        return tubularStructureService.getBarData(yclx, cslb, dwdm, dydm);
    }

    @GetMapping("details")
    @ApiOperation("管柱结构")
    public List<TubularStructure> selectDetails(String yclx, String dwdm, String dydm, String jh, String gylx, String fgq, String cdPsq, String xjf) {
        return tubularStructureService.selectDetails(yclx, dwdm, dydm, jh, gylx, fgq, cdPsq, xjf);
    }
}
