OWL ITS + 탐지시스템(인터넷 진흥원)
wyu
2021-11-09 f23d2851838aa1b1a9bc7884f3eaa2861c043362
src/main/java/kr/wisestone/owl/web/controller/HostingFieldController.java
File was renamed from src/main/java/kr/wisestone/owl/web/controller/HostingController.java
@@ -1,9 +1,9 @@
package kr.wisestone.owl.web.controller;
import kr.wisestone.owl.constant.Constants;
import kr.wisestone.owl.service.HostingService;
import kr.wisestone.owl.web.condition.HostingCondition;
import kr.wisestone.owl.web.form.HostingForm;
import kr.wisestone.owl.service.HostingFieldService;
import kr.wisestone.owl.web.condition.HostingFieldCondition;
import kr.wisestone.owl.web.form.HostingFieldForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.MediaType;
@@ -20,10 +20,10 @@
import java.util.Map;
@Controller
public class HostingController extends BaseController{
public class HostingFieldController extends BaseController{
    @Autowired
    private HostingService HostingService;
    private HostingFieldService HostingFieldService;
    // 업체 생성
    @RequestMapping(value = "/hosting/add", method = RequestMethod.POST)
@@ -32,7 +32,7 @@
    Map<String, Object> add(@RequestBody Map<String, Map<String, Object>> params) {
        Map<String, Object> resJsonData = new HashMap<>();
        Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT);
        this.HostingService.addCompany(HostingForm.make(content));
        this.HostingFieldService.add(HostingFieldForm.make(content));
        return this.setSuccessMessage(resJsonData);
    }
@@ -45,7 +45,7 @@
        Map<String, Object> resJsonData = new HashMap<>();
        Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params));
        this.HostingService.findCompany(resJsonData, HostingCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable);
        this.HostingFieldService.find(resJsonData, HostingFieldCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable);
        return this.setSuccessMessage(resJsonData);
    }
@@ -56,7 +56,7 @@
    @ResponseBody
    Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) {
        Map<String, Object> resJsonData = new HashMap<>();
        this.HostingService.detailCompany(resJsonData, HostingCondition.make(params.get(Constants.REQ_KEY_CONTENT)));
        this.HostingFieldService.detail(resJsonData, HostingFieldCondition.make(params.get(Constants.REQ_KEY_CONTENT)));
        return this.setSuccessMessage(resJsonData);
    }
@@ -68,7 +68,7 @@
    Map<String, Object> modify(@RequestBody Map<String, Map<String, Object>> params) {
        Map<String, Object> resJsonData = new HashMap<>();
        this.HostingService.modifyCompany(HostingForm.make(params.get(Constants.REQ_KEY_CONTENT)));
        this.HostingFieldService.modify(HostingFieldForm.make(params.get(Constants.REQ_KEY_CONTENT)));
        return this.setSuccessMessage(resJsonData);
    }
@@ -81,7 +81,7 @@
        Map<String, Object> resJsonData = new HashMap<>();
        Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT);
        this.HostingService.removeCompany(HostingForm.make(content));
        this.HostingFieldService.remove(HostingFieldForm.make(content));
        return this.setSuccessMessage(resJsonData);
    }
@@ -90,7 +90,7 @@
    // 업체 엑셀 다운로드
    @RequestMapping(value = "/hosting/downloadExcel", method = RequestMethod.POST)
    public ModelAndView downloadExcel(HttpServletRequest request, Model model) {
        return this.HostingService.downloadExcel(request, model);
        return this.HostingFieldService.downloadExcel(request, model);
    }
}