Search in sources :

Example 1 with EvidenceBasicInformation

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

the class HisCertificateController method showpdf.

/**
 * 查看详情 导入PDF跳转详情方法
 *
 * @param id
 * @param type
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/showpdf/{id}/{type}", produces = "text/html")
public String showpdf(@PathVariable("id") Long id, @PathVariable("type") int type, Model uiModel) {
    EvidenceHisCertificate hisCertificate = hiscertificate.selectById(id);
    // 得到服务编码
    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);
    Map<Long, List<EvidenceMainInformation>> minfo = new HashMap<Long, List<EvidenceMainInformation>>();
    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);
    // 获取证据附件表
    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);
    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) {
        uiModel.addAttribute("error", error);
        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 2 with EvidenceBasicInformation

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

the class ReceiptContoller method logImg.

/**
 * 得到合同图片
 *
 * @param id
 * @param response
 * @return
 */
@RequestMapping(value = "/img/{id}/{count}")
public String logImg(@PathVariable("id") Long id, @PathVariable("count") int count, HttpServletResponse response) {
    String img = null;
    OutputStream os = null;
    FileInputStream fis = null;
    File file = null;
    // 得到证据内容信息
    EvidenceEventContent mevencontent = sqlSession.selectOne("com.itrus.portal.db.EvidenceEventContentMapper.selectByPrimaryKey", id);
    EvidenceBasicInformation basic = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByPrimaryKey", mevencontent.getBasicInformation());
    EvidenceEnclosureExample envlosureE = new EvidenceEnclosureExample();
    EvidenceEnclosureExample.Criteria envlosureEx = envlosureE.createCriteria();
    envlosureEx.andEvidenceSnEqualTo(basic.getEvidenceSn());
    envlosureEx.andPdfTypeEqualTo("2");
    EvidenceEnclosure enclosure = sqlSession.selectOne("com.itrus.portal.db.EvidenceEnclosureMapper.selectByExample", envlosureE);
    try {
        // 生成图片
        if (enclosure != null) {
            if ("2".equals(enclosure.getPdfType())) {
                response.setHeader("Pragma", "no-cache");
                response.setHeader("Cache-Control", "no-cache");
                response.setDateHeader("Expires", 0);
                int size = count - 1;
                img = enclosure.getObjectName() + ".1.0." + size + ".png";
                log.equals("123img321" + img);
                log.equals("456getBucketName654" + enclosure.getBucketName());
                file = filePathUtils.getBillFile(enclosure.getBucketName() + File.separator + enclosure.getEvidenceSn());
            }
        }
        if (img == null) {
            return "status403";
        }
        if (!file.exists()) {
            file.mkdir();
        }
        File imgFile = new File(file, img);
        fis = new FileInputStream(imgFile);
        byte[] bb = IOUtils.toByteArray(fis);
        os = response.getOutputStream();
        os.write(bb);
        os.flush();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } finally {
        // 关闭流!
        try {
            if (null != fis) {
                fis.close();
            }
            if (null != os) {
                os.close();
            }
        } catch (IOException e) {
        }
    }
    return null;
}
Also used : EvidenceBasicInformation(com.itrus.portal.db.EvidenceBasicInformation) OutputStream(java.io.OutputStream) EvidenceEnclosureExample(com.itrus.portal.db.EvidenceEnclosureExample) EvidenceEnclosure(com.itrus.portal.db.EvidenceEnclosure) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) IOException(java.io.IOException) File(java.io.File) EvidenceEventContent(com.itrus.portal.db.EvidenceEventContent) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 3 with EvidenceBasicInformation

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

the class ReceiptContoller method outhis.

