|
@@ -0,0 +1,42 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.pub.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+import java.util.regex.Matcher;
|
|
|
+import java.util.regex.Pattern;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FIRP03248
|
|
|
+ * @Description : 工作单位电话填写错误
|
|
|
+ * @Author : dy
|
|
|
+ * @Date: 2021-11-15 18:55
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class FIRP03248 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() == null) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
|
|
|
+ Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ String workPhone = firstpageStructureMap.get("工作单位电话");
|
|
|
+ if (StringUtil.isBlank(workPhone)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //匹配电话或手机号码,如果大于15位则报错
|
|
|
+ String regex="^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\\\\d{8}$";
|
|
|
+ Pattern pattern = Pattern.compile(regex);
|
|
|
+ Matcher matcher = pattern.matcher(workPhone);
|
|
|
+ //电话号码超过15位报错
|
|
|
+ if (matcher.find() && workPhone.length()<15){
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|