import com.ruoyi.common.utils.BartenderUtils; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import java.io.IOException; import java.util.ArrayList; /** * Created by sunzhenhu on 2021/6/30 13:46 */ public class Test01 { // private int[] att=new String[]{ // "1","2" // }; private ArrayList list; @Autowired private BartenderUtils bartenderUtils; @Test public void test() throws IOException { // File file = new File("D:/work/temp.xls"); // InputStream inputStream = null; // Workbook workbook = null; // try { // inputStream = new FileInputStream(file); // workbook = WorkbookFactory.create(inputStream); // inputStream.close(); // //工作表对象 // Sheet sheet = workbook.getSheetAt(0); // //总行数 // int rowLength = sheet.getLastRowNum()+1; // //根据第一行,获取总列数 // Row row = sheet.getRow(0); // //总列数 // int colLength = row.getLastCellNum(); // //得到指定的单元格 // Cell cell = row.getCell(0); // System.out.println("行数:" + rowLength + ",列数:" + colLength); // list = new ArrayList(); // // 从第二行开始读取 // for (int i = 1; i < rowLength; i++) { // row = sheet.getRow(i); // // 获取第二列的内容 // cell = row.getCell(1); // if(cell != null){ // String temp = cell.getStringCellValue(); // if(temp != "EW_N" && !list.contains(temp)){ // list.add(temp); // } // } // } // System.out.println(list.size()); // } catch (Exception e) { // e.printStackTrace(); // } // // String convert="0123456789BCDFGHJKLMNPQRSTVWXYZ"; ////// System.out.println(list.get(0)); //// // // BufferedWriter out = new BufferedWriter(new FileWriter("D:\\test.txt")); // for (int i=1;i<=923521-1;i++){ // int dec=i; // String result=base(dec,convert); // int dis=4-result.length(); // for (int j=1;j<=dis;j++){ // result="0"+result; // } // out.write(result+"\n"); // // System.out.println(result); // } } public String base(int num,String convert){ if (num codeList= (List) valueArray.get(0); // //// for(int i=0;i50){ // year--; // } // year=year%10; // String weekYear=weekOfYear+""; // for (int i=0;i<2;i++){ // if (weekYear.length()<2){ // weekYear="0"+weekYear; // } // } // String result=year+""+weekYear; // System.out.println(result); } }