package sgc.portal.cs.cs0301.web;

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

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

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

    public CS03010002PController(CS03010002PService service) {
        this.service = service;
    }
    
    /*조회*/
    @PostMapping("/CS03010002P/getList")
    public EasyHashMap<String, Object> getList(@RequestBody CS03010002PSearch search) {
        return service.getList(search);
    }
    
    /*경과조회*/
    @PostMapping("/CS03010002P/getListElps")
    public List<EasyHashMap<String, Object>> getListElps(@RequestBody CS03010002PSearch search) {
        return service.getListElps(search);
    }
    
    /*경과조회*/
    @PostMapping("/CS03010002P/getChrgrList")
    public List<EasyHashMap<String, Object>> getChrgrList(@RequestBody CS03010002PSearch search) {
        return service.getChrgrList(search);
    }
    
    /*접수처리*/
    @PostMapping("/CS03010002P/saveReceipt")
    public Map<String, String> saveReceipt(@RequestBody CS03010002P CS03010002P) {
    	return service.saveReceipt(CS03010002P);
    }
    
    /*반려처리*/
    @PostMapping("/CS03010002P/saveReject")
    public Map<String, String> saveReject(@RequestBody CS03010002P CS03010002P) {
    	return service.saveReject(CS03010002P);
    }
    
    /*작업완료처리*/
    @PostMapping("/CS03010002P/saveComplete")
    public Map<String, String> saveComplete(@RequestBody CS03010002P CS03010002P) {
    	return service.saveComplete(CS03010002P);
    }
    
    /*최종완료처리*/
    @PostMapping("/CS03010002P/saveFinComplete")
    public Map<String, String> saveFinComplete(@RequestBody CS03010002P CS03010002P) {
    	return service.saveFinComplete(CS03010002P);
    }
    
    /*작업경과등록*/
    @PostMapping("/CS03010002P/saveElpsProcess")
    public Map<String, String> saveElpsProcess(@RequestBody CS03010002P CS03010002P) {
    	return service.saveElpsProcess(CS03010002P);
    }

    /*저장*/
    @PostMapping("/CS03010002P/save")
    public Map<String, Object> save(@RequestBody CS03010002P CS03010002P) {
    	return service.save(CS03010002P);
    }
    
    /*삭제*/
    @PostMapping("/CS03010002P/delete")
    public Map<String, String> delete(@RequestBody CS03010002P CS03010002P) {
    	return service.delete(CS03010002P);
    }
    
    @PostMapping("/CS03010002P/saveDeftElpsSms")
    public Map<String, String> saveDeftElpsSms(@RequestBody CS03010002P CS03010002P) {
    	return service.saveDeftElpsSms(CS03010002P);
    }
   
}
