From 44782a38a7a7bfc74f33ebdc1970c40a8dc4e3c4 Mon Sep 17 00:00:00 2001 From: IT-xiaoXiong <774495953@qq.com> Date: Thu, 2 Dec 2021 17:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9After=E7=9A=84=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=80=BC=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BB=99=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Impl/ChangeStatusImpl.java | 173 ++++++++++++++---- 1 file changed, 137 insertions(+), 36 deletions(-) diff --git a/com/api/aiy_changeStatus/Impl/ChangeStatusImpl.java b/com/api/aiy_changeStatus/Impl/ChangeStatusImpl.java index e6e5b3d..3978fad 100644 --- a/com/api/aiy_changeStatus/Impl/ChangeStatusImpl.java +++ b/com/api/aiy_changeStatus/Impl/ChangeStatusImpl.java @@ -7,7 +7,6 @@ import com.weaverboot.frame.ioc.anno.classAnno.WeaIocReplaceComponent; import com.weaverboot.frame.ioc.anno.methodAnno.WeaReplaceAfter; import com.weaverboot.frame.ioc.anno.methodAnno.WeaReplaceBefore; 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; @@ -32,8 +31,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceBefore(value = "/api/hrm/finance/save", order = 1, description = "工资福利修改") - public void financeAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + public String financeAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } /*@WeaReplaceBefore(value = "/api/hrm/systeminfo/save", order = 1, description = "系统信息修改") @@ -42,8 +47,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/systeminfo/save", order = 1, description = "系统信息修改") - public void systeminfoAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + public String systeminfoAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } /* @WeaReplaceBefore(value = "/api/hrm/resource/editResource", order = 1, description = "人员信息修改") @@ -53,8 +64,14 @@ public class ChangeStatusImpl { @WeaReplaceAfter(value = "/api/hrm/resource/editResource", order = 1, description = "人员信息修改") - public void editResourceAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + public String editResourceAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } /* @WeaReplaceBefore(value = "/api/hrm/forgotPassword/saveResetPassword", order = 1, description = "重置密码") @@ -63,11 +80,17 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/forgotPassword/saveResetPassword", order = 1, description = "重置密码") - public void saveResetPasswordAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + public String saveResetPasswordAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } -/* + /* * 批量数据修改,数据类型为数组 * * @param weaBeforeReplaceParam @@ -78,8 +101,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/resource/saveBatch", order = 1, description = "批量修改人员数据") - public void saveBatchAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.batchChangeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + public String saveBatchAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.batchChangeHrmResourceStatusAfter(weaAfterReplaceParam, "id", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -91,8 +120,14 @@ public class ChangeStatusImpl { */ @WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchManagerid", order = 1, description = "批量修改直接上级") - public void saveBatchManageridAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + public String saveBatchManageridAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -104,8 +139,14 @@ public class ChangeStatusImpl { */ @WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchJobtitle", order = 1, description = "批量调整职位") - public void saveBatchJobtitleAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + public String saveBatchJobtitleAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -116,8 +157,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchResourceDeptid", order = 1, description = "批量调整部门") - public void saveBatchResourceDeptidAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + public String saveBatchResourceDeptidAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -127,8 +174,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchAccounttype", order = 1, description = "批量修改主次账号") - public void saveBatchAccounttypeAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + public String saveBatchAccounttypeAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -142,8 +195,14 @@ public class ChangeStatusImpl { */ @WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchPassword", order = 1, description = "批量修改密码") - public void saveBatchPasswordAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + public String saveBatchPasswordAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "ids", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -153,8 +212,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchDefaultPwd", order = 1, description = "批量重置密码") - public void saveBatchDefaultPwdAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "resourceIds", 2); + public String saveBatchDefaultPwdAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "resourceIds", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } /* @@ -164,8 +229,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmRedeploy", order = 1, description = "人员调动") - public void saveHrmRedeployAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2); + public String saveHrmRedeployAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -176,8 +247,14 @@ public class ChangeStatusImpl { @WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmExtend", order = 1, description = "人员续签") - public void saveHrmExtendAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2); + public String saveHrmExtendAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -187,8 +264,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmHire", order = 1, description = "人员转正") - public void saveHrmHireAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2); + public String saveHrmHireAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusByIdsAfter(weaAfterReplaceParam, "tempresourceid", 2); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } /* @WeaReplaceBefore(value = "/api/hrm/batchMaintenanceAdjustEdit/saveBatchUnlockStatus", order = 1, description = "批量解锁人员") @@ -213,8 +296,14 @@ public class ChangeStatusImpl { @WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmReHire", order = 1, description = "人员返聘") - public void saveHrmReHireAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 1); + public String saveHrmReHireAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 1); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @WeaReplaceAfter(value = "/api/hrm/resource/add/save", order = 1, description = "人员添加") @@ -266,8 +355,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmDismiss", order = 1, description = "人员离职") - public void saveHrmDismissAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 3); + public String saveHrmDismissAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 3); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); } @@ -278,8 +373,14 @@ public class ChangeStatusImpl { }*/ @WeaReplaceAfter(value = "/api/hrm/statechange/saveHrmFire", order = 1, description = "人员解聘") - public void saveHrmFireAfter(WeaAfterReplaceParam weaAfterReplaceParam) { - ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 3); + public String saveHrmFireAfter(WeaAfterReplaceParam weaAfterReplaceParam) { + try { + ChangeStatusUtil.changeHrmResourceStatusAfter(weaAfterReplaceParam, "tempresourceid", 3); + + } catch (Exception e) { + e.printStackTrace(); + } + return weaAfterReplaceParam.getData(); }