|
|
@@ -16,13 +16,11 @@ import me.zhengjie.dao.mybatis.mapper.NotaryOfficeMapper;
|
|
|
import me.zhengjie.dao.mybatis.mapper.OrderFileMapper;
|
|
|
import me.zhengjie.dao.mybatis.mapper.SysUserMapper;
|
|
|
import me.zhengjie.utils.StringUtils;
|
|
|
-import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.io.InputStream;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 生成公证书定时任务
|
|
|
@@ -41,28 +39,21 @@ public class GenerateNotarizationJob {
|
|
|
* 生成签名公证书
|
|
|
*/
|
|
|
@XxlJob("generateSignedNotarization")
|
|
|
- public void generateSignedNotarization(){
|
|
|
+ public void generateSignedNotarization() {
|
|
|
XxlJobHelper.log("Generate signed notarization beginning ......");
|
|
|
- List<ContractOrderEntity> orderList = contractOrderRepository.canBeAutoSignedOrder();
|
|
|
- if (orderList != null && orderList.size() > 0) {
|
|
|
- List<String> collection = orderList.stream().map(ContractOrderEntity::getBusinessNo).collect(Collectors.toList());
|
|
|
- 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());
|
|
|
- }
|
|
|
+ List<OrderFileEntity> orderFileList = orderFileRepository.canBeSignedNotarization();
|
|
|
+ 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());
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
XxlJobHelper.log("Generate signed notarization endding ......");
|
|
|
}
|
|
|
@@ -139,7 +130,6 @@ public class GenerateNotarizationJob {
|
|
|
orderFileMapper.updateById(saveOrderFile);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 更新已签发时间
|
|
|
* @param no
|