|
@@ -60,19 +60,25 @@ public class FirstDeliveryValidController {
|
|
String key = nowDate + "_importExcelMaterials";
|
|
String key = nowDate + "_importExcelMaterials";
|
|
Object creative = redisUtil.get(key);
|
|
Object creative = redisUtil.get(key);
|
|
if (Check.isNull(creative)) {
|
|
if (Check.isNull(creative)) {
|
|
- try {
|
|
|
|
- redisUtil.set(key, "NO");
|
|
|
|
- StringBuffer path = new StringBuffer();
|
|
|
|
- path.append(downloadPath).append("excel").append("/").append(DateUtils.formatDate()).append("/");
|
|
|
|
- String newFileUrl = FileUtil.approvalFile(file, path.toString());
|
|
|
|
- //宇鹏本地服务
|
|
|
|
-// HttpUtils.fileUpload("http://192.168.1.149:8765/webhook/get_file", newFileUrl, null);
|
|
|
|
- //宇鹏外网服务
|
|
|
|
- HttpUtils.fileUpload("http://111.204.208.194:9998/webhook/get_file", newFileUrl, null);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- redisUtil.removeAll(key);
|
|
|
|
- }
|
|
|
|
|
|
+ redisUtil.set(key, "NO");
|
|
|
|
+ Thread thread = new Thread() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ try {
|
|
|
|
+ StringBuffer path = new StringBuffer();
|
|
|
|
+ path.append(downloadPath).append("excel").append("/").append(DateUtils.formatDate()).append("/");
|
|
|
|
+ String newFileUrl = FileUtil.approvalFile(file, path.toString());
|
|
|
|
+ //宇鹏本地服务
|
|
|
|
+// HttpUtils.fileUpload("http://192.168.1.149:8765/webhook/get_file", newFileUrl, null);
|
|
|
|
+ //宇鹏外网服务
|
|
|
|
+ HttpUtils.fileUpload("http://111.204.208.194:9998/webhook/get_file", newFileUrl, null);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ redisUtil.removeAll(key);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ thread.start();
|
|
} else {
|
|
} else {
|
|
return Result.error("文件上传中...");
|
|
return Result.error("文件上传中...");
|
|
}
|
|
}
|