PDF导入空字符处理
parent
f794ebb34c
commit
38283f581e
|
|
@ -56,6 +56,7 @@ import java.net.URL;
|
|||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -337,11 +338,15 @@ public class DefaultImportFileManager extends DefaultBaseManager implements Impo
|
|||
line=Integer.parseInt(info[0]);
|
||||
System.out.println(line);
|
||||
}
|
||||
|
||||
for(int x=2;x<info.length;x++){
|
||||
String s=info[x];
|
||||
// 使用removeIf方法移除所有空字符串
|
||||
String [] aa=info;
|
||||
List<String> listWithEmptyStrings = new ArrayList<>(Arrays.asList(aa));
|
||||
listWithEmptyStrings.removeIf(String::isEmpty);
|
||||
String[] resultArray = listWithEmptyStrings.toArray(new String[0]);
|
||||
for(int x=2;x<resultArray.length;x++){
|
||||
String s=resultArray[x];
|
||||
if(s.equals("**")){
|
||||
qty=info[x-1];
|
||||
qty=resultArray[x-1];
|
||||
unit="个";
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue