package sgc.portal.cs.cs0001.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.com.auth.model.PrvtinfoFindHist;
import sgc.portal.com.auth.model.SmComHdlgAuth;
import sgc.portal.com.auth.service.MaskingDesabledService;
import sgc.portal.com.com.service.ComAuthUserMngService;
import sgc.portal.cs.cs0001.service.CS00010001UService;
import sgc.portal.cs.cs0103.model.CS01030001U;
import sgc.portal.cs.cs0001.dto.CS00010001USearch;
import sgc.portal.cs.cs0001.model.CS00010001U;
import sgc.portal.cs.cs0001.model.CS00010002U;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/cs/cs0001")
public class CS00010001UController {
	
	private final CS00010001UService service;

    public CS00010001UController(CS00010001UService service) {
        this.service = service;
    }

	//협력업체관리 조회
    @PostMapping("/CS00010001U/selectSmComCovendList")
    public List<EasyHashMap<String, Object>> selectSmComCovendList(@RequestBody CS00010001USearch search) {
        return service.selectSmComCovendList(search);
    }
    
    //협력업체관리팝업 조회
    @PostMapping("/CS00010001U/selectSmComCovendPopList")
    public EasyHashMap<String, Object> selectSmComCovendPopList(@RequestBody CS00010001USearch search) {
        return service.selectSmComCovendPopList(search);
    }
    
    //협력업체 업체유형 조회
    @PostMapping("/CS00010001U/selectSmComCovendTypePopList")
    public List<EasyHashMap<String, Object>> selectSmComCovendTypePopList(@RequestBody CS00010001USearch search) {
        return service.selectSmComCovendTypePopList(search);
    }
    
    //협력업체 담당자정보 조회
    @PostMapping("/CS00010001U/selectSmComCovendChrgrPopList")
    public List<EasyHashMap<String, Object>> selectSmComCovendChrgrPopList(@RequestBody CS00010001USearch search) {
        return service.selectSmComCovendChrgrPopList(search);
    }
    
    @PostMapping("/CS00010001U/selectSmComCovendChrgrUserIdList")
    public List<EasyHashMap<String, Object>> selectSmComCovendChrgrUserIdList(@RequestBody CS00010001USearch search) {
        return service.selectSmComCovendChrgrUserIdList(search);
    }
    
    @PostMapping("/CS00010001U/selectSmComCovendCorpRegNoList")
    public List<EasyHashMap<String, Object>> selectSmComCovendCorpRegNoList(@RequestBody CS00010001USearch search) {
        return service.selectSmComCovendCorpRegNoList(search);
    }
    
    //협력업체관리팝업 등록
    @PostMapping("/CS00010001U/saveSmComCovend")
    public Map<String, String> saveSmComCovend(@RequestBody CS00010001U cS00010001U) {
    	return service.saveSmComCovend(cS00010001U);
    }
    
    //협력업체 담당자정보팝업  등록
    @PostMapping("/CS00010001U/saveSmComCovendChrgr")
    public Map<String, String> saveSmComCovendChrgr(@RequestBody List<CS00010002U> CS00010002U) {
    	return service.saveSmComCovendChrgr(CS00010002U);
    }
    
    //협력업체  삭제
    @PostMapping("/CS00010001U/deleteSmComCovend")
    public Map<String, String> deleteSmComCovend(@RequestBody CS00010001U cS00010001U) {
    	return service.deleteSmComCovend(cS00010001U);
    }
    
    //협력업체  첨부파일
    @PostMapping("/CS00010001U/updateSmComCovendAflId")
    public Map<String, String> updateSmComCovendAflId(@RequestBody CS00010001U cS00010001U) {
    	return service.updateSmComCovendAflId(cS00010001U);
    }
}
