package sgc.portal.cd.cd0202.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.cd.cd0202.dto.CD02020001USearch;
import sgc.portal.cd.cd0202.model.CD02020001U;
import sgc.portal.cd.cd0202.service.CD02020001UService;

@RestController
@RequestMapping("/cd/cd0202")
public class CD02020001UController {
    private final CD02020001UService service;

    public CD02020001UController(CD02020001UService service) {
        this.service = service;
    }
    
    //공사일보 승인 조회
    @PostMapping("/CD02020001U/selectComDayWrkList")
    public List<EasyHashMap<String, Object>> getListConDayWrkCal(@RequestBody CD02020001USearch search) {
        return service.getConDayWrkList(search);
    }
    
    //공사일보 결재 반영
    @PostMapping("/CD02020001U/updateConDayWrk")
    public Map<String, String> updateConDayWrk(@RequestBody CD02020001U cD02020001U) {
    	return service.updateConDayWrk(cD02020001U);
    }
   
}
