package com.madeu.service.mobile.mobiletreatment.impl;

import com.madeu.constants.Constants;
import com.madeu.dao.mobile.mobileuser.MobileUserSqlMapDAO;
import com.madeu.dao.mobile.mobiletreatment.MobileTreatmentSqlMapDAO;
import com.madeu.service.mobile.mobiletreatment.MobileTreatmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

@Slf4j
@Service("MobileTreatmentService")
public class MobileTreatmentServiceImpl implements MobileTreatmentService {
	
	@Autowired
	private MobileTreatmentSqlMapDAO mobileTreatmentSqlMapDAO;
	
	@Autowired
	private MobileUserSqlMapDAO mobileUserSqlMapDAO;
	
	/**
	 * 진료 리스트 조회 (option)
	 *
	 *
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	@Override
	public HashMap<String, Object> selectListTreatmentOption(
			HashMap<String, Object> paramMap) throws Exception {
		log.debug("MobileTreatmentServiceImpl selectListTreatmentOption START");

		HashMap<String, Object> map = new HashMap<String, Object>();

		log.debug("loginMemberId       :"+paramMap.get("loginMemberId"));
		
		log.debug("menuClass           :"+paramMap.get("menuClass"));

		try{
			boolean check  = true;
			
			if(true == check){
				List<Map<String, Object>> listMap = mobileTreatmentSqlMapDAO.selectListTreatmentOption(paramMap);
				
				map.put("msgCode", Constants.OK);
				map.put("success","true");
				map.put("rows",listMap);
			}
		}
		catch(Exception e){
			e.printStackTrace();
			throw e;
		}
		log.debug("MobileTreatmentServiceImpl selectListTreatmentOption END");
		return map;
	}

}
