|
|
@@ -359,7 +359,7 @@ public class App extends Application {
|
|
|
PDFTextStripper textStripper = new PDFTextStripper();
|
|
|
//提取文本
|
|
|
text = textStripper.getText(pdDocument);
|
|
|
- System.out.println("text = " + text);
|
|
|
+ //System.out.println("text = " + text);
|
|
|
//解析金额
|
|
|
Matcher matcher = pattern.matcher(text);
|
|
|
if (matcher.find()) {
|
|
|
@@ -370,7 +370,7 @@ public class App extends Application {
|
|
|
outputModel.setPdfAmount(amount2.doubleValue());
|
|
|
outputModel.setMargin(amount1.subtract(amount2).doubleValue());
|
|
|
} else {
|
|
|
- System.out.println("未匹配到金额");
|
|
|
+ //System.out.println("未匹配到金额");
|
|
|
errorImeiList.add(new OutputErrorModel(imei));
|
|
|
}
|
|
|
} catch (IOException | NumberFormatException e) {
|
|
|
@@ -404,10 +404,12 @@ public class App extends Application {
|
|
|
if (pdfFile.getName().endsWith(".pdf")) {
|
|
|
if (pdfFileMap.containsKey(imei)) {
|
|
|
//出现重复的imei
|
|
|
- Alert alert = new Alert(Alert.AlertType.ERROR);
|
|
|
- alert.setHeaderText("出现重复的imei");
|
|
|
- alert.setContentText("请检查文件夹中是否出现重复的imei:" + imei);
|
|
|
- alert.showAndWait();
|
|
|
+ Platform.runLater(()->{
|
|
|
+ Alert alert = new Alert(Alert.AlertType.ERROR);
|
|
|
+ alert.setHeaderText("出现重复的imei");
|
|
|
+ alert.setContentText("请检查文件夹中是否出现重复的imei:" + imei);
|
|
|
+ alert.showAndWait();
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
pdfFileMap.put(imei, pdfFile);
|