Commit d1f15a2a authored by yanzg's avatar yanzg

身份证识别

parent cc01fa73
...@@ -76,12 +76,12 @@ public class StringHelper { ...@@ -76,12 +76,12 @@ public class StringHelper {
return true; return true;
} }
// 判断是否属于数组 // 判断是否属于数组
boolean isArray = ArrayHelper.isArrayOrList(val); boolean isArray = ArrayHelper.isArrayOrCollection(val);
// 不是数组,则为常规值 // 不是数组,则为常规值
if (!isArray) { if (!isArray) {
return false; return false;
} }
List list = ArrayHelper.getList(val); Collection list = ArrayHelper.getCollection(val);
return list.isEmpty(); return list.isEmpty();
} }
......
...@@ -6,10 +6,7 @@ import com.yanzuoguang.util.base.ObjectHelper; ...@@ -6,10 +6,7 @@ import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.helper.ArrayHelper; import com.yanzuoguang.util.helper.ArrayHelper;
import com.yanzuoguang.util.helper.StringHelper; import com.yanzuoguang.util.helper.StringHelper;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 包含的值字段 * 包含的值字段
...@@ -90,7 +87,7 @@ public class SqlCondEquals extends SqlCondBase<SqlCondEquals> { ...@@ -90,7 +87,7 @@ public class SqlCondEquals extends SqlCondBase<SqlCondEquals> {
val = StringHelper.toInt(val); val = StringHelper.toInt(val);
} }
// 判断值是否相等 // 判断值是否相等
List list = ArrayHelper.getList(val); Collection list = ArrayHelper.getCollection(val);
for (Object item : list) { for (Object item : list) {
// 值处理 // 值处理
Object itemTo = item; Object itemTo = item;
......
...@@ -9,6 +9,7 @@ import com.yanzuoguang.util.helper.ArrayHelper; ...@@ -9,6 +9,7 @@ import com.yanzuoguang.util.helper.ArrayHelper;
import com.yanzuoguang.util.helper.StringHelper; import com.yanzuoguang.util.helper.StringHelper;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -79,7 +80,7 @@ public class SqlCondItem extends SqlCondBase<SqlCondItem> { ...@@ -79,7 +80,7 @@ public class SqlCondItem extends SqlCondBase<SqlCondItem> {
throw YzgError.getRuntimeException("026", this.getClass().getSimpleName(), sqlData.getName(), fieldName); throw YzgError.getRuntimeException("026", this.getClass().getSimpleName(), sqlData.getName(), fieldName);
} }
Object value = ObjectHelper.get(model, fieldName); Object value = ObjectHelper.get(model, fieldName);
List list = ArrayHelper.getList(value); Collection list = ArrayHelper.getCollection(value);
for (Object item : list) { for (Object item : list) {
// 处理代码片段 // 处理代码片段
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment