|
@@ -368,15 +368,17 @@ public class FlowTaskServiceImpl extends BaseServiceImpl<FlowTaskDao, FlowTask>
|
|
|
);
|
|
|
// 附件
|
|
|
List<FlowAttachment> flowAttachments = flowComment.getAttachments();
|
|
|
- for (FlowAttachment flowAttachment : flowAttachments) {
|
|
|
- taskService.createAttachment(
|
|
|
- flowAttachment.getType(),
|
|
|
- task.getId(),
|
|
|
- task.getProcessInstanceId(),
|
|
|
- flowAttachment.getName(),
|
|
|
- comment.getId(),
|
|
|
- flowAttachment.getUrl()
|
|
|
- );
|
|
|
+ if (CollectionUtils.isNotEmpty(flowAttachments)) {
|
|
|
+ for (FlowAttachment flowAttachment : flowAttachments) {
|
|
|
+ taskService.createAttachment(
|
|
|
+ flowAttachment.getType(),
|
|
|
+ task.getId(),
|
|
|
+ task.getProcessInstanceId(),
|
|
|
+ flowAttachment.getName(),
|
|
|
+ comment.getId(),
|
|
|
+ flowAttachment.getUrl()
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
return task;
|
|
|
}
|