修改人员状态,从before到after
parent
b9dac47eb9
commit
815388e8e0
|
@ -26,81 +26,169 @@ public class ChangeStatusImpl {
|
|||
+++++++++++++++++++++++++++++++++++++++++++修改人员数据Start+++++++++++++++++++++++++++++
|
||||
*/
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/finance/save", order = 1, description = "工资福利修改")
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/finance/save", order = 1, description = "工资福利修改")
|
||||
public void financeBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatus(weaBeforeReplaceParam, "id", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/finance/save", order = 1, description = "工资福利修改")
|
||||
public void financeAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2);
|
||||
}
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/systeminfo/save", order = 1, description = "系统信息修改")
|
||||
/*@WeaReplaceBefore(value = "/api/hrm/systeminfo/save", order = 1, description = "系统信息修改")
|
||||
public void systeminfoBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatus(weaBeforeReplaceParam, "id", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/systeminfo/save", order = 1, description = "系统信息修改")
|
||||
public void systeminfoAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2);
|
||||
}
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/resource/editResource", order = 1, description = "人员信息修改")
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/resource/editResource", order = 1, description = "人员信息修改")
|
||||
public void editResourceBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatus(weaBeforeReplaceParam, "id", 2);
|
||||
}*/
|
||||
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/resource/editResource", order = 1, description = "人员信息修改")
|
||||
public void editResourceAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2);
|
||||
}
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/forgotPassword/saveResetPassword", order = 1, description = "重置密码")
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/forgotPassword/saveResetPassword", order = 1, description = "重置密码")
|
||||
public void saveResetPasswordBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatus(weaBeforeReplaceParam, "id", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/forgotPassword/saveResetPassword", order = 1, description = "重置密码")
|
||||
public void saveResetPasswordAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* 批量数据修改,数据类型为数组
|
||||
*
|
||||
* @param weaBeforeReplaceParam
|
||||
*/
|
||||
@WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/resource/saveBatch", order = 1, description = "批量修改人员数据")
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/resource/saveBatch", order = 1, description = "批量修改人员数据")
|
||||
public void saveBatchBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.batchChangeHrmResourceStatus(weaBeforeReplaceParam, "id", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/resource/saveBatch", order = 1, description = "批量修改人员数据")
|
||||
public void saveBatchAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.batchChangeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchManagerid", order = 1, description = "批量修改直接上级")
|
||||
public void saveBatchManageridBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "ids", 2);
|
||||
}
|
||||
*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchManagerid", order = 1, description = "批量修改直接上级")
|
||||
public void saveBatchManageridAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchJobtitle", order = 1, description = "批量调整职位")
|
||||
public void saveBatchJobtitleBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "ids", 2);
|
||||
}
|
||||
*/
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchResourceDeptid", order = 1, description = "批量调整部门")
|
||||
@WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchJobtitle", order = 1, description = "批量调整职位")
|
||||
public void saveBatchJobtitleAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchResourceDeptid", order = 1, description = "批量调整部门")
|
||||
public void saveBatchResourceDeptidBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "ids", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchResourceDeptid", order = 1, description = "批量调整部门")
|
||||
public void saveBatchResourceDeptidAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2);
|
||||
}
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchAccounttype", order = 1, description = "批量修改主次账号")
|
||||
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchAccounttype", order = 1, description = "批量修改主次账号")
|
||||
public void saveBatchAccounttypeBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "ids", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchAccounttype", order = 1, description = "批量修改主次账号")
|
||||
public void saveBatchAccounttypeAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchPassword", order = 1, description = "批量修改密码")
|
||||
public void saveBatchPasswordBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "ids", 2);
|
||||
}
|
||||
*/
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchDefaultPwd", order = 1, description = "批量重置密码")
|
||||
public void saveBatchDefaultPwdBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "resourceIds", 2);
|
||||
@WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchPassword", order = 1, description = "批量修改密码")
|
||||
public void saveBatchPasswordAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2);
|
||||
}
|
||||
|
||||
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchDefaultPwd", order = 1, description = "批量重置密码")
|
||||
public void saveBatchDefaultPwdBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "resourceIds", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchDefaultPwd", order = 1, description = "批量重置密码")
|
||||
public void saveBatchDefaultPwdAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "resourceIds", 2);
|
||||
}
|
||||
|
||||
/*
|
||||
@WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmRedeploy", order = 1, description = "人员调动")
|
||||
public void saveHrmRedeployBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "tempresourceid", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmRedeploy", order = 1, description = "人员调动")
|
||||
public void saveHrmRedeployAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2);
|
||||
}
|
||||
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmExtend", order = 1, description = "人员续签")
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmExtend", order = 1, description = "人员续签")
|
||||
public void saveHrmExtendBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "tempresourceid", 2);
|
||||
}*/
|
||||
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmExtend", order = 1, description = "人员续签")
|
||||
public void saveHrmExtendAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2);
|
||||
}
|
||||
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmHire", order = 1, description = "人员转正")
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmHire", order = 1, description = "人员转正")
|
||||
public void saveHrmHireBfore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIds(weaBeforeReplaceParam, "tempresourceid", 2);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmHire", order = 1, description = "人员转正")
|
||||
public void saveHrmHireAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2);
|
||||
}
|
||||
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchUnlockStatus", order = 1, description = "批量解锁人员")
|
||||
|
@ -116,12 +204,19 @@ public class ChangeStatusImpl {
|
|||
+++++++++++++++++++++++++++++++++++++++++++添加人员数据Start+++++++++++++++++++++++++++++
|
||||
*/
|
||||
|
||||
/*
|
||||
@WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmReHire", order = 1, description = "人员返聘")
|
||||
public void saveHrmReHireBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatus(weaBeforeReplaceParam, "tempresourceid", 1);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmReHire", order = 1, description = "人员返聘")
|
||||
public void saveHrmReHireAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 1);
|
||||
}
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/resource/add/save", order = 1, description = "人员添加")
|
||||
public String addResourceAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
Map<String, Object> paramMap = weaAfterReplaceParam.getParamMap();
|
||||
|
@ -165,17 +260,29 @@ public class ChangeStatusImpl {
|
|||
+++++++++++++++++++++++++++++++++++++++++++离职人员数据Start+++++++++++++++++++++++++++++
|
||||
*/
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmDismiss", order = 1, description = "人员离职")
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmDismiss", order = 1, description = "人员离职")
|
||||
public void saveHrmDismissBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatus(weaBeforeReplaceParam, "tempresourceid", 3);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmDismiss", order = 1, description = "人员离职")
|
||||
public void saveHrmDismissAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 3);
|
||||
}
|
||||
|
||||
|
||||
@WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmFire", order = 1, description = "人员解聘")
|
||||
|
||||
/* @WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmFire", order = 1, description = "人员解聘")
|
||||
public void saveHrmFireBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatus(weaBeforeReplaceParam, "tempresourceid", 3);
|
||||
}*/
|
||||
|
||||
@WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmFire", order = 1, description = "人员解聘")
|
||||
public void saveHrmFireAfter(WeaAfterReplaceParam weaAfterReplaceParam) {
|
||||
ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 3);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@WeaReplaceBefore(value = "/api/hrm/statechange/saveHrmRetire", order = 1, description = "人员退修")
|
||||
public void saveHrmRetireBefore(WeaBeforeReplaceParam weaBeforeReplaceParam) {
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.api.aiy_changeStatus.Impl.Util;
|
|||
import aiyh.utils.Util;
|
||||
import aiyh.utils.zwl.common.ToolUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.weaverboot.frame.ioc.handler.replace.weaReplaceParam.impl.WeaAfterReplaceParam;
|
||||
import com.weaverboot.frame.ioc.handler.replace.weaReplaceParam.impl.WeaBeforeReplaceParam;
|
||||
import org.h2.util.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
|
@ -85,4 +86,43 @@ public class ChangeStatusUtil {
|
|||
}
|
||||
|
||||
|
||||
public static void changeHrmResourceStatusAfter(WeaAfterReplaceParam weaAfterReplaceParam, String key, int status) {
|
||||
String apiUrl = weaAfterReplaceParam.getApiUrl();
|
||||
Map<String, Object> paramMap = weaAfterReplaceParam.getParamMap();
|
||||
String id = Util.null2String(paramMap.get(key));
|
||||
if (!StringUtils.isNullOrEmpty(id)) {
|
||||
ChangeStatusUtil.changeStatus(id, status);
|
||||
}
|
||||
TOOL_UTIL.writeDebuggerLog(String.format("进入拦截请求方法,获取到的api{%s},请求参数{%s}", apiUrl, JSON.toJSONString(paramMap)));
|
||||
}
|
||||
|
||||
public static void batchChangeHrmResourceStatusAfter(WeaAfterReplaceParam weaAfterReplaceParam, String key, int status) {
|
||||
String apiUrl = weaAfterReplaceParam.getApiUrl();
|
||||
Map<String, Object> paramMap = weaAfterReplaceParam.getParamMap();
|
||||
List<Map<String, Object>> datas = (List<Map<String, Object>>) paramMap.get("datas");
|
||||
if (datas == null || datas.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
List<String> ids = new ArrayList<>();
|
||||
for (Map<String, Object> data : datas) {
|
||||
String id = Util.null2String(data.get(key));
|
||||
if (!StringUtils.isNullOrEmpty(id)) {
|
||||
ids.add(id);
|
||||
}
|
||||
}
|
||||
if (!ids.isEmpty()) {
|
||||
ChangeStatusUtil.changeStatus(ids, status);
|
||||
}
|
||||
TOOL_UTIL.writeDebuggerLog(String.format("进入拦截请求方法,获取到的api{%s},请求参数{%s}", apiUrl, JSON.toJSONString(paramMap)));
|
||||
}
|
||||
|
||||
public static void changeHrmResourceStatusByIdsAfter(WeaAfterReplaceParam weaAfterReplaceParam, String key, int status) {
|
||||
String apiUrl = weaAfterReplaceParam.getApiUrl();
|
||||
Map<String, Object> paramMap = weaAfterReplaceParam.getParamMap();
|
||||
String id = Util.null2String(paramMap.get(key));
|
||||
if (!StringUtils.isNullOrEmpty(id)) {
|
||||
ChangeStatusUtil.changeStatusByIds(id, status);
|
||||
}
|
||||
TOOL_UTIL.writeDebuggerLog(String.format("进入拦截请求方法,获取到的api{%s},请求参数{%s}", apiUrl, JSON.toJSONString(paramMap)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue