Class EmployeeServiceImpl

    • Constructor Detail

      • EmployeeServiceImpl

        public EmployeeServiceImpl()
    • Method Detail

      • update

        @Transactional
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:update\') or hasRole(\'ROLE_ADMIN\')")
        public cn.sparrowmini.org.model.Employee update​(java.lang.String employeeId,
                                                        java.util.Map<java.lang.String,​java.lang.Object> map)
        Specified by:
        update in interface EmployeeService
      • create

        @Transactional
        @ResponseStatus(code=CREATED)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:create\') or hasRole(\'ROLE_ADMIN\')")
        public cn.sparrowmini.org.model.Employee create​(cn.sparrowmini.org.model.Employee employee)
        Specified by:
        create in interface EmployeeService
      • addParent

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:parent:add\') or hasRole(\'ROLE_ADMIN\')")
        public void addParent​(java.lang.String employeeId,
                              java.util.List<java.lang.String> parentIds)
        Specified by:
        addParent in interface EmployeeService
      • removeParent

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:parent:remove\') or hasRole(\'ROLE_SUPER_ADMIN\')")
        public void removeParent​(java.lang.String employeeId,
                                 java.util.List<java.lang.String> parentIds)
        Specified by:
        removeParent in interface EmployeeService
      • addRole

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:role:add\') or hasRole(\'ROLE_ADMIN\')")
        public void addRole​(java.lang.String employeeId,
                            java.util.List<cn.sparrowmini.org.model.relation.OrganizationRole.OrganizationRolePK> ids)
        Specified by:
        addRole in interface EmployeeService
      • removeRole

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:role:remove\') or hasRole(\'ROLE_SUPER_ADMIN\')")
        public void removeRole​(java.lang.String employeeId,
                               java.util.List<cn.sparrowmini.org.model.relation.OrganizationRole.OrganizationRolePK> ids)
        Specified by:
        removeRole in interface EmployeeService
      • addLevel

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:level:add\') or hasRole(\'ROLE_ADMIN\')")
        public void addLevel​(java.lang.String employeeId,
                             java.util.List<cn.sparrowmini.org.model.relation.OrganizationPositionLevel.OrganizationPositionLevelPK> ids)
        Specified by:
        addLevel in interface EmployeeService
      • removeLevel

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:level:remove\') or hasRole(\'ROLE_SUPER_ADMIN\')")
        public void removeLevel​(java.lang.String employeeId,
                                java.util.List<cn.sparrowmini.org.model.relation.OrganizationPositionLevel.OrganizationPositionLevelPK> ids)
        Specified by:
        removeLevel in interface EmployeeService
      • getTree

        public SparrowTree<cn.sparrowmini.org.model.Employee,​java.lang.String> getTree​(java.lang.String parentId)
      • buildTree

        public void buildTree​(SparrowTree<cn.sparrowmini.org.model.Employee,​java.lang.String> myTree)
      • delBatch

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:delete\') or hasRole(\'ROLE_SUPER_ADMIN\')")
        public void delBatch​(java.lang.String[] ids)
      • getChildren

        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:child:list\') or hasRole(\'ROLE_ADMIN\')")
        public java.util.List<cn.sparrowmini.org.model.relation.EmployeeRelation> getChildren​(java.lang.String employeeId)
        Specified by:
        getChildren in interface EmployeeService
      • getParents

        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:parent:list\') or hasRole(\'ROLE_ADMIN\')")
        public java.util.List<cn.sparrowmini.org.model.relation.EmployeeRelation> getParents​(java.lang.String employeeId)
        Specified by:
        getParents in interface EmployeeService
      • getLevels

        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:level:list\') or hasRole(\'ROLE_ADMIN\')")
        public java.util.List<cn.sparrowmini.org.model.relation.EmployeeOrganizationLevel> getLevels​(java.lang.String employeeId)
        Specified by:
        getLevels in interface EmployeeService
      • getRoles

        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:role:list\') or hasRole(\'ROLE_ADMIN\')")
        public java.util.List<cn.sparrowmini.org.model.relation.EmployeeOrganizationRole> getRoles​(java.lang.String employeeId)
        Specified by:
        getRoles in interface EmployeeService
      • tree

        public SparrowTree<cn.sparrowmini.org.model.Employee,​java.lang.String> tree​(java.lang.String parentId)
        Specified by:
        tree in interface EmployeeService
      • delete

        @Transactional
        @ResponseStatus(code=NO_CONTENT)
        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:delete\') or hasRole(\'ROLE_SUPER_ADMIN\')")
        public void delete​(java.lang.String[] ids)
        Specified by:
        delete in interface EmployeeService
      • get

        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:read\') or hasRole(\'ROLE_ADMIN\')")
        public cn.sparrowmini.org.model.Employee get​(java.lang.String employeeId)
        Specified by:
        get in interface EmployeeService
      • all

        @PreAuthorize("hasAuthority(\'SCOPE_admin:emp:list\') or hasRole(\'ROLE_ADMIN\')")
        public org.springframework.data.domain.Page<cn.sparrowmini.org.model.Employee> all​(org.springframework.data.domain.Pageable pageable,
                                                                                           CommonFilterBean commonFilterBean)
        Specified by:
        all in interface EmployeeService
      • getGroup

        public java.util.Set<cn.sparrowmini.org.model.relation.GroupEmployee> getGroup​(java.lang.String employeeId)
        Specified by:
        getGroup in interface EmployeeService