package sgc.portal.base.web;

import sgc.portal.base.model.ComData;
import sgc.portal.base.model.NewEmpNoUsePopup;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.base.model.EquimentSearch;
import sgc.portal.base.service.ComPopupService;
import sgc.portal.com.com.model.CommDtl;
import sgc.portal.com.com.model.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**********************************************************
 * 시스템명  : 시스템관리(COM)
 * 프로그램ID : ComPopupController
 * 프로그램명   : 팝업화면 Controller
 * @author  : mir(aaaa@aaa.co.kr)
 * @version  :  2020-09-11
 * @since JDK1.8
 * @see   1.최초 작성
 */
@RestController
public class ComPopupController {

    @Autowired
    private ComPopupService comPopupService;

    /**
     * Select comm pop list.
     *
     * @param commdtls the commdtls
     * @return list
     * @throws Exception
     */
//공통내역 코드정보 조회
    @PostMapping(value = "/com/cmm/selectCommPop")
    public List<EasyHashMap<String, Object>> selectCommPop(@RequestBody CommDtl commdtls) {
        return comPopupService.selectCommPop(commdtls);
    }

    /**
     * Select menu pop list.
     *
     * @param mn the mn
     * @return the list
     */
//메뉴목록 조회
    @PostMapping(value = "/com/cmm/selectMenuPop")
    public List<EasyHashMap<String, Object>> selectMenuPop(@RequestBody Menu mn) {

        return comPopupService.selectMenuPop(mn);
    }

    /**
     * Selectcom dpt all pop list.
     *
     * @param comdata the comdata
     * @return the list
     */
//부서 전체 조회  kkh추가(2019.12.19)
    @PostMapping(value = "/com/cmm/selectcomDptAllPop")
    public List<EasyHashMap<String, Object>> selectcomDptAllPop(@RequestBody ComData comdata) {

        return comPopupService.selectcomDptAllPop(comdata);
    }


    /**
     * Select emp pop list.
     *
     * @param comdata the comdata
     * @return the list
     */
//사원 팝업 조회  kkh추가(2020.01.22)
    @PostMapping(value = "/com/cmm/selectEmpPopLst")
    public List<EasyHashMap<String, Object>> selectEmpPopLst(@RequestBody ComData comdata) {
    	
    	return comPopupService.selectEmpPopLst(comdata);
    }

    /**
     * Selectcom site pop list.
     *
     * @param comdata the comdata
     * @return the list
     */
//현장 조회 추가(2023.03.16)
    @PostMapping(value = "/com/cmm/selectcomSitePop")
    public List<EasyHashMap<String, Object>> selectcomSitePop(@RequestBody ComData comdata) {

        return comPopupService.selectcomSitePop(comdata);
    }

    /**
     * Selectcom site pop list.
     *
     * @param comdata the comdata
     * @return the list
     */
//차량정보 조회 추가(2023.05.24)
    @PostMapping(value = "/com/cmm/selectCarInfoLst")
    public List<EasyHashMap<String, Object>> selectCarInfoLst(@RequestBody ComData comdata) {

        return comPopupService.selectCarInfoLst(comdata);
    }

}
