7개 파일 추가됨
3개 파일 이름 변경됨
7개 파일 변경됨
5개 파일 삭제됨
File was renamed from src/main/java/kr/wisestone/owl/domain/DepartmentManagement.java |
| | |
| | | import java.io.Serializable; |
| | | |
| | | @Entity |
| | | public class DepartmentManagement extends BaseEntity implements Serializable { |
| | | public class DepartmentManage extends BaseEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | private String departmentName; |
| | | private String departmentDescription; |
| | | |
| | | public DepartmentManagement() { |
| | | public DepartmentManage() { |
| | | } |
| | | |
| | | public Long getId() { |
| | |
| | | package kr.wisestone.owl.domain; |
| | | |
| | | import kr.wisestone.owl.domain.enumType.SocialType; |
| | | import kr.wisestone.owl.util.CommonUtil; |
| | | import org.springframework.security.core.GrantedAuthority; |
| | | import org.springframework.security.core.userdetails.UserDetails; |
| | | import javax.persistence.*; |
| | |
| | | @JoinColumn(name="level_id") |
| | | private UserLevel userLevel; |
| | | |
| | | @ManyToOne(targetEntity = DepartmentManagement.class, fetch = FetchType.LAZY) |
| | | @ManyToOne(targetEntity = DepartmentManage.class, fetch = FetchType.LAZY) |
| | | @JoinColumn(name="department_id") |
| | | private DepartmentManagement departmentManagement; |
| | | private DepartmentManage departmentManage; |
| | | |
| | | |
| | | public User() { |
| | |
| | | this.account = account; |
| | | } |
| | | |
| | | public DepartmentManagement getDepartmentId() { |
| | | return departmentManagement; |
| | | public DepartmentManage getDepartmentManage() { |
| | | return departmentManage; |
| | | } |
| | | |
| | | public void setDepartmentId(DepartmentManagement department) { |
| | | this.departmentManagement = department; |
| | | public void setDepartmentManage(DepartmentManage departmentManage) { |
| | | this.departmentManage = departmentManage; |
| | | } |
| | | |
| | | public UserLevel getUserLevel() { |
New file |
| | |
| | | package kr.wisestone.owl.mapper; |
| | | |
| | | import kr.wisestone.owl.web.condition.DepartmentManageCondition; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by wisestone on 2018-02-26. |
| | | */ |
| | | @Repository |
| | | public interface DepartmentManageMapper { |
| | | List<Map<String, Object>> find(DepartmentManageCondition departmentManageCondition); |
| | | |
| | | Long count(DepartmentManageCondition departmentManageCondition); |
| | | |
| | | List<Map<String, Object>> findEvent(); |
| | | } |
| | |
| | | public interface UserLevelMapper { |
| | | List<Map<String, Object>> find(UserLevelCondition userLevelCondition); |
| | | |
| | | List<Map<String, Object>> findAdmin(); |
| | | |
| | | List<Map<String, Object>> findProjectMember(UserLevelCondition userLevelCondition); |
| | | |
| | | Long count(UserLevelCondition userLevelCondition); |
| | | |
| | | void deleteCascadeUser(UserLevelCondition userLevelCondition); |
| | | |
| | | List<Map<String, Object>> findByReservationNotifyTime(Map<String, Object> conditions); |
| | | |
| | | List<Map<String, Object>> findByAllWorkspace(UserLevelCondition userLevelCondition); |
| | | |
| | | Long countByAllWorkspace(UserLevelCondition userLevelCondition); |
| | | |
| | | List<Map<String, Object>> findEvent(); |
| | | |
New file |
| | |
| | | package kr.wisestone.owl.repository; |
| | | |
| | | import kr.wisestone.owl.domain.DepartmentManage; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | |
| | | public interface DepartmentManageRepository extends JpaRepository<DepartmentManage, Long> { |
| | | |
| | | } |
New file |
| | |
| | | package kr.wisestone.owl.service; |
| | | |
| | | import kr.wisestone.owl.domain.DepartmentManage; |
| | | import kr.wisestone.owl.vo.DepartmentManageVo; |
| | | import kr.wisestone.owl.web.condition.DepartmentManageCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentManageForm; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface DepartmentManageService extends AbstractService<DepartmentManage, Long, JpaRepository<DepartmentManage, Long>> { |
| | | DepartmentManage addDepartmentManage(DepartmentManageForm departmentManageForm); |
| | | |
| | | DepartmentManage getDepartment(Long id); |
| | | |
| | | List<DepartmentManageVo> findDepartment(Map<String, Object> resJsonData, |
| | | DepartmentManageCondition make, Pageable pageable); |
| | | } |
New file |
| | |
| | | package kr.wisestone.owl.service.impl; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import kr.wisestone.owl.common.ExcelConditionCheck; |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.domain.DepartmentManage; |
| | | import kr.wisestone.owl.exception.OwlRuntimeException; |
| | | import kr.wisestone.owl.mapper.DepartmentManageMapper; |
| | | import kr.wisestone.owl.repository.DepartmentManageRepository; |
| | | import kr.wisestone.owl.service.DepartmentManageService; |
| | | import kr.wisestone.owl.service.WorkspaceService; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.DepartmentManageCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentManageForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | public class DepartmentManageServiceImpl extends AbstractServiceImpl<DepartmentManage, Long, JpaRepository<DepartmentManage, Long>> implements DepartmentManageService { |
| | | |
| | | @Autowired |
| | | private DepartmentManageRepository departmentManageRepository; |
| | | |
| | | @Autowired |
| | | private DepartmentManageMapper departmentManageMapper; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | | |
| | | @Autowired |
| | | private ExcelView excelView; |
| | | |
| | | @Autowired |
| | | private ExcelConditionCheck excelConditionCheck; |
| | | |
| | | @Override |
| | | protected JpaRepository<DepartmentManage, Long> getRepository() { |
| | | return this.departmentManageRepository; |
| | | } |
| | | |
| | | @Override |
| | | public DepartmentManage addDepartmentManage(DepartmentManageForm departmentManageForm) { |
| | | DepartmentManage departmentManage = ConvertUtil.copyProperties(departmentManageForm, DepartmentManage.class); |
| | | departmentManageRepository.saveAndFlush(departmentManage); |
| | | return departmentManage; |
| | | } |
| | | |
| | | @Override |
| | | public DepartmentManage getDepartment(Long id) { |
| | | if (id == null) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.USER_LEVEL_NOT_EXIST)); |
| | | } |
| | | |
| | | DepartmentManage departmentManage = this.findOne(id); |
| | | |
| | | if (departmentManage == null) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.USER_LEVEL_NOT_EXIST)); |
| | | } |
| | | |
| | | return departmentManage; |
| | | } |
| | | |
| | | @Override |
| | | public List<DepartmentManageVo> findDepartment(Map<String, Object> resJsonData, |
| | | DepartmentManageCondition condition, Pageable pageable) { |
| | | |
| | | condition.setPage(pageable.getPageNumber() * pageable.getPageSize()); |
| | | condition.setPageSize(pageable.getPageSize()); |
| | | |
| | | List<Map<String, Object>> results = this.departmentManageMapper.find(condition); |
| | | Long totalDepartmentCount = this.departmentManageMapper.count(condition); |
| | | |
| | | return this.convertDepartmentManageVoToMap(results, totalDepartmentCount, pageable, resJsonData); |
| | | } |
| | | |
| | | // 검색 결과를 DepartmentManageVo 로 변환한다. |
| | | private List<DepartmentManageVo> convertDepartmentManageVoToMap(List<Map<String, Object>> results, Long totalDepartmentCount, Pageable pageable, Map<String, Object> resJsonData) { |
| | | List<DepartmentManageVo> departmentManageVos = Lists.newArrayList(); |
| | | |
| | | for (Map<String, Object> result : results) { |
| | | DepartmentManageVo departmentManageVo = ConvertUtil.convertMapToClass(result, DepartmentManageVo.class); |
| | | // 부서명만 변환 하면 되는건가 ? |
| | | departmentManageVos.add(departmentManageVo); |
| | | } |
| | | |
| | | int totalPage = (int) Math.ceil((totalDepartmentCount - 1) / pageable.getPageSize()) + 1; |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, departmentManageVos); |
| | | resJsonData.put(Constants.REQ_KEY_PAGE_VO, new ResPage(pageable.getPageNumber(), pageable.getPageSize(), |
| | | totalPage, totalDepartmentCount)); |
| | | |
| | | return departmentManageVos; |
| | | } |
| | | |
| | | // 부서 목록을 엑셀로 다운로드 한다. |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | ModelAndView modelAndView = this.workspaceService.checkUseExcelDownload(model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | Map<String, Object> conditions = new HashMap<>(); |
| | | // 엑셀 다운로드에 필요한 검색 조건 정보를 추출하고 검색 조건 추출에 오류가 발생하면 경고를 표시해준다. |
| | | modelAndView = this.excelConditionCheck.checkCondition(conditions, request, model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | DepartmentManageCondition departmentManageCondition = DepartmentManageCondition.make(conditions); |
| | | |
| | | |
| | | List<Map<String, Object>> results = this.departmentManageMapper.find(departmentManageCondition); |
| | | List<DepartmentManageVo> departmentManageVos = ConvertUtil.convertListToListClass(results, DepartmentManageVo.class); |
| | | |
| | | // code_ko_KR 에 code명 설정 |
| | | ExportExcelVo excelInfo = new ExportExcelVo(); |
| | | excelInfo.setFileName(this.messageAccessor.message("부서 목록")); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("departmentName", this.messageAccessor.message("departmentManage.departmentName"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("departmentDescription", this.messageAccessor.message("departmentManage.departmentDescription"), 20, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | |
| | | excelInfo.setDatas(departmentManageVos); |
| | | |
| | | model.addAttribute(Constants.EXCEL, excelInfo); |
| | | return new ModelAndView(this.excelView); |
| | | } |
| | | |
| | | } |
| | |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permWorkSpaceSetting", this.messageAccessor.message("manageUser.manageWorkspacePerm"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permProjectSetting", this.messageAccessor.message("manageUser.manageProjectPerm"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permIssueSetting", this.messageAccessor.message("manageUser.manageIssueSystemPerm"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permApi", this.messageAccessor.message("manageUser.manageUserPerm"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permApi", this.messageAccessor.message("manageUser.manageUserApi"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permNotice", this.messageAccessor.message("manageUser.manageNoticePerm"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permFAQ", this.messageAccessor.message("manageUser.manageFAQPerm"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("permQnA", this.messageAccessor.message("manageUser.manageQnAPerm"), 3, ExportExcelAttrVo.ALIGN_CENTER)); |
| | |
| | | import kr.wisestone.owl.util.*; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentManagementForm; |
| | | import kr.wisestone.owl.web.form.DepartmentManageForm; |
| | | import kr.wisestone.owl.web.form.UserForm; |
| | | import kr.wisestone.owl.web.form.UserLevelForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.validator.routines.EmailValidator; |
| | | import org.slf4j.Logger; |
| | |
| | | import org.springframework.security.core.session.SessionRegistry; |
| | | import org.springframework.security.core.userdetails.UserDetails; |
| | | import org.springframework.security.crypto.password.PasswordEncoder; |
| | | import org.springframework.stereotype.Repository; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.rmi.CORBA.Util; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | |
| | | private UserLevelService userLevelService; |
| | | |
| | | @Autowired |
| | | private DepartmentManagementService departmentManagementService; |
| | | private DepartmentManageService departmentManageService; |
| | | |
| | | @Autowired |
| | | private SystemRoleService systemRoleService; |
| | |
| | | |
| | | this.userLevelService.addNormalUserLevel(); |
| | | |
| | | // DepartmentManagement에 임시로 Name, Description 값 추가 |
| | | DepartmentManagementForm departmentManagementForm = new DepartmentManagementForm(); |
| | | // DepartmentManage에 임시로 Name, Description 값 추가 |
| | | DepartmentManageForm departmentManageForm = new DepartmentManageForm(); |
| | | |
| | | departmentManagementForm.setDepartmentName("개발팀"); |
| | | departmentManagementForm.setDepartmentDescription("웹사이트 및 앱 서비스 개발"); |
| | | DepartmentManagement departmentManagement = this.departmentManagementService.addDepartment(departmentManagementForm); |
| | | user.setDepartmentId(departmentManagement); |
| | | departmentManageForm.setDepartmentName("개발팀"); |
| | | departmentManageForm.setDepartmentDescription("웹사이트 및 앱 서비스 개발"); |
| | | DepartmentManage departmentManage = this.departmentManageService.addDepartmentManage(departmentManageForm); |
| | | user.setDepartmentManage(departmentManage); |
| | | |
| | | if(primaryWorkspace == null || primaryWorkspace.getName() != userForm.getWorkspaceName()) { |
| | | // 업무 공간를 생성한다. 가입한 사용자는 업무 공간의 주인이다. |
| | |
| | | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.domain.User; |
| | | import kr.wisestone.owl.domain.UserLevel; |
| | | import kr.wisestone.owl.domain.UserWorkspace; |
| | | import kr.wisestone.owl.domain.Workspace; |
| | | import kr.wisestone.owl.domain.*; |
| | | import kr.wisestone.owl.exception.OwlRuntimeException; |
| | | import kr.wisestone.owl.mapper.UserWorkspaceMapper; |
| | | import kr.wisestone.owl.repository.UserWorkspaceRepository; |
| | | import kr.wisestone.owl.service.UserLevelService; |
| | | import kr.wisestone.owl.service.UserService; |
| | | import kr.wisestone.owl.service.UserWorkspaceService; |
| | | import kr.wisestone.owl.service.WorkspaceService; |
| | | import kr.wisestone.owl.service.*; |
| | | import kr.wisestone.owl.util.CommonUtil; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.vo.ResPage; |
| | |
| | | |
| | | @Autowired |
| | | private UserLevelService userLevelService; |
| | | |
| | | @Autowired |
| | | private DepartmentManageService departmentManageService; |
| | | |
| | | @Autowired |
| | | private UserWorkspaceMapper userWorkspaceMapper; |
| | |
| | | } |
| | | |
| | | //todo 부서 변경시 |
| | | DepartmentManage currentDepartment = userWorkspace.getUser().getDepartmentManage(); |
| | | if (currentDepartment.getId() != userWorkspaceForm.getDepartmentId()) { |
| | | // 부서명 변경시 |
| | | User user = userWorkspace.getUser(); |
| | | DepartmentManage departmentManage = this.departmentManageService.getDepartment(userWorkspaceForm.getLevelId()); |
| | | user.setDepartmentManage(departmentManage); |
| | | userWorkspace.setUser(user); |
| | | } |
| | | |
| | | // 참여로 상태를 변경하려고 할때 |
| | | if (userWorkspace.getUseYn() != userWorkspaceForm.getUseYn()) { |
File was renamed from src/main/java/kr/wisestone/owl/vo/DepartmentManagementVo.java |
| | |
| | | /** |
| | | * Created by jeong on 2017-08-02. |
| | | */ |
| | | public class DepartmentManagementVo extends BaseVo{ |
| | | public class DepartmentManageVo extends BaseVo{ |
| | | |
| | | private Long id; |
| | | private String departmentName; |
| | | private String departmentDescription; |
| | | |
| | | public DepartmentManagementVo() { |
| | | public DepartmentManageVo() { |
| | | } |
| | | |
| | | public DepartmentManagementVo(Long id, String departmentName, String departmentDescription) { |
| | | public DepartmentManageVo(Long id, String departmentName, String departmentDescription) { |
| | | this.id = id; |
| | | this.departmentName = departmentName; |
| | | this.departmentDescription = departmentDescription; |
New file |
| | |
| | | package kr.wisestone.owl.web.condition; |
| | | |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by jeong on 2018-01-01. |
| | | */ |
| | | public class DepartmentManageCondition { |
| | | private Long id; |
| | | private String departmentName; |
| | | private String departmentDescription; |
| | | |
| | | private Integer Page; |
| | | private Integer PageSize; |
| | | |
| | | public static DepartmentManageCondition make(Map<String, Object> departmentManageConditions) { |
| | | return ConvertUtil.convertMapToClass(departmentManageConditions, DepartmentManageCondition.class); |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getDepartmentName() { |
| | | return departmentName; |
| | | } |
| | | |
| | | public void setDepartmentName(String departmentName) { |
| | | this.departmentName = departmentName; |
| | | } |
| | | |
| | | public String getDepartmentDescription() { |
| | | return departmentDescription; |
| | | } |
| | | |
| | | public void setDepartmentDescription(String departmentDescription) { |
| | | this.departmentDescription = departmentDescription; |
| | | } |
| | | |
| | | public Integer getPage() { |
| | | return Page; |
| | | } |
| | | |
| | | public void setPage(Integer page) { |
| | | Page = page; |
| | | } |
| | | |
| | | public Integer getPageSize() { |
| | | return PageSize; |
| | | } |
| | | |
| | | public void setPageSize(Integer pageSize) { |
| | | PageSize = pageSize; |
| | | } |
| | | } |
New file |
| | |
| | | package kr.wisestone.owl.web.controller; |
| | | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.service.DepartmentManageService; |
| | | import kr.wisestone.owl.web.condition.DepartmentManageCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentManageForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by jeong on 2017-08-02. |
| | | */ |
| | | @Controller |
| | | public class DepartmentManageController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DepartmentManageService departmentManageService; |
| | | |
| | | // 부서 생성 |
| | | @RequestMapping(value = "/departmentManage/add", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> addDepartmentManage(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); |
| | | this.departmentManageService.addDepartmentManage(DepartmentManageForm.make(content)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 사용자등급 조회 |
| | | @RequestMapping(value = "/departmentManage/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> find(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params)); |
| | | |
| | | this.departmentManageService.findDepartment(resJsonData, DepartmentManageCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | // |
| | | // // 사용자등급 상세 조회 |
| | | // @RequestMapping(value = "/userLevel/detail", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | // public |
| | | // @ResponseBody |
| | | // Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { |
| | | // Map<String, Object> resJsonData = new HashMap<>(); |
| | | // this.userLevelService.detailUserLevel(resJsonData, UserLevelCondition.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | // |
| | | // return this.setSuccessMessage(resJsonData); |
| | | // } |
| | | // |
| | | // // 사용자등급 수정 |
| | | // @RequestMapping(value = "/userLevel/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | // public |
| | | // @ResponseBody |
| | | // Map<String, Object> modify(@RequestBody Map<String, Map<String, Object>> params) { |
| | | // Map<String, Object> resJsonData = new HashMap<>(); |
| | | // |
| | | // this.userLevelService.modifyLevelPermission(UserLevelForm.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | // |
| | | // return this.setSuccessMessage(resJsonData); |
| | | // } |
| | | // |
| | | // // 사용자등급 삭제 |
| | | // @RequestMapping(value = "/userLevel/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | // public |
| | | // @ResponseBody |
| | | // Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { |
| | | // Map<String, Object> resJsonData = new HashMap<>(); |
| | | // Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); |
| | | // |
| | | // this.userLevelService.removeUserLevel(UserLevelForm.make(content)); |
| | | // |
| | | // return this.setSuccessMessage(resJsonData); |
| | | // } |
| | | // |
| | | // |
| | | // // 사용자 등급 엑셀 다운로드 |
| | | // @RequestMapping(value = "/userLevel/downloadExcel", method = RequestMethod.POST) |
| | | // public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | // return this.userLevelService.downloadExcel(request, model); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
File was renamed from src/main/java/kr/wisestone/owl/web/form/DepartmentManagementForm.java |
| | |
| | | /** |
| | | * Created by jeong on 2017-12-30. |
| | | */ |
| | | public class DepartmentManagementForm { |
| | | public class DepartmentManageForm { |
| | | private Long id; |
| | | private String departmentName; |
| | | private String departmentDescription; |
| | | |
| | | public DepartmentManagementForm() { |
| | | public DepartmentManageForm() { |
| | | } |
| | | |
| | | public static DepartmentManagementForm make(Map<String, Object> params) { |
| | | return ConvertUtil.convertMapToClass(params, DepartmentManagementForm.class); |
| | | public static DepartmentManageForm make(Map<String, Object> params) { |
| | | return ConvertUtil.convertMapToClass(params, DepartmentManageForm.class); |
| | | } |
| | | |
| | | public Long getId() { |
| | |
| | | ALTER TABLE `user` ADD COLUMN `level_id` BIGINT(11) NULL; |
| | | ALTER TABLE `user` ADD COLUMN `department_id` BIGINT(11) NULL; |
| | | |
| | | CREATE TABLE `department_management`( |
| | | CREATE TABLE `department_manage`( |
| | | `id` BIGINT(11) AUTO_INCREMENT, |
| | | `department_name` VARCHAR(50) NOT NULL, |
| | | `department_description` VARCHAR(255) NOT NULL, |
New file |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="kr.wisestone.owl.mapper.DepartmentManageMapper"> |
| | | |
| | | <select id="find" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.DepartmentManageCondition"> |
| | | SELECT |
| | | dm.id as id, |
| | | dm.department_name as departmentName, |
| | | dm.department_description as departmentDescription |
| | | FROM |
| | | department_manage dm |
| | | WHERE id != 1 AND 1=1 |
| | | <if test="departmentName != '' and departmentName != null"> |
| | | AND ul.department_name like CONCAT('%',#{departmentName},'%') |
| | | </if> |
| | | <if test="id != '' and id != null"> |
| | | AND ul.id like CONCAT('%',#{id},'%') |
| | | </if> |
| | | <if test="pageSize != '' and pageSize != null"> |
| | | limit #{pageSize} offset #{page}; |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="count" resultType="java.lang.Long" parameterType="kr.wisestone.owl.web.condition.DepartmentManageCondition"> |
| | | SELECT |
| | | count(dm.id) |
| | | FROM |
| | | department_manage dm |
| | | WHERE 1=1 |
| | | <if test="departmentName != '' and departmentName != null"> |
| | | AND ul.department_name like CONCAT('%',#{departmentName},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | manageUser.manageNoticePerm=\uACF5\uC9C0\uC0AC\uD56D \uAD00\uB9AC |
| | | manageUser.manageFAQPerm=FAQ \uAD00\uB9AC |
| | | manageUser.manageQnAPerm=QnA \uAD00\uB9AC |
| | | manageUser.manageGuidePerm=\uAC00\uC774\uB4DC \uAD00\uB9AC |
| | | manageUser.manageGuidePerm=\uAC00\uC774\uB4DC \uAD00\uB9AC |
| | | departmentManage.departmentName=\uBD80\uC11C\uBA85 |
| | | departmentManage.departmentDescription=\uBD80\uC11C\uC124\uBA85 |