File was renamed from rsf-server/src/main/java/com/vincent/rsf/server/manager/utils/ScheduleJobs.java |
| | |
| | | package com.vincent.rsf.server.manager.utils; |
| | | package com.vincent.rsf.server.manager.schedules; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.common.config.SysStockFlowProperties; |
| | | import com.vincent.rsf.server.common.utils.DateUtils; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private AsnOrderItemService asnOrderItemService; |
| | | |
| | | @Resource |
| | | private SysStockFlowProperties flowProperties; |
| | | /** |
| | | * @author Ryan |
| | | * @description 根据PO单据生成ASN单,自动生成ASN单为全量生成 |
| | |
| | | @Scheduled(cron = "0 0/30 * * * ? ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void genAsnOrder() { |
| | | //判断是否开启自动生成ASN单据 |
| | | if (!flowProperties.getFlagAutoAsn()) { |
| | | return; |
| | | } |
| | | //获取未生成ASN单据 |
| | | List<Purchase> purchases = purchaseService.list(new LambdaQueryWrapper<Purchase>().eq(Purchase::getStatus, 0)); |
| | | //采购单为空,直接跳出当前任务 |