|
楼主 |
发表于 2015-2-28 22:06:58
|
显示全部楼层
本帖最后由 Masion 于 2015-3-1 08:42 编辑
下面是 checkFingerPrint(fingerPrintFeature,name); //检查指纹是否符合 中的详细内容- private static void checkFingerPrint(String fingerPrintFeature, String name){
- //检查指纹是否符合
-
- try{
- GfpVerifyWell test = new GfpVerifyWell(); //定义指纹对比变量
-
- String query = "select SA_OPPerson, SA_OPPerson.fFingerPrintTemplate from SA_OPPerson SA_OPPerson " +
- "where SA_OPPerson.sName=:name";
- Map<String, Object> params = new HashMap<String, Object>();
- params.put("name", name);
- Table table = KSQL.select(query, params, "/system/data", null);
- Iterator<Row> it = table.iterator();
- boolean bMatch=false;
- while (it.hasNext()){
- Row r = it.next();
- String fingerPrintTemplete = r.getString("fFingerPrintTemplate"); //拿到指纹模板
- fingerPrintFeature=fingerPrintFeature.replaceAll("a", "<");
- fingerPrintFeature=fingerPrintFeature.replaceAll("b", ">");
- if (test.Match(fingerPrintFeature,fingerPrintTemplete,3)){ //如果指纹比对成功
- System.out.println("chenggong");
- bMatch=true;
- break;
- }else{
-
- System.out.println("shibai");
- bMatch = false;
- };
-
- //bMatch=true; //指纹仪调试时的开关(非常重要!!!)
- }
-
- if (!bMatch){
- throw new RuntimeException("该用户的指纹不符"); //如果指纹核对失败,则抛出异常
- }
- }
- finally{
-
- }
-
- }
-
复制代码
|
|