Commit 43d3ab82 by wang_jiaxing

常口接口控制身份证号码准确性

parent 63f40374
......@@ -184,7 +184,12 @@ public class TbStAppRyxxServiceImpl implements TbStAppRyxxService {
@Override
public TbStAppRyxx tqQgryxx(String zjhm) throws ParseException {
TbStAppRyxx ryxx;
String SFZH_REGEX = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|" +
"(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)";
if(StringUtils.isNotEmpty(zjhm)){
if (!zjhm.matches(SFZH_REGEX)) {
throw new RuntimeException("身份证号格式有误!");
}
if (!ifQgzyFlag){
QgckryBean qgckryBean = new QgckryBean();
qgckryBean.setXm("测试人员");
......
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