This commit is contained in:
2024-08-16 14:41:53 +08:00
parent d9a7787469
commit ae169f212e

View File

@@ -124,12 +124,13 @@ public class EmpSalaryService extends BaseService<EmpSalaryEntity, EmpSalaryRepo
EmpSalaryBatchEntity batch = batchService.get(dto.getBatchId());
assertBatchEditable(batch);
RLock lock = redissonClient.getLock("batchModify." + batch.getId());
@Cleanup("unlock") RLock lock = redissonClient.getLock("batchModify." + batch.getId());
boolean tryLock = lock.tryLock();
if (!tryLock) {
batchModifing(batch);
lock = null;
}
if (org.apache.commons.collections4.MapUtils.isEmpty(dto.getSalaryItems())) {
@@ -822,14 +823,17 @@ select id from tmp1 where rk = 1
assertBatchEditable(batch);
RLock lock = redissonClient.getLock("batchModify." + batch.getId());
@Cleanup("unlock") RLock lock = redissonClient.getLock("batchModify." + batch.getId());
boolean tryLock = lock.tryLock();
if (!tryLock) {
lock = null;
batchModifing(batch);
}
List<EmpSalaryItemEntity> items =
this.empSalaryItemService.getItems(batch.getOrganizationId());
@@ -854,7 +858,7 @@ select id from tmp1 where rk = 1
if (header.equals("身份证号") || header.equals("身份证")) {
object.put("idCard", value);
} else if (StringUtils.equalsAny("姓名", "部门", "岗位")) {
} else if (StringUtils.equalsAny("姓名","员工", "部门", "岗位")) {
// 忽略这些字段