|
|
|
|
@ -40,16 +40,12 @@ public class SpecialGasCylinderService { |
|
|
|
|
String manufacturerField = extractManufacturer(texts, fieldMap.get("manufacturerField"), 1); |
|
|
|
|
if (ObjectUtil.isNotEmpty(manufacturerField)) { |
|
|
|
|
equipmentRegistryRespVO.setManufacturer(manufacturerField); |
|
|
|
|
equipmentRegistryRespVO.setSupervisionAgency(manufacturerField); |
|
|
|
|
} |
|
|
|
|
String productionDateField = extractManufacturer(texts, fieldMap.get("productionDateField"), 1); |
|
|
|
|
if (ObjectUtil.isNotEmpty(productionDateField)) { |
|
|
|
|
equipmentRegistryRespVO.setProductionDate(productionDateField); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String supervisionAgencyField = extractManufacturer(texts, fieldMap.get("supervisionAgencyField"), supervisionAgencyOffset); |
|
|
|
|
if (ObjectUtil.isNotEmpty(supervisionAgencyField)) { |
|
|
|
|
equipmentRegistryRespVO.setSupervisionAgency(supervisionAgencyField); |
|
|
|
|
} |
|
|
|
|
int productBatchNumberOffset = 1; |
|
|
|
|
if (!postfix.equals("pdf")) { |
|
|
|
|
productBatchNumberOffset = 2; |
|
|
|
|
@ -73,7 +69,6 @@ public class SpecialGasCylinderService { |
|
|
|
|
if (recTexts == null || recTexts.isEmpty()) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 使用 Stream 查找关键词位置
|
|
|
|
|
int index = IntStream.range(0, recTexts.size()) |
|
|
|
|
.filter(i -> recTexts.get(i).contains(keyword)) |
|
|
|
|
|