package com.engine.organization.wrapper; import com.api.browser.bean.SearchConditionGroup; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.organization.entity.department.param.DeptCopyParam; import com.engine.organization.entity.department.param.DeptSearchParam; import com.engine.organization.entity.department.param.QuerySingleDeptListParam; import com.engine.organization.entity.department.vo.SingleDeptTreeVO; import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.service.DepartmentService; import com.engine.organization.service.impl.DepartmentServiceImpl; import com.engine.organization.util.page.PageInfo; import com.engine.organization.util.response.ReturnResult; import weaver.hrm.User; import java.util.Collection; import java.util.List; import java.util.Map; /** * @Author weaver_cl * @Description: TODO * @Date 2022/5/20 * @Version V1.0 **/ public class DepartmentWrapper extends Service { public DepartmentService getDepartmentService(User user) { return ServiceUtil.getService(DepartmentServiceImpl.class, user); } public ReturnResult getDeptListByPid(QuerySingleDeptListParam param) { PageInfo singleDeptTreeVOS = getDepartmentService(user).getDeptListByPid(param); return ReturnResult.successed(singleDeptTreeVOS); } /** * 左侧树 * * @param params * @return */ public Map getSearchTree(SearchTreeParams params) { return getDepartmentService(user).getSearchTree(params); } /** * 列表数据展示 * * @param param * @return */ public Map listPage(DeptSearchParam param) { return getDepartmentService(user).listPage(param); } /** * 获取保存表单 * * @return */ public Map getSaveForm() { return getDepartmentService(user).getSaveForm(); } /** * 保存部门基础信息 * * @param params * @return */ public int saveBaseForm(DeptSearchParam params) { return getDepartmentService(user).saveBaseForm(params); } /** * 更新禁用标记 * * @param params */ public int updateForbiddenTagById(DeptSearchParam params) { return getDepartmentService(user).updateForbiddenTagById(params); } /** * 更新分部主表、拓展表、明细表 * * @param params * @return */ public int updateForm(Map params) { return getDepartmentService(user).updateForm(params); } /** * 根据ID批量删除 * * @param ids */ public int deleteByIds(Collection ids) { return getDepartmentService(user).deleteByIds(ids); } /** * 获取搜索条件 * * @param params * @return */ public Map getSearchCondition(Map params) { return getDepartmentService(user).getSearchCondition(params); } /** * 获取列表页面按钮信息 * * @return */ public Map getHasRight() { return getDepartmentService(user).getHasRight(); } /** * 获取基本信息表单 * * @param params * @return */ public Map getDeptBaseForm(Map params) { return getDepartmentService(user).getDeptBaseForm(params); } /** * 复制表单 * * @return */ public List getCopyForm() { return getDepartmentService(user).getCopyForm(); } /** * 复制岗位到指定部门 * * @param copyParam * @return */ public int copyDepartment(DeptCopyParam copyParam) { return getDepartmentService(user).copyDepartment(copyParam); } }