| | |
| | | |
| | | Long findBydepartmentId(Long Id); |
| | | |
| | | Long countInDepartment(Long Id); |
| | | |
| | | List<Map<String, Object>> findByDepartmentIds(UserCondition condition); |
| | | } |
| | |
| | | |
| | | ModelAndView downloadExcel(HttpServletRequest request, Model model); |
| | | |
| | | boolean department(Long id); |
| | | boolean countInDepartment(Long id); |
| | | |
| | | List<Map<String, Object>> findByDepartmentIds( UserCondition condition); |
| | | } |
| | |
| | | import kr.wisestone.owl.web.form.UserDepartmentForm; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface UserDepartmentService extends AbstractService<UserDepartment, Long, JpaRepository<UserDepartment, Long>> { |
| | |
| | | package kr.wisestone.owl.service.impl; |
| | | |
| | | import kr.wisestone.owl.domain.Department; |
| | | import kr.wisestone.owl.domain.UserDepartment; |
| | | import kr.wisestone.owl.domain.UserLevel; |
| | | import kr.wisestone.owl.mapper.DepartmentMapper; |
| | | import kr.wisestone.owl.service.UserDepartmentService; |
| | | import kr.wisestone.owl.service.UserService; |
| | | import kr.wisestone.owl.web.condition.DepartmentCondition; |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | |
| | | private DepartmentMapper departmentMapper; |
| | | |
| | | @Autowired |
| | | private UserService userService; |
| | | private DepartmentService departmentService; |
| | | |
| | | @Autowired |
| | | private UserDepartmentService userDepartmentService; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | |
| | | } |
| | | |
| | | for (Long id : departmentForm.getRemoveIds()) { |
| | | this.departmentRepository.deleteById(id); |
| | | this.departmentRepository.flush(); |
| | | if (!this.departmentService.countInDepartment(id)) { |
| | | this.departmentRepository.deleteById(id); |
| | | } else { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.DEPARTMENT_ALREADY_IN_USE)); |
| | | } |
| | | } |
| | | this.departmentRepository.flush(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public boolean countInDepartment(Long id) { |
| | | return this.departmentMapper.countInDepartment(id) > 0; |
| | | } |
| | | |
| | | |
| | | // 사용자 부서 ID로 조회한다. |
| | | @Override |
| | | public Department getDepartment(Long id) { |
| | |
| | | } |
| | | |
| | | return department; |
| | | } |
| | | |
| | | // 삭제 할 부서 유저가 사용하고 있는지 확인 |
| | | @Override |
| | | public boolean department(Long Id) { |
| | | return this.departmentMapper.findBydepartmentId(Id) > 0; |
| | | } |
| | | |
| | | @Override |
| | |
| | | // code_ko_KR 에 code명 설정 |
| | | ExportExcelVo excelInfo = new ExportExcelVo(); |
| | | excelInfo.setFileName(this.messageAccessor.message("Hosting 목록")); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("name", this.messageAccessor.message("Hosting.companyName"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("manager", this.messageAccessor.message("Hosting.companyManager"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("tel", this.messageAccessor.message("Hosting.companyTel"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("email", this.messageAccessor.message("Hosting.companyEmail"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("memo", this.messageAccessor.message("Hosting.companyMemo"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("name", this.messageAccessor.message("Hosting.HostingName"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("code", this.messageAccessor.message("Hosting.HostingCode"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("manager", this.messageAccessor.message("Hosting.HostingManager"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("tel", this.messageAccessor.message("Hosting.HostingTel"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("email", this.messageAccessor.message("Hosting.HostingEmail"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("memo", this.messageAccessor.message("Hosting.HostingMemo"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | |
| | | excelInfo.setDatas(hostingFieldVos); |
| | | |
| | |
| | | // code_ko_KR 에 code명 설정 |
| | | ExportExcelVo excelInfo = new ExportExcelVo(); |
| | | excelInfo.setFileName(this.messageAccessor.message("Isp 목록")); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("name", this.messageAccessor.message("Isp.IspName"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("manager", this.messageAccessor.message("Isp.IspManager"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("tel", this.messageAccessor.message("Isp.IspTel"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("email", this.messageAccessor.message("Isp.IspEmail"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("memo", this.messageAccessor.message("Isp.IspMemo"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("name", this.messageAccessor.message("isp.ispName"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("code", this.messageAccessor.message("isp.ispCode"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("manager", this.messageAccessor.message("isp.ispManager"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("tel", this.messageAccessor.message("isp.ispTel"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("email", this.messageAccessor.message("isp.ispEmail"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("memo", this.messageAccessor.message("isp.ispMemo"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | |
| | | excelInfo.setDatas(ispFieldVos); |
| | | |
| | |
| | | private Long id; |
| | | private String departmentName; |
| | | private String departmentDescription; |
| | | private Long departmentCount; |
| | | private List<Long> removeIds = Lists.newArrayList(); |
| | | |
| | | public DepartmentForm() { |
| | |
| | | this.departmentDescription = departmentDescription; |
| | | } |
| | | |
| | | public Long getDepartmentCount() { |
| | | return departmentCount; |
| | | } |
| | | |
| | | public void setDepartmentCount(Long departmentCount) { |
| | | this.departmentCount = departmentCount; |
| | | } |
| | | |
| | | public List<Long> getRemoveIds() { |
| | | return removeIds; |
| | | } |
| | |
| | | # email \uC124\uC815 |
| | | email.host=mail.g2works.kr |
| | | email.port=587 |
| | | email.userName=supportowl@wisestone.kr |
| | | email.password=Stone0620** |
| | | email.userName=wyu@maprex.co.kr |
| | | email.password=1234 |
| | | email.transport.protocol=smtp |
| | | email.smtp.auth=true |
| | | email.smtp.starttle.enable=true |
| | |
| | | companyField.companyTel=\uC804\uD654\uBC88\uD638 |
| | | companyField.companyEmail=\uC774\uBA54\uC77C |
| | | companyField.companyMemo=\uBE44\uACE0 |
| | | isp.ispName=ISP \uC774\uB984 |
| | | isp.ispCode=\uCF54\uB4DC |
| | | isp.ispManager=\uB2F4\uB2F9\uC790 |
| | | isp.ispTel=\uC804\uD654\uBC88\uD638 |
| | | isp.ispEmail=\uC774\uBA54\uC77C |
| | | isp.ispMemo=\uBE44\uACE0 |
| | | Hosting.HostingName=\uD638\uC2A4\uD305 \uC774\uB984 |
| | | Hosting.HostingCode=\uCF54\uB4DC |
| | | Hosting.HostingManager=\uB2F4\uB2F9\uC790 |
| | | Hosting.HostingTel=\uC804\uD654\uBC88\uD638 |
| | | Hosting.HostingEmail=\uC774\uBA54\uC77C |
| | | Hosting.HostingMemo=\uBE44\uACE0 |