package com.fs.hospital.service.impl;

import com.fs.hospital.domain.Hospital;
import com.fs.hospital.domain.HospitalOrder;
import com.fs.hospital.domain.HospitalOutpatientOrder;
import com.fs.hospital.mapper.HospitalOrderMapper;
import com.fs.hospital.mapper.HospitalOutpatientOrderMapper;
import com.fs.hospital.mapper.HospitalStatisticsMapper;
import com.fs.hospital.service.IHospitalStatisticsService;
import com.fs.hospital.vo.HospitalStatisticsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HospitalStatisticsServiceImpl implements IHospitalStatisticsService {
    @Autowired
    HospitalStatisticsMapper hospitalStatisticsMapper;
    @Override
    public HospitalStatisticsVO getIndexStatisticsVO() {
        HospitalStatisticsVO vo = new HospitalStatisticsVO();
        vo.setOutpatientAllNum(hospitalStatisticsMapper.selectHospitalOutpatientOrderByOrderByDay());
        vo.setOutpatientNum(hospitalStatisticsMapper.selectHospitalOutpatientOrderByOrderByStatus());
        vo.setOrderNum(hospitalStatisticsMapper.selectHospitalOrderByStatus());
        vo.setPharmacyOrderNum(hospitalStatisticsMapper.selectPharmacyOrderNum());
        vo.setInspectOrderNum(hospitalStatisticsMapper.selectInspectOrderNum());
        vo.setExamOrder(hospitalStatisticsMapper.selectExamOrder());
        vo.setProductTotalCountWarn(hospitalStatisticsMapper.selectProductTotalCountWarn());
        vo.setProductLimitDateWarn(hospitalStatisticsMapper.selectProductLimitDateWarn());
        vo.setGrossRateWarn(hospitalStatisticsMapper.selectGrossRateWarn());
        vo.setProductUpdate(hospitalStatisticsMapper.selectProductUpdate());
        vo.setProductCodeWarn(hospitalStatisticsMapper.selectProductCodeWarn());
        return vo;
    }
}
