package sgc.portal.cs.cs0102.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.cs0102.service.CS01020001UService;
import sgc.portal.cs.cs0102.dto.CS01020001USearch;
import sgc.portal.cs.cs0102.model.CS01020001U;
import sgc.portal.cs.cs0102.model.CS01020002U;
import sgc.portal.cs.cs0102.model.CS01020003U;
import sgc.portal.cs.cs0102.model.CS01020004U;
import sgc.portal.cs.cs0102.model.CS01020005U;
import sgc.portal.cs.cs0102.model.CS01020006U;

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

@RestController
@RequestMapping("/cs/cs0102")
public class CS01020001UController {
	
	private final CS01020001UService service;

    public CS01020001UController(CS01020001UService service) {
        this.service = service;
    }

    //하자대공종 조회
    @PostMapping("/CS01020001U/selectTcsStdLjobtypList")
    public List<EasyHashMap<String, Object>> selectTcsStdLjobtypList(@RequestBody CS01020001USearch search) {
        return service.selectTcsStdLjobtypList(search);
    }

	//하자대공종 등록 수정 삭제
    @PostMapping("/CS01020001U/saveTcsStdLjobtyp")
    public Map<String, String> saveTcsStdLjobtyp(@RequestBody List<CS01020001U> CS01020001U) {
    	return service.saveTcsStdLjobtyp(CS01020001U);
    }
    
    //위치 조회
    @PostMapping("/CS01020001U/selectTcsStdLocList")
    public List<EasyHashMap<String, Object>> selectTcsStdLocList(@RequestBody CS01020001USearch search) {
        return service.selectTcsStdLocList(search);
    }

	//위치 등록 수정 삭제
    @PostMapping("/CS01020001U/saveTcsStdLoc")
    public void saveTcsStdLoc(@RequestBody List<CS01020002U> CS01020002U) {
    	service.saveTcsStdLoc(CS01020002U);
    }
    
    //하자공종 조회
    @PostMapping("/CS01020001U/selectTcsStdJobtypList")
    public List<EasyHashMap<String, Object>> selectTcsStdJobtypList(@RequestBody CS01020001USearch search) {
        return service.selectTcsStdJobtypList(search);
    }
    
    //하자공종 트리 조회
    @PostMapping("/CS01020001U/selectTcsStdJobtypTreeList")
    public List<EasyHashMap<String, Object>> selectTcsStdJobtypTreeList(@RequestBody CS01020001USearch search) {
        return service.selectTcsStdJobtypTreeList(search);
    }
    
    //하자공종  대공종 콤보 조회
    @PostMapping("/CS01020001U/selectTcsStdJobtypCommList")
    public List<EasyHashMap<String, Object>> selectTcsStdJobtypCommList(@RequestBody CS01020001USearch search) {
        return service.selectTcsStdJobtypCommList(search);
    }

	//하자공종 등록 수정 삭제
    @PostMapping("/CS01020001U/saveTcsStdJobtyp")
    public Map<String, String> saveTcsStdJobtyp(@RequestBody List<CS01020003U> CS01020003U) {
    	return service.saveTcsStdJobtyp(CS01020003U);
    }
    
    //하자유형 조회
    @PostMapping("/CS01020001U/selectTcsStdTypeList")
    public List<EasyHashMap<String, Object>> selectTcsStdTypeList(@RequestBody CS01020001USearch search) {
        return service.selectTcsStdTypeList(search);
    }

	//하자유형 등록 수정 삭제
    @PostMapping("/CS01020001U/saveTcsStdType")
    public void saveTcsStdType(@RequestBody List<CS01020004U> CS01020004U) {
    	service.saveTcsStdType(CS01020004U);
    }
    
    //하자원인 조회
    @PostMapping("/CS01020001U/selectTcsStdCausList")
    public List<EasyHashMap<String, Object>> selectTcsStdCausList(@RequestBody CS01020001USearch search) {
        return service.selectTcsStdCausList(search);
    }

	//하자원인 등록 수정 삭제
    @PostMapping("/CS01020001U/saveTcsStdCaus")
    public void saveTcsStdCaus(@RequestBody List<CS01020005U> CS01020005U) {
    	service.saveTcsStdCaus(CS01020005U);
    }
    
    //상품분류 조회
    @PostMapping("/CS01020001U/selectTcsProdList")
    public List<EasyHashMap<String, Object>> selectTcsProdList(@RequestBody CS01020001USearch search) {
        return service.selectTcsProdList(search);
    }

	//상품분류 등록 수정 삭제
    @PostMapping("/CS01020001U/saveTcsProd")
    public void saveTcsProd(@RequestBody List<CS01020006U> CS01020006U) {
    	service.saveTcsProd(CS01020006U);
    }
}
