自动化立体仓库 - WMS系统
pang.jiabao
2025-02-08 f1c69821bfa7733daaa79a377dac45556946cf6b
src/main/java/com/zy/asrs/task/PlaDetlScheduler.java
@@ -2,12 +2,14 @@
import com.core.common.Cools;
import com.zy.asrs.entity.Pla;
import com.zy.asrs.mapper.PlaMapper;
import com.zy.asrs.service.PlaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
@Slf4j
@@ -16,6 +18,9 @@
    @Autowired
    private PlaService plaService;
    @Resource
    private PlaMapper plaMapper;
    @Scheduled(cron = "0/60 * * * * ? ")
    private void execute(){
@@ -29,4 +34,16 @@
        }
    }
    /**
     * 每隔一天扫描一次冻结的库存,超过三个月则自动解冻
     */
    @Scheduled(cron = "0 0 0 * * ?")
    private void autoThaw(){
        int i = plaMapper.autoThaw();
        log.info("---------------自动解冻库存{}个--------------------------", i);
    }
}