package com.ruoyi.wms.schedule;

import com.ruoyi.wms.util.TcpUtil;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.net.InetAddress;
import java.util.List;

/**
 * @Verasion:1.0
 * @Author:DZY
 * @Date:2022/8/2
 **/
@Configuration
@EnableScheduling
@Service
public class SendToErpSchedule {


//    @Scheduled(cron = "*/1 * * * * ?")
//    private void configureTasks() {
//
//        System.err.println("定时任务");
//    }


    //@Scheduled(cron = "*/5 * * * * ?")
    //private void configureTasks() {
    //    InetAddress address = packet.getAddress();//获取发送端的地址
    //    int port = packet.getPort();//获取 发送端进程所绑定的端口
    //    Scanner scanner = new Scanner(System.in);//从键盘接受数据
    //    String send = scanner.nextLine();//nextLine方式接受字符串
    //    byte[] data2 = send.getBytes();//将接收到的数据转换为字节数组
    //    DatagramPacket packet2 = new DatagramPacket(data2, data2.length,address,port);// 2.创建数据报，包含响应的数据信息
    //    socket.send(packet2); // 3.响应客户端
    //}
}
