Merge branch 'fix/累计专项附加扣除防抖动' into release/2.9.1.2307.01
This commit is contained in:
commit
b7c58ecc11
|
|
@ -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)
|
||||
|
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue