package thyyxxk.webserver.controller.inpatient.makedbzfees;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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.entity.ResultVo;
import thyyxxk.webserver.entity.makedbzfees.GetMzFeesParam;
import thyyxxk.webserver.entity.makedbzfees.SaveZyFeesParam;
import thyyxxk.webserver.service.inpatient.makedbzfees.MakeDbzFeesService;
import java.util.Map;

/**
 * @author dj
 */
@RestController
@RequestMapping("/makeDbzFees")
public class MakeDzbFeesController {
    private final MakeDbzFeesService service;

    @Autowired
    public MakeDzbFeesController(MakeDbzFeesService service) {
        this.service = service;
    }

    @PostMapping("/getReceipts")
    public ResultVo<Map<String, Object>> getReceipts(@RequestBody @Validated GetMzFeesParam param) {
        return service.getReceipts(param);
    }

    @PostMapping("/saveToZyFees")
    public ResultVo<String> saveToZyFees(@RequestBody @Validated SaveZyFeesParam param) {
        return service.saveToZyFees(param);
    }
}
