use of com.itrus.portal.db.Agentinformation 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";
}
use of com.itrus.portal.db.Agentinformation in project portal by ixinportal.
the class BasicInformationController method realname.
/**
* 跳转天威实名认证
*
* @param id
* @param pages
* @param uiModel
* @return
*/
@RequestMapping(value = "realname/{id}/{type}", produces = "text/html")
public String realname(@PathVariable("id") Long id, @PathVariable("type") Long type, Model uiModel) {
if (type == 1) {
RealNameRecord realName = realnameservice.selectById(id);
uiModel.addAttribute("realName", realName);
AppServiceAuthentication appServiceauthentication = appServiceAuthenticationService.selectById(realName.getAppServiceAuthentication());
uiModel.addAttribute("appServiceauthentication", appServiceauthentication);
AppService appService = appServiceImpl.selectById(appServiceauthentication.getAppService());
uiModel.addAttribute("appService", appService);
Licenseinformation licen = sqlSession.selectOne("com.itrus.portal.db.LicenseinformationMapper.selectByPrimaryKey", realName.getLicenseinformation());
String ss = appServiceauthentication.getServiceAuthenticationItem();
Organization orgen = sqlSession.selectOne("com.itrus.portal.db.OrganizationMapper.selectByPrimaryKey", realName.getOrganization());
Corporateinformation core = sqlSession.selectOne("com.itrus.portal.db.CorporateinformationMapper.selectByPrimaryKey", realName.getCorporateinformation());
Agentinformation agee = sqlSession.selectOne("com.itrus.portal.db.AgentinformationMapper.selectByPrimaryKey", realName.getAgentinformation());
Enterprisebank entt = sqlSession.selectOne("com.itrus.portal.db.EnterprisebankMapper.selectByPrimaryKey1", realName.getEnterprisebank());
if (null != ss && "" != ss) {
if (ss.indexOf("1") != -1) {
uiModel.addAttribute("licenseinformation", licen);
} else {
uiModel.addAttribute("licenseinformation", 1);
}
if (ss.indexOf("2") != -1) {
uiModel.addAttribute("organition", orgen);
} else {
uiModel.addAttribute("organition", 1);
}
if (ss.indexOf("3") != -1) {
uiModel.addAttribute("corporateinformation", core);
} else {
uiModel.addAttribute("corporateinformation", 1);
}
if (ss.indexOf("4") != -1) {
uiModel.addAttribute("corporateinformatio", core);
} else {
uiModel.addAttribute("corporateinformatio", 1);
}
if (ss.indexOf("5") != -1) {
uiModel.addAttribute("agentinformation", agee);
} else {
uiModel.addAttribute("agentinformation", 1);
}
if (ss.indexOf("6") != -1) {
uiModel.addAttribute("agentinformatio", agee);
} else {
uiModel.addAttribute("agentinformatio", 1);
}
if (ss.indexOf("7") != -1) {
uiModel.addAttribute("enterprise", entt);
} else if (ss.indexOf("8") != -1) {
uiModel.addAttribute("enterprise", entt);
} else {
uiModel.addAttribute("enterprise", 1);
}
}
ApplicationInfo applicationInfo = applicationInfoService.selectById(realName.getApplicationInfo());
uiModel.addAttribute("applicationInfo", applicationInfo);
uiModel.addAttribute("listReal", listReal);
uiModel.addAttribute("count", listReal.size());
} else if (type == 2) {
RealNameRecord realName = realnameservice.selectById(id);
uiModel.addAttribute("realName", realName);
AppServiceAuthentication appServiceauthentication = appServiceAuthenticationService.selectById(realName.getAppServiceAuthentication());
uiModel.addAttribute("appServiceauthentication", appServiceauthentication);
AppService appService = appServiceImpl.selectById(appServiceauthentication.getAppService());
uiModel.addAttribute("appService", appService);
Licenseinformation licen = sqlSession.selectOne("com.itrus.portal.db.LicenseinformationMapper.selectByPrimaryKey", realName.getLicenseinformation());
String ss = appServiceauthentication.getServiceAuthenticationItem();
Organization orgen = sqlSession.selectOne("com.itrus.portal.db.OrganizationMapper.selectByPrimaryKey", realName.getOrganization());
Corporateinformation core = sqlSession.selectOne("com.itrus.portal.db.CorporateinformationMapper.selectByPrimaryKey", realName.getCorporateinformation());
Agentinformation agee = sqlSession.selectOne("com.itrus.portal.db.AgentinformationMapper.selectByPrimaryKey", realName.getAgentinformation());
Enterprisebank entt = sqlSession.selectOne("com.itrus.portal.db.EnterprisebankMapper.selectByPrimaryKey1", realName.getEnterprisebank());
if (null != ss && "" != ss) {
if (ss.indexOf("1") != -1) {
uiModel.addAttribute("licenseinformation", licen);
} else {
uiModel.addAttribute("licenseinformation", 1);
}
if (ss.indexOf("2") != -1) {
uiModel.addAttribute("organition", orgen);
} else {
uiModel.addAttribute("organition", 1);
}
if (ss.indexOf("3") != -1) {
uiModel.addAttribute("corporateinformation", core);
} else {
uiModel.addAttribute("corporateinformation", 1);
}
if (ss.indexOf("4") != -1) {
uiModel.addAttribute("corporateinformatio", core);
} else {
uiModel.addAttribute("corporateinformatio", 1);
}
if (ss.indexOf("5") != -1) {
uiModel.addAttribute("agentinformation", agee);
} else {
uiModel.addAttribute("agentinformation", 1);
}
if (ss.indexOf("6") != -1) {
uiModel.addAttribute("agentinformatio", agee);
} else {
uiModel.addAttribute("agentinformatio", 1);
}
if (ss.indexOf("7") != -1) {
uiModel.addAttribute("enterprise", entt);
} else if (ss.indexOf("8") != -1) {
uiModel.addAttribute("enterprise", entt);
} else {
uiModel.addAttribute("enterprise", 1);
}
}
ApplicationInfo applicationInfo = applicationInfoService.selectById(realName.getApplicationInfo());
uiModel.addAttribute("applicationInfo", applicationInfo);
uiModel.addAttribute("listPersonal", listPersonal);
}
return "basicinformation/realnamerecord";
}
use of com.itrus.portal.db.Agentinformation in project portal by ixinportal.
the class RealNameCordController method loadImg.
/**
* 得到图片
*
* @param type1
* 企业类型 1,企业 2,个人3,可信人脸
* @param type2
* 认证类型 1,法人 2,代理人
* @param id
* @param response
* @return
*/
@RequestMapping(value = "/img/{type1}/{type2}/{id}")
public String loadImg(@PathVariable("type1") String type1, @PathVariable("type2") String type2, @PathVariable("id") Long id, HttpServletResponse response) {
String img = null;
String serviceId = null;
OutputStream os = null;
FileInputStream fis = null;
RealNameRecord realNameRecord = null;
Agentinformation agentionfo = new Agentinformation();
Corporateinformation corporatein = new Corporateinformation();
PersonalName personalName = null;
FaceMatching faceMatching0 = null;
File file = null;
try {
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
if ("1".equals(type1)) {
realNameRecord = realnameservice.selectById(id);
corporatein = sqlSession.selectOne("com.itrus.portal.db.CorporateinformationMapper.selectByPrimaryKey", realNameRecord.getCorporateinformation());
agentionfo = sqlSession.selectOne("com.itrus.portal.db.AgentinformationMapper.selectByPrimaryKey", realNameRecord.getAgentinformation());
realNameRecord = realnameservice.selectById(id);
if (realNameRecord != null && "1".equals(type2)) {
img = corporatein.getPhotoCodeImg();
}
if (realNameRecord != null && "2".equals(type2)) {
img = agentionfo.getPhotoCodeImg();
}
file = filePathUtils.getBillFile(realNameRecord.getSerialnumber());
}
if ("2".equals(type1)) {
personalName = sqlSession.selectOne("com.itrus.portal.db.PersonalNameMapper.selectByPrimaryKey", id);
/* FaceMatchingExample face = new FaceMatchingExample();
FaceMatchingExample.Criteria faceMat=face.createCriteria();
faceMat.andPersonalNameEqualTo(personalName.getId());
List<FaceMatching> facem = sqlSession.selectList("com.itrus.portal.db.FaceMatchingMapper.selectByExample", face);
faceMatching0 = sqlSession.selectOne("com.itrus.portal.db.FaceMatchingMapper.selectByPrimaryKey", id);
if(facem!=null&&facem.size()>=1){
faceMatching1 = facem.get(0);
}
if(facem!=null&&facem.size()>=2){
faceMatching0 = facem.get(1);
}
*/
if (personalName != null && "2".equals(type2)) {
img = personalName.getPhotoCodeImg();
}
if (personalName != null && "1".equals(type2)) {
img = personalName.getInformationImg();
}
/*if (personalName != null && "3".equals(type2)) {
if(faceMatching0.getPhotoType()==0){
img = faceMatching0.getPhotoCodeImg();
}else{
img = faceMatching1.getPhotoCodeImg();
}
img = faceMatching0.getPhotoCodeImg();
}*/
/*if (personalName != null && "4".equals(type2)) {
if(faceMatching0.getPhotoType()==1){
img = faceMatching0.getPhotoCodeImg();
}else{
img = faceMatching1.getPhotoCodeImg();
}
img = faceMatching0.getPhotoCodeImg();
}*/
file = filePathUtils.getBillFile(personalName.getSerialnumber());
}
if ("3".equals(type1)) {
faceMatching0 = sqlSession.selectOne("com.itrus.portal.db.FaceMatchingMapper.selectByPrimaryKey", id);
personalName = sqlSession.selectOne("com.itrus.portal.db.PersonalNameMapper.selectByPrimaryKey", faceMatching0.getPersonalName());
if (personalName != null && "1".equals(type2)) {
/* if(faceMatching0.getPhotoType()==0){
img = faceMatching0.getPhotoCodeImg();
}else{
img = faceMatching1.getPhotoCodeImg();
}*/
img = faceMatching0.getPhotoCodeImg();
}
file = filePathUtils.getBillFile(personalName.getSerialnumber());
}
if (realNameRecord == null && personalName == null) {
return "status403";
}
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 (IOException e) {
// 未找到
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {
// 关闭流!
try {
if (null != fis) {
fis.close();
}
if (null != os) {
os.close();
}
} catch (IOException e) {
}
}
return null;
}
use of com.itrus.portal.db.Agentinformation in project portal by ixinportal.
the class QueueService method run.
@Override
public void run() {
boolean isException = false;
while (true) {
log.debug("execute run,the queue size is [" + OBJECT_QUEUE.size() + "]");
if (OBJECT_QUEUE.isEmpty()) {
try {
// 若队列中没有信息则等待十秒
sleep(10 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
continue;
}
log.debug("execute run,the queue size is [" + OBJECT_QUEUE.size() + "]");
Map<String, RealNameRecord> realMap = new HashMap<String, RealNameRecord>();
Map<String, PersonalName> perMap = new HashMap<String, PersonalName>();
// for (int i = 0; !OBJECT_QUEUE.isEmpty() && i < 500; i++) {
Object obj = OBJECT_QUEUE.poll();
if (obj instanceof Map) {
if ((RealNameRecord) ((Map) obj).get("realNameRecord") != null) {
realMap.put("realNameRecord", (RealNameRecord) ((Map) obj).get("realNameRecord"));
}
if ((PersonalName) ((Map) obj).get("personalName") != null) {
perMap.put("personalName", (PersonalName) ((Map) obj).get("personalName"));
}
}
// 存储企业路径
if (!realMap.isEmpty()) {
try {
RealNameRecord realNameRecord = (RealNameRecord) ((Map) obj).get("realNameRecord");
log.error("【认证信息入库】 企业名称 :" + realNameRecord.getCompanyname() + ",入库时间 :" + new Date());
sqlSession.insert("com.itrus.portal.db.RealNameRecordMapper.insert", realNameRecord);
Agentinformation agentinformation = (Agentinformation) ((Map) obj).get("agentinformation");
if (agentinformation != null) {
agentinformation.setRealNameRecord(realNameRecord.getId());
sqlSession.insert("com.itrus.portal.db.AgentinformationMapper.insert", agentinformation);
realNameRecord.setAgentinformation(agentinformation.getId());
}
ApplicationInfo applicationInfo = (ApplicationInfo) ((Map) obj).get("applicationInfo");
AppService appService = (AppService) ((Map) obj).get("appService");
// 计费 appId serviceCode 服务类别,二选一(企业为1,个人为2) 调用前还是调用后
Map<String, Object> cert = certificationChargingService.charging(applicationInfo.getAppId(), appService.getAppServiceId(), appService.getServiceConfigName(), appService.getServiceConfigId(), applicationInfo, appService, realNameRecord.getId(), "RealNameRecord");
if ((int) cert.get("retCode") != 1) {
// 错误
realNameRecord.setServicestate(1L);
}
realNameRecord.setReturntime(new Date());
sqlSession.update("com.itrus.portal.db.RealNameRecordMapper.updateByPrimaryKeySelective", realNameRecord);
} catch (Exception e) {
isException = true;
// 将错误信息显示,不进行操作
log.error(e);
}
}
// 存储个人记录
if (!perMap.isEmpty()) {
try {
PersonalName personalName = (PersonalName) ((Map) obj).get("personalName");
log.error("【认证信息入库】 名称 :" + personalName.getName() + ",入库时间 :" + new Date());
sqlSession.insert("com.itrus.portal.db.PersonalNameMapper.insert", personalName);
ApplicationInfo applicationInfo = (ApplicationInfo) ((Map) obj).get("applicationInfo");
AppService appService = (AppService) ((Map) obj).get("appService");
// 计费 appId code 服务类别,二选一(企业为1,个人为2) 调用前还是调用后
Map<String, Object> cert = certificationChargingService.charging(applicationInfo.getAppId(), appService.getAppServiceId(), appService.getServiceConfigName(), appService.getServiceConfigId(), applicationInfo, appService, personalName.getId(), "PersonalName");
if ((int) cert.get("retCode") != 1) {
// 错误
personalName.setServicestate(1);
}
personalName.setReturntime(new Date());
sqlSession.update("com.itrus.portal.db.PersonalNameMapper.updateByPrimaryKeySelective", personalName);
} catch (Exception e) {
isException = true;
// 将错误信息显示,不进行操作
log.error(e);
}
}
log.debug("the exception is [" + isException + "]");
// 若出现异常则暂停10秒钟
if (isException) {
try {
// 若队列中没有信息则等待十秒
sleep(10 * 1000);
} catch (InterruptedException e) {
log.error(e);
} finally {
isException = false;
}
}
}
}
use of com.itrus.portal.db.Agentinformation in project portal by ixinportal.
the class RealNameCordController method show.
// 显示详情
@RequestMapping(value = "/{id}", produces = "text/html")
public String show(@PathVariable("id") Long id, Model uiModel) {
RealNameRecord realName = realnameservice.selectById(id);
uiModel.addAttribute("realName", realName);
AppServiceAuthentication appServiceauthentication = appServiceAuthenticationService.selectById(realName.getAppServiceAuthentication());
uiModel.addAttribute("appServiceauthentication", appServiceauthentication);
AppService appService = appServiceImpl.selectById(appServiceauthentication.getAppService());
uiModel.addAttribute("appService", appService);
/*
* LicenseinformationExample licensecriteria = new
* LicenseinformationExample(); LicenseinformationExample.Criteria
* licenseinformation=licensecriteria.or();
* licenseinformation.andRealNameRecordEqualTo(id);
* List<Licenseinformation> sysRess= sqlSession.selectList(
* "com.itrus.portal.db.LicenseinformationMapper.selectByExample",
* licensecriteria);
*/
Licenseinformation licen = sqlSession.selectOne("com.itrus.portal.db.LicenseinformationMapper.selectByPrimaryKey", realName.getLicenseinformation());
String ss = appServiceauthentication.getServiceAuthenticationItem();
/*
* OrganizationExample organition = new OrganizationExample();
* OrganizationExample.Criteria organitonex=organition.or();
* organitonex.andRealNameRecordEqualTo(id); List<Organization> organ=
* sqlSession.selectList(
* "com.itrus.portal.db.OrganizationMapper.selectByExample",
* organition);
*/
Organization orgen = sqlSession.selectOne("com.itrus.portal.db.OrganizationMapper.selectByPrimaryKey", realName.getOrganization());
/*
* CorporateinformationExample corporatein = new
* CorporateinformationExample(); CorporateinformationExample.Criteria
* corporateinform=corporatein.or();
* corporateinform.andRealNameRecordEqualTo(id);
* List<Corporateinformation> cor= sqlSession.selectList(
* "com.itrus.portal.db.CorporateinformationMapper.selectByExample",
* corporatein);
*/
Corporateinformation core = sqlSession.selectOne("com.itrus.portal.db.CorporateinformationMapper.selectByPrimaryKey", realName.getCorporateinformation());
/*
* AgentinformationExample agentinformation = new
* AgentinformationExample(); AgentinformationExample.Criteria
* agentincrite=agentinformation.or();
* agentincrite.andRealNameRecordEqualTo(id); List<Agentinformation> age
* = null; age= sqlSession.selectList(
* "com.itrus.portal.db.AgentinformationMapper.selectByExample",
* agentinformation);
*/
Agentinformation agee = sqlSession.selectOne("com.itrus.portal.db.AgentinformationMapper.selectByPrimaryKey", realName.getAgentinformation());
/*
* EnterprisebankExample enterise = new EnterprisebankExample();
* EnterprisebankExample.Criteria enterpr=enterise.or();
* enterpr.andRealNameRecordEqualTo(id); List<Enterprisebank> ent=
* sqlSession.selectList(
* "com.itrus.portal.db.EnterprisebankMapper.selectByExample",
* enterise);
*/
Enterprisebank entt = sqlSession.selectOne("com.itrus.portal.db.EnterprisebankMapper.selectByPrimaryKey1", realName.getEnterprisebank());
if (null != ss && "" != ss) {
if (ss.indexOf("1") != -1) {
uiModel.addAttribute("licenseinformation", licen);
} else {
uiModel.addAttribute("licenseinformation", 1);
}
if (ss.indexOf("2") != -1) {
uiModel.addAttribute("organition", orgen);
} else {
uiModel.addAttribute("organition", 1);
}
if (ss.indexOf("3") != -1) {
uiModel.addAttribute("corporateinformation", core);
} else {
uiModel.addAttribute("corporateinformation", 1);
}
if (ss.indexOf("4") != -1) {
uiModel.addAttribute("corporateinformatio", core);
} else {
uiModel.addAttribute("corporateinformatio", 1);
}
if (ss.indexOf("5") != -1) {
uiModel.addAttribute("agentinformation", agee);
} else {
uiModel.addAttribute("agentinformation", 1);
}
if (ss.indexOf("6") != -1) {
uiModel.addAttribute("agentinformatio", agee);
} else {
uiModel.addAttribute("agentinformatio", 1);
}
if (ss.indexOf("7") != -1) {
uiModel.addAttribute("enterprise", entt);
} else if (ss.indexOf("8") != -1) {
uiModel.addAttribute("enterprise", entt);
} else {
uiModel.addAttribute("enterprise", 1);
}
}
ApplicationInfo applicationInfo = applicationInfoService.selectById(realName.getApplicationInfo());
uiModel.addAttribute("applicationInfo", applicationInfo);
return "realnamerecord/show";
}
Aggregations