Bladeren bron

月度库存报表

yzc 1 jaar geleden
bovenliggende
commit
b035b1787c

+ 2 - 0
hx-wms/src/main/java/com/fjhx/wms/service/monthly/impl/MonthlyInventoryReportServiceImpl.java

@@ -18,6 +18,7 @@ import com.ruoyi.common.utils.wrapper.IWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -84,6 +85,7 @@ public class MonthlyInventoryReportServiceImpl extends ServiceImpl<MonthlyInvent
      * 每月1号的0:10:00执行自动生成上月报表
      */
     @Scheduled(cron = "0 10 0 1 * ?")
+    @Transactional
     public void generateReport() {
         List<MonthlyInventoryReport> monthlyInventoryReportList = new ArrayList<>();