| | |
| | | @Id |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | @Id |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | package kr.wisestone.owl.mapper; |
| | | |
| | | import kr.wisestone.owl.web.condition.CompanyFieldCondition; |
| | | import kr.wisestone.owl.web.condition.DepartmentManageCondition; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | package kr.wisestone.owl.mapper; |
| | | |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | | import kr.wisestone.owl.web.condition.UserLevelCondition; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | public class HostingFieldVo extends BaseVo{ |
| | | |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | |
| | | public HostingFieldVo() {} |
| | | |
| | | public HostingFieldVo(Long id, String name, String manager, String tel, String email, String memo) { |
| | | public HostingFieldVo(Long id, String code, String name, String manager, String tel, String email, String memo) { |
| | | |
| | | this.id = id; |
| | | this.code = code; |
| | | this.name = name; |
| | | this.manager = manager; |
| | | this.tel = tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | public class IspFieldVo extends BaseVo{ |
| | | |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | |
| | | public IspFieldVo() {} |
| | | |
| | | public IspFieldVo(Long id, String name, String manager, String tel, String email, String memo) { |
| | | public IspFieldVo(Long id, String code, String name, String manager, String tel, String email, String memo) { |
| | | |
| | | this.id = id; |
| | | this.code = code; |
| | | this.name = name; |
| | | this.manager = manager; |
| | | this.tel = tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | |
| | | public class HostingFieldCondition { |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | |
| | | public class IspFieldCondition { |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | private HostingFieldService HostingFieldService; |
| | | |
| | | // 업체 생성 |
| | | @RequestMapping(value = "/hosting/add", method = RequestMethod.POST) |
| | | @RequestMapping(value = "/hostingField/add", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> add(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 조회 |
| | | @RequestMapping(value = "/hosting/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/hostingField/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> find(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 상세 조회 |
| | | @RequestMapping(value = "/hosting/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/hostingField/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 수정 |
| | | @RequestMapping(value = "/hosting/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/hostingField/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> modify(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 삭제 |
| | | @RequestMapping(value = "/hosting/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/hostingField/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | |
| | | |
| | | // 업체 엑셀 다운로드 |
| | | @RequestMapping(value = "/hosting/downloadExcel", method = RequestMethod.POST) |
| | | @RequestMapping(value = "/hostingField/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.HostingFieldService.downloadExcel(request, model); |
| | | } |
| | |
| | | private IspFieldService IspFieldService; |
| | | |
| | | // 업체 생성 |
| | | @RequestMapping(value = "/isp/add", method = RequestMethod.POST) |
| | | @RequestMapping(value = "/ispField/add", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> add(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 조회 |
| | | @RequestMapping(value = "/isp/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/ispField/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> find(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 상세 조회 |
| | | @RequestMapping(value = "/isp/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/ispField/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 수정 |
| | | @RequestMapping(value = "/isp/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/ispField/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> modify(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | } |
| | | |
| | | // 업체 삭제 |
| | | @RequestMapping(value = "/isp/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | @RequestMapping(value = "/ispField/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { |
| | |
| | | |
| | | |
| | | // 업체 엑셀 다운로드 |
| | | @RequestMapping(value = "/isp/downloadExcel", method = RequestMethod.POST) |
| | | @RequestMapping(value = "/ispField/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.IspFieldService.downloadExcel(request, model); |
| | | } |
| | |
| | | |
| | | public class HostingFieldForm { |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | |
| | | public class IspFieldForm { |
| | | private Long id; |
| | | private String code; |
| | | private String name; |
| | | private String manager; |
| | | private String tel; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | |
| | | CREATE TABLE `isp`( |
| | | `id` BIGINT(11) AUTO_INCREMENT, |
| | | `code` varchar (50) NOT NULL, |
| | | `name` VARCHAR(50) NOT NULL, |
| | | `manager` VARCHAR(50) NULL, |
| | | `tel` VARCHAR (50) NULL, |
| | |
| | | |
| | | CREATE TABLE `hosting`( |
| | | `id` BIGINT(11) AUTO_INCREMENT, |
| | | `code` varchar (50) NOT NULL, |
| | | `name` VARCHAR(50) NOT NULL, |
| | | `manager` VARCHAR(50) NULL, |
| | | `tel` VARCHAR (50) NULL, |
| | |
| | | |
| | | <select id="find" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.HostingFieldCondition"> |
| | | SELECT |
| | | h.id as id, |
| | | h.name as name, |
| | | h.manager as manager, |
| | | h.tel as tel, |
| | | h.email as email, |
| | | h.memo as memo |
| | | ht.id as id, |
| | | ht.code as code, |
| | | ht.name as name, |
| | | ht.manager as manager, |
| | | ht.tel as tel, |
| | | ht.email as email, |
| | | ht.memo as memo |
| | | FROM |
| | | hosting h |
| | | hosting ht |
| | | WHERE 1=1 |
| | | <if test="name != '' and name != null"> |
| | | AND h.name like CONCAT('%',#{name},'%') |
| | | AND ht.name like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="id != '' and id != null"> |
| | | AND h.id like CONCAT('%',#{id},'%') |
| | | AND ht.id like CONCAT('%',#{id},'%') |
| | | </if> |
| | | <if test="pageSize != '' and pageSize != null"> |
| | | limit #{pageSize} offset #{page}; |
| | |
| | | |
| | | <select id="count" resultType="java.lang.Long" parameterType="kr.wisestone.owl.web.condition.HostingFieldCondition"> |
| | | SELECT |
| | | count(h.id) |
| | | count(ht.id) |
| | | FROM |
| | | hosting h |
| | | hosting ht |
| | | WHERE 1=1 |
| | | <if test="name != '' and name != null"> |
| | | AND h.name like CONCAT('%',#{name},'%') |
| | | AND ht.name like CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="id != '' and id != null"> |
| | | AND h.id like CONCAT('%',#{id},'%') |
| | | AND ht.id like CONCAT('%',#{id},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="find" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.IspFieldCondition"> |
| | | SELECT |
| | | i.id as id, |
| | | i.code as code, |
| | | i.name as name, |
| | | i.manager as manager, |
| | | i.tel as tel, |