weaver-hrm-organization/src/com/engine/organization/wrapper/GradeWrapper.java

136 lines
3.6 KiB
Java
Raw Normal View History

2022-05-11 15:37:17 +08:00
package com.engine.organization.wrapper;
2022-07-04 17:51:31 +08:00
2022-07-05 15:15:00 +08:00
import com.alibaba.fastjson.JSON;
2022-05-11 15:37:17 +08:00
import com.engine.common.util.ServiceUtil;
2022-07-05 15:15:00 +08:00
import com.engine.organization.annotation.Log;
2022-05-11 18:27:52 +08:00
import com.engine.organization.entity.scheme.param.GradeSearchParam;
2022-07-05 15:15:00 +08:00
import com.engine.organization.enums.LogModuleNameEnum;
import com.engine.organization.enums.OperateTypeEnum;
2022-05-11 18:27:52 +08:00
import com.engine.organization.service.GradeService;
import com.engine.organization.service.impl.GradeServiceImpl;
2022-07-05 15:15:00 +08:00
import com.engine.organization.util.OrganizationWrapper;
2022-05-11 15:37:17 +08:00
import org.apache.ibatis.annotations.Param;
import weaver.hrm.User;
import java.util.Collection;
import java.util.Map;
/**
2022-06-14 11:07:48 +08:00
* @description:
2022-05-11 15:37:17 +08:00
* @author:dxfeng
2022-05-11 18:27:52 +08:00
* @createTime: 2022/05/11
2022-05-11 15:37:17 +08:00
* @version: 1.0
*/
2022-07-05 15:15:00 +08:00
public class GradeWrapper extends OrganizationWrapper {
2022-07-04 17:51:31 +08:00
2022-05-11 18:27:52 +08:00
private GradeService getGradeService(User user) {
return ServiceUtil.getService(GradeServiceImpl.class, user);
2022-05-11 15:37:17 +08:00
}
2022-07-04 17:51:31 +08:00
2022-05-11 15:37:17 +08:00
/**
2022-05-11 18:27:52 +08:00
* 职级列表
2022-05-11 15:37:17 +08:00
*
* @param params
* @return
*/
public Map<String, Object> listPage(Map<String, Object> params) {
2022-05-11 18:27:52 +08:00
return getGradeService(user).listPage(params);
2022-05-11 15:37:17 +08:00
}
/**
2022-05-11 18:27:52 +08:00
* 新增职级
2022-05-11 15:37:17 +08:00
*
* @param param
* @return
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.GRADE, operateDesc = "新增职等")
2022-05-11 18:27:52 +08:00
public int saveGrade(GradeSearchParam param) {
2022-07-05 15:15:00 +08:00
int saveGrade = getGradeService(user).saveGrade(param);
writeOperateLog(new Object() {
2022-07-06 15:43:16 +08:00
}.getClass(), JSON.toJSONString(param));
2022-07-05 15:15:00 +08:00
return saveGrade;
2022-05-11 15:37:17 +08:00
}
/**
2022-05-11 18:27:52 +08:00
* 更新职级
2022-05-11 15:37:17 +08:00
*
* @param param
* @return
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "更新职级")
2022-05-11 18:27:52 +08:00
public int updateGrade(GradeSearchParam param) {
2022-07-05 15:15:00 +08:00
int updateGrade = getGradeService(user).updateGrade(param);
writeOperateLog(new Object() {
2022-07-06 15:43:16 +08:00
}.getClass(), JSON.toJSONString(param));
2022-07-05 15:15:00 +08:00
return updateGrade;
2022-05-11 15:37:17 +08:00
}
/**
* 更新禁用标记
*
* @param params
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "更新职级禁用标识")
2022-05-11 18:27:52 +08:00
public int updateForbiddenTagById(GradeSearchParam params) {
2022-07-05 15:15:00 +08:00
int updateForbiddenTagById = getGradeService(user).updateForbiddenTagById(params);
writeOperateLog(new Object() {
2022-07-06 15:43:16 +08:00
}.getClass(), JSON.toJSONString(params));
2022-07-05 15:15:00 +08:00
return updateForbiddenTagById;
2022-05-11 15:37:17 +08:00
}
/**
* 根据ID批量删除
*
* @param ids
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "删除职等")
2022-05-11 15:37:17 +08:00
public int deleteByIds(@Param("ids") Collection<Long> ids) {
2022-07-05 15:15:00 +08:00
int deleteByIds = getGradeService(user).deleteByIds(ids);
writeOperateLog(new Object() {
2022-07-06 15:43:16 +08:00
}.getClass(), JSON.toJSONString(ids));
2022-07-05 15:15:00 +08:00
return deleteByIds;
2022-05-11 15:37:17 +08:00
}
/**
* 获取搜索条件
*
* @param params
* @return
*/
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
2022-05-11 18:27:52 +08:00
return getGradeService(user).getSearchCondition(params);
2022-05-11 15:37:17 +08:00
}
/**
* 获取新增表单
*
* @param params
* @return
*/
2022-05-11 18:27:52 +08:00
public Map<String, Object> getGradeForm(Map<String, Object> params) {
return getGradeService(user).getGradeForm(params);
2022-05-11 15:37:17 +08:00
}
/**
* 获取列表页面按钮信息
*
* @return
*/
2022-05-11 18:27:52 +08:00
public Map<String, Object> getHasRight() {
return getGradeService(user).getHasRight();
2022-05-11 15:37:17 +08:00
}
/**
* 获取列表tabs
*
* @return
*/
public Map<String, Object> getTabInfo() {
2022-05-11 18:27:52 +08:00
return getGradeService(user).getTabInfo();
2022-05-11 15:37:17 +08:00
}
}