package thyyxxk.webserver.controller.shitijian;

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.RestController;
import thyyxxk.webserver.config.auth.PassToken;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.shitijian.TiJianPiPeiPojo;
import thyyxxk.webserver.entity.shitijian.TiJianUploadInfosPojo;
import thyyxxk.webserver.entity.shitijian.TiJianYuYuePojo;
import thyyxxk.webserver.service.shitijian.SiTjService;

import java.util.List;

/**
 * <p>
 * 描述： 体检控制层
 * </p>
 *
 * @author xc
 * @date 2021-07-15 14:39
 */
@RestController
@RequestMapping("/openInter")
public class SiTjController {
    private final SiTjService service;

    @Autowired
    public SiTjController(SiTjService service) {
        this.service = service;
    }

    @PassToken
    @PostMapping("/i1001")
    public ResultVo<Object> getTiJianTaoCanMuLu(@RequestBody TiJianYuYuePojo param) {
        return service.getTiJianTaoCanMuLu(param.getYear());
    }

    @PassToken
    @PostMapping("/i1002")
    public ResultVo<Object> yiSiZhenDuanMuLu(@RequestBody TiJianYuYuePojo param) {
        return service.yiSiZhenDuanMuLu(param.getYear());
    }

    @PassToken
    @PostMapping("/i1003")
    public ResultVo<Object> tiJianZhiBiaoMulu(@RequestBody TiJianYuYuePojo param) {
        return service.tiJianZhiBiaoMulu(param.getYear());
    }

    @PassToken
    @PostMapping("/i1005")
    public ResultVo<Object> tiJianTaoCanPipei(@RequestBody List<TiJianPiPeiPojo> list) {
        return service.tiJianTaoCanPipei(list);
    }

    @PassToken
    @PostMapping("/i1006")
    public ResultVo<Object> yiShiZhenDuanPiPei(@RequestBody List<String> list) {
        return service.yiShiZhenDuanPiPei(list);
    }

    @PassToken
    @PostMapping("/i1007")
    public ResultVo<Object> tiJianZhiBiaoPiPei(@RequestBody List<TiJianPiPeiPojo> list) {
        return service.tiJianZhiBiaoPiPei(list);
    }

    @PassToken
    @PostMapping("/i1008")
    public ResultVo<Object> quXiaoTiJianTaoCanPiPei(@RequestBody List<String> param) {
        return service.quXiaoTiJianTaoCanPiPei(param);
    }

    @PassToken
    @PostMapping("/i1009")
    public ResultVo<Object> quXiaoYiSiZhenDuanPiPei(@RequestBody List<String> param) {
        return service.quXiaoYiSiZhenDuanPiPei(param);
    }

    @PassToken
    @PostMapping("/i1010")
    public ResultVo<Object> quXiaoTiJianZhiBiaoPiPei(@RequestBody List<String> param) {
        return service.quXiaoTiJianZhiBiaoPiPei(param);
    }

    @PassToken
    @PostMapping("/i1011")
    public ResultVo<Object> tiJianTaoCanPiPeiChaXun(@RequestBody TiJianPiPeiPojo param) {
        return service.tiJianTaoCanPiPeiChaXun(param);
    }

    @PassToken
    @PostMapping("/i1013")
    public ResultVo<Object> yiSiZhenDuanPiPeiChaXun(@RequestBody TiJianPiPeiPojo param) {
        return service.yiSiZhenDuanPiPeiChaXun(param);
    }

    @PassToken
    @PostMapping("/i1012")
    public ResultVo<Object> tiJianZhiBiaoPiPeiChaXun(@RequestBody TiJianPiPeiPojo param) {
        return service.tiJianZhiBiaoPiPeiChaXun(param);
    }

    @PassToken
    @PostMapping("/i1020")
    public ResultVo<Object> tiJianShouFeiXiangMuMuLu(@RequestBody TiJianYuYuePojo param) {
        return service.tiJianShouFeiXiangMuMuLu(param.getYear());
    }

    @PassToken
    @PostMapping("/i1014")
    public ResultVo<Object> tiJianRenYuanXinXi(@RequestBody TiJianYuYuePojo param) {
        return service.tiJianRenYuanXinXi(param);
    }

    @PassToken
    @PostMapping("/i1015")
    public ResultVo<Object> tiJianRenYuanTaoCanMingXi(@RequestBody TiJianYuYuePojo param) {
        return service.tiJianRenYuanTaoCanMingXi(param);
    }

    @PassToken
    @PostMapping("/i1016")
    public ResultVo<Object> tiJianXinXiCaiJiYuJieSuan(@RequestBody List<TiJianUploadInfosPojo> param) {
        return service.tiJianXinXiCaiJiYuJieSuan(param);
    }

    @PassToken
    @PostMapping("/i1019")
    public ResultVo<Object> yeWuHuiTui(@RequestBody TiJianYuYuePojo param) {
        return service.yeWuHuiTui(param);
    }

    @PassToken
    @PostMapping("/i1018")
    public ResultVo<Object> tiJianXinXiChaXun(@RequestBody TiJianYuYuePojo param) {
        return service.tiJianXinXiChaXun(param);
    }

}
