fix(88145): 标准比对--发起对比失败
This commit is contained in:
+3
-2
@@ -26,6 +26,7 @@ import com.jero.modules.split.service.IFileSplitItemsEOService;
|
|||||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||||
import com.jero.modules.system.util.MyStringUtils;
|
import com.jero.modules.system.util.MyStringUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -186,8 +187,8 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
|||||||
if (null != rightAllTxt && !rightAllTxt.isEmpty()) {
|
if (null != rightAllTxt && !rightAllTxt.isEmpty()) {
|
||||||
double similarity = 0;
|
double similarity = 0;
|
||||||
// 使用正则表达式判断是否是纯<img>标签,不以</p>结尾,也不以</table>结尾
|
// 使用正则表达式判断是否是纯<img>标签,不以</p>结尾,也不以</table>结尾
|
||||||
String leftTxtTrim = leftTxt.trim();
|
String leftTxtTrim = StringUtils.isBlank(leftTxt) ? "" : leftTxt.trim();
|
||||||
String rightTxtTrim = rightTxt.trim();
|
String rightTxtTrim = StringUtils.isBlank(rightTxt) ? "" : rightTxt.trim();
|
||||||
boolean leftTxtMatches = Pattern.matches("<img[^>]+>(?<!</p>)(?<!</table>)", leftTxtTrim);
|
boolean leftTxtMatches = Pattern.matches("<img[^>]+>(?<!</p>)(?<!</table>)", leftTxtTrim);
|
||||||
boolean rightTxtMatches = Pattern.matches("<img[^>]+>(?<!</p>)(?<!</table>)", rightTxtTrim);
|
boolean rightTxtMatches = Pattern.matches("<img[^>]+>(?<!</p>)(?<!</table>)", rightTxtTrim);
|
||||||
if (leftTxtMatches && rightTxtMatches){
|
if (leftTxtMatches && rightTxtMatches){
|
||||||
|
|||||||
Reference in New Issue
Block a user