Commit ccfc0eec by 林永健

fix(sop): 修复任务插入逻辑避免重复添加员工记录

1 parent eeb97d25
...@@ -354,10 +354,12 @@ public class SopTaskInfoService { ...@@ -354,10 +354,12 @@ public class SopTaskInfoService {
Integer period = sopConfig.getStudyDay(); Integer period = sopConfig.getStudyDay();
List<SopTaskInfo> insertList = new ArrayList<>(); List<SopTaskInfo> insertList = new ArrayList<>();
for (DateService.ItemDetail indicatorDetail : staffIndicatorInfoList) { for (DateService.ItemDetail indicatorDetail : staffIndicatorInfoList) {
if (uuidSet.contains(indicatorDetail.getStaffId() + indicatorDetail.getMerchantId())) { String key = indicatorDetail.getStaffId() + indicatorDetail.getMerchantId();
if (uuidSet.contains(key)) {
log.info("该员工最新记录存在未结束(进行中,未改善)的阶段任务, staffId: {},merchantId: {}", indicatorDetail.getStaffId(), indicatorDetail.getMerchantId()); log.info("该员工最新记录存在未结束(进行中,未改善)的阶段任务, staffId: {},merchantId: {}", indicatorDetail.getStaffId(), indicatorDetail.getMerchantId());
continue; continue;
} }
uuidSet.add(key);
SopTaskInfo sopTaskInfo = new SopTaskInfo(); SopTaskInfo sopTaskInfo = new SopTaskInfo();
sopTaskInfo.setDeletedFlag(DeleteFlagEnum.N.getValue()); sopTaskInfo.setDeletedFlag(DeleteFlagEnum.N.getValue());
sopTaskInfo.setCreatedDate(date); sopTaskInfo.setCreatedDate(date);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!