| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import jakarta.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | // throw new CoolException("收货单保存至收货区执行失败!!"); |
| | | // } |
| | | |
| | | if (!asnOrderService.update(new LambdaUpdateWrapper<WkOrder>() |
| | | .set(WkOrder::getQty, order.getAnfme()) |
| | | .set(WkOrder::getExceStatus, AsnExceStatus.ASN_EXCE_STATUS_RECEIPT_DONE.val) |
| | | .eq(WkOrder::getId, order.getId()))) { |
| | | WkOrder currentOrder = asnOrderService.getById(order.getId()); |
| | | if (Objects.isNull(currentOrder)) { |
| | | throw new CoolException("收货单不存在!!"); |
| | | } |
| | | currentOrder.setQty(order.getAnfme()) |
| | | .setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_RECEIPT_DONE.val); |
| | | if (!asnOrderService.updateById(currentOrder)) { |
| | | throw new CoolException("收货单状态修改失败!!"); |
| | | } |
| | | } |
| | |
| | | * @description 生成物料标签 |
| | | * @time 2025/3/29 12:35 |
| | | */ |
| | | @Scheduled(cron = "0 0/05 * * * ? ") |
| | | // @Scheduled(cron = "0 0/05 * * * ? ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void generateMatnrLabel() { |
| | | List<WkOrderItem> list = asnOrderItemService.list(new LambdaQueryWrapper<WkOrderItem>() |