Commit 21fe5276 by 雷紫添

添加身份证验证

parent 396a8955
......@@ -16,15 +16,12 @@ public class IdentityCardVerification {
System.out.println(IdentityCardVerification("110101199003074370"));
}*/
public static void main(String[] args) {
System.out.println(IdentityCardVerification("152105199609301229"));
}
/**
*身份证验证
* @param idStr
* @return
*/
public static String IdentityCardVerification(String idStr){
public String IdentityCardVerification(String idStr){
String[] wf = { "1", "0", "x", "9", "8", "7", "6", "5", "4", "3", "2" };
String[] checkCode = { "7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2" };
String iDCardNo = "";
......
......@@ -4,10 +4,7 @@ package com.founder.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.founder.common.CodeMsg;
import com.founder.common.IpADdress;
import com.founder.common.IpADressLock;
import com.founder.common.RedisLock;
import com.founder.common.*;
import com.founder.model.Face;
import com.founder.model.Jccj;
import com.founder.service.AutoSeqService;
......@@ -39,6 +36,8 @@ public class JccjController {
private RedisLock redisLock;
@Autowired
private IpADressLock ipADressLock;
@Autowired
private IdentityCardVerification identityCardVerification;
@Value(value = "${redistimeout}")
private int redistimeout;
@Value(value = "${ftpserverip}")
......@@ -50,6 +49,13 @@ public class JccjController {
public Object queryDatas( HttpServletRequest request, @RequestBody Jccj jccj) {
//1.验证是否非法调用()
Map<String, Object> res = new HashMap<>();
String idStr=identityCardVerification.IdentityCardVerification(jccj.getUser_id());
if( !jccj.getUser_id().equals(idStr)){
res.put("status_code", "010103");
res.put("message", idStr);
res.put("taskid", jccj.getTaskid());
return res;
}
if(!ipADressLock.getIpAddress(request)){
res.put("status_code", "010102");
res.put("message", "访问ip地址未授权");
......
......@@ -25,6 +25,7 @@ public class ScheduleTask {
}
private void xxbsSerevice(){
logger.info("This is a say method!"+format.format(new Date()));
//1.从表中获取未上报的信息
/*直接从服务器获取zip包并转成base64
......
......@@ -41,7 +41,7 @@ public class test {
jccj.setXxsb_zip(encodedText);
jccj.setTaskid("JCXX-R1100000500002014070008");
jccj.setUser_id("142728188997588823");
jccj.setUser_id("14272818899753333333823");
jccj.setUser_dept("1400000000");
jccj.setVersion("1.00");
//发送,httpclient 包含zip包
......
......@@ -61,4 +61,6 @@ codemsg:
- code: "010102"
name: "访问ip地址未授权"
- code: "010103"
name: "请勿重复提交"
\ No newline at end of file
name: "请勿重复提交"
- code: "010104"
name: "用户身份证信息有误"
\ No newline at end of file
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