Commit 7942005d authored by 赵啸非's avatar 赵啸非

添加目录字段

parent 3a0d5f10
...@@ -53,6 +53,7 @@ import java.io.*; ...@@ -53,6 +53,7 @@ import java.io.*;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -145,9 +146,18 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -145,9 +146,18 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
for (ApplyLogEntity entity : list) { for (ApplyLogEntity entity : list) {
//List<ChildLicenseEntity> childLicenseList = childLicenseService.find(new ChildLicenseQuery().applyId(entity.getId())); //List<ChildLicenseEntity> childLicenseList = childLicenseService.find(new ChildLicenseQuery().applyId(entity.getId()));
List<ChildLicenseEntity> childLicenseList = childLicenseListMap.get(entity.getId()); List<ChildLicenseEntity> childLicenseList = childLicenseListMap.get(entity.getId());
Predicate<ChildLicenseEntity> enablePredicate =item->item.getChildStatus() == StatusEnum.ENABLE.getValue();
Predicate<ChildLicenseEntity> processPredicate =item->item.getChildStatus() == StatusEnum.ENABLE.getValue()&&item.getProcessStatus() == ProcessStatusEnum.已处理.getValue();
long childSum = childLicenseList.stream().filter(enablePredicate).count();
long pCount = childLicenseList.stream().filter(processPredicate).count();
List<CertificateDocumentPdu> documentEntityList = childLicenseList.stream().map(item -> {
CertificateDocumentPdu pdu = new CertificateDocumentPdu();
pdu.setId(item.getId());
pdu.setStatus(item.getChildStatus());
pdu.setDocumentName(item.getDocumentName());
return pdu;
}).collect(Collectors.toList());
long childSum = childLicenseList.stream().filter(item -> item.getChildStatus() == StatusEnum.ENABLE.getValue()).count();
long pCount = childLicenseList.stream().filter(item -> item.getChildStatus() == StatusEnum.ENABLE.getValue()&&item.getProcessStatus() == ProcessStatusEnum.已处理.getValue()).count();
/* int childSum = 0; /* int childSum = 0;
int pCount = 0; int pCount = 0;
List<CertificateDocumentPdu> documentEntityList = new ArrayList<>(); List<CertificateDocumentPdu> documentEntityList = new ArrayList<>();
...@@ -168,8 +178,8 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap ...@@ -168,8 +178,8 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
documentEntityList.add(pdu); documentEntityList.add(pdu);
}*/ }*/
entity.setProcessStatus(pCount + "/" + childSum); entity.setProcessStatus(pCount + "/" + childSum);
// entity.setChildCertificate(documentEntityList); entity.setChildCertificate(documentEntityList);
entity.setChildLicense(childLicenseList); //entity.setChildLicense(childLicenseList);
} }
} }
......
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