| | |
| | | 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; |
| | |
| | | @Autowired |
| | | private IspFieldService IspFieldService; |
| | | |
| | | // 업체 생성 |
| | | // ISP 생성 |
| | | @RequestMapping(value = "/ispField/add", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 조회 |
| | | // ISP 조회 |
| | | @RequestMapping(value = "/ispField/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 상세 조회 |
| | | // ISP 상세 조회 |
| | | @RequestMapping(value = "/ispField/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 수정 |
| | | // ISP 수정 |
| | | @RequestMapping(value = "/ispField/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업체 삭제 |
| | | // ISP 삭제 |
| | | @RequestMapping(value = "/ispField/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | |
| | | // 업체 엑셀 다운로드 |
| | | // ISP 엑셀 다운로드 |
| | | @RequestMapping(value = "/ispField/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.IspFieldService.downloadExcel(request, model); |
| | | } |
| | | |
| | | // ISP Import 용 엑셀 템플릿 다운로드 |
| | | @RequestMapping(value = "/ispField/downloadExcelTemplate", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcelImport(HttpServletRequest request, Model model) { |
| | | return this.IspFieldService.downloadExcelTemplate(request, model); |
| | | } |
| | | |
| | | // ISP 엑셀 등록 |
| | | @RequestMapping(value = "/ispField/importExcel", method = RequestMethod.POST) |
| | | public @ResponseBody Map<String, Object> importExcel(MultipartHttpServletRequest request) throws Exception { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.IspFieldService.importExcel(request.getFile("file")); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | } |
| | | |