package cn.hnthyy.thmz.service.impl.his.zy;

import cn.hnthyy.thmz.entity.his.zy.ZyLedgerFile;
import cn.hnthyy.thmz.mapper.his.zy.ZyLedgerFileMapper;
import cn.hnthyy.thmz.service.his.zy.ZyLedgerFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ZyLedgerFileServiceImpl implements ZyLedgerFileService {
    @SuppressWarnings("all")
    @Autowired
    private ZyLedgerFileMapper zyLedgerFileMapper;
    @Override
    public List<ZyLedgerFile> queryZyLedgerFileByInpatientNoAndTimes(String inpatientNo, Integer admissTimes) {
        return zyLedgerFileMapper.selectZyLedgerFileByInpatientNoAndTimes(inpatientNo,admissTimes);
    }

    @Override
    public Integer queryCurrentLedgerSn(String inpatientNo, Integer admissTimes) {
        return zyLedgerFileMapper.selectCurrentLedgerSn(inpatientNo,admissTimes);
    }

    @Override
    public ZyLedgerFile queryLastLedgerSn(String inpatientNo, Integer admissTimes) {
        return zyLedgerFileMapper.selectLastLedgerSn(inpatientNo,admissTimes);
    }

    @Override
    public Map<String, Object> queryTellerInfo(String inpatientNo, Integer admissTimes) {
        Integer ledgerSn= zyLedgerFileMapper.selectMaxLedgerSn(inpatientNo,admissTimes);
        return zyLedgerFileMapper.selectTellerInfo(inpatientNo,admissTimes,ledgerSn);
    }

    @Override
    public Map<String, Object> queryTellerInfo(String inpatientNo, Integer admissTimes, Integer ledgerSn) {
        return zyLedgerFileMapper.selectTellerInfo(inpatientNo,admissTimes,ledgerSn);
    }
}
