package sgc.portal.cs.cs0103.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.cs0103.service.CS01030001UService;
import sgc.portal.cs.cs0103.dto.CS01030001USearch;
import sgc.portal.cs.cs0103.model.CS01030000U;
import sgc.portal.cs.cs0103.model.CS01030001U;
import sgc.portal.cs.cs0103.model.CS01030002U;
import sgc.portal.cs.cs0103.model.CS01030003U;
import sgc.portal.cs.cs0103.model.CS01030004U;
import sgc.portal.cs.cs0103.model.CS01030005U;

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

@RestController
@RequestMapping("/cs/cs0103")
public class CS01030001UController {
	
	private final CS01030001UService service;

    public CS01030001UController(CS01030001UService service) {
        this.service = service;
    }

    //하자관리현장 조회
    @PostMapping("/CS01030001U/selectTcsSiteList")
    public List<EasyHashMap<String, Object>> selectTcsSiteList(@RequestBody CS01030001USearch search) {
        return service.selectTcsSiteList(search);
    }
    
    //하자관리현장팝업조회
    @PostMapping("/CS01030001U/selectZehrComDeptToTcsSiteList")
    public List<EasyHashMap<String, Object>> selectZehrComDeptToTcsSiteList(@RequestBody CS01030001USearch search) {
        return service.selectZehrComDeptToTcsSiteList(search);
    }
    
    //상품분류공통조회
    @PostMapping("/CS01030001U/selectProbNoList")
    public List<EasyHashMap<String, Object>> selectProbNoList(@RequestBody CS01030001USearch search) {
        return service.selectProbNoList(search);
    }

	//하자관리현장 등록 수정 삭제
    @PostMapping("/CS01030001U/saveTcsSite")
    public Map<String, String> saveTcsSite(@RequestBody List<CS01030000U> CS01030000U) {
    	return service.saveTcsSite(CS01030000U);
    }
    
    
    
    
    //하자대공종
    //하자대공종  조회
    @PostMapping("/CS01030001U/selectTcsStdLjobtypList")
    public List<EasyHashMap<String, Object>> selectTcsStdLjobtypList(@RequestBody CS01030001USearch search) {
        return service.selectTcsStdLjobtypList(search);
    }
    
    //하자대공종현장  조회
    @PostMapping("/CS01030001U/selectTcsSiteStdLjobtypList")
    public List<EasyHashMap<String, Object>> selectTcsSiteStdLjobtypList(@RequestBody CS01030001USearch search) {
        return service.selectTcsSiteStdLjobtypList(search);
    }
    
    //하자대공종현장 등록
    @PostMapping("/CS01030001U/saveTcsSiteStdLjobtyp")
    public Map<String, String> saveTcsSiteStdLjobtyp(@RequestBody CS01030001U cS01030001U) {
    	return service.saveTcsSiteStdLjobtyp(cS01030001U);
    }
    
    //하자대공종현장 삭제
    @PostMapping("/CS01030001U/deleteTcsSiteStdLjobtyp")
    public Map<String, String> deleteTcsSiteStdLjobtyp(@RequestBody CS01030001U cS01030001U) {
    	return service.deleteTcsSiteStdLjobtyp(cS01030001U);
    }
    
    
    
    //위치
    //위치  조회
    @PostMapping("/CS01030001U/selectTcsStdLocList")
    public List<EasyHashMap<String, Object>> selectTcsStdLocList(@RequestBody CS01030001USearch search) {
        return service.selectTcsStdLocList(search);
    }
    
    //하자위치현장  조회
    @PostMapping("/CS01030001U/selectTcsSiteStdLocList")
    public List<EasyHashMap<String, Object>> selectTcsSiteStdLocList(@RequestBody CS01030001USearch search) {
        return service.selectTcsSiteStdLocList(search);
    }
    
    //하자위치현장 등록
    @PostMapping("/CS01030001U/saveTcsSiteStdLoc")
    public Map<String, String> saveTcsSiteStdLoc(@RequestBody CS01030002U cS01030002U) {
    	return service.saveTcsSiteStdLoc(cS01030002U);
    }
    
