|
@@ -1058,6 +1058,12 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
|
|
|
workattachmentService.insertOnWorkAttachment(workattachment);
|
|
|
//添加备考表附件id
|
|
|
projectReportRecord.setReferenceAttachmentId(workattachment.getId());
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(projectReportRecord.getReferenceAttachmentId()) && StringUtils.isNotBlank(reportRecord.getReferenceAttachmentId())) {
|
|
|
+ if(!projectReportRecord.getReferenceAttachmentId().equals(reportRecord.getReferenceAttachmentId())){
|
|
|
+ workattachmentService.deleteById(reportRecord.getReferenceAttachmentId());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
//生成文件目录
|
|
|
//获取上传阿里云盘文件地址
|
|
@@ -1077,6 +1083,12 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
|
|
|
workattachmentService.insertOnWorkAttachment(workattachment);
|
|
|
//添加目录附件id
|
|
|
projectReportRecord.setCatalogueAttachmentId(workattachment.getId());
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(projectReportRecord.getCatalogueAttachmentId()) && StringUtils.isNotBlank(reportRecord.getCatalogueAttachmentId())) {
|
|
|
+ if(!projectReportRecord.getCatalogueAttachmentId().equals(reportRecord.getCatalogueAttachmentId())){
|
|
|
+ workattachmentService.deleteById(reportRecord.getCatalogueAttachmentId());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
notifyRole = "报告归档管理员审批";
|
|
@@ -1317,16 +1329,6 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
|
|
|
if (1 == projectReportRecord.getType()){
|
|
|
dao.update(projectReportRecord);
|
|
|
}else if(2 == projectReportRecord.getType()){
|
|
|
- if (StringUtils.isNotBlank(projectReportRecord.getReferenceAttachmentId()) && StringUtils.isNotBlank(reportRecord.getReferenceAttachmentId())) {
|
|
|
- if(!projectReportRecord.getReferenceAttachmentId().equals(reportRecord.getReferenceAttachmentId())){
|
|
|
- workattachmentService.deleteById(reportRecord.getReferenceAttachmentId());
|
|
|
- }
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(projectReportRecord.getCatalogueAttachmentId()) && StringUtils.isNotBlank(reportRecord.getCatalogueAttachmentId())) {
|
|
|
- if(!projectReportRecord.getCatalogueAttachmentId().equals(reportRecord.getCatalogueAttachmentId())){
|
|
|
- workattachmentService.deleteById(reportRecord.getCatalogueAttachmentId());
|
|
|
- }
|
|
|
- }
|
|
|
dao.updateRuralProjectReportRecord(projectReportRecord);
|
|
|
}
|
|
|
return "保存审核意见成功!";
|