/**
 * 预览出证信息
 *
 * @param serialnumber
 * @param type
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/outhis/{serialnumber}", produces = "text/html")
public String outhis(@PathVariable("serialnumber") String serialnumber, Model uiModel) {
    // 得到证据基本信息表
    List<EvidenceBasicInformation> blist = new ArrayList<EvidenceBasicInformation>();
    // 得到企业平台信息
    Map<Long, EvidenceCompaniesSubmit> companiesSubmit = new HashMap<Long, EvidenceCompaniesSubmit>();
    // 得到天威企业信息
    Map<Long, List<RealNameRecord>> realnameRecor = new HashMap<Long, List<RealNameRecord>>();
    // 得到天威个人信息
    Map<Long, PersonalName> personalName = new HashMap<Long, PersonalName>();
    // 得到个人平台信息
    Map<Long, EvidenceIndividual> denceid = new HashMap<Long, EvidenceIndividual>();
    // 得到得到身份意愿信息
    Map<Long, EvidenceDesireIdentify> mdesire = new HashMap<Long, EvidenceDesireIdentify>();
    // 得到事件内容信息
    Map<Long, EvidenceEventContent> eventcontent = new HashMap<Long, EvidenceEventContent>();
    // 得到时间对象
    Map<Long, List<EvidenceTrustedIdentity>> trusid = new HashMap<Long, List<EvidenceTrustedIdentity>>();
    // 得到身份标识信息
    Map<Long, List<EvidenceTrustedIdentity>> trusted = new HashMap<Long, List<EvidenceTrustedIdentity>>();
    // 得到事件时间信息
    Map<Long, List<EvidenceEventTime>> enenttime = new HashMap<Long, List<EvidenceEventTime>>();
    // 得到事件行为认证信息
    Map<Long, List<EvidenceEventBehavior>> enenbehavior = new HashMap<Long, List<EvidenceEventBehavior>>();
    // 得到事件意愿认证信息
    Map<Long, List<EvidenceEventDesire>> evendesire = new HashMap<Long, List<EvidenceEventDesire>>();
    // 得到平台提交信息代表人
    Map<Long, EvidenceRepresentative> erepresetative = new HashMap<Long, EvidenceRepresentative>();
    // 得到平台提交信息代理人
    Map<Long, EvidenceTheAgent> etheagent = new HashMap<Long, EvidenceTheAgent>();
    // 得到营业执照
    Map<Long, Licenseinformation> licensein = new HashMap<Long, Licenseinformation>();
    // 得到企业银行信息
    Map<Long, Enterprisebank> enterpris = new HashMap<Long, Enterprisebank>();
    // 得到组织机构代码
    Map<Long, Organization> organiza = new HashMap<Long, Organization>();
    // 得到法定代表人信息
    Map<Long, Corporateinformation> corporat = new HashMap<Long, Corporateinformation>();
    // 得到代理人信息
    Map<Long, Agentinformation> agemtom = new HashMap<Long, Agentinformation>();
    // 得到银行三四要素信息
    Map<Long, Bankcardelements> bankcardele = new HashMap<Long, Bankcardelements>();
    // 证据基本信息,放入多个基本信息
    List<EvidenceBasicInformation> basicinfos = new ArrayList<EvidenceBasicInformation>();
    // 得到出证信息
    EvidenceHisCertificateExample hiscer = new EvidenceHisCertificateExample();
    EvidenceHisCertificateExample.Criteria tificate = hiscer.createCriteria();
    tificate.andSerialnumberEqualTo(serialnumber);
    EvidenceHisCertificate hisCertificate = sqlSession.selectOne("com.itrus.portal.db.EvidenceHisCertificateMapper.selectByExample", hiscer);
    // 得到出证存证中间表
    EvidenceHisRelationshipExample hisrelation = new EvidenceHisRelationshipExample();
    EvidenceHisRelationshipExample.Criteria shipEx = hisrelation.createCriteria();
    shipEx.andHisCertificateEqualTo(hisCertificate.getId());
    List<EvidenceHisRelationship> hisrelationship = sqlSession.selectList("com.itrus.portal.db.EvidenceHisRelationshipMapper.selectByExample", hisrelation);
    for (EvidenceHisRelationship h : hisrelationship) {
        // 得到基本信息表
        EvidenceBasicInformation basic = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByPrimaryKey", h.getBasicInformation());
        basicinfos.add(basic);
        // 得到身份意愿信息
        EvidenceDesireIdentifyExample desireIdentify = new EvidenceDesireIdentifyExample();
        EvidenceDesireIdentifyExample.Criteria desireExample = desireIdentify.createCriteria();
        desireExample.andEvidenceSnEqualTo(basic.getEvidenceSn());
        EvidenceDesireIdentify desire = sqlSession.selectOne("com.itrus.portal.db.EvidenceDesireIdentifyMapper.selectByExample", desireIdentify);
        mdesire.put(basic.getId(), desire);
        EvidenceRealNameExample realnameE = new EvidenceRealNameExample();
        EvidenceRealNameExample.Criteria realnameEx = realnameE.createCriteria();
        realnameEx.andBasicInformationEqualTo(basic.getId());
        EvidenceRealName erealname = sqlSession.selectOne("com.itrus.portal.db.EvidenceRealNameMapper.selectByExample", realnameE);
        if (erealname != null) {
            if (!"1".equals(erealname.getEventVerifierType())) {
                if ("1".equals(erealname.getType())) {
                    EvidenceCompaniesSubmit companiesSubmit1 = sqlSession.selectOne("com.itrus.portal.db.EvidenceCompaniesSubmitMapper.selectByPrimaryKey", erealname.getCompaniesSubmit());
                    companiesSubmit.put(basic.getId(), companiesSubmit1);
                    // 得到法定代表人
                    EvidenceRepresentative representative = sqlSession.selectOne("com.itrus.portal.db.EvidenceRepresentativeMapper.selectByPrimaryKey", companiesSubmit1.getRepresentative());
                    erepresetative.put(basic.getId(), representative);
                    // 得到代理人
                    EvidenceTheAgent theAgen = sqlSession.selectOne("com.itrus.portal.db.EvidenceTheAgentMapper.selectByPrimaryKey", companiesSubmit1.getTheAgent());
                    etheagent.put(basic.getId(), theAgen);
                    uiModel.addAttribute("companiesSubmit", companiesSubmit);
                    uiModel.addAttribute("realname", companiesSubmit);
                } else {
                    EvidenceIndividual dic = sqlSession.selectOne("com.itrus.portal.db.EvidenceIndividualMapper.selectByPrimaryKey", erealname.getIndividual());
                    denceid.put(basic.getId(), dic);
                    uiModel.addAttribute("denceid", denceid);
                    uiModel.addAttribute("realname", denceid);
                }
            } else {
                if ("1".equals(erealname.getType())) {
                    String serialnamber = erealname.getSerialnumber();
                    String[] namber = serialnamber.split(",");
                    // List<RealNameRecord> listReal = new ArrayList<RealNameRecord>();
                    List<String> listString = new ArrayList<String>();
                    for (int i = 0; i < namber.length; i++) {
                        listString.add(namber[i]);
                    }
                    RealNameRecordExample realname = new RealNameRecordExample();
                    RealNameRecordExample.Criteria recor = realname.createCriteria();
                    // recor.andSerialnumberEqualTo(erealname.getSerialnumber());
                    recor.andSerialnumberIn(listString);
                    List<RealNameRecord> realnameRecor1 = sqlSession.selectList("com.itrus.portal.db.RealNameRecordMapper.selectByExample", realname);
                    realnameRecor.put(basic.getId(), realnameRecor1);
                    for (RealNameRecord real : realnameRecor1) {
                        // 得到营业执照
                        if (real.getLicenseinformation() != null) {
                            Licenseinformation information = sqlSession.selectOne("com.itrus.portal.db.LicenseinformationMapper.selectByPrimaryKey", real.getLicenseinformation());
                            licensein.put(basic.getId(), information);
                        }
                        // 得到企业银行信息
                        if (real.getEnterprisebank() != null) {
                            Enterprisebank enterprise = sqlSession.selectOne("com.itrus.portal.db.EnterprisebankMapper.selectByPrimaryKey", real.getEnterprisebank());
                            enterpris.put(basic.getId(), enterprise);
                        }
                        // 得到组织机构代码信息
                        if (real.getOrganization() != null) {
                            Organization organization = sqlSession.selectOne("com.itrus.portal.db.OrganizationMapper.selectByPrimaryKey", real.getOrganization());
                            organiza.put(basic.getId(), organization);
                        }
                        // 得到法定代表人信息
                        if (real.getCorporateinformation() != null) {
                            Corporateinformation enterprise = sqlSession.selectOne("com.itrus.portal.db.CorporateinformationMapper.selectByPrimaryKey", real.getCorporateinformation());
                            corporat.put(basic.getId(), enterprise);
                        }
                        // 得到代理人信息
                        if (real.getAgentinformation() != null) {
                            Agentinformation enterprise = sqlSession.selectOne("com.itrus.portal.db.AgentinformationMapper.selectByPrimaryKey", real.getAgentinformation());
                            agemtom.put(basic.getId(), enterprise);
                        }
                    }
                    uiModel.addAttribute("realname", realnameRecor);
                } else {
                    PersonalNameExample personal = new PersonalNameExample();
                    PersonalNameExample.Criteria personalname = personal.createCriteria();
                    personalname.andSerialnumberEqualTo(erealname.getSerialnumber());
                    PersonalName personalName1 = sqlSession.selectOne("com.itrus.portal.db.PersonalNameMapper.selectByExample", personal);
                    personalName.put(basic.getId(), personalName1);
                    // 得到银行三四要素信息
                    Bankcardelements bank = sqlSession.selectOne("com.itrus.portal.db.BankcardelementsMapper.selectByPrimaryKey", personalName1.getBankcardelements());
                    bankcardele.put(basic.getId(), bank);
                    uiModel.addAttribute("personalName", personalName);
                    uiModel.addAttribute("realname", personalName);
                }
            }
        }
        // 事件内容
        EvidenceEventContentExample evencontent = new EvidenceEventContentExample();
        EvidenceEventContentExample.Criteria countent = evencontent.createCriteria();
        // countent.andBasicInformationEqualTo(basic.getId());
        countent.andEvidenceSnEqualTo(basic.getEvidenceSn());
        List<EvidenceEventContent> mevencontent = sqlSession.selectList("com.itrus.portal.db.EvidenceEventContentMapper.selectByExample", evencontent);
        eventcontent.put(basic.getId(), mevencontent.get(0));
        // 得到身份可信标识
        EvidenceTrustedIdentityExample trusten = new EvidenceTrustedIdentityExample();
        EvidenceTrustedIdentityExample.Criteria identityex = trusten.createCriteria();
        identityex.andBasicInformationEqualTo(basic.getEvidenceSn());
        identityex.andEventContentIsNull();
        List<EvidenceTrustedIdentity> trustedidentity = sqlSession.selectList("com.itrus.portal.db.EvidenceTrustedIdentityMapper.selectByExample", trusten);
        trusted.put(basic.getId(), trustedidentity);
        // 事件对象认证
        EvidenceTrustedIdentityExample trustenid = new EvidenceTrustedIdentityExample();
        EvidenceTrustedIdentityExample.Criteria identitye = trustenid.createCriteria();
        identitye.andEventContentEqualTo(mevencontent.get(0).getIdCode());
        List<EvidenceTrustedIdentity> trustedidentit = sqlSession.selectList("com.itrus.portal.db.EvidenceTrustedIdentityMapper.selectByExample", trustenid);
        trusid.put(basic.getId(), trustedidentit);
        // 事件时间认证
        EvidenceEventTimeExample eventime = new EvidenceEventTimeExample();
        EvidenceEventTimeExample.Criteria eventimeEx = eventime.createCriteria();
        eventimeEx.andEventContentEqualTo(mevencontent.get(0).getIdCode());
        List<EvidenceEventTime> meventime = sqlSession.selectList("com.itrus.portal.db.EvidenceEventTimeMapper.selectByExample", eventime);
        enenttime.put(basic.getId(), meventime);
        // 事件行为认证
        EvidenceEventBehaviorExample eventbehaciorEx = new EvidenceEventBehaviorExample();
        EvidenceEventBehaviorExample.Criteria eventbe = eventbehaciorEx.createCriteria();
        eventbe.andEventContentEqualTo(mevencontent.get(0).getIdCode());
        List<EvidenceEventBehavior> eventbehacior = sqlSession.selectList("com.itrus.portal.db.EvidenceEventBehaviorMapper.selectByExample", eventbehaciorEx);
        enenbehavior.put(basic.getId(), eventbehacior);
        // 事件意愿认证
        EvidenceEventDesireExample desireEx = new EvidenceEventDesireExample();
        EvidenceEventDesireExample.Criteria eventdesire = desireEx.createCriteria();
        // eventdesire.andMainInformationEqualTo(basic.getId());
        eventdesire.andEventContenteEqualTo(mevencontent.get(0).getIdCode());
        List<EvidenceEventDesire> meventdesire = sqlSession.selectList("com.itrus.portal.db.EvidenceEventDesireMapper.selectByExample", desireEx);
        evendesire.put(basic.getId(), meventdesire);
        blist.add(basic);
        // 判断图片是否存在
        if (mevencontent.get(0).getIsimg() == null) {
            // EvidenceBasicInformation basic = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByPrimaryKey", mevencontent.getBasicInformation());
            // 得到证据附件表,用于获取信息
            EvidenceEnclosureExample envlosureE = new EvidenceEnclosureExample();
            EvidenceEnclosureExample.Criteria envlosureEx = envlosureE.createCriteria();
            envlosureEx.andEvidenceSnEqualTo(basic.getEvidenceSn());
            envlosureEx.andPdfTypeEqualTo("2");
            EvidenceEnclosure envlosure = sqlSession.selectOne("com.itrus.portal.db.EvidenceEnclosureMapper.selectByExample", envlosureE);
            // 判断是否为用户上传pdf
            if (envlosure != null) {
                String urlFile = systemConfigService.getpdfurl() + File.separator + envlosure.getBucketName() + File.separator + envlosure.getEvidenceSn();
                File filePathStr = new File(urlFile, envlosure.getObjectName());
                int pdfToPng = 0;
                if (filePathStr != null && filePathStr.getPath() != null) {
                    try {
                        pdfToPng = Pdf.pdf2png(filePathStr.getPath());
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
                // 判断生成图片是否成功
                if (pdfToPng > 0) {
                    // 修改内容表信息,表示生成图片
                    mevencontent.get(0).setIsimg(1);
                    mevencontent.get(0).setImgCount(pdfToPng);
                    sqlSession.update("com.itrus.portal.db.EvidenceEventContentMapper.updateByPrimaryKey", mevencontent);
                    String oper = "原文图片生成成功";
                    String info = "图片地址:" + urlFile;
                    LogUtil.evidencelog(sqlSession, null, oper, info);
                } else {
                    String oper = "原文图片生成失败";
                    String info = "失败原因:" + systemConfigService.getpdfurl() + File.separator + envlosure.getBucketName();
                    LogUtil.evidencelog(sqlSession, null, oper, info);
                }
            }
        }
    }
    uiModel.addAttribute("basicinfos", basicinfos);
    // 平台代表人
    uiModel.addAttribute("erepresetative", erepresetative);
    // 平台代理人
    uiModel.addAttribute("etheagent", etheagent);
    // 营业执照信息
    uiModel.addAttribute("licensein", licensein);
    // 企业银行信息
    uiModel.addAttribute("enterpris", enterpris);
    // 住址机构代码
    uiModel.addAttribute("organiza", organiza);
    // 法定代表人
    uiModel.addAttribute("corporat", corporat);
    // 法定代理人
    uiModel.addAttribute("agemtom", agemtom);
    // 银行卡三四要素
    uiModel.addAttribute("bankcardele", bankcardele);
    // 得到得到身份意愿信息
    uiModel.addAttribute("mdesire", mdesire);
    // 得到事件时间信息
    uiModel.addAttribute("enenttime", enenttime);
    // 得到事件行为认证信息
    uiModel.addAttribute("enenbehavior", enenbehavior);
    // 得到时间对象
    uiModel.addAttribute("trusid", trusid);
    // 得到身份标识信息
    uiModel.addAttribute("trusted", trusted);
    // 得到证据基本信息表
    uiModel.addAttribute("blist", blist);
    // 得到事件内容信息
    uiModel.addAttribute("eventcontent", eventcontent);
    // 得到出证信息
    uiModel.addAttribute("hisCertificate", hisCertificate);
    // 出证时间
    uiModel.addAttribute("datetime", new Date());
    return "reporttemplate/certificationReport1";
}
Also used : EvidenceIndividual(com.itrus.portal.db.EvidenceIndividual) HashMap(java.util.HashMap) PersonalNameExample(com.itrus.portal.db.PersonalNameExample) ArrayList(java.util.ArrayList) Corporateinformation(com.itrus.portal.db.Corporateinformation) EvidenceRealName(com.itrus.portal.db.EvidenceRealName) List(java.util.List) ArrayList(java.util.ArrayList) EvidenceEventDesire(com.itrus.portal.db.EvidenceEventDesire) Enterprisebank(com.itrus.portal.db.Enterprisebank) EvidenceDesireIdentify(com.itrus.portal.db.EvidenceDesireIdentify) EvidenceEventBehaviorExample(com.itrus.portal.db.EvidenceEventBehaviorExample) EvidenceHisRelationship(com.itrus.portal.db.EvidenceHisRelationship) EvidenceEnclosureExample(com.itrus.portal.db.EvidenceEnclosureExample) RealNameRecord(com.itrus.portal.db.RealNameRecord) EvidenceEventContentExample(com.itrus.portal.db.EvidenceEventContentExample) EvidenceEventTime(com.itrus.portal.db.EvidenceEventTime) EvidenceRepresentative(com.itrus.portal.db.EvidenceRepresentative) File(java.io.File) EvidenceRealNameExample(com.itrus.portal.db.EvidenceRealNameExample) Organization(com.itrus.portal.db.Organization) EvidenceBasicInformation(com.itrus.portal.db.EvidenceBasicInformation) EvidenceHisCertificate(com.itrus.portal.db.EvidenceHisCertificate) EvidenceEnclosure(com.itrus.portal.db.EvidenceEnclosure) EvidenceTheAgent(com.itrus.portal.db.EvidenceTheAgent) Agentinformation(com.itrus.portal.db.Agentinformation) EvidenceDesireIdentifyExample(com.itrus.portal.db.EvidenceDesireIdentifyExample) PersonalName(com.itrus.portal.db.PersonalName) EvidenceEventDesireExample(com.itrus.portal.db.EvidenceEventDesireExample) EvidenceEventTimeExample(com.itrus.portal.db.EvidenceEventTimeExample) EvidenceCompaniesSubmit(com.itrus.portal.db.EvidenceCompaniesSubmit) EvidenceEventContent(com.itrus.portal.db.EvidenceEventContent) Licenseinformation(com.itrus.portal.db.Licenseinformation) EvidenceHisRelationshipExample(com.itrus.portal.db.EvidenceHisRelationshipExample) IOException(java.io.IOException) Date(java.util.Date) EvidenceEventBehavior(com.itrus.portal.db.EvidenceEventBehavior) EvidenceHisCertificateExample(com.itrus.portal.db.EvidenceHisCertificateExample) EvidenceTrustedIdentity(com.itrus.portal.db.EvidenceTrustedIdentity) Bankcardelements(com.itrus.portal.db.Bankcardelements) RealNameRecordExample(com.itrus.portal.db.RealNameRecordExample) EvidenceTrustedIdentityExample(com.itrus.portal.db.EvidenceTrustedIdentityExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 4 with EvidenceBasicInformation

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

the class ReceiptContoller method preview.

/**
 * 预览证书
 *
 * @param evidenceSn
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/preview/{evidenceSn}", produces = "text/html")
public String preview(@PathVariable("evidenceSn") String evidenceSn, Model uiModel) {
    // 得到证书基本信息
    EvidenceBasicInformationExample basicEx = new EvidenceBasicInformationExample();
    EvidenceBasicInformationExample.Criteria information = basicEx.createCriteria();
    information.andEvidenceSnEqualTo(evidenceSn);
    EvidenceBasicInformation basic = sqlSession.selectOne("com.itrus.portal.db.EvidenceBasicInformationMapper.selectByExample", basicEx);
    // 得到时间内容信息
    EvidenceEventContentExample evencontent = new EvidenceEventContentExample();
    EvidenceEventContentExample.Criteria countent = evencontent.createCriteria();
    // countent.andBasicInformationEqualTo(basic.getId());
    countent.andEvidenceSnEqualTo(basic.getEvidenceSn());
    List<EvidenceEventContent> mevencontent = sqlSession.selectList("com.itrus.portal.db.EvidenceEventContentMapper.selectByExample", evencontent);
    /*
		 * EvidenceEnclosureExample closure = new EvidenceEnclosureExample();
		 * EvidenceEnclosureExample.Criteria enclsureEx =
		 * closure.createCriteria();
		 * enclsureEx.andEvidenceSnEqualTo(evidenceSn);
		 */
    Map param = new HashMap();
    param.put("evidenceSn", evidenceSn);
    int sun = basicInformationimpl.selectsize(param);
    // int sun = basic.getEvidenceSize();
    // 得到证书附件信息
    List<EvidenceEnclosure> enclosure = sqlSession.selectList("com.itrus.portal.db.EvidenceEnclosureMapper.selectEvidenceEnclosureList", param);
    // int count = 0;
    // for (int i = 0; i < enclosure.size(); i++) {
    // count++;
    // }
    // 得到服务表信息
    /*AppService appservice = appService.selectById(basic.getOutAppService());
		if (null != appservice) {
			// 得到出证服务配置
			EvidenceOutServiceConfigExample saveService = new EvidenceOutServiceConfigExample();
			EvidenceOutServiceConfigExample.Criteria saveServiceEx = saveService.createCriteria();
			saveServiceEx.andAppServiceEqualTo(appservice.getId());
			EvidenceOutServiceConfig outService = sqlSession
					.selectOne("com.itrus.portal.db.EvidenceOutServiceConfigMapper.selectByExample", saveService);
			
			// 得到回执名称
			if (outService != null) {
				// 得到证书信息
				EvidenceCertificate certificate = sqlSession.selectOne(
						"com.itrus.portal.db.EvidenceCertificateMapper.selectByPrimaryKey",
						outService.getEvidenceCertificate());
				
				uiModel.addAttribute("certificate", certificate);
			}*/
    // 得到服务表信息
    // 得到服务编码
    Map<Long, AppService> mAppService = CacheCustomer.APP_SERVICE_MAP_BY_ID();
    AppService appservices = null;
    if (mAppService != null && mAppService.get(basic.getAppService()) != null) {
        appservices = mAppService.get(basic.getAppService());
    }
    if (null == appservices) {
        appservices = appService.selectById(basic.getAppService());
    }
    // AppService appservices = appService.selectById(basic.getAppService());
    Map<Long, EvidenceSaveService> evidenceSaveService = CacheCustomer.getappSAVE_SERVICE_MAP();
    EvidenceSaveService evidenceSave = null;
    if (evidenceSaveService != null && evidenceSaveService.get(appservices.getId()) != null) {
        evidenceSave = evidenceSaveService.get(appservices.getId());
    } else {
        EvidenceSaveServiceExample save = new EvidenceSaveServiceExample();
        EvidenceSaveServiceExample.Criteria saveEx = save.createCriteria();
        saveEx.andAppServiceEqualTo(appservices.getId());
        evidenceSave = sqlSession.selectOne("com.itrus.portal.db.EvidenceSaveServiceMapper.selectByExample", save);
    }
    uiModel.addAttribute("evidenceSave", evidenceSave);
    // }
    uiModel.addAttribute("datetime", new Date());
    uiModel.addAttribute("sun", sun);
    uiModel.addAttribute("enclosure", enclosure);
    if (enclosure.size() != 0) {
        // uiModel.addAttribute("fixationTime", enclosure.get(0).getFixationTime());// 最新一次更新时间
        // 第一次更新时间
        uiModel.addAttribute("dataTime", enclosure.get(enclosure.size() - 1).getFixationTime());
    }
    uiModel.addAttribute("mevencontent", mevencontent.get(0));
    uiModel.addAttribute("basic", basic);
    // }
    return "reporttemplate/receiptTemplate1";
}
Also used : AppService(com.itrus.portal.db.AppService) EvidenceBasicInformation(com.itrus.portal.db.EvidenceBasicInformation) HashMap(java.util.HashMap) EvidenceSaveService(com.itrus.portal.db.EvidenceSaveService) EvidenceEnclosure(com.itrus.portal.db.EvidenceEnclosure) EvidenceEventContentExample(com.itrus.portal.db.EvidenceEventContentExample) Date(java.util.Date) EvidenceBasicInformationExample(com.itrus.portal.db.EvidenceBasicInformationExample) EvidenceSaveServiceExample(com.itrus.portal.db.EvidenceSaveServiceExample) Map(java.util.Map) HashMap(java.util.HashMap) EvidenceEventContent(com.itrus.portal.db.EvidenceEventContent) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 5 with EvidenceBasicInformation

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

