package com.zy.asrs.task; import com.core.common.Cools; import com.zy.asrs.entity.*; import com.zy.asrs.service.*; import com.zy.common.properties.SlaveWmsParameterProperties; import com.zy.system.entity.Config; import com.zy.system.service.ConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Slf4j @Component public class AutoLocMoveScheduler { @Autowired private ConfigService configService; @Autowired private SlaveWmsParameterProperties slaveWmsParameterProperties; @Autowired private OrderPakoutService orderPakoutService; //定时出库 经典双伸 @Scheduled(cron = "0/3 * * * * ? ") public void locToLocAutoLocMove(){ if (slaveWmsParameterProperties.isAutoLocMoveBoolean()){ Config config = configService.selectConfigByCode("AutoLocMove"); if (Cools.isEmpty(config) || config.getValue().equals("false")) { return; } OrderPakout orderPakout = orderPakoutService.selectOrderMoveStatus(); if (!Cools.isEmpty(orderPakout)){ // autoMoveService.selectList() }else { orderPakout = orderPakoutService.selectOrderMoveStatusInitial(); if (Cools.isEmpty(orderPakout)){ return; } orderPakout.setMoveStatus(2); orderPakoutService.updateById(orderPakout); } } } }