Search in sources :

Example 6 with EvidenceSubjectIdentityExample

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

the class HisCertificateController method show.

/**
 * 查看详情
 *
 * @param id
 * @param type
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/{id}/{type}", produces = "text/html")
public String show(@PathVariable("id") Long id, @PathVariable("type") int type, Model uiModel) {
    EvidenceHisCertificate hisCertificate = hiscertificate.selectById(id);
    // 出征流水号
    contractNumber = hisCertificate.getSerialnumber();
    // 得到服务编码
    AppService appservice = appService.selectById(hisCertificate.getHisAppService());
    // 得到出证服务配置
    EvidenceOutServiceConfigExample saveService = new EvidenceOutServiceConfigExample();
    EvidenceOutServiceConfigExample.Criteria saveServiceEx = saveService.createCriteria();
    saveServiceEx.andAppServiceEqualTo(appservice.getId());
    EvidenceOutServiceConfig outService = sqlSession.selectOne("com.itrus.portal.db.EvidenceOutServiceConfigMapper.selectByExample", saveService);
    // 得到出证模板信息
    EvidenceOutTemplate outtemp = sqlSession.selectOne("com.itrus.portal.db.EvidenceOutTemplateMapper.selectByPrimaryKey", outService.getSaveRetTemplate());
    uiModel.addAttribute("hisCertificate", hisCertificate);
    uiModel.addAttribute("outtemp", outtemp);
    // 获取证据附件表
    EvidenceEnclosureExample envlosureE = new EvidenceEnclosureExample();
    EvidenceEnclosureExample.Criteria envlosureEx = envlosureE.createCriteria();
    envlosureEx.andSerialnumberEqualTo(hisCertificate.getSerialnumber());
    envlosureEx.andPdfTypeEqualTo("4");
    EvidenceEnclosure envlosure = sqlSession.selectOne("com.itrus.portal.db.EvidenceEnclosureMapper.selectByExample", envlosureE);
    uiModel.addAttribute("envlosure", envlosure);
    Map<Long, List<EvidenceMainInformation>> minfo = new HashMap<Long, List<EvidenceMainInformation>>();
    // Map<Long, List<EvidenceBasicInformation>> mbasi = new HashMap<Long,
    // List<EvidenceBasicInformation>>();
    List<EvidenceBasicInformation> blists = new ArrayList<EvidenceBasicInformation>();
    // 得到出证关联表信息
    EvidenceHisRelationshipExample relation = new EvidenceHisRelationshipExample();
    EvidenceHisRelationshipExample.Criteria hisreation = relation.createCriteria();
    hisreation.andHisCertificateEqualTo(hisCertificate.getId());
    List<EvidenceHisRelationship> hisRelation = sqlSession.selectList("com.itrus.portal.db.EvidenceHisRelationshipMapper.selectByExample", relation);
    for (int j = 0; j < hisRelation.size(); j++) {
        List<EvidenceMainInformation> mlist = new ArrayList<EvidenceMainInformation>();
        // 得到证据基本信息
        EvidenceBasicInformation basic = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByPrimaryKey", hisRelation.get(j).getBasicInformation());
        blists.add(basic);
        // 得到证据身份主题关联信息
        EvidenceSubjectIdentityExample subjectExample = new EvidenceSubjectIdentityExample();
        EvidenceSubjectIdentityExample.Criteria identity = subjectExample.createCriteria();
        identity.andBasicInformationEqualTo(basic.getEvidenceSn());
        List<EvidenceSubjectIdentity> subjectIdentity = sqlSession.selectList("com.itrus.portal.db.EvidenceSubjectIdentityMapper.selectByExample", subjectExample);
        for (int g = 0; g < subjectIdentity.size(); g++) {
            // 得到主题身份信息
            EvidenceMainInformation mainInfo = sqlSession.selectOne("com.itrus.portal.db.EvidenceMainInformationMapper.selectByPrimaryKey", subjectIdentity.get(g).getMainInformation());
            mlist.add(mainInfo);
        }
        minfo.put(basic.getId(), mlist);
    }
    uiModel.addAttribute("mainInfo", minfo);
    uiModel.addAttribute("blists", blists);
    if (type == 1) {
        // 待出证
        return "hiscertificate/show";
    } else if (type == 2) {
        // 已出证
        return "hiscertificate/show1";
    }
    return null;
}
Also used : EvidenceSubjectIdentityExample(com.itrus.portal.db.EvidenceSubjectIdentityExample) HashMap(java.util.HashMap) EvidenceBasicInformation(com.itrus.portal.db.EvidenceBasicInformation) ArrayList(java.util.ArrayList) EvidenceHisCertificate(com.itrus.portal.db.EvidenceHisCertificate) EvidenceEnclosure(com.itrus.portal.db.EvidenceEnclosure) EvidenceMainInformation(com.itrus.portal.db.EvidenceMainInformation) EvidenceOutServiceConfig(com.itrus.portal.db.EvidenceOutServiceConfig) EvidenceOutTemplate(com.itrus.portal.db.EvidenceOutTemplate) ArrayList(java.util.ArrayList) List(java.util.List) AppService(com.itrus.portal.db.AppService) EvidenceOutServiceConfigExample(com.itrus.portal.db.EvidenceOutServiceConfigExample) EvidenceHisRelationship(com.itrus.portal.db.EvidenceHisRelationship) EvidenceEnclosureExample(com.itrus.portal.db.EvidenceEnclosureExample) EvidenceSubjectIdentity(com.itrus.portal.db.EvidenceSubjectIdentity) EvidenceHisRelationshipExample(com.itrus.portal.db.EvidenceHisRelationshipExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 7 with EvidenceSubjectIdentityExample

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

the class HisCertificateController method list.

@RequestMapping(produces = "text/html")
public // 待出证
String list(@RequestParam(value = "queryDate1", required = false) Date queryDate1, @RequestParam(value = "queryDate2", required = false) Date queryDate2, @RequestParam(value = "evidenceSn", required = false) String evidenceSn, @RequestParam(value = "serialnumber", required = false) String serialnumber, @RequestParam(value = "serviceRequestPlatform", required = false) String serviceRequestPlatform, @RequestParam(value = "hisApplicant", required = false) String hisApplicant, @RequestParam(value = "subjectName", required = false) String subjectName, @RequestParam(value = "identification", required = false) String identification, @RequestParam(value = "hisway", required = false) String hisway, // 返回页面
@RequestParam(value = "status", required = false) String status, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, // 已出证
@RequestParam(value = "queryDate3", required = false) Date queryDate3, @RequestParam(value = "queryDate4", required = false) Date queryDate4, @RequestParam(value = "queryDate5", required = false) Date queryDate5, @RequestParam(value = "queryDate6", required = false) Date queryDate6, @RequestParam(value = "evidenceSn1", required = false) String evidenceSn1, @RequestParam(value = "serialnumber1", required = false) String serialnumber1, @RequestParam(value = "serviceRequestPlatform1", required = false) String serviceRequestPlatform1, @RequestParam(value = "hisApplicant1", required = false) String hisApplicant1, @RequestParam(value = "subjectName1", required = false) String subjectName1, @RequestParam(value = "hisState", required = false) String hisState, @RequestParam(value = "hisway1", required = false) String hisway1, @RequestParam(value = "page2", required = false) Integer page2, @RequestParam(value = "size2", required = false) Integer size2, Model uiModel) {
    if (queryDate1 == null && queryDate2 == null) {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.DATE, 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        calendar.add(Calendar.MILLISECOND, -1);
        queryDate2 = calendar.getTime();
        calendar.add(Calendar.MILLISECOND, 1);
        calendar.add(Calendar.MONTH, -1);
        queryDate1 = calendar.getTime();
    }
    if (queryDate3 == null && queryDate4 == null) {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.DATE, 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        calendar.add(Calendar.MILLISECOND, -1);
        queryDate4 = calendar.getTime();
        calendar.add(Calendar.MILLISECOND, 1);
        calendar.add(Calendar.MONTH, -1);
        queryDate3 = calendar.getTime();
    }
    if (queryDate5 == null && queryDate6 == null) {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.DATE, 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        calendar.add(Calendar.MILLISECOND, -1);
        queryDate6 = calendar.getTime();
        calendar.add(Calendar.MILLISECOND, 1);
        calendar.add(Calendar.MONTH, -1);
        queryDate5 = calendar.getTime();
    }
    // 待出证记录
    Map param = new HashMap();
    if (page == null || page < 1)
        page = 1;
    if (size == null || size < 1)
        size = 10;
    Integer offset = size * (page - 1);
    param.put("offset", offset);
    param.put("limit", size);
    param.put("queryDate1", queryDate1);
    param.put("queryDate2", queryDate2);
    if (StringUtils.isNotEmpty(evidenceSn)) {
        param.put("evidenceSn", "%" + evidenceSn + "%");
    }
    if (StringUtils.isNotEmpty(serialnumber)) {
        param.put("serialnumber", "%" + serialnumber + "%");
    }
    if (StringUtils.isNotEmpty(serviceRequestPlatform)) {
        param.put("serviceRequestPlatform", "%" + serviceRequestPlatform + "%");
    }
    if (StringUtils.isNotEmpty(hisApplicant)) {
        param.put("hisApplicant", "%" + hisApplicant + "%");
    }
    if (StringUtils.isNotEmpty(subjectName)) {
        param.put("subjectName", "%" + subjectName + "%");
    }
    if (StringUtils.isNotEmpty(identification)) {
        param.put("identification", "%" + identification + "%");
    }
    if (StringUtils.isNotEmpty(hisway)) {
        param.put("hisway", hisway);
    }
    // else{
    // //String hisw = "2,3";
    // param.put("hisway", "2,3");
    // }
    // 得到待出证信息
    List<Map<String, Object>> list = hiscertificate.selectHisCertificateListEnt(param);
    int count = hiscertificate.selectHisCertificateCountEnt(param);
    Map<Long, List<EvidenceMainInformation>> minfo = new HashMap<Long, List<EvidenceMainInformation>>();
    Map<Long, List<EvidenceBasicInformation>> mbasi = new HashMap<Long, List<EvidenceBasicInformation>>();
    for (int i = 0; i < list.size(); i++) {
        // 得到出证关联表信息
        long id = Long.parseLong(list.get(i).get("id").toString());
        EvidenceHisRelationshipExample relation = new EvidenceHisRelationshipExample();
        EvidenceHisRelationshipExample.Criteria hisreation = relation.createCriteria();
        hisreation.andHisCertificateEqualTo(id);
        List<EvidenceHisRelationship> hisRelation = sqlSession.selectList("com.itrus.portal.db.EvidenceHisRelationshipMapper.selectByExample", relation);
        List<EvidenceBasicInformation> blist = new ArrayList<EvidenceBasicInformation>();
        List<EvidenceMainInformation> lists = new ArrayList<EvidenceMainInformation>();
        for (int j = 0; j < hisRelation.size(); j++) {
            // 得到证据基本信息
            EvidenceBasicInformation basic = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByPrimaryKey", hisRelation.get(j).getBasicInformation());
            blist.add(basic);
            // 得到证据身份主题关联信息
            EvidenceSubjectIdentityExample subjectExample = new EvidenceSubjectIdentityExample();
            EvidenceSubjectIdentityExample.Criteria identity = subjectExample.createCriteria();
            identity.andBasicInformationEqualTo(basic.getEvidenceSn());
            List<EvidenceSubjectIdentity> subjectIdentity = sqlSession.selectList("com.itrus.portal.db.EvidenceSubjectIdentityMapper.selectByExample", subjectExample);
            for (int g = 0; g < subjectIdentity.size(); g++) {
                // 得到主题身份信息
                EvidenceMainInformation mainInfo = sqlSession.selectOne("com.itrus.portal.db.EvidenceMainInformationMapper.selectByPrimaryKey", subjectIdentity.get(g).getMainInformation());
                lists.add(mainInfo);
            }
        }
        minfo.put(id, lists);
        mbasi.put(id, blist);
    }
    uiModel.addAttribute("pages", (count + size - 1) / size);
    if (page > 1 && size * (page - 1) >= count) {
        page = (count + size - 1) / size;
    }
    uiModel.addAttribute("page", page);
    uiModel.addAttribute("size", size);
    uiModel.addAttribute("count", count);
    uiModel.addAttribute("list", list);
    uiModel.addAttribute("mainInfo", minfo);
    uiModel.addAttribute("blist", mbasi);
    // 已出证
    Map param1 = new HashMap();
    // page,size
    if (page2 == null || page2 < 1)
        page2 = 1;
    if (size2 == null || size2 < 1)
        size2 = 10;
    // query data
    Integer offset2 = size2 * (page2 - 1);
    param1.put("offset", offset2);
    param1.put("limit", size2);
    param1.put("queryDate3", queryDate3);
    param1.put("queryDate4", queryDate4);
    param1.put("queryDate5", queryDate5);
    param1.put("queryDate6", queryDate6);
    if (StringUtils.isNotEmpty(evidenceSn1)) {
        param1.put("evidenceSn", "%" + evidenceSn1 + "%");
    }
    if (StringUtils.isNotEmpty(serialnumber1)) {
        param1.put("serialnumber", "%" + serialnumber1 + "%");
    }
    if (StringUtils.isNotEmpty(serviceRequestPlatform1)) {
        param1.put("serviceRequestPlatform", "%" + serviceRequestPlatform1 + "%");
    }
    if (StringUtils.isNotEmpty(hisApplicant1)) {
        param1.put("hisApplicant", "%" + hisApplicant1 + "%");
    }
    if (StringUtils.isNotEmpty(subjectName1)) {
        param1.put("subjectName", "%" + subjectName1 + "%");
    }
    if (StringUtils.isNotEmpty(hisState) && !"-1".equals(hisState)) {
        param1.put("hisState", hisState);
    }
    if (StringUtils.isNotEmpty(hisway1) && !"0".equals(hisway1)) {
        param1.put("hisway", hisway1);
    }
    List<Map<String, Object>> hlist = hiscertificate.selectHisCertificateEnt(param1);
    int count1 = hiscertificate.selectHisCertificateSizeEnt(param1);
    Map<Long, List<EvidenceMainInformation>> minfor = new HashMap<Long, List<EvidenceMainInformation>>();
    Map<Long, List<EvidenceBasicInformation>> mbasic = new HashMap<Long, List<EvidenceBasicInformation>>();
    for (int i = 0; i < hlist.size(); i++) {
        // 得到出证关联表信息
        long id = Long.parseLong(hlist.get(i).get("id").toString());
        EvidenceHisRelationshipExample relation = new EvidenceHisRelationshipExample();
        EvidenceHisRelationshipExample.Criteria hisreation = relation.createCriteria();
        hisreation.andHisCertificateEqualTo(id);
        List<EvidenceHisRelationship> hisRelation = sqlSession.selectList("com.itrus.portal.db.EvidenceHisRelationshipMapper.selectByExample", relation);
        List<EvidenceMainInformation> mlist = new ArrayList<EvidenceMainInformation>();
        List<EvidenceBasicInformation> blists = new ArrayList<EvidenceBasicInformation>();
        for (int j = 0; j < hisRelation.size(); j++) {
            // 得到证据基本信息
            EvidenceBasicInformation basic = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByPrimaryKey", hisRelation.get(j).getBasicInformation());
            blists.add(basic);
            // 得到证据身份主题关联信息
            EvidenceSubjectIdentityExample subjectExample = new EvidenceSubjectIdentityExample();
            EvidenceSubjectIdentityExample.Criteria identity = subjectExample.createCriteria();
            identity.andBasicInformationEqualTo(basic.getEvidenceSn());
            List<EvidenceSubjectIdentity> subjectIdentity = sqlSession.selectList("com.itrus.portal.db.EvidenceSubjectIdentityMapper.selectByExample", subjectExample);
            for (int g = 0; g < subjectIdentity.size(); g++) {
                // 得到主题身份信息
                EvidenceMainInformation mainInfo = sqlSession.selectOne("com.itrus.portal.db.EvidenceMainInformationMapper.selectByPrimaryKey", subjectIdentity.get(g).getMainInformation());
                mlist.add(mainInfo);
            }
        }
        minfor.put(id, mlist);
        mbasic.put(id, blists);
    }
    uiModel.addAttribute("pages2", (count1 + size2 - 1) / size2);
    // page, size
    if (page2 > 1 && size2 * (page2 - 1) >= count1) {
        page2 = (count1 + size2 - 1) / size2;
    }
    List<EvidenceHisCertificate> his = hiscertificate.selecthisway();
    uiModel.addAttribute("his", his);
    uiModel.addAttribute("page2", page2);
    uiModel.addAttribute("size2", size2);
    uiModel.addAttribute("count2", count1);
    uiModel.addAttribute("hlist", hlist);
    uiModel.addAttribute("ainInfo", minfor);
    uiModel.addAttribute("blists", mbasic);
    uiModel.addAttribute("status", status);
    uiModel.addAttribute("queryDate1", queryDate1);
    uiModel.addAttribute("queryDate2", queryDate2);
    uiModel.addAttribute("queryDate3", queryDate3);
    uiModel.addAttribute("queryDate4", queryDate4);
    uiModel.addAttribute("queryDate5", queryDate5);
    uiModel.addAttribute("queryDate6", queryDate6);
    uiModel.addAttribute("evidenceSn", evidenceSn);
    uiModel.addAttribute("serialnumber", serialnumber);
    uiModel.addAttribute("serviceRequestPlatform", serviceRequestPlatform);
    uiModel.addAttribute("hisApplicant", hisApplicant);
    uiModel.addAttribute("subjectName", subjectName);
    uiModel.addAttribute("identification", identification);
    uiModel.addAttribute("hisway2", hisway);
    uiModel.addAttribute("serialnumber1", serialnumber1);
    uiModel.addAttribute("serviceRequestPlatform1", serviceRequestPlatform1);
    uiModel.addAttribute("hisApplicant", hisApplicant1);
    uiModel.addAttribute("subjectName1", subjectName1);
    uiModel.addAttribute("hisState", hisState);
    uiModel.addAttribute("hisway3", hisway1);
    uiModel.addAttribute("evidenceSn1", evidenceSn1);
    return "hiscertificate/list";
}
Also used : EvidenceSubjectIdentityExample(com.itrus.portal.db.EvidenceSubjectIdentityExample) HashMap(java.util.HashMap) EvidenceBasicInformation(com.itrus.portal.db.EvidenceBasicInformation) ArrayList(java.util.ArrayList) EvidenceHisCertificate(com.itrus.portal.db.EvidenceHisCertificate) EvidenceMainInformation(com.itrus.portal.db.EvidenceMainInformation) ArrayList(java.util.ArrayList) List(java.util.List) EvidenceHisRelationship(com.itrus.portal.db.EvidenceHisRelationship) Calendar(java.util.Calendar) EvidenceSubjectIdentity(com.itrus.portal.db.EvidenceSubjectIdentity) EvidenceHisRelationshipExample(com.itrus.portal.db.EvidenceHisRelationshipExample) Map(java.util.Map) HashMap(java.util.HashMap) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 8 with EvidenceSubjectIdentityExample

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

the class BasicInformationController method show1.

/**
 * 身份认证详情
 *
 * @param id
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/identity/{id}", produces = "text/html")
public String show1(@PathVariable("id") Long id, Model uiModel) {
    // 得到证据详情
    EvidenceBasicInformation basicinfor = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByPrimaryKey", id);
    List<EvidenceMainInformation> mlist = new ArrayList<EvidenceMainInformation>();
    // 得到主体身份信息
    EvidenceSubjectIdentityExample subjectExample = new EvidenceSubjectIdentityExample();
    EvidenceSubjectIdentityExample.Criteria identity = subjectExample.createCriteria();
    identity.andBasicInformationEqualTo(basicinfor.getEvidenceSn());
    List<EvidenceSubjectIdentity> subjectIdentity = sqlSession.selectList("com.itrus.portal.db.EvidenceSubjectIdentityMapper.selectByExample", subjectExample);
    for (int i = 0; i < subjectIdentity.size(); i++) {
        // 得到主体信息
        /*List<EvidenceMainInformation> mainInfo = sqlSession.selectList(
					"com.itrus.portal.db.EvidenceMainInformationMapper.selectByPrimaryKey",
					subjectIdentity.get(i).getMainInformation());*/
        EvidenceMainInformationExample infomationE = new EvidenceMainInformationExample();
        EvidenceMainInformationExample.Criteria tionE = infomationE.createCriteria();
        tionE.andIdentificationEqualTo(subjectIdentity.get(i).getMainInformation());
        // infomationE.isDistinct();
        if (subjectIdentity.get(i).getMainName() != null) {
            tionE.andSubjectNameEqualTo(subjectIdentity.get(i).getMainName());
        }
        List<EvidenceMainInformation> mainInfo = sqlSession.selectList("com.itrus.portal.db.EvidenceMainInformationMapper.selectByExample", infomationE);
        if (mainInfo.size() != 0) {
            mlist.add(mainInfo.get(0));
        }
    // mlist.add(mainInfo);
    }
    // 得到身份意愿鉴别
    EvidenceDesireIdentifyExample desireid = new EvidenceDesireIdentifyExample();
    EvidenceDesireIdentifyExample.Criteria desireidentitfy = desireid.createCriteria();
    desireidentitfy.andEvidenceSnEqualTo(basicinfor.getEvidenceSn());
    EvidenceDesireIdentify desire = sqlSession.selectOne("com.itrus.portal.db.EvidenceDesireIdentifyMapper.selectByExample", desireid);
    // 得到证据附件信息,用于查询服务委托人等信息
    EvidenceEnclosureExample enclou = new EvidenceEnclosureExample();
    EvidenceEnclosureExample.Criteria sure = enclou.createCriteria();
    // sure.andBasicInformationEqualTo(id);
    sure.andEvidenceSnEqualTo(basicinfor.getEvidenceSn());
    sure.andPdfTypeEqualTo("1");
    EvidenceEnclosure enclosure = sqlSession.selectOne("com.itrus.portal.db.EvidenceEnclosureMapper.selectByExample", enclou);
    if (enclosure != null) {
        // 服务委托人签名信息
        EvidenceClientSignatureExample client = new EvidenceClientSignatureExample();
        EvidenceClientSignatureExample.Criteria signat = client.createCriteria();
        signat.andEvidenceSnEqualTo(enclosure.getEvidenceSn());
        signat.andNameEqualTo("0");
        EvidenceClientSignature cliensig = sqlSession.selectOne("com.itrus.portal.db.EvidenceClientSignatureMapper.selectByExample", client);
        // 天威签名信息
        EvidenceClientSignatureExample cilentsign = new EvidenceClientSignatureExample();
        EvidenceClientSignatureExample.Criteria signature = cilentsign.createCriteria();
        signature.andEvidenceSnEqualTo(enclosure.getEvidenceSn());
        signature.andNameEqualTo("1");
        EvidenceClientSignature cilentsignature = sqlSession.selectOne("com.itrus.portal.db.EvidenceClientSignatureMapper.selectByExample", cilentsign);
        if (cilentsignature != null) {
            // 天威证书信息
            /*EvidenceCertExample certE = new EvidenceCertExample();
				EvidenceCertExample.Criteria evidenceCertE = certE.createCriteria();
				evidenceCertE.andClientSignatureEqualTo(cilentsignature.getId());*/
            EvidenceCert oneCert = sqlSession.selectOne("com.itrus.portal.db.EvidenceCertMapper.selectByPrimaryKey", cilentsignature.getCertId());
            // 天威核验信息
            EvidenceCheckExample checkE = new EvidenceCheckExample();
            EvidenceCheckExample.Criteria evidenceCheckE = checkE.createCriteria();
            evidenceCheckE.andClientSignatureEqualTo(cilentsignature.getId());
            EvidenceCheck oneCheck = sqlSession.selectOne("com.itrus.portal.db.EvidenceCheckMapper.selectByExample", checkE);
            // 天威证书信息
            uiModel.addAttribute("oneCert", oneCert);
            // 天威核验信息
            uiModel.addAttribute("oneCheck", oneCheck);
        }
        // 服务委托人时间戳信息
        EvidenceClientTimeStampExample clientTime = new EvidenceClientTimeStampExample();
        EvidenceClientTimeStampExample.Criteria stamp = clientTime.createCriteria();
        stamp.andEvidenceSnEqualTo(enclosure.getEvidenceSn());
        stamp.andNameEqualTo("0");
        EvidenceClientTimeStamp clientTimestamp = sqlSession.selectOne("com.itrus.portal.db.EvidenceClientTimeStampMapper.selectByExample", clientTime);
        // 天威时间戳信息
        EvidenceClientTimeStampExample tclientTime = new EvidenceClientTimeStampExample();
        EvidenceClientTimeStampExample.Criteria tstamp = tclientTime.createCriteria();
        tstamp.andEvidenceSnEqualTo(enclosure.getEvidenceSn());
        tstamp.andNameEqualTo("1");
        EvidenceClientTimeStamp tclientTimestamp = sqlSession.selectOne("com.itrus.portal.db.EvidenceClientTimeStampMapper.selectByExample", tclientTime);
        EvidenceCheck listCheck = new EvidenceCheck();
        List<EvidenceCert> listCert = new ArrayList<EvidenceCert>();
        if (cliensig != null && cliensig.getId() != null) {
            // 服务委托人证书信息
            /*EvidenceCertExample certEx = new EvidenceCertExample();
				EvidenceCertExample.Criteria evidenceCert = certEx.createCriteria();
				evidenceCert.andClientSignatureEqualTo(cliensig.getId());*/
            listCert = sqlSession.selectList("com.itrus.portal.db.EvidenceCertMapper.selectByPrimaryKey", cliensig.getCertId());
            // 服务委托人核验信息
            EvidenceCheckExample checkEx = new EvidenceCheckExample();
            EvidenceCheckExample.Criteria evidenceCheck = checkEx.createCriteria();
            evidenceCheck.andClientSignatureEqualTo(cliensig.getId());
            listCheck = sqlSession.selectOne("com.itrus.portal.db.EvidenceCheckMapper.selectByExample", checkEx);
        }
        Map<Long, EvidenceCheck> mapCheck = new HashMap<Long, EvidenceCheck>();
        // 服务委托人证书核验信息
        for (EvidenceCert c : listCert) {
            EvidenceCheckExample certcheckEx = new EvidenceCheckExample();
            EvidenceCheckExample.Criteria certCheck = certcheckEx.createCriteria();
            certCheck.andEvidenceCertEqualTo(c.getId());
            EvidenceCheck listCertCheck = sqlSession.selectOne("com.itrus.portal.db.EvidenceCheckMapper.selectByExample", certcheckEx);
            mapCheck.put(c.getId(), listCertCheck);
        }
        // 服务委托人证书信息
        uiModel.addAttribute("listCert", listCert);
        // 服务委托人核验信息
        uiModel.addAttribute("listCheck", listCheck);
        // 服务委托人证书核验信息
        uiModel.addAttribute("mapCheck", mapCheck);
        // 服务委托人签名信息
        uiModel.addAttribute("cliensig", cliensig);
        // 天威签名信息
        uiModel.addAttribute("cilentsignature", cilentsignature);
        // 服务委托人时间戳信息
        uiModel.addAttribute("clientTimestamp", clientTimestamp);
        // 天威时间戳信息
        uiModel.addAttribute("tclientTimestamp", tclientTimestamp);
    }
    // 身份实名认证信息
    EvidenceRealNameExample realnameE = new EvidenceRealNameExample();
    EvidenceRealNameExample.Criteria realnameEx = realnameE.createCriteria();
    // realnameEx.andMainInformationEqualTo(m.getId());
    // realnameEx.andBasicInformationEqualTo(id);
    realnameEx.andEvidenceSnEqualTo(basicinfor.getEvidenceSn());
    EvidenceRealName erealname = sqlSession.selectOne("com.itrus.portal.db.EvidenceRealNameMapper.selectByExample", realnameE);
    Map<Long, AppService> rappService = new HashMap<Long, AppService>();
    if (erealname != null) {
        uiModel.addAttribute("erealname", erealname);
        if ("2".equals(erealname.getEventVerifierType()) || "3".equals(erealname.getEventVerifierType())) {
            // 判断平台
            if ("1".equals(erealname.getType())) {
                EvidenceCompaniesSubmitExample evidenceCompanies = new EvidenceCompaniesSubmitExample();
                EvidenceCompaniesSubmitExample.Criteria submit = evidenceCompanies.createCriteria();
                submit.andIdCodeEqualTo(erealname.getCompaniesSubmit());
                EvidenceCompaniesSubmit companiesSubmit = sqlSession.selectOne("com.itrus.portal.db.EvidenceCompaniesSubmitMapper.selectByExample", evidenceCompanies);
                if (companiesSubmit != null && companiesSubmit.getRepresentative() != null) {
                    // 法定代表人
                    EvidenceRepresentativeExample representaioce = new EvidenceRepresentativeExample();
                    EvidenceRepresentativeExample.Criteria evidenceRepresent = representaioce.createCriteria();
                    evidenceRepresent.andIdCodeEqualTo(companiesSubmit.getRepresentative());
                    EvidenceRepresentative representative = sqlSession.selectOne("com.itrus.portal.db.EvidenceRepresentativeMapper.selectByExample", representaioce);
                    uiModel.addAttribute("representative", representative);
                }
                if (companiesSubmit != null && companiesSubmit.getTheAgent() != null) {
                    // 代理人
                    EvidenceTheAgentExample evidenceTheAgent = new EvidenceTheAgentExample();
                    EvidenceTheAgentExample.Criteria theAgentEx = evidenceTheAgent.createCriteria();
                    theAgentEx.andIdCodeEqualTo(companiesSubmit.getTheAgent());
                    EvidenceTheAgent theagent = sqlSession.selectOne("com.itrus.portal.db.EvidenceTheAgentMapper.selectByExample", evidenceTheAgent);
                    uiModel.addAttribute("theagent", theagent);
                }
                uiModel.addAttribute("companiesSubmit", companiesSubmit);
            } else {
                // 天威
                EvidenceIndividualExample evidenceIndividual = new EvidenceIndividualExample();
                EvidenceIndividualExample.Criteria individual = evidenceIndividual.createCriteria();
                individual.andIdCodeEqualTo(erealname.getIndividual());
                EvidenceIndividual indiv = sqlSession.selectOne("com.itrus.portal.db.EvidenceIndividualMapper.selectByExample", evidenceIndividual);
                uiModel.addAttribute("indiv", indiv);
            }
        } else if ("1".equals(erealname.getEventVerifierType())) {
            // 天威
            if ("1".equals(erealname.getType())) {
                // 获取流水号
                String serialnamber = erealname.getSerialnumber();
                // 将多个流水号以逗号分隔成一个数组
                String[] namber = serialnamber.split(",");
                // 声明一个list存储流水号
                List<String> listString = new ArrayList<String>();
                for (int i = 0; i < namber.length; i++) {
                    // 将数组中的流水号放入list中
                    listString.add(namber[i]);
                }
                // 查询实名认证信息
                RealNameRecordExample realname = new RealNameRecordExample();
                RealNameRecordExample.Criteria recor = realname.createCriteria();
                recor.andSerialnumberIn(listString);
                realname.setOrderByClause("returntime");
                listReal = sqlSession.selectList("com.itrus.portal.db.RealNameRecordMapper.selectByExample", realname);
                for (RealNameRecord real : listReal) {
                    AppServiceAuthentication authent = sqlSession.selectOne("com.itrus.portal.db.AppServiceAuthenticationMapper.selectByPrimaryKey", real.getAppServiceAuthentication());
                    // 得到服务编码
                    AppService appservice = appService.selectById(authent.getAppService());
                    rappService.put(real.getId(), appservice);
                }
            // realnameRecor.put(m.getId(), listReal);
            } else {
                String serialnamber = erealname.getSerialnumber();
                String[] namber = serialnamber.split(",");
                List<String> listString = new ArrayList<String>();
                for (int i = 0; i < namber.length; i++) {
                    listString.add(namber[i]);
                // listReal.add(realnameRecor1);
                }
                PersonalNameExample personal = new PersonalNameExample();
                PersonalNameExample.Criteria personalname = personal.createCriteria();
                personalname.andSerialnumberIn(listString);
                personal.setOrderByClause("returntime");
                listPersonal = sqlSession.selectList("com.itrus.portal.db.PersonalNameMapper.selectByExample", personal);
                uiModel.addAttribute("listPersonal", listPersonal);
            // personalName.put(m.getId(), listPersonal);
            }
        }
    }
    uiModel.addAttribute("enclosure", enclosure);
    uiModel.addAttribute("rappService", rappService);
    uiModel.addAttribute("listReal", listReal);
    uiModel.addAttribute("desire", desire);
    uiModel.addAttribute("mainInfo", mlist);
    uiModel.addAttribute("basicinfor", basicinfor);
    return "basicinformation/show1";
}
Also used : EvidenceIndividual(com.itrus.portal.db.EvidenceIndividual) EvidenceSubjectIdentityExample(com.itrus.portal.db.EvidenceSubjectIdentityExample) HashMap(java.util.HashMap) EvidenceClientTimeStamp(com.itrus.portal.db.EvidenceClientTimeStamp) PersonalNameExample(com.itrus.portal.db.PersonalNameExample) ArrayList(java.util.ArrayList) EvidenceRealName(com.itrus.portal.db.EvidenceRealName) EvidenceClientTimeStampExample(com.itrus.portal.db.EvidenceClientTimeStampExample) ArrayList(java.util.ArrayList) List(java.util.List) EvidenceCompaniesSubmitExample(com.itrus.portal.db.EvidenceCompaniesSubmitExample) EvidenceDesireIdentify(com.itrus.portal.db.EvidenceDesireIdentify) EvidenceSubjectIdentity(com.itrus.portal.db.EvidenceSubjectIdentity) EvidenceEnclosureExample(com.itrus.portal.db.EvidenceEnclosureExample) EvidenceCheckExample(com.itrus.portal.db.EvidenceCheckExample) RealNameRecord(com.itrus.portal.db.RealNameRecord) AppServiceAuthentication(com.itrus.portal.db.AppServiceAuthentication) EvidenceCert(com.itrus.portal.db.EvidenceCert) EvidenceRepresentative(com.itrus.portal.db.EvidenceRepresentative) EvidenceIndividualExample(com.itrus.portal.db.EvidenceIndividualExample) EvidenceRealNameExample(com.itrus.portal.db.EvidenceRealNameExample) EvidenceBasicInformation(com.itrus.portal.db.EvidenceBasicInformation) EvidenceEnclosure(com.itrus.portal.db.EvidenceEnclosure) EvidenceMainInformation(com.itrus.portal.db.EvidenceMainInformation) EvidenceTheAgent(com.itrus.portal.db.EvidenceTheAgent) EvidenceDesireIdentifyExample(com.itrus.portal.db.EvidenceDesireIdentifyExample) EvidenceCompaniesSubmit(com.itrus.portal.db.EvidenceCompaniesSubmit) EvidenceClientSignature(com.itrus.portal.db.EvidenceClientSignature) AppService(com.itrus.portal.db.AppService) EvidenceCheck(com.itrus.portal.db.EvidenceCheck) EvidenceClientSignatureExample(com.itrus.portal.db.EvidenceClientSignatureExample) EvidenceTheAgentExample(com.itrus.portal.db.EvidenceTheAgentExample) EvidenceRepresentativeExample(com.itrus.portal.db.EvidenceRepresentativeExample) EvidenceMainInformationExample(com.itrus.portal.db.EvidenceMainInformationExample) RealNameRecordExample(com.itrus.portal.db.RealNameRecordExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

EvidenceMainInformation (com.itrus.portal.db.EvidenceMainInformation)8 EvidenceSubjectIdentity (com.itrus.portal.db.EvidenceSubjectIdentity)8 EvidenceSubjectIdentityExample (com.itrus.portal.db.EvidenceSubjectIdentityExample)8 ArrayList (java.util.ArrayList)8 HashMap (java.util.HashMap)8 EvidenceBasicInformation (com.itrus.portal.db.EvidenceBasicInformation)7 List (java.util.List)7 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)7 EvidenceEnclosure (com.itrus.portal.db.EvidenceEnclosure)5 EvidenceEnclosureExample (com.itrus.portal.db.EvidenceEnclosureExample)5 EvidenceMainInformationExample (com.itrus.portal.db.EvidenceMainInformationExample)5 AppService (com.itrus.portal.db.AppService)4 EvidenceCompaniesSubmit (com.itrus.portal.db.EvidenceCompaniesSubmit)4 EvidenceDesireIdentify (com.itrus.portal.db.EvidenceDesireIdentify)4 EvidenceHisCertificate (com.itrus.portal.db.EvidenceHisCertificate)4 EvidenceHisRelationship (com.itrus.portal.db.EvidenceHisRelationship)4 EvidenceIndividual (com.itrus.portal.db.EvidenceIndividual)4 EvidenceRealName (com.itrus.portal.db.EvidenceRealName)4 PersonalNameExample (com.itrus.portal.db.PersonalNameExample)4 RealNameRecord (com.itrus.portal.db.RealNameRecord)4