the class StatisticsIssuingController method list.

@RequestMapping(produces = "text/html")
public String list(@RequestParam(value = "serviceRequestPlatform", required = false) String serviceRequestPlatform, @RequestParam(value = "Statistics", required = false) Integer Statistics, @RequestParam(value = "year1", required = false) Integer year1, @RequestParam(value = "year2", required = false) Integer year2, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, @RequestParam(value = "hisApplicant", required = false) String hisApplicant, @RequestParam(value = "type", required = false) String type, @RequestParam(value = "outReportTemplate", required = false) String outReportTemplate, @RequestParam(value = "hisway", required = false) String hisway, Model uiModel) throws Exception {
    Map param = new HashMap();
    Integer year3 = null;
    if (year1 != null) {
        year3 = year1;
    }
    List<Map<Integer, Integer>> list = new ArrayList<Map<Integer, Integer>>();
    java.util.Date nowdate = new java.util.Date();
    String[] monthList = { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" };
    String[] seasonList = { "S1", "S2", "S3", "S4" };
    String month = null;
    String season = null;
    String year = null;
    Calendar calendar = Calendar.getInstance();
    Calendar calendar2 = Calendar.getInstance();
    if (null != Statistics && Statistics == 12) {
        while (year1 <= year2) {
            for (int j = 0; j <= 11; j++) {
                calendar.set(Calendar.YEAR, year1);
                calendar.set(Calendar.MONTH, j);
                calendar.set(Calendar.DAY_OF_MONTH, 1);
                calendar.set(Calendar.HOUR_OF_DAY, 0);
                calendar.set(Calendar.MINUTE, 0);
                calendar.set(Calendar.SECOND, 0);
                calendar.set(Calendar.MILLISECOND, 0);
                Date dt1 = calendar.getTime();
                calendar2.set(Calendar.YEAR, year1);
                calendar2.set(Calendar.MONTH, j + 1);
                calendar2.set(Calendar.DAY_OF_MONTH, 1);
                calendar2.set(Calendar.HOUR_OF_DAY, 0);
                calendar2.set(Calendar.MINUTE, 0);
                calendar2.set(Calendar.SECOND, 0);
                calendar2.set(Calendar.MILLISECOND, 0);
                Date dt2 = calendar2.getTime();
                if (StringUtils.isNotEmpty(serviceRequestPlatform) && !"0".equals(serviceRequestPlatform)) {
                    param.put("serviceRequestPlatform", serviceRequestPlatform);
                }
                if (StringUtils.isNotEmpty(hisApplicant)) {
                    param.put("hisApplicant", "%" + hisApplicant + "%");
                }
                if (type != null && !"0".equals(type)) {
                    param.put("type", type);
                }
                if (outReportTemplate != null && !"0".equals(outReportTemplate)) {
                    param.put("outReportTemplate", outReportTemplate);
                }
                if (hisway != null && !"0".equals(hisway)) {
                    param.put("hisway", hisway);
                }
                month = year1 + "-" + monthList[j];
                param.put("queryDate1", dt1);
                param.put("queryDate2", dt2);
                int count = hiscertificate.selectcount(param);
                Map<Integer, Integer> map = new HashMap<Integer, Integer>();
                map.put(1, year1);
                map.put(2, count);
                list.add(map);
            }
            year1++;
        }
    }
    if (null != Statistics && Statistics == 4) {
        while (year1 <= year2) {
            for (int j = 0; j <= 9; j = j + 3) {
                calendar.set(Calendar.YEAR, year1);
                calendar.set(Calendar.MONTH, j);
                calendar.set(Calendar.DAY_OF_MONTH, 1);
                calendar.set(Calendar.HOUR_OF_DAY, 0);
                calendar.set(Calendar.MINUTE, 0);
                calendar.set(Calendar.SECOND, 0);
                calendar.set(Calendar.MILLISECOND, 0);
                Date dt1 = calendar.getTime();
                calendar2.set(Calendar.YEAR, year1);
                calendar2.set(Calendar.MONTH, j + 3);
                calendar2.set(Calendar.DAY_OF_MONTH, 1);
                calendar2.set(Calendar.HOUR_OF_DAY, 0);
                calendar2.set(Calendar.MINUTE, 0);
                calendar2.set(Calendar.SECOND, 0);
                calendar2.set(Calendar.MILLISECOND, 0);
                Date dt2 = calendar2.getTime();
                if (StringUtils.isNotEmpty(serviceRequestPlatform) && !"0".equals(serviceRequestPlatform)) {
                    param.put("serviceRequestPlatform", serviceRequestPlatform);
                }
                if (StringUtils.isNotEmpty(hisApplicant)) {
                    param.put("hisApplicant", "%" + hisApplicant + "%");
                }
                if (type != null && !"0".equals(type)) {
                    param.put("type", type);
                }
                if (outReportTemplate != null && !"0".equals(outReportTemplate)) {
                    param.put("outReportTemplate", outReportTemplate);
                }
                if (hisway != null && !"0".equals(hisway)) {
                    param.put("hisway", hisway);
                }
                month = year1 + "-" + monthList[j];
                param.put("queryDate1", dt1);
                param.put("queryDate2", dt2);
                int count = hiscertificate.selectcount(param);
                Map<Integer, Integer> map = new HashMap<Integer, Integer>();
                map.put(1, year1);
                map.put(2, count);
                list.add(map);
            }
            year1++;
        }
    }
    if (null != Statistics && Statistics == 1) {
        while (year1 <= year2) {
            calendar.set(Calendar.YEAR, year1);
            calendar.set(Calendar.MONTH, 0);
            calendar.set(Calendar.DAY_OF_MONTH, 1);
            calendar.set(Calendar.HOUR_OF_DAY, 0);
            calendar.set(Calendar.MINUTE, 0);
            calendar.set(Calendar.SECOND, 0);
            calendar.set(Calendar.MILLISECOND, 0);
            Date dt1 = calendar.getTime();
            calendar2.set(Calendar.YEAR, year1 + 1);
            calendar2.set(Calendar.MONTH, 0);
            calendar2.set(Calendar.DAY_OF_MONTH, 1);
            calendar2.set(Calendar.HOUR_OF_DAY, 0);
            calendar2.set(Calendar.MINUTE, 0);
            calendar2.set(Calendar.SECOND, 0);
            calendar2.set(Calendar.MILLISECOND, 0);
            Date dt2 = calendar2.getTime();
            if (StringUtils.isNotEmpty(serviceRequestPlatform) && !"0".equals(serviceRequestPlatform)) {
                param.put("serviceRequestPlatform", serviceRequestPlatform);
            }
            if (StringUtils.isNotEmpty(hisApplicant)) {
                param.put("hisApplicant", "%" + hisApplicant + "%");
            }
            if (type != null && !"0".equals(type)) {
                param.put("type", type);
            }
            if (outReportTemplate != null && !"0".equals(outReportTemplate)) {
                param.put("outReportTemplate", outReportTemplate);
            }
            if (hisway != null && !"0".equals(hisway)) {
                param.put("hisway", hisway);
            }
            year = year + "Y";
            param.put("queryDate1", dt1);
            param.put("queryDate2", dt2);
            int count = hiscertificate.selectcount(param);
            Map<Integer, Integer> map = new HashMap<Integer, Integer>();
            map.put(1, year1);
            map.put(2, count);
            list.add(map);
            year1++;
        }
    }
    List appservice = applicationInfoService.selectByExample(new ApplicationInfoExample());
    uiModel.addAttribute("appservice", appservice);
    if (null == serviceRequestPlatform || "0".equals(serviceRequestPlatform)) {
        serviceRequestPlatform = "所有应用";
    }
    List<EvidenceBasicInformation> basicinfo = basicInformationimpl.selectList();
    uiModel.addAttribute("basicinfo", basicinfo);
    List<EvidenceOutTemplate> outRemplate = outServiceConfigService.selectOutTemplateByList();
    uiModel.addAttribute("outRemplate", outRemplate);
    if (null == serviceRequestPlatform || "0".equals(serviceRequestPlatform)) {
        serviceRequestPlatform = "所有应用";
    }
    uiModel.addAttribute("list", list);
    // System.out.println(list);
    uiModel.addAttribute("year1", year3);
    uiModel.addAttribute("serviceRequestPlatform", serviceRequestPlatform);
    uiModel.addAttribute("year2", year2);
    uiModel.addAttribute("Statistics", Statistics);
    uiModel.addAttribute("hisApplicant", hisApplicant);
    uiModel.addAttribute("type", type);
    uiModel.addAttribute("outReportTemplate", outReportTemplate);
    uiModel.addAttribute("hisway", hisway);
    return "sratisticsissuing/list";
}
Also used : ApplicationInfoExample(com.itrus.portal.db.ApplicationInfoExample) HashMap(java.util.HashMap) EvidenceBasicInformation(com.itrus.portal.db.EvidenceBasicInformation) Date(java.util.Date) Calendar(java.util.Calendar) ArrayList(java.util.ArrayList) Date(java.util.Date) ArrayList(java.util.ArrayList) List(java.util.List) EvidenceOutTemplate(com.itrus.portal.db.EvidenceOutTemplate) HashMap(java.util.HashMap) Map(java.util.Map) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

EvidenceBasicInformation (com.itrus.portal.db.EvidenceBasicInformation)37 HashMap (java.util.HashMap)30 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)24 ArrayList (java.util.ArrayList)20 EvidenceEnclosure (com.itrus.portal.db.EvidenceEnclosure)19 Date (java.util.Date)18 JSONObject (com.alibaba.fastjson.JSONObject)16 EvidenceEnclosureExample (com.itrus.portal.db.EvidenceEnclosureExample)16 List (java.util.List)15 AppService (com.itrus.portal.db.AppService)13 IOException (java.io.IOException)13 EvidenceBasicInformationExample (com.itrus.portal.db.EvidenceBasicInformationExample)12 ApplicationInfo (com.itrus.portal.db.ApplicationInfo)11 EvidenceHisCertificate (com.itrus.portal.db.EvidenceHisCertificate)11 EvidenceHisRelationship (com.itrus.portal.db.EvidenceHisRelationship)11 Map (java.util.Map)11 EvidenceEventContent (com.itrus.portal.db.EvidenceEventContent)10 EvidenceMainInformation (com.itrus.portal.db.EvidenceMainInformation)10 EvidenceHisRelationshipExample (com.itrus.portal.db.EvidenceHisRelationshipExample)8 EvidenceSubjectIdentity (com.itrus.portal.db.EvidenceSubjectIdentity)8