You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
160 lines
3.8 KiB
Java
160 lines
3.8 KiB
Java
package com.engine.organization.wrapper;
|
|
|
|
import com.api.browser.bean.SearchConditionItem;
|
|
import com.engine.common.util.ServiceUtil;
|
|
import com.engine.core.impl.Service;
|
|
import com.engine.organization.entity.job.param.JobSearchParam;
|
|
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
|
import com.engine.organization.service.JobService;
|
|
import com.engine.organization.service.impl.JobServiceImpl;
|
|
import com.engine.organization.util.OrganizationFormItemUtil;
|
|
import com.engine.organization.util.response.ReturnResult;
|
|
import weaver.hrm.User;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* @description: TODO
|
|
* @author:dxfeng
|
|
* @createTime: 2022/05/27
|
|
* @version: 1.0
|
|
*/
|
|
public class JobWrapper extends Service {
|
|
private JobService getJobService(User user) {
|
|
return ServiceUtil.getService(JobServiceImpl.class, user);
|
|
}
|
|
|
|
/**
|
|
* 左侧树
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
public Map<String, Object> getSearchTree(SearchTreeParams params) {
|
|
return getJobService(user).getSearchTree(params);
|
|
}
|
|
|
|
/**
|
|
* 列表
|
|
*
|
|
* @param param
|
|
* @return
|
|
*/
|
|
public Map<String, Object> listPage(JobSearchParam param) {
|
|
return getJobService(user).listPage(param);
|
|
}
|
|
|
|
/**
|
|
* 顶部按钮
|
|
*
|
|
* @return
|
|
*/
|
|
public Map<String, Object> getHasRight() {
|
|
return getJobService(user).getHasRight();
|
|
}
|
|
|
|
/**
|
|
* 搜索条件
|
|
*
|
|
* @return
|
|
*/
|
|
public Map<String, Object> getSearchCondition() {
|
|
return getJobService(user).getSearchCondition();
|
|
}
|
|
|
|
/**
|
|
* 获取新增表单
|
|
*
|
|
* @return
|
|
*/
|
|
public Map<String, Object> getSaveForm() {
|
|
return getJobService(user).getSaveForm();
|
|
}
|
|
|
|
/**
|
|
* 获取详细表单
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
public Map<String, Object> getJobBaseForm(Map<String, Object> params) {
|
|
return getJobService(user).getJobBaseForm(params);
|
|
|
|
}
|
|
|
|
/**
|
|
* 保存基础信息
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
public int saveBaseForm(JobSearchParam params) {
|
|
return getJobService(user).saveBaseForm(params);
|
|
}
|
|
|
|
/**
|
|
* 更新主表、拓展表、明细表
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
public int updateForm(Map<String, Object> params) {
|
|
return getJobService(user).updateForm(params);
|
|
}
|
|
|
|
/**
|
|
* 复制岗位到指定部门
|
|
*
|
|
* @param id
|
|
* @param departmentId
|
|
* @return
|
|
*/
|
|
public int copyJobItem(long id, long departmentId) {
|
|
return getJobService(user).copyJobItem(id, departmentId);
|
|
}
|
|
|
|
/**
|
|
* @param params
|
|
* @return
|
|
*/
|
|
public int updateForbiddenTagById(JobSearchParam params) {
|
|
return getJobService(user).updateForbiddenTagById(params);
|
|
}
|
|
|
|
/**
|
|
* 根据ID批量删除
|
|
*
|
|
* @param ids
|
|
* @return
|
|
*/
|
|
public int deleteByIds(Collection<Long> ids) {
|
|
return getJobService(user).deleteByIds(ids);
|
|
}
|
|
|
|
|
|
/**
|
|
* 获取复制表单
|
|
* @return
|
|
*/
|
|
public ReturnResult getCopyForm() {
|
|
List<SearchConditionItem> condition = new ArrayList<>();
|
|
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "复制到", "161", "department", "deptBrowser");
|
|
deptBrowserItem.setRules("required|string");
|
|
condition.add(deptBrowserItem);
|
|
return ReturnResult.successed(condition);
|
|
}
|
|
|
|
/**
|
|
* 根据岗位获取人员
|
|
* @param jobId
|
|
* @return
|
|
*/
|
|
public ReturnResult getHrmListByJobId(Long jobId) {
|
|
Map<String, Object> hrmListByJobId = getJobService(user).getHrmListByJobId(jobId);
|
|
return ReturnResult.successed(hrmListByJobId);
|
|
}
|
|
}
|