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

131 lines
3.9 KiB
Java
Raw Normal View History

2022-05-07 10:18:50 +08:00
package com.engine.organization.wrapper;
2022-07-05 15:15:00 +08:00
import com.alibaba.fastjson.JSON;
2022-05-07 10:18:50 +08:00
import com.engine.common.util.ServiceUtil;
2022-07-05 15:15:00 +08:00
import com.engine.organization.annotation.Log;
2022-06-22 11:22:51 +08:00
import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
2022-05-07 22:03:42 +08:00
import com.engine.organization.entity.scheme.param.SchemeSearchParam;
2022-07-05 15:15:00 +08:00
import com.engine.organization.enums.LogModuleNameEnum;
import com.engine.organization.enums.OperateTypeEnum;
2022-05-07 10:18:50 +08:00
import com.engine.organization.service.SchemeService;
import com.engine.organization.service.impl.SchemeServiceImpl;
2022-07-05 15:15:00 +08:00
import com.engine.organization.util.OrganizationWrapper;
2022-05-07 22:03:42 +08:00
import org.apache.ibatis.annotations.Param;
2022-05-07 10:18:50 +08:00
import weaver.hrm.User;
2022-05-07 22:03:42 +08:00
import java.util.Collection;
2022-06-22 11:22:51 +08:00
import java.util.List;
2022-05-07 11:32:48 +08:00
import java.util.Map;
2022-05-07 10:18:50 +08:00
/**
2022-05-09 14:40:18 +08:00
* @Author dxfeng
2022-06-14 11:07:48 +08:00
* @description:
2022-05-09 14:40:18 +08:00
* @Date 2022/5/9
2022-05-07 10:18:50 +08:00
* @Version V1.0
**/
2022-07-05 15:15:00 +08:00
public class SchemeWrapper extends OrganizationWrapper {
2022-05-07 10:18:50 +08:00
private SchemeService getSchemeService(User user) {
2022-05-07 22:03:42 +08:00
return ServiceUtil.getService(SchemeServiceImpl.class, user);
2022-05-07 10:18:50 +08:00
}
2022-05-07 22:03:42 +08:00
/**
* 等级方案列表
*
* @param params
* @return
*/
2022-05-07 11:32:48 +08:00
public Map<String, Object> listPage(Map<String, Object> params) {
return getSchemeService(user).listPage(params);
}
2022-05-07 22:03:42 +08:00
/**
* 新增等级方案
*
* @param param
* @return
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "新增等级方案")
public int save(SchemeSearchParam param) {
int save = getSchemeService(user).save(param);
writeOperateLog(new Object() {
}.getClass(), "新增等级方案【" + JSON.toJSONString(param) + "");
return save;
2022-05-07 22:03:42 +08:00
}
/**
* 更新等级方案信息
*
* @param param
* @return
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "更新等级方案")
public int updateScheme(SchemeSearchParam param) {
int updateScheme = getSchemeService(user).updateScheme(param);
writeOperateLog(new Object() {
}.getClass(), "更新等级方案【" + JSON.toJSONString(param) + "");
return updateScheme;
2022-05-07 22:03:42 +08:00
}
/**
* 更新禁用标记
2022-05-09 14:40:18 +08:00
*
2022-05-07 22:03:42 +08:00
* @param params
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "更新等级方案禁用标识")
public int updateForbiddenTagById(SchemeSearchParam params) {
int updateForbiddenTagById = getSchemeService(user).updateForbiddenTagById(params);
writeOperateLog(new Object() {
}.getClass(), "更新等级方案禁用标识【" + JSON.toJSONString(params) + "");
return updateForbiddenTagById;
2022-05-07 22:03:42 +08:00
}
/**
* 根据ID批量删除等级方案信息
*
* @param ids
*/
2022-07-05 15:15:00 +08:00
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.SCHEME, operateDesc = "删除等级方案")
public int deleteByIds(@Param("ids") Collection<Long> ids) {
int deleteByIds = getSchemeService(user).deleteByIds(ids);
writeOperateLog(new Object() {
}.getClass(), "更新等级方案禁用标识【" + JSON.toJSONString(ids) + "");
return deleteByIds;
2022-05-07 22:03:42 +08:00
}
2022-05-09 14:40:18 +08:00
2022-05-10 10:54:41 +08:00
/**
* 获取搜索条件
2022-06-22 11:22:51 +08:00
*
2022-05-10 10:54:41 +08:00
* @param params
* @return
*/
2022-05-09 14:40:18 +08:00
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
return getSchemeService(user).getSearchCondition(params);
}
2022-05-10 10:54:41 +08:00
/**
* 获取新增表单
2022-06-22 11:22:51 +08:00
*
2022-05-10 10:54:41 +08:00
* @param params
* @return
*/
2022-05-09 14:40:18 +08:00
public Map<String, Object> getSchemeForm(Map<String, Object> params) {
return getSchemeService(user).getSchemeForm(params);
2022-05-07 11:32:48 +08:00
}
2022-05-10 10:54:41 +08:00
/**
* 获取列表页面按钮信息
2022-06-22 11:22:51 +08:00
*
2022-05-10 10:54:41 +08:00
* @return
*/
public Map<String, Object> getTableBtn() {
return getSchemeService(user).getTableBtn();
}
2022-06-22 11:22:51 +08:00
public List<TypeTreeVO> getTreeData() {
return getSchemeService(user).getTreeData();
}
2022-05-07 10:18:50 +08:00
}