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

import cn.hnthyy.thmz.entity.his.YzActOrder;
import cn.hnthyy.thmz.mapper.his.yz.YzActOrderMapper;
import cn.hnthyy.thmz.service.his.yz.YzActOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class YzActOrderServiceImpl implements YzActOrderService {
    @SuppressWarnings("all")
    @Autowired
    private YzActOrderMapper yzActOrderMapper;
    @Override
    public int modifyYzActOrderTime(YzActOrder yzActOrder) {
        return yzActOrderMapper.updateYzActOrderTime(yzActOrder);
    }

    @Override
    public String queryLeaveOrderDate(String inpatientNo, Integer admissTimes) {
        String date =yzActOrderMapper.selectLeaveOrderDate(inpatientNo,admissTimes,"yz_act_order");
        if(date!=null){
            return date;
        }
        return yzActOrderMapper.selectLeaveOrderDate(inpatientNo,admissTimes,"yz_inact_order");
    }
}
