装备编辑回显装备证书
This commit is contained in:
parent
c8dada1e67
commit
7175588131
|
|
@ -442,7 +442,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
return null;
|
||||
}
|
||||
|
||||
private AjaxResult uploadFile(DevInfo devInfo, Long userId) {
|
||||
private AjaxResult uploadFile(Table table, DevInfo devInfo, Long userId) {
|
||||
if (userId == null) {
|
||||
return AjaxResult.error("用户信息获取失败,请刷新后重试");
|
||||
}
|
||||
|
|
@ -468,21 +468,21 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
});
|
||||
fileInfoList.addAll(devInfo.getDetailsFileList());
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(devInfo.getInsurancePdf())) {
|
||||
devInfo.getInsurancePdf().removeIf(Objects::isNull);
|
||||
devInfo.getInsurancePdf().forEach(item -> {
|
||||
if (CollectionUtil.isNotEmpty(table.getInsurancePdf())) {
|
||||
table.getInsurancePdf().removeIf(Objects::isNull);
|
||||
table.getInsurancePdf().forEach(item -> {
|
||||
item.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE);
|
||||
item.setFileType(Long.valueOf(INSURANCE_PDF));
|
||||
});
|
||||
fileInfoList.addAll(devInfo.getInsurancePdf());
|
||||
fileInfoList.addAll(table.getInsurancePdf());
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(devInfo.getExaminationPdf())) {
|
||||
devInfo.getExaminationPdf().removeIf(Objects::isNull);
|
||||
devInfo.getExaminationPdf().forEach(item -> {
|
||||
if (CollectionUtil.isNotEmpty(table.getExaminationPdf())) {
|
||||
table.getExaminationPdf().removeIf(Objects::isNull);
|
||||
table.getExaminationPdf().forEach(item -> {
|
||||
item.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE);
|
||||
item.setFileType(Long.valueOf(EXAMINATION_PDF));
|
||||
});
|
||||
fileInfoList.addAll(devInfo.getExaminationPdf());
|
||||
fileInfoList.addAll(table.getExaminationPdf());
|
||||
}
|
||||
|
||||
// 上传处理后的附件列表
|
||||
|
|
@ -537,7 +537,8 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
.setModelId(devInfo.getMaId());
|
||||
bmFileInfoMapper.deleteBmFileInfoByBizInfo(bmFileInfo);
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
uploadFile(devInfo, userId);
|
||||
Table table = tableList.get(0);
|
||||
uploadFile(table, devInfo, userId);
|
||||
}
|
||||
return i > 0 ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue