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

100 lines
2.9 KiB
Java
Raw Normal View History

2022-06-14 09:36:47 +08:00
package com.engine.organization.wrapper;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
2022-06-17 09:45:32 +08:00
import com.engine.organization.entity.extend.param.ExtendFieldSearchParam;
2022-06-15 11:25:23 +08:00
import com.engine.organization.entity.extend.param.ExtendTitleSaveParam;
2022-06-15 11:36:48 +08:00
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
2022-06-14 16:10:26 +08:00
import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
import com.engine.organization.enums.ModuleTypeEnum;
2022-06-14 09:36:47 +08:00
import com.engine.organization.service.FieldDefinedService;
import com.engine.organization.service.impl.FieldDefinedServiceImpl;
import com.engine.organization.util.response.ReturnResult;
import weaver.hrm.User;
import java.util.List;
2022-06-14 15:29:22 +08:00
import java.util.Map;
2022-06-14 09:36:47 +08:00
/**
* @Author weaver_cl
2022-06-14 11:07:48 +08:00
* @description:
2022-06-14 09:36:47 +08:00
* @Date 2022/6/13
* @Version V1.0
**/
public class FieldDefinedWrapper extends Service {
private FieldDefinedService getFieldDefinedService(User user) {
2022-06-14 15:29:22 +08:00
return ServiceUtil.getService(FieldDefinedServiceImpl.class, user);
2022-06-14 09:36:47 +08:00
}
2022-06-14 16:10:26 +08:00
public ReturnResult getTree(ModuleTypeEnum moduleTypeEnum) {
List<TypeTreeVO> treeDTOS = getFieldDefinedService(user).getTree(moduleTypeEnum);
return ReturnResult.successed(treeDTOS);
2022-06-14 09:36:47 +08:00
}
2022-06-14 15:29:22 +08:00
/**
* 获取标题分组
2022-06-17 10:54:59 +08:00
*
2022-06-14 15:29:22 +08:00
* @param groupType
* @return
*/
public Map<String, Object> getTabInfo(String groupType) {
return getFieldDefinedService(user).getTabInfo(groupType);
}
2022-06-15 11:25:23 +08:00
/**
* 分组维护
*
* @param param
* @return
*/
public Map<String, Object> saveGroup(ExtendTitleSaveParam param) {
return getFieldDefinedService(user).saveGroup(param);
}
/**
* 新建分组
2022-06-17 10:54:59 +08:00
*
2022-06-15 11:25:23 +08:00
* @param param
* @return
*/
public Map<String, Object> saveTitle(ExtendTitleSaveParam param) {
return getFieldDefinedService(user).saveTitle(param);
}
2022-06-15 11:36:48 +08:00
2022-06-15 17:17:34 +08:00
public ReturnResult changeTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
2022-06-17 10:54:59 +08:00
getFieldDefinedService(user).changeTree(moduleTypeEnum, fieldTypeTreeParam);
2022-06-15 11:36:48 +08:00
return ReturnResult.successed();
}
2022-06-15 18:03:01 +08:00
2022-06-16 09:55:07 +08:00
public int deleteTitle(Long id) {
return getFieldDefinedService(user).deleteTitle(id);
2022-06-15 18:03:01 +08:00
}
2022-06-16 14:19:54 +08:00
2022-06-16 17:57:03 +08:00
public ReturnResult deleteTree(Long id) {
getFieldDefinedService(user).deleteTree(id);
return ReturnResult.successed();
}
public ReturnResult saveTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
getFieldDefinedService(user).saveTree(moduleTypeEnum, fieldTypeTreeParam);
return ReturnResult.successed();
}
2022-06-16 14:19:54 +08:00
public int saveFields(String data) {
return getFieldDefinedService(user).saveFields(data);
}
2022-06-16 16:10:33 +08:00
2022-06-17 09:45:32 +08:00
public Map<String, Object> getFieldDefinedInfo(ExtendFieldSearchParam param) {
2022-06-16 16:10:33 +08:00
return getFieldDefinedService(user).getFieldDefinedInfo(param);
}
2022-06-17 10:54:59 +08:00
public void deleteFieldDefined(ExtendFieldSearchParam param) {
getFieldDefinedService(user).deleteFieldDefined(param);
}
2022-06-14 09:36:47 +08:00
}