Commit 10bb04ed authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent ac396eed
......@@ -109,6 +109,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
errorMessageList.stream().forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(),errorMessage));
}
List<TEmployeeProject> updateList = new ArrayList<>();
Set<String> errorMsg;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
......@@ -174,7 +175,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeePro.setUnitNo(tCustomerInfo.getCustomerCode());
updateTEmployeePro.setUnitName(tCustomerInfo.getCustomerName());
}
tEmployeeProjectService.updateById(updateTEmployeePro);
updateList.add(updateTEmployeePro);
// 记录变更日志
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro);
......@@ -182,13 +183,16 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
} else {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_SEARCH_EXIT, excel.getOldSettleCode()));
}
} else {
// 数据不合法
}
if (!CollUtil.isEmpty(errorMsg)) {
errorMessageList.add(new ErrorMessage((long) (i + 2), errorMsg));
}
}
if (CollUtil.isNotEmpty(errorMessageList)) {
return R.failed(errorMessageList);
} else {
tEmployeeProjectService.updateBatchById(updateList);
}
return R.ok();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment