案件压缩包导入
This commit is contained in:
@@ -221,15 +221,20 @@ public class OCRUtils {
|
||||
// 开始截取字符串 申请人:赵会
|
||||
// String[] startContentSplit = ocrText.split(fatchRule.getStartContent());
|
||||
int startFirstIndex = ocrText.indexOf(fatchRule.getStartContent()) + fatchRule.getStartContent().length();
|
||||
if(startFirstIndex<0){
|
||||
continue;
|
||||
}
|
||||
if (ocrText.length() >= startFirstIndex) {
|
||||
ocrText = ocrText.substring(startFirstIndex);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotEmpty(fatchRule.getEndContent())) {
|
||||
int endFirstIndex = ocrText.indexOf(fatchRule.getEndContent()) + fatchRule.getEndContent().length();
|
||||
if (ocrText.length() >= (endFirstIndex-fatchRule.getEndContent().length())) {
|
||||
fatchMap.put(fatchRule.getColumn(), ocrText.substring(0, endFirstIndex-fatchRule.getEndContent().length()));
|
||||
ocrText = ocrText.substring(endFirstIndex-fatchRule.getEndContent().length());
|
||||
if(ocrText.indexOf(fatchRule.getEndContent())>=0) {
|
||||
int endFirstIndex = ocrText.indexOf(fatchRule.getEndContent()) + fatchRule.getEndContent().length();
|
||||
if (ocrText.length() >= (endFirstIndex - fatchRule.getEndContent().length())) {
|
||||
fatchMap.put(fatchRule.getColumn(), ocrText.substring(0, endFirstIndex - fatchRule.getEndContent().length()));
|
||||
ocrText = ocrText.substring(endFirstIndex - fatchRule.getEndContent().length());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user