| | |
| | | package kr.wisestone.owl.web.controller; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.UseCompany; |
| | | import kr.wisestone.owl.constant.UsePartner; |
| | | import kr.wisestone.owl.service.HostingFieldService; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.vo.HostingFieldVo; |
| | | import kr.wisestone.owl.web.condition.HostingFieldCondition; |
| | | import kr.wisestone.owl.web.form.HostingFieldForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Controller |
| | |
| | | @Autowired |
| | | private HostingFieldService HostingFieldService; |
| | | |
| | | // 업체 생성 |
| | | // 호스팅 생성 |
| | | @RequestMapping(value = "/hostingField/add", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 조회 |
| | | // 호스팅 조회 |
| | | @RequestMapping(value = "/hostingField/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 상세 조회 |
| | | // 호스팅 상세 조회 |
| | | @RequestMapping(value = "/hostingField/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 수정 |
| | | // 호스팅 수정 |
| | | @RequestMapping(value = "/hostingField/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 삭제 |
| | | // 호스팅 삭제 |
| | | @RequestMapping(value = "/hostingField/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | } |
| | | |
| | | // 업체/ISP/호스팅 목록 가져오기 |
| | | @RequestMapping(value = "/company/getCompanyList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/company/getPartnerList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> getCompanyList(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> getPartnerList(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | resJsonData.put(Constants.REQ_KEY_CONTENT, UseCompany.getCompanyList()); |
| | | resJsonData.put(Constants.REQ_KEY_CONTENT, UsePartner.getPartnerList()); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | |
| | | // 업체 엑셀 다운로드 |
| | | // 호스팅 엑셀 다운로드 |
| | | @RequestMapping(value = "/hostingField/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.HostingFieldService.downloadExcel(request, model); |
| | | } |
| | | |
| | | // 호스팅 Import 용 엑셀 템플릿 다운로드 |
| | | @RequestMapping(value = "/hostingField/downloadExcelTemplate", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcelImport(HttpServletRequest request, Model model) { |
| | | return this.HostingFieldService.downloadExcelTemplate(request, model); |
| | | } |
| | | |
| | | // 호스팅 엑셀 등록 |
| | | @RequestMapping(value = "/hostingField/importExcel", method = RequestMethod.POST) |
| | | public @ResponseBody Map<String, Object> importExcel(MultipartHttpServletRequest request) throws Exception { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.HostingFieldService.importExcel(request.getFile("file")); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | } |
| | | |