package com.izouma.jmrh.service;

import com.izouma.jmrh.domain.OrgInfo;
import com.izouma.jmrh.exception.BusinessException;
import com.izouma.jmrh.repo.*;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
@AllArgsConstructor
public class OrgInfoService {

    private OrgInfoRepo orgInfoRepo;

    public Map<String, Object> getAllCount(Long id){
        HashMap<String, Object> map = new HashMap<>();
        OrgInfo orgInfo = orgInfoRepo.findById(id).orElseThrow(new BusinessException("无记录"));
        map.put("orgInfo",orgInfo);
        return map;
    }

}
