| | |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.handler.AutoReplenishmentHandler; |
| | | import com.zy.common.entity.Parameter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | |
| | | private LocDetlService locDetlService; |
| | | |
| | | /* |
| | | 定时便利库存,生成自动补货单据 |
| | | 定时遍历库存,生成自动补货单据 |
| | | */ |
| | | @Scheduled(cron = "0 */1 * * * ? ") |
| | | public void createOrder(){ |
| | | System.out.println(new Date()); |
| | | |
| | | if(!"Y".equals(Parameter.get().getAutoReplenishment())){ |
| | | return; |
| | | } |
| | | |
| | | //检测是否有未完成的补货单据 |
| | | DocType docType = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_name", "自动补货单")); |
| | | int count = orderService.selectCount(new EntityWrapper<Order>() |