package thyyxxk.webserver.controller.zfsf;

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.config.exception.ExceptionEnum;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.zysf.MzsfBillnoRec;
import thyyxxk.webserver.service.zysf.MzsfBillnoRecService;
import thyyxxk.webserver.utils.ResultVoUtil;

import javax.annotation.Resource;

/**
 * @Description: 住院发票
 * @Author:lihong
 * @Date: 2024/9/9
 */
@RestController
@RequestMapping("/mzsfBillnoRec")
public class MzsfBillnoRecController {
    @Resource
    private MzsfBillnoRecService service;

    @PostMapping("/save")
    @PassToken
    public ResultVo<String> save(@RequestBody MzsfBillnoRec param) {
        service.save(param);
        return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_EL_MESSAGE);
    }

    @PostMapping("/queryCurrentNo")
    @PassToken
    public ResultVo<MzsfBillnoRec> queryCurrentNo(@RequestBody MzsfBillnoRec param) {
        MzsfBillnoRec data = service.queryCurrentNo(param);
        return ResultVoUtil.success(data);
    }

}
