Search in sources :

Example 1 with FaceMatchingExample

use of com.itrus.portal.db.FaceMatchingExample in project portal by ixinportal.

the class PersonalNameController method show.

// 显示详情
@RequestMapping(value = "/{id}", produces = "text/html")
public String show(@PathVariable("id") Long id, Model uiModel) {
    PersonalName personalname = personalnameservice.selectById(id);
    uiModel.addAttribute("personalname", personalname);
    // uiModel.addAttribute("personalname", personalname);
    PersonalServiceAuthentication peraonalservice = personalServiceAuthenticationService.selectById(personalname.getPersonalServiceAuthentication());
    String ss = peraonalservice.getServiceAuthenticationItem();
    String sdk = peraonalservice.getServiceAuthenticationSdkItem();
    uiModel.addAttribute("peraonalservice", peraonalservice);
    AppService appService = appServiceImpl.selectById(peraonalservice.getAppService());
    uiModel.addAttribute("appService", appService);
    Bankcardelements bank = sqlSession.selectOne("com.itrus.portal.db.BankcardelementsMapper.selectByPrimaryKey", personalname.getBankcardelements());
    FaceMatching facemat = null;
    FaceMatching facema = null;
    FaceMatching faceMatchin = null;
    List<FaceMatching> faceMatching = null;
    FaceMatchingExample face = new FaceMatchingExample();
    FaceMatchingExample.Criteria faceMat = face.createCriteria();
    faceMat.andPersonalNameEqualTo(personalname.getId());
    faceMatching = sqlSession.selectList("com.itrus.portal.db.FaceMatchingMapper.selectByExample", face);
    if (faceMatching != null && faceMatching.size() >= 1) {
        facema = faceMatching.get(0);
    }
    if (faceMatching != null && faceMatching.size() >= 2) {
        facemat = faceMatching.get(1);
    } else if (facema != null) {
        FaceMatchingExample faceM = new FaceMatchingExample();
        FaceMatchingExample.Criteria faceMat1 = faceM.createCriteria();
        faceMat1.andPhotoTypeEqualTo(0);
        faceMat1.andCreateTimeLessThanOrEqualTo(facema.getCreateTime());
        faceMat1.andPersonIdEqualTo(facema.getPersonId());
        if (facema.getSource().equals("6")) {
            faceMat1.andSourceEqualTo("3");
        }
        faceMat1.andBelievableFaceIsNotNull();
        faceM.setOrderByClause("create_time desc");
        faceM.setLimit(1);
        faceMatchin = sqlSession.selectOne("com.itrus.portal.db.FaceMatchingMapper.selectByExample", faceM);
    }
    if (ss != null && ss != "") {
        // 银行卡3,4要素
        if (ss.indexOf("4") != -1 || ss.indexOf("5") != -1) {
            uiModel.addAttribute("organition", bank);
        } else {
            uiModel.addAttribute("organition", 1);
        }
        // 身份证人像核验
        if (ss.indexOf("2") != -1) {
            uiModel.addAttribute("personal", 1);
        }
        if (ss.indexOf("3") != -1) {
            if (faceMatching != null && faceMatching.size() >= 1) {
                if (facema.getPhotoType() != 0) {
                    uiModel.addAttribute("face", facemat);
                } else {
                    uiModel.addAttribute("face", facema);
                }
            }
        } else {
            uiModel.addAttribute("face", 1);
        }
        if (ss.indexOf("6") != -1 || ss.indexOf("7") != -1) {
            if (faceMatching != null && faceMatching.size() >= 1) {
                if (facema.getPhotoType() == 0) {
                    uiModel.addAttribute("faceM", facema);
                } else if (facema.getPhotoType() == 1) {
                    uiModel.addAttribute("faceM1", facema);
                }
            }
            /*System.out.println(facema.getId());
					System.out.println(facemat.getId());*/
            if (faceMatching != null && faceMatching.size() >= 2) {
                if (facemat.getPhotoType() == 0) {
                    uiModel.addAttribute("faceM", facemat);
                } else if (facemat.getPhotoType() == 1) {
                    uiModel.addAttribute("faceM1", facemat);
                }
            } else {
                uiModel.addAttribute("faceMa", faceMatchin);
            }
        } else {
            uiModel.addAttribute("faceM", 1);
        }
        // 身份证间项
        if (ss.indexOf("1") != -1) {
            uiModel.addAttribute("persona", 1);
        }
    }
    // uiModel.addAttribute("face", faceMatching);
    if (sdk != null && sdk != "") {
        // 银行卡OCR
        if (sdk.indexOf("3") != -1) {
            uiModel.addAttribute("BankOCR", bank);
        } else {
            uiModel.addAttribute("BankOCR", 1);
        }
        // 身份证OCR
        if (sdk.indexOf("1") != -1) {
            uiModel.addAttribute("OCR", 1);
        }
        // 活体检验
        if (sdk.indexOf("2") != -1) {
            uiModel.addAttribute("HUO", 1);
        }
    }
    ApplicationInfo applicationInfo = applicationInfoService.selectById(personalname.getApplicationInfo());
    uiModel.addAttribute("applicationInfo", applicationInfo);
    return "personalname/show";
}
Also used : PersonalServiceAuthentication(com.itrus.portal.db.PersonalServiceAuthentication) AppService(com.itrus.portal.db.AppService) FaceMatching(com.itrus.portal.db.FaceMatching) PersonalName(com.itrus.portal.db.PersonalName) ApplicationInfo(com.itrus.portal.db.ApplicationInfo) Bankcardelements(com.itrus.portal.db.Bankcardelements) FaceMatchingExample(com.itrus.portal.db.FaceMatchingExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with FaceMatchingExample

use of com.itrus.portal.db.FaceMatchingExample in project portal by ixinportal.

the class BelievableFaceController method show.

/**
 * 返回查看详情页面
 * @param id
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/{id}", produces = "text/html")
public String show(@PathVariable("id") Long id, Model uiModel) {
    BelievableFace believableFace = believableFaceService.selectById(id);
    uiModel.addAttribute("believableFace", believableFace);
    ApplicationInfo applicationInfo = applicationInfoService.selectById(believableFace.getApplicationInfo());
    uiModel.addAttribute("applicationInfo", applicationInfo);
    // 查询照片表,多条数据
    FaceMatchingExample face = new FaceMatchingExample();
    FaceMatchingExample.Criteria faceMat = face.createCriteria();
    faceMat.andBelievableFaceEqualTo(believableFace.getId());
    List<FaceMatching> faceMatching = sqlSession.selectList("com.itrus.portal.db.FaceMatchingMapper.selectByExample", face);
    uiModel.addAttribute("faceMatching", faceMatching);
    return "believableFace/show";
}
Also used : FaceMatching(com.itrus.portal.db.FaceMatching) ApplicationInfo(com.itrus.portal.db.ApplicationInfo) FaceMatchingExample(com.itrus.portal.db.FaceMatchingExample) BelievableFace(com.itrus.portal.db.BelievableFace) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ApplicationInfo (com.itrus.portal.db.ApplicationInfo)2 FaceMatching (com.itrus.portal.db.FaceMatching)2 FaceMatchingExample (com.itrus.portal.db.FaceMatchingExample)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 AppService (com.itrus.portal.db.AppService)1 Bankcardelements (com.itrus.portal.db.Bankcardelements)1 BelievableFace (com.itrus.portal.db.BelievableFace)1 PersonalName (com.itrus.portal.db.PersonalName)1 PersonalServiceAuthentication (com.itrus.portal.db.PersonalServiceAuthentication)1