File was renamed from src/main/java/kr/wisestone/owl/web/controller/IspController.java |
| | |
| | | package kr.wisestone.owl.web.controller; |
| | | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.service.IspService; |
| | | import kr.wisestone.owl.service.IspFieldService; |
| | | import kr.wisestone.owl.web.condition.IspCondition; |
| | | import kr.wisestone.owl.web.form.IspForm; |
| | | import kr.wisestone.owl.web.form.IspFieldForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.http.MediaType; |
| | |
| | | import java.util.Map; |
| | | |
| | | @Controller |
| | | public class IspController extends BaseController{ |
| | | public class IspFieldController extends BaseController{ |
| | | |
| | | @Autowired |
| | | private IspService IspService; |
| | | private IspFieldService IspFieldService; |
| | | |
| | | // 업체 생성 |
| | | @RequestMapping(value = "/isp/add", method = RequestMethod.POST) |
| | |
| | | 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.IspService.addCompany(IspForm.make(content)); |
| | | this.IspFieldService.add(IspFieldForm.make(content)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params)); |
| | | |
| | | this.IspService.findCompany(resJsonData, IspCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); |
| | | this.IspFieldService.find(resJsonData, IspCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | @ResponseBody |
| | | Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.IspService.detailCompany(resJsonData, IspCondition.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | this.IspFieldService.detail(resJsonData, IspCondition.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | Map<String, Object> modify(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.IspService.modifyCompany(IspForm.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | this.IspFieldService.modify(IspFieldForm.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); |
| | | |
| | | this.IspService.removeCompany(IspForm.make(content)); |
| | | this.IspFieldService.remove(IspFieldForm.make(content)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | // 업체 엑셀 다운로드 |
| | | @RequestMapping(value = "/isp/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.IspService.downloadExcel(request, model); |
| | | return this.IspFieldService.downloadExcel(request, model); |
| | | } |
| | | } |
| | | |