规则更新

devhuozheluoji
DELL 2 years ago
parent 0f7c5b20e4
commit 7bc5d74200

@ -520,7 +520,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
* @param fieldMap map * @param fieldMap map
*/ */
public Map<String, CheckSemanticModel> getCheckSemanticModelMap(Map<String, String> configRuleMap, Map<String, String> fieldMap, List<JSONObject> sourceJsonObjects) { public Map<String, CheckSemanticModel> getCheckSemanticModelMap(Map<String, String> configRuleMap, Map<String, String> fieldMap, List<JSONObject> sourceJsonObjects) {
if (configRuleMap!=null) { if (configRuleMap!=null && CollectionUtils.isNotEmpty(configRuleMap.keySet())) {
for (String s : configRuleMap.keySet()) { for (String s : configRuleMap.keySet()) {
String value = configRuleMap.get(s); String value = configRuleMap.get(s);
if ("hn".equals(s)) { if ("hn".equals(s)) {
@ -893,8 +893,8 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
ocrResultAdd(ocrResultDTOList, value.getFieldName(), field, inputText, null, probability, imgPath, value.getFieldName() + "参数未获取到结果", false, ruleInfo); ocrResultAdd(ocrResultDTOList, value.getFieldName(), field, inputText, null, probability, imgPath, value.getFieldName() + "参数未获取到结果", false, ruleInfo);
} else if (StringUtils.isBlank(inputText)) { } else if (StringUtils.isBlank(inputText)) {
//没有输入值. //没有输入值.
fieldRightMap.put(field, true); fieldRightMap.put(field, false);
ocrResultAdd(ocrResultDTOList, value.getFieldName(), field, inputText, text, probability, imgPath, "没有输入值不做匹配", true, ruleInfo); ocrResultAdd(ocrResultDTOList, value.getFieldName(), field, inputText, text, probability, imgPath, "没有输入值不做匹配", false, ruleInfo);
} else if ("0".equals(ruleInfo)) { } else if ("0".equals(ruleInfo)) {
//不必校验,有识别到就行,通过 //不必校验,有识别到就行,通过
fieldRightMap.put(field, true); fieldRightMap.put(field, true);

Loading…
Cancel
Save