package com.docus.server.his.infrastructure;

import com.docus.server.his.infrastructure.mapper.HisDeptMapper;
import com.docus.server.his.infrastructure.mapper.HisTBasicMapper;
import com.docus.server.his.infrastructure.mapper.HisUserMapper;
import com.docus.server.record.pojo.dto.TBasicDTO;
import com.docus.server.sys.common.pojo.dto.DeptDTO;
import com.docus.server.sys.common.pojo.dto.UserDTO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

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

@Component
@AllArgsConstructor
public class HisSysDao {


    private final HisDeptMapper hisDeptMapper;
    private final HisUserMapper hisUserMapper;
    private final HisTBasicMapper hisTBasicMapper;


    public List<DeptDTO> getDeptListView(Date startDate, Date endDate, long pageNum, long pageSize) {
        return hisDeptMapper.getDeptListView(startDate, endDate, (pageNum - 1) * pageSize, pageSize);
    }


    public List<UserDTO> getUserListView(Date startDate, Date endDate, long pageNum, long pageSize) {
        return hisUserMapper.getUserListView(startDate, endDate, (pageNum - 1) * pageSize, pageSize);
    }

    public void getMedicalRecordListView() {

    }

    public List<TBasicDTO> getTBasicListView(Date startDate, Date endDate, long pageNum, long pageSize) {
        return hisTBasicMapper.getTBasicListView(startDate, endDate, (pageNum - 1) * pageSize, pageSize);
    }
}
