|
|
@@ -3,12 +3,12 @@ package me.zhengjie.application.admin.service.impl;
|
|
|
import java.io.File;
|
|
|
import java.io.InputStream;
|
|
|
import java.nio.charset.Charset;
|
|
|
-import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-
|
|
|
-import javax.annotation.PostConstruct;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -17,8 +17,6 @@ import org.springframework.stereotype.Service;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
-import com.xxl.job.core.context.XxlJobHelper;
|
|
|
-import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
import cn.hutool.core.util.ZipUtil;
|
|
|
@@ -143,12 +141,35 @@ public class OrderCochainServiceImpl extends AbstractServiceImpl<IOrderCochainDa
|
|
|
wrapper.eq("business_no", businessNo);
|
|
|
// 这里处理,如果没有盖章的就把签名的pdf上传
|
|
|
List<OrderFileEntity> orderFiles = orderFileMapper.selectList(wrapper);
|
|
|
+ Map<String, Integer> count = new HashMap<>();
|
|
|
+ String repeat = "";
|
|
|
for (OrderFileEntity orderFile : orderFiles) {
|
|
|
- if (StringUtils.isNotBlank(orderFile.getSignedPdfUrl())) {
|
|
|
- downloadByPath(orderFile.getSignedPdfUrl(), map, orderFile.getFileName(), zipList);
|
|
|
+ Integer size = count.get(orderFile.getSignedPdfUrl());
|
|
|
+ if (size == null || size == 0) {
|
|
|
+ count.put(orderFile.getSignedPdfUrl(), 1);
|
|
|
} else {
|
|
|
- downloadByPath(orderFile.getPdfUrl(), map, orderFile.getFileName(), zipList);
|
|
|
+ repeat = orderFile.getSignedPdfUrl();
|
|
|
+ count.put(orderFile.getSignedPdfUrl(), size++);
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+// for (OrderFileEntity orderFile : orderFiles) {
|
|
|
+// if (StringUtils.isNotBlank(orderFile.getSignedPdfUrl())) {
|
|
|
+// downloadByPath(orderFile.getSignedPdfUrl(), map, orderFile.getFileName(), zipList);
|
|
|
+// } else {
|
|
|
+// downloadByPath(orderFile.getPdfUrl(), map, orderFile.getFileName(), zipList);
|
|
|
+// }
|
|
|
+// }
|
|
|
+ boolean isflag = true;
|
|
|
+ for (OrderFileEntity orderFile : orderFiles) {
|
|
|
+ String key = orderFile.getSignedPdfUrl();
|
|
|
+ if (repeat != null && repeat.equals(key) && isflag) {
|
|
|
+ isflag = false;
|
|
|
+ downloadByPath(orderFile.getSignedPdfUrl(), map, "公证申请表等相关文书", zipList);
|
|
|
+ } else {
|
|
|
+ downloadByPath(orderFile.getSignedPdfUrl(), map, orderFile.getFileName(), zipList);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
// 处理视频
|
|
|
QueryWrapper<OrderRoomIdEntity> queryWrapper = new QueryWrapper<>();
|