|
@@ -14,10 +14,13 @@ import me.zhengjie.base.util.CFCACertUtil;
|
|
|
import me.zhengjie.dao.mybatis.OrderFileRepository;
|
|
import me.zhengjie.dao.mybatis.OrderFileRepository;
|
|
|
import me.zhengjie.dao.mybatis.entity.*;
|
|
import me.zhengjie.dao.mybatis.entity.*;
|
|
|
import me.zhengjie.utils.StringUtils;
|
|
import me.zhengjie.utils.StringUtils;
|
|
|
|
|
+
|
|
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
|
+import java.util.Collections;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -47,7 +50,7 @@ public class GenerateNotarizationJob {
|
|
|
orderQw.eq("auto_generate", "1");
|
|
orderQw.eq("auto_generate", "1");
|
|
|
List<NotaryOrderEntity> orderList = notaryOrderMapper.selectList(orderQw);
|
|
List<NotaryOrderEntity> orderList = notaryOrderMapper.selectList(orderQw);
|
|
|
if (orderList != null && orderList.size() > 0) {
|
|
if (orderList != null && orderList.size() > 0) {
|
|
|
- List<Long> collection = new ArrayList();
|
|
|
|
|
|
|
+ List<Long> collection = new ArrayList<>();
|
|
|
for (NotaryOrderEntity order : orderList) {
|
|
for (NotaryOrderEntity order : orderList) {
|
|
|
QueryWrapper<BorrowerEntity> borrowerQw = new QueryWrapper<>();
|
|
QueryWrapper<BorrowerEntity> borrowerQw = new QueryWrapper<>();
|
|
|
borrowerQw.eq("business_no", order.getBusinessNo());
|
|
borrowerQw.eq("business_no", order.getBusinessNo());
|
|
@@ -73,20 +76,23 @@ public class GenerateNotarizationJob {
|
|
|
collection.add(guarantee.getId());
|
|
collection.add(guarantee.getId());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- List<OrderFileEntity> orderFileList = orderFileRepository.canBeSignedNotarization(collection);
|
|
|
|
|
- for (OrderFileEntity orderFile : orderFileList) {
|
|
|
|
|
- try {
|
|
|
|
|
- if(StringUtils.isEmpty(orderFile.getAxqContractNo())) {
|
|
|
|
|
- signNotarization(orderFile);
|
|
|
|
|
- }
|
|
|
|
|
- if(StringUtils.isEmpty(orderFile.getSignedPdfUrl())) {
|
|
|
|
|
- downloadNotarization(orderFile);
|
|
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(collection)) {
|
|
|
|
|
+ List<OrderFileEntity> orderFileList = orderFileRepository.canBeSignedNotarization(collection);
|
|
|
|
|
+ for (OrderFileEntity orderFile : orderFileList) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ if(StringUtils.isEmpty(orderFile.getAxqContractNo())) {
|
|
|
|
|
+ signNotarization(orderFile);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isEmpty(orderFile.getSignedPdfUrl())) {
|
|
|
|
|
+ downloadNotarization(orderFile);
|
|
|
|
|
+ }
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ XxlJobHelper.log(e.getMessage());
|
|
|
}
|
|
}
|
|
|
- }catch (Exception e){
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- XxlJobHelper.log(e.getMessage());
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
XxlJobHelper.log("Generate signed notarization endding ......");
|
|
XxlJobHelper.log("Generate signed notarization endding ......");
|
|
|
}
|
|
}
|