记录操作日志
This commit is contained in:
parent
618e30e6ef
commit
f5d95fabb2
|
|
@ -61,6 +61,9 @@ public class LoggerContext implements Serializable {
|
|||
// 操作模块名称
|
||||
private String operateModuleName;
|
||||
|
||||
// 操作模块ID
|
||||
private Integer operateModule;
|
||||
|
||||
// 日志信息
|
||||
private String message;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,28 +6,35 @@ package com.engine.organization.enums;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public enum LogModuleNameEnum {
|
||||
SCHEME("等级方案"),
|
||||
LEVEL("职等"),
|
||||
GRADE("职级"),
|
||||
SEQUENCE("岗位序列"),
|
||||
POST("职务分类"),
|
||||
POSTINFO("职务管理"),
|
||||
GROUP("集团管理"),
|
||||
COMPANY("公司/分部"),
|
||||
DEPARTMENT("部门管理"),
|
||||
JOB("岗位管理"),
|
||||
RESOURCE("人员管理"),
|
||||
STAFFPLAN("编制方案"),
|
||||
STAFF("编制上报"),
|
||||
OTHER("其他模块");
|
||||
SCHEME("等级方案", 1),
|
||||
LEVEL("职等", 2),
|
||||
GRADE("职级", 3),
|
||||
SEQUENCE("岗位序列", 4),
|
||||
POST("职务分类", 5),
|
||||
POSTINFO("职务管理", 6),
|
||||
GROUP("集团管理", 7),
|
||||
COMPANY("分部管理", 8),
|
||||
DEPARTMENT("部门管理", 9),
|
||||
JOB("岗位管理", 10),
|
||||
RESOURCE("人员管理", 11),
|
||||
STAFFPLAN("编制方案", 12),
|
||||
STAFF("编制上报", 13),
|
||||
OTHER("其他模块", 99);
|
||||
|
||||
private String value;
|
||||
private String name;
|
||||
|
||||
LogModuleNameEnum(String value) {
|
||||
private Integer value;
|
||||
|
||||
LogModuleNameEnum(String name, Integer value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
class_name,
|
||||
delete_type,
|
||||
operate_module_name,
|
||||
operate_module,
|
||||
message
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -63,6 +64,7 @@
|
|||
#{className},
|
||||
#{deleteType},
|
||||
#{operateModuleName},
|
||||
#{operateModule},
|
||||
#{message}
|
||||
</trim>
|
||||
</insert>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public interface SchemeService {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> save(SchemeSearchParam param);
|
||||
int save(SchemeSearchParam param);
|
||||
|
||||
/**
|
||||
* 更新等级方案信息
|
||||
|
|
@ -37,21 +37,23 @@ public interface SchemeService {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> updateScheme(SchemeSearchParam param);
|
||||
int updateScheme(SchemeSearchParam param);
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
void updateForbiddenTagById(SchemeSearchParam params);
|
||||
int updateForbiddenTagById(SchemeSearchParam params);
|
||||
|
||||
/**
|
||||
* 根据ID批量删除等级方案信息
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(Collection<Long> ids);
|
||||
int deleteByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取搜索条件
|
||||
|
|
|
|||
|
|
@ -60,20 +60,17 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> save(SchemeSearchParam param) {
|
||||
public int save(SchemeSearchParam param) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
Map<String, Object> apidatas = new HashMap<>(16);
|
||||
List<SchemePO> list = getSchemeMapper().listByNo(Util.null2String(param.getSchemeNo()));
|
||||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID());
|
||||
getSchemeMapper().insertIgnoreNull(schemePO);
|
||||
return apidatas;
|
||||
return getSchemeMapper().insertIgnoreNull(schemePO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateScheme(SchemeSearchParam param) {
|
||||
public int updateScheme(SchemeSearchParam param) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID());
|
||||
// 更新前先查询下旧编号,
|
||||
String oldSchemeNo = getSchemeMapper().getSchemeByID(schemePO.getId()).getSchemeNo();
|
||||
|
|
@ -81,23 +78,22 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
List<SchemePO> list = getSchemeMapper().listByNo(Util.null2String(schemePO.getSchemeNo()));
|
||||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
}
|
||||
getSchemeMapper().updateScheme(schemePO);
|
||||
return apidatas;
|
||||
return getSchemeMapper().updateScheme(schemePO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateForbiddenTagById(SchemeSearchParam params) {
|
||||
public int updateForbiddenTagById(SchemeSearchParam params) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
SchemePO schemePO = SchemePO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
|
||||
getSchemeMapper().updateForbiddenTagById(schemePO);
|
||||
return getSchemeMapper().updateForbiddenTagById(schemePO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteByIds(Collection<Long> ids) {
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
getSchemeMapper().deleteByIds(ids);
|
||||
return getSchemeMapper().deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.util.concurrent.Executors;
|
|||
* @Date 2022/4/27
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class LogAspect<T> {
|
||||
public class LogAspect<T> {
|
||||
|
||||
Class<T> clazz;
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ public class LogAspect<T> {
|
|||
private static final Logger logger = LoggerFactory.getLogger(LogAspect.class);
|
||||
|
||||
|
||||
public LogAspect(Class<T> clazz,Method method,LoggerContext loggerContext) {
|
||||
public LogAspect(Class<T> clazz, Method method, LoggerContext loggerContext) {
|
||||
this.clazz = clazz;
|
||||
this.method = method;
|
||||
this.loggerContext = loggerContext;
|
||||
|
|
@ -49,7 +49,8 @@ public class LogAspect<T> {
|
|||
Parameter[] parameters = method.getParameters();
|
||||
String value = annotation.operateType().getValue();
|
||||
String operateDesc = annotation.operateDesc();
|
||||
String operateModuleName = annotation.operateModule().getValue();
|
||||
String operateModuleName = annotation.operateModule().getName();
|
||||
Integer operateModule = annotation.operateModule().getValue();
|
||||
loggerContext.setOperateDesc(operateDesc);
|
||||
loggerContext.setCreateTime(new Date());
|
||||
loggerContext.setOperateType(value);
|
||||
|
|
@ -58,6 +59,7 @@ public class LogAspect<T> {
|
|||
loggerContext.setClassName(clazz.getName());
|
||||
loggerContext.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
loggerContext.setOperateModuleName(operateModuleName);
|
||||
loggerContext.setOperateModule(operateModule);
|
||||
MapperProxyFactory.getProxy(SISLogMapper.class).insert(loggerContext);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@ public class SchemeController {
|
|||
public ReturnResult saveScheme(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> save = getSchemeWrapper(user).save(param);
|
||||
return ReturnResult.successed(save);
|
||||
return ReturnResult.successed(getSchemeWrapper(user).save(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
@ -87,8 +86,7 @@ public class SchemeController {
|
|||
public ReturnResult updateScheme(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> update = getSchemeWrapper(user).updateScheme(param);
|
||||
return ReturnResult.successed(update);
|
||||
return ReturnResult.successed(getSchemeWrapper(user).updateScheme(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
@ -109,8 +107,7 @@ public class SchemeController {
|
|||
public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
getSchemeWrapper(user).updateForbiddenTagById(param);
|
||||
return ReturnResult.successed();
|
||||
return ReturnResult.successed(getSchemeWrapper(user).updateForbiddenTagById(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
@ -131,8 +128,7 @@ public class SchemeController {
|
|||
public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeleteParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
getSchemeWrapper(user).deleteByIds(param.getIds());
|
||||
return ReturnResult.successed();
|
||||
return ReturnResult.successed(getSchemeWrapper(user).deleteByIds(param.getIds()));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.company.param.CompSearchParam;
|
||||
import com.engine.organization.entity.department.param.DepartmentMoveParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.CompService;
|
||||
import com.engine.organization.service.impl.CompServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -19,7 +23,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/16
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class CompWrapper extends Service {
|
||||
public class CompWrapper extends OrganizationWrapper {
|
||||
private CompService getCompService(User user) {
|
||||
return ServiceUtil.getService(CompServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -41,8 +45,12 @@ public class CompWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateDesc = "新增分部", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public Long saveBaseComp(Map<String, Object> params) {
|
||||
return getCompService(user).saveBaseComp(params);
|
||||
Long companyId = getCompService(user).saveBaseComp(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增分部【" + JSON.toJSONString(params) + "】");
|
||||
return companyId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -50,8 +58,12 @@ public class CompWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新分部禁用标识", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public int updateForbiddenTagById(CompSearchParam params) {
|
||||
return getCompService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getCompService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新分部禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -60,8 +72,12 @@ public class CompWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新分部信息", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public Long updateComp(Map<String, Object> params) {
|
||||
return getCompService(user).updateComp(params);
|
||||
Long companyId = getCompService(user).updateComp(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新分部信息【" + JSON.toJSONString(params) + "】");
|
||||
return companyId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,8 +85,26 @@ public class CompWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateDesc = "删除分部信息", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getCompService(user).deleteByIds(ids);
|
||||
int deleteByIds = getCompService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除分部信息,删除数据ID【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转移分部
|
||||
*
|
||||
* @param moveParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "转移分部", operateModule = LogModuleNameEnum.COMPANY)
|
||||
public int moveCompany(DepartmentMoveParam moveParam) {
|
||||
int moveCompany = getCompService(user).moveCompany(moveParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "转移分部,分部ID【" + moveParam.getId() + "】,目标分部ID【" + moveParam.getCompany() + "】");
|
||||
return moveCompany;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -112,15 +146,10 @@ public class CompWrapper extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* 转移分部
|
||||
* 获取转移表单
|
||||
*
|
||||
* @param moveParam
|
||||
* @return
|
||||
*/
|
||||
public int moveCompany(DepartmentMoveParam moveParam) {
|
||||
return getCompService(user).moveCompany(moveParam);
|
||||
}
|
||||
|
||||
public List<SearchConditionGroup> getMoveForm() {
|
||||
return getCompService(user).getMoveForm();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.department.param.*;
|
||||
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
|
||||
import com.engine.organization.entity.job.vo.SingleJobTreeVO;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.DepartmentService;
|
||||
import com.engine.organization.service.impl.DepartmentServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import com.engine.organization.util.page.PageInfo;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -23,7 +27,7 @@ import java.util.Map;
|
|||
* @Date 2022/5/20
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class DepartmentWrapper extends Service {
|
||||
public class DepartmentWrapper extends OrganizationWrapper {
|
||||
|
||||
public DepartmentService getDepartmentService(User user) {
|
||||
return ServiceUtil.getService(DepartmentServiceImpl.class, user);
|
||||
|
|
@ -79,8 +83,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateDesc = "新增部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
return getDepartmentService(user).saveBaseForm(params);
|
||||
Long departmentId = getDepartmentService(user).saveBaseForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增部门【" + JSON.toJSONString(params) + "】");
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -89,8 +97,12 @@ public class DepartmentWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新部门禁用标记", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int updateForbiddenTagById(DeptSearchParam params) {
|
||||
return getDepartmentService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getDepartmentService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新部门禁用标记【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -99,8 +111,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新部门信息", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public Long updateForm(Map<String, Object> params) {
|
||||
return getDepartmentService(user).updateForm(params);
|
||||
Long departmentId = getDepartmentService(user).updateForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新部门信息【" + JSON.toJSONString(params) + "】");
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -108,8 +124,12 @@ public class DepartmentWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateDesc = "删除部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getDepartmentService(user).deleteByIds(ids);
|
||||
int deleteByIds = getDepartmentService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除部门【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -156,8 +176,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param copyParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateDesc = "复制部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int copyDepartment(DeptCopyParam copyParam) {
|
||||
return getDepartmentService(user).copyDepartment(copyParam);
|
||||
int copyDepartment = getDepartmentService(user).copyDepartment(copyParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "复制部门【" + JSON.toJSONString(copyParam) + "】");
|
||||
return copyDepartment;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -176,8 +200,12 @@ public class DepartmentWrapper extends Service {
|
|||
* @param mergeParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "合并部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int mergeDepartment(DepartmentMergeParam mergeParam) {
|
||||
return getDepartmentService(user).mergeDepartment(mergeParam);
|
||||
int mergeDepartment = getDepartmentService(user).mergeDepartment(mergeParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "合并部门【" + JSON.toJSONString(mergeParam) + "】");
|
||||
return mergeDepartment;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -195,7 +223,11 @@ public class DepartmentWrapper extends Service {
|
|||
* @param moveParam
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "转移部门", operateModule = LogModuleNameEnum.DEPARTMENT)
|
||||
public int moveDepartment(DepartmentMoveParam moveParam) {
|
||||
return getDepartmentService(user).moveDepartment(moveParam);
|
||||
int moveDepartment = getDepartmentService(user).moveDepartment(moveParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "转移部门【" + JSON.toJSONString(moveParam) + "】");
|
||||
return moveDepartment;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.scheme.param.GradeSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.GradeService;
|
||||
import com.engine.organization.service.impl.GradeServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -18,8 +22,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class GradeWrapper extends Service {
|
||||
|
||||
public class GradeWrapper extends OrganizationWrapper {
|
||||
|
||||
|
||||
private GradeService getGradeService(User user) {
|
||||
|
|
@ -43,8 +46,12 @@ public class GradeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.GRADE, operateDesc = "新增职等")
|
||||
public int saveGrade(GradeSearchParam param) {
|
||||
return getGradeService(user).saveGrade(param);
|
||||
int saveGrade = getGradeService(user).saveGrade(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职等【" + JSON.toJSONString(param) + "】");
|
||||
return saveGrade;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -53,8 +60,12 @@ public class GradeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "更新职级")
|
||||
public int updateGrade(GradeSearchParam param) {
|
||||
return getGradeService(user).updateGrade(param);
|
||||
int updateGrade = getGradeService(user).updateGrade(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职级【" + JSON.toJSONString(param) + "】");
|
||||
return updateGrade;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -62,8 +73,12 @@ public class GradeWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "更新职级禁用标识")
|
||||
public int updateForbiddenTagById(GradeSearchParam params) {
|
||||
return getGradeService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getGradeService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职级禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -71,8 +86,12 @@ public class GradeWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.GRADE, operateDesc = "删除职等")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getGradeService(user).deleteByIds(ids);
|
||||
int deleteByIds = getGradeService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职等【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.GroupService;
|
||||
import com.engine.organization.service.impl.GroupServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -14,7 +18,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/16
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class GroupWrapper extends Service {
|
||||
public class GroupWrapper extends OrganizationWrapper {
|
||||
private GroupService getGroupService(User user) {
|
||||
return ServiceUtil.getService(GroupServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -36,8 +40,12 @@ public class GroupWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.GROUP, operateDesc = "更新集团")
|
||||
public boolean updateGroup(Map<String, Object> params) {
|
||||
return getGroupService(user).updateGroup(params);
|
||||
boolean updateGroup = getGroupService(user).updateGroup(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新集团【" + JSON.toJSONString(params) + "】");
|
||||
return updateGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.HrmResourceService;
|
||||
import com.engine.organization.service.impl.HrmResourceServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -15,7 +19,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/06/21
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class HrmResourceWrapper extends Service {
|
||||
public class HrmResourceWrapper extends OrganizationWrapper {
|
||||
private HrmResourceService getHrmResourceService(User user) {
|
||||
return ServiceUtil.getService(HrmResourceServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -33,16 +37,24 @@ public class HrmResourceWrapper extends Service {
|
|||
return getHrmResourceService(user).getSaveForm();
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.RESOURCE, operateDesc = "新增人员")
|
||||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).saveBaseForm(params);
|
||||
Long resourceId = getHrmResourceService(user).saveBaseForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增人员【" + JSON.toJSONString(params) + "】");
|
||||
return resourceId;
|
||||
}
|
||||
|
||||
public Map<String, Object> getBaseForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).getBaseForm(params);
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.RESOURCE, operateDesc = "更新人员信息")
|
||||
public int updateForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).updateForm(params);
|
||||
int updateForm = getHrmResourceService(user).updateForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新人员信息【" + JSON.toJSONString(params) + "】");
|
||||
return updateForm;
|
||||
}
|
||||
|
||||
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,26 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.job.param.JobMergeParam;
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.JobService;
|
||||
import com.engine.organization.service.impl.JobServiceImpl;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
|
|
@ -21,7 +28,7 @@ import java.util.*;
|
|||
* @createTime: 2022/05/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class JobWrapper extends Service {
|
||||
public class JobWrapper extends OrganizationWrapper {
|
||||
private JobService getJobService(User user) {
|
||||
return ServiceUtil.getService(JobServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -90,8 +97,12 @@ public class JobWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.JOB, operateDesc = "新增岗位")
|
||||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
return getJobService(user).saveBaseForm(params);
|
||||
Long jobId = getJobService(user).saveBaseForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增岗位【" + JSON.toJSONString(params) + "】");
|
||||
return jobId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -100,8 +111,12 @@ public class JobWrapper extends Service {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.JOB, operateDesc = "更新岗位信息")
|
||||
public Long updateForm(Map<String, Object> params) {
|
||||
return getJobService(user).updateForm(params);
|
||||
Long jobId = getJobService(user).updateForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位信息【" + JSON.toJSONString(params) + "】");
|
||||
return jobId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,16 +126,26 @@ public class JobWrapper extends Service {
|
|||
* @param department
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.JOB, operateDesc = "复制岗位到部门")
|
||||
public int copyJobItem(String ids, String department) {
|
||||
return getJobService(user).copyJobItem(ids, department);
|
||||
int copyJobItem = getJobService(user).copyJobItem(ids, department);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "复制岗位到部门,岗位ID【" + ids + "】,部门ID【" + department + "】");
|
||||
return copyJobItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新禁用标识
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.JOB, operateDesc = "更新岗位禁用标识")
|
||||
public int updateForbiddenTagById(JobSearchParam params) {
|
||||
return getJobService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getJobService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -129,8 +154,12 @@ public class JobWrapper extends Service {
|
|||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.JOB, operateDesc = "删除岗位信息")
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getJobService(user).deleteByIds(ids);
|
||||
int deleteByIds = getJobService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除岗位信息【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -164,7 +193,11 @@ public class JobWrapper extends Service {
|
|||
return getJobService(user).getMergeForm();
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.JOB, operateDesc = "合并岗位")
|
||||
public int mergeJob(JobMergeParam mergeParam) {
|
||||
return getJobService(user).mergeJob(mergeParam);
|
||||
int mergeJob = getJobService(user).mergeJob(mergeParam);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "合并岗位【" + JSON.toJSONString(mergeParam) + "】");
|
||||
return mergeJob;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.scheme.param.LevelSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.LevelService;
|
||||
import com.engine.organization.service.impl.LevelServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -18,7 +22,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class LevelWrapper extends Service {
|
||||
public class LevelWrapper extends OrganizationWrapper {
|
||||
private LevelService getLevelService(User user) {
|
||||
return ServiceUtil.getService(LevelServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -39,8 +43,12 @@ public class LevelWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "新增职等")
|
||||
public int saveLevel(LevelSearchParam param) {
|
||||
return getLevelService(user).saveLevel(param);
|
||||
int saveLevel = getLevelService(user).saveLevel(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职等【" + JSON.toJSONString(param) + "】");
|
||||
return saveLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -49,8 +57,12 @@ public class LevelWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "更新职等")
|
||||
public int updateLevel(LevelSearchParam param) {
|
||||
return getLevelService(user).updateLevel(param);
|
||||
int updateLevel = getLevelService(user).updateLevel(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职等【" + JSON.toJSONString(param) + "】");
|
||||
return updateLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -58,8 +70,12 @@ public class LevelWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "更新职等禁用标识")
|
||||
public int updateForbiddenTagById(LevelSearchParam params) {
|
||||
return getLevelService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getLevelService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职等禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -67,8 +83,12 @@ public class LevelWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.LEVEL, operateDesc = "删除职等")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getLevelService(user).deleteByIds(ids);
|
||||
int deleteByIds = getLevelService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职等【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.postion.param.PostInfoSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.PostInfoService;
|
||||
import com.engine.organization.service.impl.PostInfoServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -17,7 +21,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PostInfoWrapper extends Service {
|
||||
public class PostInfoWrapper extends OrganizationWrapper {
|
||||
private PostInfoService getPostInfoService(User user) {
|
||||
return ServiceUtil.getService(PostInfoServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -38,8 +42,12 @@ public class PostInfoWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "新增职务信息")
|
||||
public int savePostInfo(PostInfoSearchParam param) {
|
||||
return getPostInfoService(user).savePostInfo(param);
|
||||
int savePostInfo = getPostInfoService(user).savePostInfo(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职务信息【" + JSON.toJSONString(param) + "】");
|
||||
return savePostInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +56,12 @@ public class PostInfoWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "更新职务信息")
|
||||
public int updatePostInfo(PostInfoSearchParam param) {
|
||||
return getPostInfoService(user).updatePostInfo(param);
|
||||
int updatePostInfo = getPostInfoService(user).updatePostInfo(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职务信息【" + JSON.toJSONString(param) + "】");
|
||||
return updatePostInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -57,8 +69,12 @@ public class PostInfoWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "更新职务信息禁用标识")
|
||||
public int updateForbiddenTagById(PostInfoSearchParam params) {
|
||||
return getPostInfoService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getPostInfoService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职务信息禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -66,8 +82,12 @@ public class PostInfoWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.POSTINFO, operateDesc = "删除职务信息")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getPostInfoService(user).deleteByIds(ids);
|
||||
int deleteByIds = getPostInfoService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职务信息【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.PostService;
|
||||
import com.engine.organization.service.impl.PostServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -18,7 +22,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PostWrapper extends Service {
|
||||
public class PostWrapper extends OrganizationWrapper {
|
||||
private PostService getPostService(User user) {
|
||||
return ServiceUtil.getService(PostServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -29,8 +33,12 @@ public class PostWrapper extends Service {
|
|||
* @param postPO
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.POST, operateDesc = "新增职务分类")
|
||||
public int savePost(PostPO postPO) {
|
||||
return getPostService(user).savePost(postPO);
|
||||
int savePost = getPostService(user).savePost(postPO);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增职等【" + JSON.toJSONString(postPO) + "】");
|
||||
return savePost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -39,8 +47,12 @@ public class PostWrapper extends Service {
|
|||
* @param postPO
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.POST, operateDesc = "更新职务分类")
|
||||
public int updatePost(PostPO postPO) {
|
||||
return getPostService(user).updatePost(postPO);
|
||||
int updatePost = getPostService(user).updatePost(postPO);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新职务分类【" + JSON.toJSONString(postPO) + "】");
|
||||
return updatePost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +60,12 @@ public class PostWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.POST, operateDesc = "删除职务分类")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getPostService(user).deleteByIds(ids);
|
||||
int deleteByIds = getPostService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除职务分类【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
|
||||
import com.engine.organization.entity.scheme.param.SchemeSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.SchemeService;
|
||||
import com.engine.organization.service.impl.SchemeServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -19,7 +23,7 @@ import java.util.Map;
|
|||
* @Date 2022/5/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class SchemeWrapper extends Service {
|
||||
public class SchemeWrapper extends OrganizationWrapper {
|
||||
|
||||
private SchemeService getSchemeService(User user) {
|
||||
return ServiceUtil.getService(SchemeServiceImpl.class, user);
|
||||
|
|
@ -41,8 +45,12 @@ public class SchemeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> save(SchemeSearchParam param) {
|
||||
return getSchemeService(user).save(param);
|
||||
@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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -51,8 +59,12 @@ public class SchemeWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> updateScheme(SchemeSearchParam param) {
|
||||
return getSchemeService(user).updateScheme(param);
|
||||
@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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -60,8 +72,12 @@ public class SchemeWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
public void updateForbiddenTagById(SchemeSearchParam params) {
|
||||
getSchemeService(user).updateForbiddenTagById(params);
|
||||
@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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,8 +85,12 @@ public class SchemeWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
public void deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
getSchemeService(user).deleteByIds(ids);
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.sequence.param.SequenceSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.SequenceService;
|
||||
import com.engine.organization.service.impl.SequenceServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -17,7 +21,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/12
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class SequenceWrapper extends Service {
|
||||
public class SequenceWrapper extends OrganizationWrapper {
|
||||
private SequenceService getSequenceService(User user) {
|
||||
return ServiceUtil.getService(SequenceServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -38,8 +42,12 @@ public class SequenceWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "新增岗位序列")
|
||||
public int saveSequence(SequenceSearchParam param) {
|
||||
return getSequenceService(user).saveSequence(param);
|
||||
int saveSequence = getSequenceService(user).saveSequence(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增岗位序列【" + JSON.toJSONString(param) + "】");
|
||||
return saveSequence;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +56,12 @@ public class SequenceWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "更新岗位序列")
|
||||
public int updateSequence(SequenceSearchParam param) {
|
||||
return getSequenceService(user).updateSequence(param);
|
||||
int updateSequence = getSequenceService(user).updateSequence(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位序列【" + JSON.toJSONString(param) + "】");
|
||||
return updateSequence;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -57,8 +69,12 @@ public class SequenceWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "更新岗位序列禁用标识")
|
||||
public int updateForbiddenTagById(SequenceSearchParam params) {
|
||||
return getSequenceService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getSequenceService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新岗位序列禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -66,8 +82,12 @@ public class SequenceWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.SEQUENCE, operateDesc = "删除岗位序列")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getSequenceService(user).deleteByIds(ids);
|
||||
int deleteByIds = getSequenceService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除岗位序列【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.staff.param.StaffPlanSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.StaffPlanService;
|
||||
import com.engine.organization.service.impl.StaffPlanServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -17,7 +21,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/25
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class StaffPlanWrapper extends Service {
|
||||
public class StaffPlanWrapper extends OrganizationWrapper {
|
||||
private StaffPlanService getStaffPlanService(User user) {
|
||||
return ServiceUtil.getService(StaffPlanServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -38,8 +42,12 @@ public class StaffPlanWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "新增编制方案")
|
||||
public int saveStaffPlan(StaffPlanSearchParam param) {
|
||||
return getStaffPlanService(user).saveStaffPlan(param);
|
||||
int saveStaffPlan = getStaffPlanService(user).saveStaffPlan(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增编制方案【" + JSON.toJSONString(param) + "】");
|
||||
return saveStaffPlan;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,8 +56,12 @@ public class StaffPlanWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "更新编制方案")
|
||||
public int updateStaffPlan(StaffPlanSearchParam param) {
|
||||
return getStaffPlanService(user).updateStaffPlan(param);
|
||||
int updateStaffPlan = getStaffPlanService(user).updateStaffPlan(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新编制方案【" + JSON.toJSONString(param) + "】");
|
||||
return updateStaffPlan;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -57,8 +69,12 @@ public class StaffPlanWrapper extends Service {
|
|||
*
|
||||
* @param params
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "更新编制方案禁用标识")
|
||||
public int updateForbiddenTagById(StaffPlanSearchParam params) {
|
||||
return getStaffPlanService(user).updateForbiddenTagById(params);
|
||||
int updateForbiddenTagById = getStaffPlanService(user).updateForbiddenTagById(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新编制方案禁用标识【" + JSON.toJSONString(params) + "】");
|
||||
return updateForbiddenTagById;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -66,8 +82,12 @@ public class StaffPlanWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.STAFFPLAN, operateDesc = "删除编制方案")
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getStaffPlanService(user).deleteByIds(ids);
|
||||
int deleteByIds = getStaffPlanService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除编制方案【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.staff.param.StaffSearchParam;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.StaffService;
|
||||
import com.engine.organization.service.impl.StaffServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -16,7 +20,7 @@ import java.util.Map;
|
|||
* @createTime: 2022/05/25
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class StaffWrapper extends Service {
|
||||
public class StaffWrapper extends OrganizationWrapper {
|
||||
private StaffService getStaffService(User user) {
|
||||
return ServiceUtil.getService(StaffServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -37,8 +41,12 @@ public class StaffWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.STAFF, operateDesc = "新增编制上报")
|
||||
public int saveStaff(StaffSearchParam param) {
|
||||
return getStaffService(user).saveStaff(param);
|
||||
int saveStaff = getStaffService(user).saveStaff(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "新增编制上报【" + JSON.toJSONString(param) + "】");
|
||||
return saveStaff;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -47,8 +55,12 @@ public class StaffWrapper extends Service {
|
|||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.STAFF, operateDesc = "更新编制上报")
|
||||
public int updateStaff(StaffSearchParam param) {
|
||||
return getStaffService(user).updateStaff(param);
|
||||
int updateStaff = getStaffService(user).updateStaff(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "更新编制上报【" + JSON.toJSONString(param) + "】");
|
||||
return updateStaff;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -57,8 +69,12 @@ public class StaffWrapper extends Service {
|
|||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Log(operateType = OperateTypeEnum.DELETE, operateModule = LogModuleNameEnum.STAFF, operateDesc = "删除编制上报")
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getStaffService(user).deleteByIds(ids);
|
||||
int deleteByIds = getStaffService(user).deleteByIds(ids);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), "删除编制上报【" + JSON.toJSONString(ids) + "】");
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue