From 2bf99d3ec1c9847e4d646fc58a216308b2e815d0 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 3 Jul 2023 10:33:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E4=B8=93=E9=A1=B9?= =?UTF-8?q?=E9=99=84=E5=8A=A0=E6=89=A3=E9=99=A4=E9=98=B2=E6=8A=96=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/AddUpDeductionServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index ebb461705..51fa0e11c 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -637,11 +637,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction @Override public String autoAddAll(Date yearMonth, Boolean isAdmin) { String cacheKey = "addUpDeduction_autoAddAll_processing"; + Object objVal = Util_DataCache.getObjVal( cacheKey); + if(objVal != null){ + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(135788, "一键累计过于频繁,请稍后再试")); + } try { - Object objVal = Util_DataCache.getObjVal( cacheKey); - if(objVal != null){ - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(135788, "一键累计过于频繁,请稍后再试")); - } Util_DataCache.setObjVal(cacheKey,true ); //如果是定时任务直接查询所有,isAdmin传true boolean isChief = Boolean.TRUE.equals(isAdmin) From 5e4f32dbab6813e87c8967f401a6ff5047f5bf09 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 3 Jul 2023 10:34:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E4=B8=93=E9=A1=B9?= =?UTF-8?q?=E9=99=84=E5=8A=A0=E6=89=A3=E9=99=A4=E6=9B=B4=E6=96=B0=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E6=97=B6=E9=97=B4=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/AddUpDeductionServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 51fa0e11c..b8a8ecd91 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -717,14 +717,15 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction AddUpDeduction oldInfo = Optional.ofNullable(currentEmpInfo.get(employeeId)) .flatMap(c -> c.stream().findFirst()) .orElse(null); + Date now = new Date(); if (oldInfo == null) { - addUpDeduction.setCreateTime(yearMonth); - addUpDeduction.setUpdateTime(yearMonth); + addUpDeduction.setCreateTime(now); + addUpDeduction.setUpdateTime(now); insertList.add(encryptUtil.encrypt(addUpDeduction, AddUpDeduction.class)); } else { addUpDeduction.setId(oldInfo.getId()); addUpDeduction.setCreateTime(oldInfo.getCreateTime()); - addUpDeduction.setUpdateTime(yearMonth); + addUpDeduction.setUpdateTime(now); updateList.add(encryptUtil.encrypt(addUpDeduction, AddUpDeduction.class)); } });