记录日志

This commit is contained in:
钱涛 2024-01-30 14:17:06 +08:00
parent a8bfe83030
commit b6f7281cbd
1 changed files with 16 additions and 15 deletions

View File

@ -209,21 +209,22 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
// 删除薪资账套的人员范围
salarySobRangeBiz.deleteByIds(ids);
// 查询薪资账套
// Set<Long> salarySobIds = SalaryEntityUtil.properties(salarySobRangePOS, SalarySobRangePO::getSalarySobId);
// List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByIds(salarySobIds);
// // "关联人员范围"还是"从范围中排除"
// Integer includeType = salarySobRangePOS.get(0).getIncludeType();
// // todo 记录日志
// String operateTypeName = Objects.equals(includeType, NumberUtils.INTEGER_ONE) ?
// SalaryI18nUtil.getI18nLabel(98605, "关联人员范围删除对象") : SalaryI18nUtil.getI18nLabel(98606, "从范围中排除删除对象");
// salarySobPOS.forEach(salarySobPO -> {
// LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId("" + salarySobPO.getId());
// loggerContext.setTargetName(salarySobPO.getName());
// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
// loggerContext.setOperateTypeName(operateTypeName);
// loggerContext.setOperatedesc(operateTypeName);
// });
Set<Long> salarySobIds = SalaryEntityUtil.properties(salarySobRangePOS, SalarySobRangePO::getSalarySobId);
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByIds(salarySobIds);
// "关联人员范围"还是"从范围中排除"
Integer includeType = salarySobRangePOS.get(0).getIncludeType();
//记录日志
String operateTypeName = Objects.equals(includeType, 1) ?
SalaryI18nUtil.getI18nLabel(98605, "关联人员范围删除对象") : SalaryI18nUtil.getI18nLabel(98606, "从范围中排除删除对象");
salarySobPOS.forEach(salarySobPO -> {
LoggerContext<SalarySobPO> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetId("" + salarySobPO.getId());
loggerContext.setTargetName(salarySobPO.getName());
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
loggerContext.setOperateTypeName(operateTypeName);
loggerContext.setOperatedesc(operateTypeName);
});
}
@Override