package thyyxxk.webserver.controller.inpatient.charge;

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.inpatient.charge.MzsfBillnoRec;
import thyyxxk.webserver.service.inpatient.charge.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);
    }

    @PostMapping("/saveYjjSjh")
    @PassToken
    public ResultVo<String> saveYjjSjh(@RequestBody MzsfBillnoRec param) {
        service.saveYjjSjh(param);
        return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_EL_MESSAGE);
    }
    /**
     * @description: 查询当前预交金收据号
     * @author: lihong
     * @date: 2025/6/11 8:50
     * @param: param
     * @return: thyyxxk.webserver.entity.ResultVo<thyyxxk.webserver.entity.inpatient.charge.MzsfBillnoRec>
     **/
    @PostMapping("/queryYjjSjh")
    @PassToken
    public ResultVo<MzsfBillnoRec> queryYjjSjh(@RequestBody MzsfBillnoRec param) {
        MzsfBillnoRec data = service.queryYjjSjh(param);
        return ResultVoUtil.success(data);
    }

}
