package com.docus.server.ecg.service.impl;

import com.docus.server.constants.DSKeyConstants;
import com.docus.server.ecg.infrastructure.mapper.EcgDeptMapper;
import com.docus.server.ecg.service.IEcgService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

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

@Component(DSKeyConstants.ECG_DS_KEY + "ServiceImpl")
@AllArgsConstructor
public class EcgServiceImpl implements IEcgService {

    private final EcgDeptMapper ecgDeptMapper;

    @Override
    public List<Map<String, Object>> page(Date startDate, Date endDate, int pageNum, int pageSize) {
        return ecgDeptMapper.page(startDate, endDate, (pageNum - 1) * pageSize, pageSize);
    }

    @Override
    public List<Map<String, Object>> BatchForJZH(List<String> jzhs) {
        return ecgDeptMapper.BatchForJZH(jzhs);
    }

    @Override
    public List<Map<String, Object>> BatchForJZHAndAdmissTimes(List<Map<String, Object>> datas) {
        return ecgDeptMapper.BatchForJZHAndAdmissTimes(datas);
    }

    @Override
    public List<Map<String, Object>> BatchForZYHAndAdmissTimes(List<Map<String, Object>> datas) {
        return ecgDeptMapper.BatchForZYHAndAdmissTimes(datas);
    }

    @Override
    public List<Map<String, Object>> BatchForEXAMTIME(List<Map<String, Object>> datas) {
        return ecgDeptMapper.BatchForEXAMTIME(datas);
    }


}