    //하자위치현장 삭제
    @PostMapping("/CS01030001U/deleteTcsSiteStdLoc")
    public Map<String, String> deleteTcsSiteStdLoc(@RequestBody CS01030002U cS01030002U) {
    	return service.deleteTcsSiteStdLoc(cS01030002U);
    }
    
    
    
    //하자공종
    //하자공종  조회
    @PostMapping("/CS01030001U/selectTcsStdJobtypList")
    public List<EasyHashMap<String, Object>> selectTcsStdJobtypList(@RequestBody CS01030001USearch search) {
        return service.selectTcsStdJobtypList(search);
    }
    
    //하자공종현장  조회
    @PostMapping("/CS01030001U/selectTcsSiteStdJobtypList")
    public List<EasyHashMap<String, Object>> selectTcsSiteStdJobtypList(@RequestBody CS01030001USearch search) {
        return service.selectTcsSiteStdJobtypList(search);
    }
    
    //하자공종현장 등록
    @PostMapping("/CS01030001U/saveTcsSiteStdJobtyp")
    public Map<String, String> saveTcsSiteStdJobtyp(@RequestBody CS01030003U cS01030003U) {
    	return service.saveTcsSiteStdJobtyp(cS01030003U);
    }
    
    //하자공종현장 삭제
    @PostMapping("/CS01030001U/deleteTcsSiteStdJobtyp")
    public Map<String, String> deleteTcsSiteStdJobtyp(@RequestBody CS01030003U cS01030003U) {
    	return service.deleteTcsSiteStdJobtyp(cS01030003U);
    }
    
    //하자유형
    //하자유형  조회
    @PostMapping("/CS01030001U/selectTcsStdTypeList")
    public List<EasyHashMap<String, Object>> selectTcsStdTypeList(@RequestBody CS01030001USearch search) {
        return service.selectTcsStdTypeList(search);
    }
    
    //하자유형현장  조회
    @PostMapping("/CS01030001U/selectTcsSiteStdTypeList")
    public List<EasyHashMap<String, Object>> selectTcsSiteStdTypeList(@RequestBody CS01030001USearch search) {
        return service.selectTcsSiteStdTypeList(search);
    }
    
    //하자유형현장 등록
    @PostMapping("/CS01030001U/saveTcsSiteStdType")
    public Map<String, String> saveTcsSiteStdType(@RequestBody CS01030004U cS01030004U) {
    	return service.saveTcsSiteStdType(cS01030004U);
    }
    
    //하자유형현장 삭제
    @PostMapping("/CS01030001U/deleteTcsSiteStdType")
    public Map<String, String> deleteTcsSiteStdType(@RequestBody CS01030004U cS01030004U) {
    	return service.deleteTcsSiteStdType(cS01030004U);
    }
    
    
    //하자원인
    //하자원인  조회
    @PostMapping("/CS01030001U/selectTcsStdCausList")
    public List<EasyHashMap<String, Object>> selectTcsStdCausList(@RequestBody CS01030001USearch search) {
        return service.selectTcsStdCausList(search);
    }
    
    //하자원인현장  조회
    @PostMapping("/CS01030001U/selectTcsSiteStdCausList")
    public List<EasyHashMap<String, Object>> selectTcsSiteStdCausList(@RequestBody CS01030001USearch search) {
        return service.selectTcsSiteStdCausList(search);
    }
    
    //하자원인현장 등록
    @PostMapping("/CS01030001U/saveTcsSiteStdCaus")
    public Map<String, String> saveTcsSiteStdCaus(@RequestBody CS01030005U cS01030005U) {
    	return service.saveTcsSiteStdCaus(cS01030005U);
    }
    
    //하자원인현장 삭제
    @PostMapping("/CS01030001U/deleteTcsSiteStdCaus")
    public Map<String, String> deleteTcsSiteStdCaus(@RequestBody CS01030005U cS01030005U) {
    	return service.deleteTcsSiteStdCaus(cS01030005U);
    }
}
