package sgc.portal.base.web;

import sgc.portal.base.model.ParticularsOfAccountPop;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.base.service.ComParticularsOfAccountPopService;
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.List;


/**
 * 콤보 박스(부서) 컨트롤러.
 *
 * @author beomgeun.lee
* @version 1.0.0
 * @since 2020. 9. 22.
 */
@RestController
public class ComParticularsOfAccountPopController {

    @Autowired
    private ComParticularsOfAccountPopService comParticularsOfAccountPopService;

    /**
     * Select dept list easy hash map.
     *
     * @param particularsOfAccountPop the particulars of account pop
     * @return the easy hash map
     */
    @PostMapping(value = "/com/cmm/selectParticularsOfAccountPopup")
    public EasyHashMap<String, Object> selectDeptList(@RequestBody ParticularsOfAccountPop particularsOfAccountPop) {
        return comParticularsOfAccountPopService.selectParticularsOfAccountPopup(particularsOfAccountPop);
    }


    /**
     * Select particulars of account popup list list.
     *
     * @param particularsOfAccountPop the particulars of account pop
     * @return the list
     */
    @PostMapping(value = "/com/cmm/selectParticularsOfAccountPopupList")
    public List<EasyHashMap<String, Object>> selectParticularsOfAccountPopupList(@RequestBody ParticularsOfAccountPop particularsOfAccountPop) {
        return comParticularsOfAccountPopService.selectParticularsOfAccountPopupList(particularsOfAccountPop);
    }


    /**
     * Save particulars of account popup.
     *
     * @param particularsOfAccountPops the particulars of account pops
     */
    @PostMapping(value = "/com/cmm/saveParticularsOfAccountPopup")
    public void saveParticularsOfAccountPopup(@RequestBody List<ParticularsOfAccountPop> particularsOfAccountPops){
        comParticularsOfAccountPopService.saveParticularsOfAccountPopup(particularsOfAccountPops);
    }

}