Browse Source

Merge branch 'dev-1.2' of http://192.168.2.236:10080/louhr/qc into dev-1.2

louhr 5 years ago
parent
commit
621a799e2d

+ 34 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP02972.java

@@ -0,0 +1,34 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP02972
+ * @Description : 现住址要具体到门牌号
+ * @Author : Mark
+ * @Date: 2020-06-19 10:23
+ */
+@Component
+public class FIRP02972 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String address = firstpageStructureMap.get(Content.current_address);
+            if (!CatalogueUtil.isEmpty(address)) {
+                String suffix = (address.length()<=5)?address:(address.substring(address.length()-5));
+                String regex = "[\\d]+(-[\\d]+)*";
+                if (!suffix.matches(regex)) {
+                    status.set("-1");
+                }
+            }
+        }
+    }
+}