package thyyxxk.webserver.controller.dictionary;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
import thyyxxk.webserver.service.dictionary.YiBaoKeShiPiPeiService;

import java.util.List;

/**
 * <p>
 * 描述： 医保科室匹配目录
 * </p>
 *
 * @author xc
 * @date 2021-07-21 14:28
 */
@RestController
@RequestMapping("/yiBaoKeShi")
public class YiBaoKeShiPiPeiController {

    private final YiBaoKeShiPiPeiService service;

    @Autowired
    public YiBaoKeShiPiPeiController(YiBaoKeShiPiPeiService service) {
        this.service = service;
    }

    @GetMapping("/getBenYuanKeShi")
    public ResultVo<List<GetDropdownBox>> getBenYuanKeShi(@RequestParam("flag") Integer flag) {
        return service.getBenYuanKeShi(flag);
    }

    @PostMapping("/getYiBaoKeShi")
    public ResultVo<List<GetDropdownBox>> getYiBaoKeShi() {
        return service.getYiBaoKeShi();
    }

    @GetMapping("/piPeiKeShi")
    public ResultVo<Integer> piPeiKeShi(@RequestParam("benYuanCode") String benYuanCode,
                                        @RequestParam("yiBaoCode") String yiBaoCode,
                                        @RequestParam("yiBaoName") String yiBaoName,
                                        @RequestParam("flag") Integer flag) {
        return service.piPeiKeShi(benYuanCode, yiBaoCode, yiBaoName, flag);
    }


}
