//package com.tykj.dev.device.library;
//
//import com.tykj.dev.device.library.service.DeviceLibraryService;
//import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.CommandLineRunner;
//import org.springframework.stereotype.Component;
//
//import java.util.UUID;
//
//@Slf4j
//@Component
//public class deviceRun implements CommandLineRunner {
//    @Autowired
//    DeviceLibraryService deviceLibraryService;
//    /**
//     * Callback used to run the bean.
//     *
//     * @param args incoming main method arguments
//     * @throws Exception on error
//     */
//    @Override
//    public void run(String... args) throws Exception {
//        int seq = 10000;
//        for (int i=0;i<15000;i++){
//            DeviceLibrary deviceLibrary = new DeviceLibrary();
//            deviceLibrary.setLifeStatus(2);
//            deviceLibrary.setRfidCardId(UUID.randomUUID().toString());
//            deviceLibrary.setLocationUnit("省机要局");
//            deviceLibrary.setPackingId(3);
//            deviceLibrary.setType(1);
//            deviceLibrary.setOwnUnit("省机要局");
//            deviceLibrary.setInvisibleRange(3);
//            deviceLibrary.setManageStatus(1);
//            deviceLibrary.setMatchingRange(2);
//            deviceLibrary.setModel("aa");
//            deviceLibrary.setName("aa");
//            deviceLibrary.setProdNumber("1111");
//            deviceLibrary.setSeqNumber(String.valueOf(seq));
//            seq++;
//            deviceLibrary.setRfidSurfaceId("xxxxx");
//            deviceLibrary.setSecretLevel(3);
//            deviceLibrary.setIsPart(0);
//            deviceLibrary.setStorageType(2);
//            deviceLibraryService.addEntity(deviceLibrary);
//        }
//    }
//}
