|
@@ -18,8 +18,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.io.File;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
/**
|
|
|
* Created by owen on 2020/3/16 0016 18:17
|
|
@@ -79,6 +81,28 @@ public class VerticalListener {
|
|
|
log.error("rsaVertical 计算异常");
|
|
|
throw new BaseRuntimeException(MsgCode.e_RSA_VERTICAL_6000, MsgCode.msg_RSA_VERTICAL_6000);
|
|
|
}
|
|
|
+ boolean isAllExit = true;
|
|
|
+ //先校验nas中垂直校验生成的文件是否可访问,如果不行,则需要休眠3s
|
|
|
+ for (String path : ossImageHigh.keySet()) {
|
|
|
+ File tmp = new File(path);
|
|
|
+ if(!tmp.exists()){
|
|
|
+ isAllExit = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (String path : ossImageLow.keySet()) {
|
|
|
+ File tmp = new File(path);
|
|
|
+ if(!tmp.exists()){
|
|
|
+ isAllExit = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!isAllExit){
|
|
|
+ log.info("垂直交验的文件存在获取不到的情况,休眠3秒再尝试读取");
|
|
|
+ TimeUnit.SECONDS.sleep(3);
|
|
|
+ }
|
|
|
|
|
|
// 模型上传oss
|
|
|
AliyunOssUtil.uploadMulFiles(ossImageHigh);
|