From 6c955bced91e431cb6dbd255257d3dafd1dc6cf2 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期四, 26 二月 2026 09:59:20 +0800
Subject: [PATCH] 地磅抓拍页面修改

---
 fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/SystemScheduled.java |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/SystemScheduled.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/SystemScheduled.java
index 7a2b0ec..928c3fe 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/SystemScheduled.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/SystemScheduled.java
@@ -1,10 +1,12 @@
 package com.fzzy.igds.timer;
 
 import com.fzzy.common.constant.BizTypeEnum;
+import com.fzzy.igds.utils.DateUtil;
 import com.ruoyi.common.config.FrameworkConfig;
 import com.ruoyi.common.enums.BusinessStatus;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.enums.OperatorType;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.SysCompany;
 import com.ruoyi.system.domain.SysOperLog;
@@ -16,8 +18,7 @@
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 @EnableScheduling
 @Slf4j
@@ -37,7 +38,7 @@
     /**
      *
      */
-    @Scheduled(cron = "0 0 1 */30 * ?")
+    @Scheduled(cron = "0 0 1 1 * ?")
     public void cronJob1() {
         try {
             log.info("------------姣�30澶╃殑鍑屾櫒1鐐规墽琛屾竻闄ゆ搷浣滄棩蹇楀紑濮�------------");
@@ -66,10 +67,30 @@
 
         //鑾峰彇绯荤粺涓墍鏈夌殑companyId
         List<SysCompany> sysCompanies = companyService.selectAll();
+        //璁剧疆鍒犻櫎鍙傛暟
+        SysOperLog deleteOperLog = new SysOperLog();
+        //璁剧疆鍒犻櫎鎴鏃堕棿
+        String endTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtil.getNewByDay(new Date(), -90));
+        Map<String, Object> params = new HashMap<>();
+        params.put("endTime", endTime);
+        deleteOperLog.setParams(params);
+        //闇�瑕佸垹闄ょ殑涓氬姟绫诲瀷
+        String[] bizTypes = new String[]{
+                BizTypeEnum.SCREEN.getCode(),
+                BizTypeEnum.SUPERVISION.getCode(),
+                BizTypeEnum.SECURITY.getCode(),
+                BizTypeEnum.GRAIN.getCode(),
+                BizTypeEnum.INOUT.getCode()
+        };
         for (SysCompany sysCompany : sysCompanies) {
             if (StringUtils.isNotBlank(sysCompany.getCompanyId())) {
+                //璁剧疆鍒犻櫎浼佷笟缂栫爜
+                deleteOperLog.setCompanyId(sysCompany.getCompanyId());
                 log.info("------------娓呴櫎缁勭粐缂栫爜銆恵}銆戞搷浣滄棩蹇�------------", sysCompany.getCompanyId());
-                operLogService.cleanOperLog(sysCompany.getCompanyId());
+                for (int i = 0; i < bizTypes.length; i++) {
+                    deleteOperLog.setBizType( bizTypes[i]);
+                    operLogService.cleanOperLogByEntity(deleteOperLog);
+                }
             }
         }
     }

--
Gitblit v1.9.3