Commit 084caa06 authored by huyuchen's avatar huyuchen

huych-电子档案批量导入第五次提交

parent d000fdc1
...@@ -273,11 +273,13 @@ public class TElectronicArchiveDetailServiceImpl extends ServiceImpl<TElectronic ...@@ -273,11 +273,13 @@ public class TElectronicArchiveDetailServiceImpl extends ServiceImpl<TElectronic
downloadArchiveFiles(zipOut, folderName, downloadInfo); downloadArchiveFiles(zipOut, folderName, downloadInfo);
// 更新反馈状态为成功 // 更新反馈状态为成功
// 使用materialTypeAttaMap的所有key来匹配,确保所有资料类型的反馈都被更新
Set<String> materialTypes = downloadInfo.getMaterialTypeAttaMap().keySet();
for (ArchiveDownloadFeedbackVO feedback : feedbackList) { for (ArchiveDownloadFeedbackVO feedback : feedbackList) {
if (feedback.getEmpName().equals(downloadInfo.getDetail().getEmpName()) && if (feedback.getEmpName().equals(downloadInfo.getDetail().getEmpName()) &&
feedback.getEmpIdcard().equals(downloadInfo.getDetail().getEmpIdcard()) && feedback.getEmpIdcard().equals(downloadInfo.getDetail().getEmpIdcard()) &&
feedback.getDeptNo().equals(downloadInfo.getDetail().getDeptNo()) && feedback.getDeptNo().equals(downloadInfo.getDetail().getDeptNo()) &&
feedback.getMaterialType().equals(downloadInfo.getMaterialType())) { materialTypes.contains(feedback.getMaterialType())) {
feedback.setDownloadStatus("成功"); feedback.setDownloadStatus("成功");
feedback.setFailReason(""); feedback.setFailReason("");
} }
...@@ -285,11 +287,12 @@ public class TElectronicArchiveDetailServiceImpl extends ServiceImpl<TElectronic ...@@ -285,11 +287,12 @@ public class TElectronicArchiveDetailServiceImpl extends ServiceImpl<TElectronic
} catch (Exception e) { } catch (Exception e) {
log.error("下载档案文件失败,文件夹:{}", folderName, e); log.error("下载档案文件失败,文件夹:{}", folderName, e);
// 更新反馈状态为失败 // 更新反馈状态为失败
Set<String> materialTypes = downloadInfo.getMaterialTypeAttaMap().keySet();
for (ArchiveDownloadFeedbackVO feedback : feedbackList) { for (ArchiveDownloadFeedbackVO feedback : feedbackList) {
if (feedback.getEmpName().equals(downloadInfo.getDetail().getEmpName()) && if (feedback.getEmpName().equals(downloadInfo.getDetail().getEmpName()) &&
feedback.getEmpIdcard().equals(downloadInfo.getDetail().getEmpIdcard()) && feedback.getEmpIdcard().equals(downloadInfo.getDetail().getEmpIdcard()) &&
feedback.getDeptNo().equals(downloadInfo.getDetail().getDeptNo()) && feedback.getDeptNo().equals(downloadInfo.getDetail().getDeptNo()) &&
feedback.getMaterialType().equals(downloadInfo.getMaterialType())) { materialTypes.contains(feedback.getMaterialType())) {
feedback.setDownloadStatus("失败"); feedback.setDownloadStatus("失败");
feedback.setFailReason("下载文件失败:" + e.getMessage()); feedback.setFailReason("下载文件失败:" + e.getMessage());
} }
...@@ -460,7 +463,7 @@ public class TElectronicArchiveDetailServiceImpl extends ServiceImpl<TElectronic ...@@ -460,7 +463,7 @@ public class TElectronicArchiveDetailServiceImpl extends ServiceImpl<TElectronic
if (!downloadInfo.getMaterialTypeAttaMap().containsKey(request.getMaterialType())) { if (!downloadInfo.getMaterialTypeAttaMap().containsKey(request.getMaterialType())) {
downloadInfo.getMaterialTypeAttaMap().put(request.getMaterialType(), attaList); downloadInfo.getMaterialTypeAttaMap().put(request.getMaterialType(), attaList);
} }
downloadInfo.setMaterialType(request.getMaterialType()); // 不再使用单个materialType字段,而是使用materialTypeAttaMap的所有key
// 添加成功的反馈(状态暂时为"处理中",实际下载完成后更新) // 添加成功的反馈(状态暂时为"处理中",实际下载完成后更新)
feedbackList.add(createSuccessFeedbackVO(request,detail)); feedbackList.add(createSuccessFeedbackVO(request,detail));
......
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