fix(企标稽查流程): 80750
This commit is contained in:
+5
-10
@@ -38,7 +38,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@@ -228,20 +227,16 @@ public class ProcessEsInspectServiceImpl extends ServiceImpl<ProcessEsInspectMap
|
||||
.eq(OSSFile::getStandardId, lawsEnterpriseStandard.getId())
|
||||
.orderByDesc(OSSFile::getCreateTime));
|
||||
if (!list.isEmpty()){
|
||||
// pdf、word
|
||||
list = list.stream()
|
||||
.filter(v -> v.getFileName().endsWith(".pdf")
|
||||
|| v.getFileName().endsWith(".docx")
|
||||
|| v.getFileName().endsWith(".doc")).collect(Collectors.toList());
|
||||
|
||||
// 发布稿>修改单>报批稿>送审稿>征求意见稿>草稿
|
||||
String[] fileTypeArr = {FieldCommon.FILE_PUBLISH_OF_ORIGINAL, FieldCommon.FILE_MODIFICATION_LIST,
|
||||
FieldCommon.FILE_DRAFT_FOR_REVIEW, FieldCommon.FILE_DRAFT_FOR_APPROVAL,
|
||||
FieldCommon.FILE_DRAFT_FOR_COMMENT, FieldCommon.FILE_DRAFT};
|
||||
for (String fileType : fileTypeArr) {
|
||||
Optional<OSSFile> optional = list.stream().filter(v ->
|
||||
fileType.equals(v.getStandardFileType())).findFirst();
|
||||
|
||||
Optional<OSSFile> optional = list.stream()
|
||||
.filter(v -> fileType.equals(v.getStandardFileType())
|
||||
&& (v.getFileName().endsWith(".pdf")
|
||||
|| v.getFileName().endsWith(".docx")
|
||||
|| v.getFileName().endsWith(".doc"))).findFirst();
|
||||
if (optional.isPresent()){
|
||||
return optional.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user