package com.openhis.yb.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.common.constant.YbCommonConstants;
import com.openhis.common.enums.Whether;
import com.openhis.yb.domain.InpatientSettle;
import com.openhis.yb.mapper.InpatientSettleMapper;
import com.openhis.yb.service.IInpatientSettleService;
import org.springframework.stereotype.Service;

@Service
public class InpatientSettleServiceImpl extends ServiceImpl<InpatientSettleMapper, InpatientSettle> implements IInpatientSettleService {
    @Override
    public InpatientSettle getBySettleId(String ybSettleIds) {
        return baseMapper.selectOne(new LambdaQueryWrapper<InpatientSettle>().eq(InpatientSettle::getSetlId,ybSettleIds).eq(InpatientSettle::getDeleteFlag, Whether.NO.getValue()).last(YbCommonConstants.sqlConst.LIMIT1));
    }
}
