package sgc.portal.qc.qc0102.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.qc.qc0101.dto.QC01010001USearch;
import sgc.portal.qc.qc0102.dto.QC01020001USearch;
import sgc.portal.qc.qc0102.service.QC01020001UService;

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

@RestController
@RequestMapping("/qc/qc0102")
public class QC01020001UController {
	
    private final QC01020001UService service;

    public QC01020001UController(QC01020001UService service) {
        this.service = service;
    }
    
    @PostMapping("/QC01020001U/selectQcStndPrcgList30")
    public List<EasyHashMap<String, Object>> selectQcStndPrcgList30(@RequestBody QC01020001USearch search) {
        return service.selectQcStndPrcgList30(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndGudlList30")
    public List<EasyHashMap<String, Object>> selectQcStndGudlList30(@RequestBody QC01020001USearch search) {
        return service.selectQcStndGudlList30(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndPrcgList")
    public List<EasyHashMap<String, Object>> selectQcStndPrcgList(@RequestBody QC01020001USearch search) {
        return service.selectQcStndPrcgList(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndGudlList")
    public List<EasyHashMap<String, Object>> selectQcStndGudlList(@RequestBody QC01020001USearch search) {
        return service.selectQcStndGudlList(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndPrcgFileList")
    public List<EasyHashMap<String, Object>> selectQcStndPrcgFileList(@RequestBody QC01020001USearch search) {
        return service.selectQcStndPrcgFileList(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndGudlFileList")
    public List<EasyHashMap<String, Object>> selectQcStndGudlFileList(@RequestBody QC01020001USearch search) {
        return service.selectQcStndGudlFileList(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndContextList")
    public List<EasyHashMap<String, Object>> selectQcStndContextList(@RequestBody QC01020001USearch search) {
        return service.selectQcStndContextList(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndList")
    public Map<String, Object> selectQcStndList(@RequestBody QC01020001USearch search) {
    	
    	Map<String, Object> resultMap = new HashMap<String, Object>();
    	
    	List<EasyHashMap<String, Object>>  list1R = service.selectQcStndRList(search);
    	List<EasyHashMap<String, Object>>  list2R = service.selectHeaderUpList1(search);
    	List<EasyHashMap<String, Object>>  list3R = service.selectHeaderDownList1(search);
    	
    	List<EasyHashMap<String, Object>>  list1A = service.selectQcStndAList(search);
    	List<EasyHashMap<String, Object>>  list2A = service.selectHeaderUpList2(search);
    	List<EasyHashMap<String, Object>>  list3A = service.selectHeaderDownList2(search);
    	
    	List<EasyHashMap<String, Object>>  list1M = service.selectQcStndMList(search);
    	List<EasyHashMap<String, Object>>  list2M = service.selectHeaderUpList3(search);
    	List<EasyHashMap<String, Object>>  list3M = service.selectHeaderDownList3(search);
    	
    	List<EasyHashMap<String, Object>>  list1E = service.selectQcStndEList(search);
    	List<EasyHashMap<String, Object>>  list2E = service.selectHeaderUpList4(search);
    	List<EasyHashMap<String, Object>>  list3E = service.selectHeaderDownList4(search);
    	
    	List<EasyHashMap<String, Object>>  list1S = service.selectQcStndSList(search);
    	List<EasyHashMap<String, Object>>  list2S = service.selectHeaderUpList5(search);
    	List<EasyHashMap<String, Object>>  list3S = service.selectHeaderDownList5(search);
    	
    	int count1 = service.selectQcStndRCount(search);
    	int count2 = service.selectQcStndACount(search);
    	int count3 = service.selectQcStndMCount(search);
    	int count4 = service.selectQcStndECount(search);
    	int count5 = service.selectQcStndSCount(search);
    	
    	resultMap.put("dcdataList1"			, list1R);
    	resultMap.put("dsHeaderUpList1"		, list2R);
        resultMap.put("dsHeaderDownList1"	, list3R);
        
        resultMap.put("dcdataList2"			, list1A);
    	resultMap.put("dsHeaderUpList2"		, list2A);
        resultMap.put("dsHeaderDownList2"	, list3A);
        
        resultMap.put("dcdataList3"			, list1M);
    	resultMap.put("dsHeaderUpList3"		, list2M);
        resultMap.put("dsHeaderDownList3"	, list3M);
        
        resultMap.put("dcdataList4"			, list1E);
    	resultMap.put("dsHeaderUpList4"		, list2E);
        resultMap.put("dsHeaderDownList4"	, list3E);
        
        resultMap.put("dcdataList5"			, list1S);
    	resultMap.put("dsHeaderUpList5"		, list2S);
        resultMap.put("dsHeaderDownList5"	, list3S);
        
        resultMap.put("dsCount1"	, count1);
        resultMap.put("dsCount2"	, count2);
        resultMap.put("dsCount3"	, count3);
        resultMap.put("dsCount4"	, count4);
        resultMap.put("dsCount5"	, count5);
        
        return resultMap;
    }
    
    
    @PostMapping("/QC01020001U/selectQcStndTreeListNext")
    public List<EasyHashMap<String, Object>> selectQcStndTreeListNext(@RequestBody QC01020001USearch search) {
        return service.selectQcStndTreeListNext(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndListNext")
    public List<EasyHashMap<String, Object>> selectQcStndListNext(@RequestBody QC01020001USearch search) {
        return service.selectQcStndListNext(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndPrcgFrmtAflIdList")
    public List<EasyHashMap<String, Object>> selectQcStndPrcgFrmtAflIdList(@RequestBody QC01020001USearch search) {
        return service.selectQcStndPrcgFrmtAflIdList(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndGudlNmList")
    public List<EasyHashMap<String, Object>> selectQcStndGudlNmList(@RequestBody QC01020001USearch search) {
        return service.selectQcStndGudlNmList(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndPrcgListNext")
    public List<EasyHashMap<String, Object>> selectQcStndPrcgListNext(@RequestBody QC01020001USearch search) {
        return service.selectQcStndPrcgListNext(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndGudlListNext")
    public List<EasyHashMap<String, Object>> selectQcStndGudlListNext(@RequestBody QC01020001USearch search) {
        return service.selectQcStndGudlListNext(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndPrcgGudlAflIdListNext")
    public List<EasyHashMap<String, Object>> selectQcStndPrcgGudlAflIdListNext(@RequestBody QC01020001USearch search) {
        return service.selectQcStndPrcgGudlAflIdListNext(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndPrcgHisFrmtAflIdListNext")
    public List<EasyHashMap<String, Object>> selectQcStndPrcgHisFrmtAflIdListNext(@RequestBody QC01020001USearch search) {
        return service.selectQcStndPrcgHisFrmtAflIdListNext(search);
    }
    
    @PostMapping("/QC01020001U/selectQcStndGudlGudlRelAflIdListNext")
    public List<EasyHashMap<String, Object>> selectQcStndGudlGudlRelAflIdListNext(@RequestBody QC01020001USearch search) {
        return service.selectQcStndGudlGudlRelAflIdListNext(search);
    }
}