package sgc.portal.cw.cw0901.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0901.dto.CW09010001USearch;
import sgc.portal.cw.cw0901.model.CW09010001U;
import sgc.portal.cw.cw0901.service.CW09010001UService;

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

@RestController
@RequestMapping("/cw/cw0901")
public class CW09010001UController {
	
    private final CW09010001UService service;

    public CW09010001UController(CW09010001UService service) {
        this.service = service;
    }

    @PostMapping("/CW09010001U/selectZehrWeekWorkList")
    public List<EasyHashMap<String, Object>> selectZehrWeekWorkList(@RequestBody CW09010001USearch search) {
        return service.selectZehrWeekWorkList(search);
    }
    
    @PostMapping("/CW09010001U/selectZehrWeekWorkMonthList")
    public List<EasyHashMap<String, Object>> selectZehrWeekWorkMonthList(@RequestBody CW09010001USearch search) {
        return service.selectZehrWeekWorkMonthList(search);
    }
    
    @PostMapping("/CW09010001U/selectZehrWeekWorkAtchfileIdMap")
    public EasyHashMap<String, Object> selectZehrWeekWorkAtchfileIdMap(@RequestBody CW09010001USearch search) {
        return service.selectZehrWeekWorkAtchfileIdMap(search);
    }
    
    @PostMapping("/CW09010001U/selectZehrWeekWorkAtchfileIdList")
    public List<EasyHashMap<String, Object>> selectZehrWeekWorkAtchfileIdList(@RequestBody CW09010001USearch search) {
        return service.selectZehrWeekWorkAtchfileIdList(search);
    }
    
    @PostMapping("/CW09010001U/saveZehrWeekWork")
    public Map<String, String> saveZehrWeekWork(@RequestBody CW09010001U cW09010001U) {
    	return service.saveZehrWeekWork(cW09010001U);
    }
    
    @PostMapping("/CW09010001U/updateZehrWeekWorkAtchfileId1")
    public Map<String, String> updateZehrWeekWorkAtchfileId1(@RequestBody CW09010001U cW09010001U) {
    	return service.updateZehrWeekWorkAtchfileId1(cW09010001U);
    }
    
    @PostMapping("/CW09010001U/updateZehrWeekWorkAtchfileId2")
    public Map<String, String> updateZehrWeekWorkAtchfileId2(@RequestBody CW09010001U cW09010001U) {
    	return service.updateZehrWeekWorkAtchfileId2(cW09010001U);
    }
    
    @PostMapping("/CW09010001U/selectZehrWeekWorkDeptCdList")
    public List<EasyHashMap<String, Object>> selectZehrWeekWorkDeptCdList(@RequestBody CW09010001USearch search) {
        return service.selectZehrWeekWorkDeptCdList(search);
    }
}