Ver Fonte

Merge remote-tracking branch 'origin/dev' into dev

zhuwei há 1 dia atrás
pai
commit
a3afbf74fb

+ 5 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -5408,6 +5408,10 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 									LocalDateTime[] localDateTimes = convertDateRange(time, "-");
 									auto.setStartDate(localDateTimes[0]);
 									auto.setEndDate(localDateTimes[1]);
+								} else if (result.contains("~")) {
+									LocalDateTime[] localDateTimes = convertDateRange(time, "~");
+									auto.setStartDate(localDateTimes[0]);
+									auto.setEndDate(localDateTimes[1]);
 								}
 							} else if (result.contains("保管期限")||result.contains("保管限期")) {
 								String storageTime=result.replace("保管期限","").replace("保管限期","").replace(":","").replace(":","").replaceAll("_","");
@@ -5432,7 +5436,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 							}
 						}
 						if(StringUtils.isNotEmpty(fileName.toString())){
-							auto.setName(fileName.toString().replace("密级",""));
+							auto.setName(fileName.toString().replace("密级","").replace("级密",""));
 						}
 					}
 				}

+ 12 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialSystemDockingController.java

@@ -16,6 +16,8 @@
  */
 package org.springblade.business.controller;
 
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -33,6 +35,7 @@ import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -126,6 +129,15 @@ public class TrialSystemDockingController extends BladeController {
 		return R.data(map);
 	}
 
+	//@Scheduled(cron = "0 10 16 * * ?")
+	//刷新OSS没上传成功的文件
+	public void updateOSSUrl(){
+		List<TrialSystemDocking> trialSystemDockings = trialSystemDockingService.getBaseMapper().selectList(new LambdaQueryWrapper<>(TrialSystemDocking.class).eq(TrialSystemDocking::getIsUpdateOss, 0).eq(TrialSystemDocking::getIsDeleted, 0));
+		if(!trialSystemDockings.isEmpty()){
+			trialSystemDockingService.syncUpdateFile(trialSystemDockings);
+		}
+	}
+
 	/**
 	 * 修改 德飞试验系统对接表
 	 */

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -2383,6 +2383,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
         //获取excel流 和 html流
         InputStream exceInp = CommonUtil.getOSSInputStream(newFileUrl);
+        if(exceInp==null){
+            return R.fail(wbsTreeContract.getNodeName()+"excel为找到");
+        }
 
         Workbook workbook = null;
         int index = newFileUrl.lastIndexOf(".");