package sgc.portal.ei.ei0201.web;

import java.util.List;
import java.util.Map;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.ei.ei0201.dto.EI02010001USearch;
import sgc.portal.ei.ei0201.model.EI02010001U;
import sgc.portal.ei.ei0201.service.EI02010001UService;

@RestController
@RequestMapping("/ei/ei0201")
public class EI02010001UController {
	private final EI02010001UService service;

	public EI02010001UController(EI02010001UService service) {
		this.service = service;
	}
	//자금관리 조회
	@PostMapping("/EI02010001U/list1")
	public List<EasyHashMap<String, Object>> getList1(@RequestBody EI02010001USearch search) {
		return service.getList1(search);
	}
	
	//기초이월 조회
	@PostMapping("/EI02010001U/list2")
	public List<EasyHashMap<String, Object>> getList2(@RequestBody EI02010001USearch search) {
		return service.getList2(search);
	}
	
	//저장
	@PostMapping("/EI02010001U/save")
	public Map<String, String> save(@RequestBody Map<String, List<EI02010001U>> eI02010001U) {
		return service.save(eI02010001U);
	}

}
