Browse Source

下载时间限制

wangming 3 months ago
parent
commit
c2b49d5cb8

+ 3 - 3
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionItpServiceImpl.java

@@ -1337,7 +1337,7 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
     @Override
     public void batchDownloadFile(List<ZhcxOutsideExportVo> ExportVos, HttpServletResponse response) {
         if (!isWithinAllowedTime()) {
-            throw new CustomException("请在20:00-7:00之间批量下载资料");
+            throw new CustomException("请在14:00-7:00之间批量下载资料");
         }
         SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
         String classPath = filepath;
@@ -1615,8 +1615,8 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
         LocalTime now = LocalTime.now();
 
         // 定义开始和结束时间
-        LocalTime startTime = LocalTime.of(20, 0); // 20:00
-        LocalTime endTime = LocalTime.of(7, 0);   // 次日 07:00
+        LocalTime startTime = LocalTime.of(14, 0); // 20:00
+        LocalTime endTime = LocalTime.of(5, 0);   // 次日 07:00
 
         // 判断是否在允许时间段内
         // 跨日判断