package sgc.portal.cs.cs0301.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cs.cs0301.dto.CS03010001USearch;
import sgc.portal.cs.cs0301.model.CS03010001P;
import sgc.portal.cs.cs0301.model.CS03010001U;
import sgc.portal.cs.cs0301.model.CS03010002P;
import sgc.portal.cs.cs0301.service.CS03010001UService;

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

@RestController
@RequestMapping("/cs/cs0301")
public class CS03010001UController {
    private final CS03010001UService service;

    public CS03010001UController(CS03010001UService service) {
        this.service = service;
    }
    
    /*하자리스트*/
    @PostMapping("/CS03010001U/getDeftList")
    public List<EasyHashMap<String, Object>> getDeftList(@RequestBody CS03010001USearch search) {
        return service.getDeftList(search);
    }
    
    /*하자리스트 카운트*/
    @PostMapping("/CS03010001U/getDeftCountList")
    public List<EasyHashMap<String, Object>> getDeftCountList(@RequestBody CS03010001USearch search) {
        return service.getDeftCountList(search);
    }
    
    /*하자경과리스트*/
    @PostMapping("/CS03010001U/getDeftElpsList")
    public List<EasyHashMap<String, Object>> getDeftElpsList(@RequestBody CS03010001USearch search) {
        return service.getDeftElpsList(search);
    }

    /*접수처리*/
    @PostMapping("/CS03010001U/saveDeft")
    public Map<String, String> saveDeft(@RequestBody List<CS03010001U> CS03010001U) {
    	return service.saveDeft(CS03010001U);
    }
    
    /*SMS전송처리경과*/
    @PostMapping("/CS03010001U/saveDeftElpsSms")
    public Map<String, String> saveDeftElpsSms(@RequestBody CS03010001U CS03010001U) {
    	return service.saveDeftElpsSms(CS03010001U);
    }
    
    /*첨부파일*/
    @PostMapping("/CS03010001U/saveAflId")
    public Map<String, String> saveAflId(@RequestBody CS03010001U CS03010001U) {
    	return service.saveAflId(CS03010001U);
    }
    
    /*작업지시서 전송 리스트 조회*/
    @PostMapping("/CS03010001U/getWorkWkiList")
    public List<EasyHashMap<String, Object>> getWorkWkiList(@RequestBody CS03010001USearch search) {
        return service.getWorkWkiList(search);
    }
    
    /*작업지시서전송 처리경과*/
    @PostMapping("/CS03010001U/saveDeftElpsWork")
    public Map<String, String> saveDeftElpsWork(@RequestBody CS03010001U CS03010001U) {
    	return service.saveDeftElpsWork(CS03010001U);
    }
    
    /*완료처리 리스트 조회*/
    @PostMapping("/CS03010001U/getDeftCompliteList")
    public List<EasyHashMap<String, Object>> getDeftCompliteList(@RequestBody CS03010001USearch search) {
        return service.getDeftCompliteList(search);
    }
    
    /*완료처리 처리경과*/
    @PostMapping("/CS03010001U/saveDeftComplite")
    public Map<String, String> saveDeftComplite(@RequestBody CS03010001U CS03010001U) {
    	return service.saveDeftComplite(CS03010001U);
    }
}
