天眼查

This commit is contained in:
weiyunlong 2024-10-22 16:46:46 +08:00
parent 745b13187f
commit 198ca11bc7
3 changed files with 1131 additions and 2 deletions

View File

@ -0,0 +1,359 @@
package shkd.repc.resm.opplugin;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.operation.SaveServiceHelper;
/**
* 资质预审审核
* qeug_resm_prequalific_ext
*/
public class PrequalificationOPPlugin extends AbstractOperationServicePlugIn {
@Override
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
//资质预审审核 + OP 判断如果为直接入库那就查潜在供应商中的正式供应商字段然后进行取值赋值
super.afterExecuteOperationTransaction(e);
String operationKey = e.getOperationKey();
if ("audit".equals(operationKey)) {
DynamicObject[] dataEntities1 = e.getDataEntities();
DynamicObject dynamicObject = dataEntities1[0];
String inType = dynamicObject.getString("in_type");//入库方式 直接入库:1,供方考察入库:0
if ("1".equals(inType)) {
DynamicObject preSupplierid = dynamicObject.getDynamicObject("pre_supplierid");//潜在供应商
if (null != preSupplierid) {
long preSupplierid_id = preSupplierid.getLong("id");
QFilter q1 = new QFilter("id", QCP.equals, preSupplierid_id);
//潜在供应商
DynamicObject resm_regsupplier = BusinessDataServiceHelper.loadSingle("resm_regsupplier", new QFilter[]{q1});
if (null != resm_regsupplier) {
DynamicObject officesupplier = resm_regsupplier.getDynamicObject("officesupplier");//正式供应商
if (null != officesupplier) {
long officesupplier_id= officesupplier.getLong("id");
QFilter q2 = new QFilter("id", QCP.equals, officesupplier_id);
//正式供应商
DynamicObject resm_official_supplier = BusinessDataServiceHelper.loadSingle("resm_official_supplier", new QFilter[]{q2});
if (null != resm_official_supplier) {
/**
* 基本信息核对 qeug_infocheckentry
*/
DynamicObjectCollection qeugInfocheckentry = preSupplierid.getDynamicObjectCollection("qeug_infocheckentry");
DynamicObjectCollection qeugInfocheckentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_infocheckentry");
qeugInfocheckentry1.clear();
if (null != qeugInfocheckentry) {
for (int i = 0; i < qeugInfocheckentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeugInfocheckentry.get(i);
DynamicObject add = qeugInfocheckentry1.addNew();
add.set("seq",i);
add.set("qeug_bsfieldname", qeugInfocheckentry_item.getString("qeug_bsfieldname"));
add.set("qeug_bsfield", qeugInfocheckentry_item.getString("qeug_bsfield"));
add.set("qeug_apifield", qeugInfocheckentry_item.getString("qeug_apifield"));
add.set("qeug_bsinput", qeugInfocheckentry_item.getString("qeug_bsinput"));
add.set("qeug_queryresult", qeugInfocheckentry_item.getString("qeug_queryresult"));
add.set("qeug_issame", qeugInfocheckentry_item.getString("qeug_issame"));
}
}
/**
* 基本信息
*/
resm_official_supplier.set("qeug_legalpersonn",resm_regsupplier.getString("resm_regsupplier"));
resm_official_supplier.set("qeug_regnumber",resm_regsupplier.getString("qeug_regnumber"));
resm_official_supplier.set("qeug_orgnumber",resm_regsupplier.getString("qeug_orgnumber"));
resm_official_supplier.set("qeug_businessduration",resm_regsupplier.getString("qeug_businessduration"));
resm_official_supplier.set("qeug_reglocation",resm_regsupplier.getString("qeug_reglocation"));
resm_official_supplier.set("qeug_reginstitute",resm_regsupplier.getString("qeug_reginstitute"));
resm_official_supplier.set("qeug_regstatus",resm_regsupplier.getString("qeug_regstatus"));
resm_official_supplier.set("qeug_websitelist",resm_regsupplier.getString("qeug_websitelist"));
resm_official_supplier.set("qeug_photodate",resm_regsupplier.getDate("qeug_photodate"));
resm_official_supplier.set("qeug_creditcode",resm_regsupplier.getString("qeug_creditcode"));
resm_official_supplier.set("qeug_industry",resm_regsupplier.getString("qeug_industry"));
resm_official_supplier.set("qeug_bases",resm_regsupplier.getString("qeug_bases"));
resm_official_supplier.set("qeug_currencyfield",resm_regsupplier.getDynamicObject("qeug_currencyfield"));
resm_official_supplier.set("qeug_regcapitals",resm_regsupplier.getBigDecimal("qeug_regcapitals"));
resm_official_supplier.set("qeug_companyorgtype",resm_regsupplier.getString("qeug_companyorgtype"));
resm_official_supplier.set("qeug_estiblishtime",resm_regsupplier.getDate("qeug_estiblishtime"));
resm_official_supplier.set("qeug_canceldate",resm_regsupplier.getString("qeug_canceldate"));
resm_official_supplier.set("qeug_city",resm_regsupplier.getString("qeug_city"));
resm_official_supplier.set("qeug_phonenumber",resm_regsupplier.getString("qeug_phonenumber"));
resm_official_supplier.set("qeug_headoffice",resm_regsupplier.getString("qeug_headoffice"));
resm_official_supplier.set("qeug_historynames",resm_regsupplier.getString("qeug_historynames"));
resm_official_supplier.set("qeug_socialstaffnum",resm_regsupplier.getString("qeug_socialstaffnum"));
resm_official_supplier.set("qeug_controllingperson",resm_regsupplier.getString("qeug_controllingperson"));
resm_official_supplier.set("qeug_businessscopes",resm_regsupplier.getString("qeug_businessscopes"));
resm_official_supplier.set("qeug_verify",resm_regsupplier.getString("qeug_verify"));
/**
* 主要人员信息 qeug_entryentity
*/
DynamicObjectCollection qeug_entryentity = preSupplierid.getDynamicObjectCollection("qeug_entryentity");
DynamicObjectCollection qeug_entryentity1 = resm_official_supplier.getDynamicObjectCollection("qeug_entryentity");
qeug_entryentity1.clear();
if (null != qeug_entryentity) {
for (int i = 0; i < qeug_entryentity.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_entryentity.get(i);
DynamicObject add = qeug_entryentity1.addNew();
add.set("seq",i);
add.set("qeug_personnelname", qeugInfocheckentry_item.getString("qeug_personnelname"));
add.set("qeug_position", qeugInfocheckentry_item.getString("qeug_position"));
}
}
/**
* 股东信息 qeug_shareholderentry
*/
DynamicObjectCollection qeug_shareholderentry = preSupplierid.getDynamicObjectCollection("qeug_shareholderentry");
DynamicObjectCollection qeug_shareholderentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_shareholderentry");
qeug_shareholderentry1.clear();
if (null != qeug_shareholderentry) {
for (int i = 0; i < qeug_shareholderentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_shareholderentry.get(i);
DynamicObject add = qeug_shareholderentry1.addNew();
add.set("seq",i);
add.set("qeug_name", qeugInfocheckentry_item.getString("qeug_name"));
add.set("qeug_typename", qeugInfocheckentry_item.getString("qeug_typename"));
}
}
/**
* 分支信息 qeug_icentry
*/
DynamicObjectCollection qeug_icentry = preSupplierid.getDynamicObjectCollection("qeug_icentry");
DynamicObjectCollection qeug_icentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_icentry");
qeug_icentry1.clear();
if (null != qeug_icentry) {
for (int i = 0; i < qeug_icentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_icentry.get(i);
DynamicObject add = qeug_icentry1.addNew();
add.set("seq",i);
add.set("qeug_branchlistname", qeugInfocheckentry_item.getString("qeug_branchlistname"));
add.set("qeug_regstatusic", qeugInfocheckentry_item.getString("qeug_regstatusic"));
}
}
/**
* 变更信息 qeug_changeinfo
*/
DynamicObjectCollection qeug_changeinfo = preSupplierid.getDynamicObjectCollection("qeug_changeinfo");
DynamicObjectCollection qeug_changeinfo1 = resm_official_supplier.getDynamicObjectCollection("qeug_changeinfo");
qeug_changeinfo1.clear();
if (null != qeug_changeinfo) {
for (int i = 0; i < qeug_changeinfo.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_changeinfo.get(i);
DynamicObject add = qeug_changeinfo1.addNew();
add.set("seq",i);
add.set("qeug_changeitem", qeugInfocheckentry_item.getString("qeug_changeitem"));
add.set("qeug_changetime", qeugInfocheckentry_item.getString("qeug_changetime"));
add.set("qeug_contentbefore", qeugInfocheckentry_item.getString("qeug_contentbefore"));
add.set("qeug_contentafter", qeugInfocheckentry_item.getString("qeug_contentafter"));
}
}
/**
* 异常信息 qeug_abnormal
*/
DynamicObjectCollection qeug_abnormal = preSupplierid.getDynamicObjectCollection("qeug_abnormal");
DynamicObjectCollection qeug_abnormal1 = resm_official_supplier.getDynamicObjectCollection("qeug_abnormal");
qeug_abnormal1.clear();
if (null != qeug_abnormal) {
for (int i = 0; i < qeug_abnormal.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_abnormal.get(i);
DynamicObject add = qeug_abnormal1.addNew();
add.set("seq",i);
add.set("qeug_putreason", qeugInfocheckentry_item.getString("qeug_putreason"));
add.set("qeug_putdate", qeugInfocheckentry_item.getString("qeug_putdate"));
add.set("qeug_removereason", qeugInfocheckentry_item.getString("qeug_removereason"));
add.set("qeug_removedate", qeugInfocheckentry_item.getString("qeug_removedate"));
}
}
/**
* 资质信息 qeug_certificateentry
*/
DynamicObjectCollection qeug_certificateentry = preSupplierid.getDynamicObjectCollection("qeug_certificateentry");
DynamicObjectCollection qeug_certificateentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_certificateentry");
qeug_certificateentry1.clear();
if (null != qeug_certificateentry) {
for (int i = 0; i < qeug_certificateentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_certificateentry.get(i);
DynamicObject add = qeug_certificateentry1.addNew();
add.set("seq",i);
add.set("qeug_certno", qeugInfocheckentry_item.getString("qeug_certno"));
add.set("qeug_certificatename", qeugInfocheckentry_item.getString("qeug_certificatename"));
add.set("qeug_startdate", qeugInfocheckentry_item.getString("qeug_startdate"));
add.set("qeug_enddate", qeugInfocheckentry_item.getString("qeug_enddate"));
}
}
/**
* 工程资质 qeug_qualificationentry
*/
DynamicObjectCollection qeug_qualificationentry = preSupplierid.getDynamicObjectCollection("qeug_qualificationentry");
DynamicObjectCollection qeug_qualificationentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_qualificationentry");
qeug_qualificationentry1.clear();
if (null != qeug_qualificationentry) {
for (int i = 0; i < qeug_qualificationentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_qualificationentry.get(i);
DynamicObject add = qeug_qualificationentry1.addNew();
add.set("seq",i);
add.set("qeug_certificatenum", qeugInfocheckentry_item.getString("qeug_certificatenum"));
add.set("qeug_qualificationname", qeugInfocheckentry_item.getString("qeug_qualificationname"));
add.set("qeug_issuingcertificateti", qeugInfocheckentry_item.getString("qeug_issuingcertificateti"));
add.set("qeug_effectivetime", qeugInfocheckentry_item.getString("qeug_effectivetime"));
add.set("qeug_organ", qeugInfocheckentry_item.getString("qeug_organ"));
}
}
/**
* 建筑资质-不良行为 qeug_badconductentry
*/
DynamicObjectCollection qeug_badconductentry = preSupplierid.getDynamicObjectCollection("qeug_badconductentry");
DynamicObjectCollection qeug_badconductentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_badconductentry");
qeug_badconductentry1.clear();
if (null != qeug_badconductentry) {
for (int i = 0; i < qeug_badconductentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_badconductentry.get(i);
DynamicObject add = qeug_badconductentry1.addNew();
add.set("seq",i);
add.set("qeug_integritysubject", qeugInfocheckentry_item.getString("qeug_integritysubject"));
add.set("qeug_crediticon", qeugInfocheckentry_item.getString("qeug_crediticon"));
add.set("qeug_decisioncontent", qeugInfocheckentry_item.getString("qeug_decisioncontent"));
add.set("qeug_decisioncontent2", qeugInfocheckentry_item.getString("qeug_decisioncontent2"));
add.set("qeug_reasons", qeugInfocheckentry_item.getString("qeug_reasons"));
add.set("qeug_decisiondate", qeugInfocheckentry_item.getString("qeug_decisiondate"));
add.set("qeug_publishvalidityperio", qeugInfocheckentry_item.getString("qeug_publishvalidityperio"));
}
}
/**
* 建筑资质-工程项目 qeug_projectentry
*/
DynamicObjectCollection qeug_projectentry = preSupplierid.getDynamicObjectCollection("qeug_projectentry");
DynamicObjectCollection qeug_projectentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_projectentry");
qeug_projectentry1.clear();
if (null != qeug_projectentry) {
for (int i = 0; i < qeug_projectentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_projectentry.get(i);
DynamicObject add = qeug_projectentry1.addNew();
add.set("seq",i);
add.set("qeug_proname", qeugInfocheckentry_item.getString("qeug_proname"));
add.set("qeug_base", qeugInfocheckentry_item.getString("qeug_base"));
add.set("qeug_protype", qeugInfocheckentry_item.getString("qeug_protype"));
add.set("qeug_buildcompanys", qeugInfocheckentry_item.getString("qeug_buildcompanys"));
}
}
/**
* 建筑资质-注册人员 qeug_reghumanentry
*/
DynamicObjectCollection qeug_reghumanentry = preSupplierid.getDynamicObjectCollection("qeug_reghumanentry");
DynamicObjectCollection qeug_reghumanentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_reghumanentry");
qeug_reghumanentry1.clear();
if (null != qeug_reghumanentry) {
for (int i = 0; i < qeug_reghumanentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_reghumanentry.get(i);
DynamicObject add = qeug_reghumanentry1.addNew();
add.set("seq",i);
add.set("qeug_registertype", qeugInfocheckentry_item.getString("qeug_registertype"));
add.set("qeug_humanname", qeugInfocheckentry_item.getString("qeug_humanname"));
}
}
/**
* 行政处罚 qeug_punishmentinfoentry
*/
DynamicObjectCollection qeug_punishmentinfoentry = preSupplierid.getDynamicObjectCollection("qeug_punishmentinfoentry");
DynamicObjectCollection qeug_punishmentinfoentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_punishmentinfoentry");
qeug_punishmentinfoentry1.clear();
if (null != qeug_punishmentinfoentry) {
for (int i = 0; i < qeug_punishmentinfoentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_punishmentinfoentry.get(i);
DynamicObject add = qeug_punishmentinfoentry1.addNew();
add.set("seq",i);
add.set("qeug_decisiondatepun", qeugInfocheckentry_item.getString("qeug_decisiondatepun"));
add.set("qeug_punishnumber", qeugInfocheckentry_item.getString("qeug_punishnumber"));
add.set("qeug_punishnumberpun", qeugInfocheckentry_item.getString("qeug_punishnumberpun"));
add.set("qeug_content", qeugInfocheckentry_item.getString("qeug_content"));
add.set("qeug_departmentname", qeugInfocheckentry_item.getString("qeug_departmentname"));
add.set("qeug_legalpersonname", qeugInfocheckentry_item.getString("qeug_legalpersonname"));
add.set("qeug_punishstatus", qeugInfocheckentry_item.getString("qeug_punishstatus"));
add.set("qeug_punishname", qeugInfocheckentry_item.getString("qeug_punishname"));
}
}
/**
* 严重违法 qeug_illegalinfoentry
*/
DynamicObjectCollection qeug_illegalinfoentry = preSupplierid.getDynamicObjectCollection("qeug_illegalinfoentry");
DynamicObjectCollection qeug_illegalinfoentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_illegalinfoentry");
qeug_illegalinfoentry1.clear();
if (null != qeug_illegalinfoentry) {
for (int i = 0; i < qeug_illegalinfoentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_illegalinfoentry.get(i);
DynamicObject add = qeug_illegalinfoentry1.addNew();
add.set("seq",i);
add.set("qeug_removedateil", qeugInfocheckentry_item.getString("qeug_removedateil"));
add.set("qeug_putreasonil", qeugInfocheckentry_item.getString("qeug_putreasonil"));
add.set("qeug_putdepartment", qeugInfocheckentry_item.getString("qeug_putdepartment"));
add.set("qeug_removedepartment", qeugInfocheckentry_item.getString("qeug_removedepartment"));
add.set("qeug_removereasonil", qeugInfocheckentry_item.getString("qeug_removereasonil"));
add.set("qeug_putdateil", qeugInfocheckentry_item.getString("qeug_putdateil"));
}
}
/**
* 诉讼 qeug_lawsuitentry
*/
DynamicObjectCollection qeug_lawsuitentry = preSupplierid.getDynamicObjectCollection("qeug_lawsuitentry");
DynamicObjectCollection qeug_lawsuitentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_lawsuitentry");
qeug_lawsuitentry1.clear();
if (null != qeug_lawsuitentry) {
for (int i = 0; i < qeug_lawsuitentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_lawsuitentry.get(i);
DynamicObject add = qeug_lawsuitentry1.addNew();
add.set("seq",i);
add.set("qeug_doctype", qeugInfocheckentry_item.getString("qeug_doctype"));
add.set("qeug_title", qeugInfocheckentry_item.getString("qeug_title"));
add.set("qeug_court", qeugInfocheckentry_item.getString("qeug_court"));
add.set("qeug_judgetime", qeugInfocheckentry_item.getString("qeug_judgetime"));
add.set("qeug_caseno", qeugInfocheckentry_item.getString("qeug_caseno"));
add.set("qeug_casetype", qeugInfocheckentry_item.getString("qeug_casetype"));
add.set("qeug_casereason", qeugInfocheckentry_item.getString("qeug_casereason"));
}
}
/**
* 失信执行 qeug_jr_dishonestentry
*/
DynamicObjectCollection qeug_jr_dishonestentry = preSupplierid.getDynamicObjectCollection("qeug_jr_dishonestentry");
DynamicObjectCollection qeug_jr_dishonestentry1 = resm_official_supplier.getDynamicObjectCollection("qeug_jr_dishonestentry");
qeug_jr_dishonestentry1.clear();
if (null != qeug_jr_dishonestentry) {
for (int i = 0; i < qeug_jr_dishonestentry.size(); i++) {
DynamicObject qeugInfocheckentry_item = qeug_jr_dishonestentry.get(i);
DynamicObject add = qeug_jr_dishonestentry1.addNew();
add.set("seq",i);
add.set("qeug_iname", qeugInfocheckentry_item.getString("qeug_iname"));
add.set("qeug_disrupttypename", qeugInfocheckentry_item.getString("qeug_disrupttypename"));
add.set("qeug_casecode", qeugInfocheckentry_item.getString("qeug_casecode"));
add.set("qeug_performance", qeugInfocheckentry_item.getString("qeug_performance"));
add.set("qeug_regdate", qeugInfocheckentry_item.getString("qeug_regdate"));
add.set("qeug_publishdate", qeugInfocheckentry_item.getString("qeug_publishdate"));
add.set("qeug_gistunit", qeugInfocheckentry_item.getString("qeug_gistunit"));
}
}
SaveServiceHelper.save(new DynamicObject[]{resm_official_supplier});
}
}
}
}
}
}
}
}

View File

@ -8,6 +8,7 @@ import kd.bos.dataentity.entity.OrmLocaleValue;
import kd.bos.entity.operate.result.OperateErrorInfo;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.entity.plugin.args.BeforeOperationArgs;
import kd.bos.entity.validate.ErrorLevel;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
@ -36,6 +37,775 @@ public class TycQzSupplierSearchOPPlugin extends AbstractOperationServicePlugIn
private static final Log logger = LogFactory.getLog(TycSupplierSearchOPPlugin.class);
@Override
public void beforeExecuteOperationTransaction(BeforeOperationArgs e) {
super.beforeExecuteOperationTransaction(e);
//资质预审之前查询天眼查数据
String eok = e.getOperationKey();
// if("preaudit".equals(eok)) {
// DynamicObject[] dynamicObjects = e.getDataEntities();
// for (DynamicObject dynamicObject : dynamicObjects) {
// tyc_Test_keyword = dynamicObject.getString("name");//供应商名称
// try {
//
// /**
// * 1.企业基本信息含主要人员_819 ?keyword=中航重机股份有限公司
// */
// String tyc_Baseinfo = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Baseinfo
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"企业基本信息含主要人员_819");
// JSONObject tyc_Baseinfo_results = JSONObject.parseObject(tyc_Baseinfo);
// if (null != tyc_Baseinfo_results) {
// JSONObject tyc_Baseinfo_result = (JSONObject)tyc_Baseinfo_results.get("result");
// if (null != tyc_Baseinfo_result) {
// //法人
// String legalPersonName = (String) tyc_Baseinfo_result.get("legalPersonName");
// //注册号
// String regNumber = (String) tyc_Baseinfo_result.get("regNumber");
// //组织机构代码
// String orgNumber = (String) tyc_Baseinfo_result.get("orgNumber");
// //营业期限(逻辑待定)--经营开始时间-经营结束时间
// String businessduration = "";
// Long fromTime = (Long)tyc_Baseinfo_result.get("fromTime");//开始时间
// Long toTime =(Long)tyc_Baseinfo_result.get("toTime");//结束时间
// if (null != fromTime && null != toTime) {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// businessduration =sdf.format(new Date(fromTime)) + "" + sdf.format(new Date(toTime));//营业期限
// }
// //注册地址
// String regLocation = (String) tyc_Baseinfo_result.get("regLocation");
// //登记机关
// String regInstitute = (String) tyc_Baseinfo_result.get("regInstitute");
// //经营范围(2000 文本)
// String businessScope = (String) tyc_Baseinfo_result.get("businessScope");
// //企业状态经营状态
// String regStatus = (String) tyc_Baseinfo_result.get("regStatus");
// //网址
// String websiteList = (String) tyc_Baseinfo_result.get("websiteList");
// //todo 发照日期
// //统一社会信用代码
// String creditCode = (String) tyc_Baseinfo_result.get("creditCode");
// //行业
// String industry = (String) tyc_Baseinfo_result.get("industry");
// //省份简称
// String base = (String) tyc_Baseinfo_result.get("base");
// String provinceName = getProvinceName(base);
// //注册资本
// String regCapital = (String) tyc_Baseinfo_result.get("regCapital");
// //企业联系电话
// //企业联系方式
// String phoneNumber = (String) tyc_Baseinfo_result.get("phoneNumber");
// //企业类型
// String companyOrgType = (String) tyc_Baseinfo_result.get("companyOrgType");
// //成立日期
// String estiblishtime = "";
// Long estiblishTime = (Long) tyc_Baseinfo_result.get("estiblishTime");
// if (null != estiblishTime) {
// estiblishtime = convertTimestampToDate(estiblishTime);
// }
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// //注销日期
// String canceldate = "";
// Long cancelDate = (Long) tyc_Baseinfo_result.get("cancelDate");
// if (null != cancelDate) {
// canceldate = convertTimestampToDate(cancelDate);
// }
//
// //
// String city = (String) tyc_Baseinfo_result.get("city");
// //曾用名
// String historyNames = (String) tyc_Baseinfo_result.get("historyNames");
// //参保人数
// Integer socialStaffNum = (Integer) tyc_Baseinfo_result.get("socialStaffNum");
// //主要人员列表
// DynamicObjectCollection qeugEntryentity = dynamicObject.getDynamicObjectCollection("qeug_entryentity");
// qeugEntryentity.clear();
// JSONObject staffListS = tyc_Baseinfo_result.getJSONObject("staffList");
// JSONArray staffLists = staffListS.getJSONArray("result");
// if (null != staffLists) {
// for (int i = 0; i < staffLists.size(); i++) {
// DynamicObject add = qeugEntryentity.addNew();
// JSONObject staffList = (JSONObject)staffLists.get(i);
// String name = staffList.getString("name");//主要人员姓名
// String typeJoin = "";//主要人员职位
// JSONArray typeJoins = staffList.getJSONArray("typeJoin");
// if (null != typeJoins) {
// StringBuilder sb = new StringBuilder();
// for (int j = 0; j < typeJoins.size(); j++) {
// sb.append((String)typeJoins.get(j));
// if (j < typeJoins.size() - 1) {
// sb.append(",");
// }
// }
// typeJoin = sb.toString();
// }
// add.set("seq",i);
// add.set("qeug_personnelname",name);//主要人员姓名
// add.set("qeug_position",typeJoin);//主要人员职位
// }
// }
//
// //设置到潜在供应商中
// dynamicObject.set("qeug_legalpersonn",legalPersonName);//法人代表
// dynamicObject.set("qeug_regnumber",regNumber);//企业注册号
// dynamicObject.set("qeug_orgnumber",orgNumber);//组织机构代码
// dynamicObject.set("qeug_businessduration",businessduration);//营业期限
// dynamicObject.set("qeug_reglocation",regLocation);//公司地址
// dynamicObject.set("qeug_reginstitute",regInstitute);//登记机关
// dynamicObject.set("qeug_regstatus",regStatus);//经营状态
// dynamicObject.set("qeug_websitelist",websiteList);//企业网站
// try {
// Date parse = sdf.parse(estiblishtime);
// dynamicObject.set("qeug_photodate",parse);//发照日期
// dynamicObject.set("qeug_estiblishtime",parse);//成立日期
// } catch (ParseException ex) {
// throw new RuntimeException(ex);
// }
// dynamicObject.set("qeug_creditcode",creditCode);//统一社会信用代码
// dynamicObject.set("qeug_industry",industry);//所属行业
// dynamicObject.set("qeug_bases",provinceName);//
// dynamicObject.set("qeug_regcapital",regCapital);//注册资本
// dynamicObject.set("qeug_companyorgtype",companyOrgType);//企业类型
// dynamicObject.set("qeug_canceldate",canceldate);//注销日期
// dynamicObject.set("qeug_city",city);//城市
// dynamicObject.set("qeug_phonenumber",phoneNumber);//联系电话
// dynamicObject.set("qeug_historynames",historyNames);//曾用名
// dynamicObject.set("qeug_socialstaffnum",socialStaffNum);//参保人数
// dynamicObject.set("qeug_businessscopes",businessScope);//经营范围
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
//
// /**
// * -------------------------------------------基本信息核对------------------------------------------
// */
//
// DynamicObjectCollection qeug_infocheckentry = dynamicObject.getDynamicObjectCollection("qeug_infocheckentry");
// qeug_infocheckentry.clear();
// DynamicObject[] qeugTycInfochecks = BusinessDataServiceHelper.load("qeug_tyc_infocheck",
// "number,name,qeug_apifields", null);
// for (int i = 0; i < qeugTycInfochecks.length; i++) {
// DynamicObject qeugTycInfocheck = qeugTycInfochecks[i];
// DynamicObject add = qeug_infocheckentry.addNew();
// add.set("seq",i);
// String number = qeugTycInfocheck.getString("number");
// add.set("qeug_bsfield",number);//核对字段标识
// add.set("qeug_bsfieldname",qeugTycInfocheck.getString("name"));//核对项目名称
// String bsinput = "";//录入内容
// Object obj = dynamicObject.get(number);
// SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
// if (obj instanceof Date) {
// Date date = (Date) obj;
// bsinput = sd.format(date);
// } else if(obj instanceof String) {
// bsinput =(String) obj;
// }else if(obj instanceof OrmLocaleValue) {
// OrmLocaleValue o = (OrmLocaleValue) obj;
// bsinput = o.get("zh_CN");
// }
// add.set("qeug_bsinput",bsinput);
// String qeugApifields = qeugTycInfocheck.getString("qeug_apifields");//接口字段标识
// add.set("qeug_apifield",qeugApifields);//接口字段标识
// String queryresult = "";//接口查询结果
// Object obj1 = tyc_Baseinfo_result.get(qeugApifields);
// if (obj1 instanceof Date) {
// Date date = (Date) obj1;
// queryresult = sd.format(date);
// } else if(obj1 instanceof String) {
// queryresult =(String) obj1;
// } else if(obj1 instanceof Long) {
// Date date = new Date((Long) obj1);
// queryresult = sd.format(date);
// }
// add.set("qeug_queryresult",queryresult);
// if (bsinput.equals(queryresult)) {
// add.set("qeug_issame","1");//0:不匹配 1:匹配
// }else {
// add.set("qeug_issame","0");
// }
// }
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
//
// }else {
// //接口调用失败
// Integer error_code = (Integer)tyc_Baseinfo_results.get("error_code");//状态码
// if (error_code.equals(300003)) {
// String reason = (String)tyc_Baseinfo_results.get("reason");//错误信息
// OperateErrorInfo operateErrorInfo = new OperateErrorInfo();
// operateErrorInfo.setMessage(reason + ",请联系管理员");
// operateErrorInfo.setErrorLevel(ErrorLevel.Error.name());
// operateErrorInfo.setPkValue(dynamicObject.getPkValue());
// this.operationResult.addErrorInfo(operateErrorInfo);
// logger.error("天眼查接口调用失败,错误码:" + error_code + ",原因:" + reason);
// }
// }
// }
//
//
// /**
// * 20.疑似实际控制人_1123 ?keyword=北京百度网讯科技有限公司
// */
// String tyc_ActualControl = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_ActualControl
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"疑似实际控制人_1123");
// JSONObject tyc_ActualControl_results = JSONObject.parseObject(tyc_ActualControl);
// if (null != tyc_ActualControl_results) {
// JSONObject tyc_ActualControl_result = (JSONObject)tyc_ActualControl_results.get("result");
// if (null != tyc_ActualControl_result) {
// JSONArray actualControllerLists = tyc_ActualControl_result.getJSONArray("actualControllerList");
// String name = "";
// if (null != actualControllerLists) {
// StringBuilder sb = new StringBuilder();
// for (int i = 0; i < actualControllerLists.size(); i++) {
// JSONObject actualControllerList = (JSONObject)actualControllerLists.get(i);
// sb.append((String)actualControllerList.get("name"));//控制人姓名
// if (i < actualControllerLists.size() - 1) {
// sb.append(",");
// }
// }
// name = sb.toString();
// }
// dynamicObject.set("qeug_controllingperson",name);//控制人姓名
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
//
//
// /**
// * todo 2.实际控制权_747 ?pageSize=20&keyword=北京百度网讯科技有限公司&pageNum=1
// */
// String tyc_Companyholding = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Companyholding
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"实际控制权_747");
//
// /**
// * 3.总公司_963 ?keyword=139573097
// */
// String tyc_ParentCompany = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_ParentCompany
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"总公司_963");
// JSONObject tyc_ParentCompany_results = JSONObject.parseObject(tyc_ParentCompany);
// if (null != tyc_ParentCompany_results) {
// JSONObject tyc_ParentCompany_result = (JSONObject)tyc_ParentCompany_results.get("result");
// if (null != tyc_ParentCompany_result) {
// //总公司名
// String name = (String) tyc_ParentCompany_result.get("name");
// dynamicObject.set("qeug_headoffice",name);//总公司名
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
//
//
// /**
// * 4.工商信息_1001 ?keyword=9519792
// */
// DynamicObjectCollection qeugIcentry = dynamicObject.getDynamicObjectCollection("qeug_icentry");
// qeugIcentry.clear();
// String tyc_Ic = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Ic
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"工商信息_1001");
// JSONObject tyc_Ic_results = JSONObject.parseObject(tyc_Ic);
// if (null != tyc_Ic_results) {
// JSONObject tyc_Ic_result = (JSONObject)tyc_Ic_results.get("result");
// if (null != tyc_Ic_result) {
// JSONArray branchLists = tyc_Ic_result.getJSONArray("branchList");
// if (null != branchLists) {
// for (int i = 0; i < branchLists.size(); i++) {
// DynamicObject add = qeugIcentry.addNew();
// JSONObject branchList = (JSONObject)branchLists.get(i);
// String branchListname = (String)branchList.get("name");//分支机构名称
// String regStatus = (String)branchList.get("regStatus");//经营状态
// add.set("seq",i);
// add.set("qeug_branchlistname",branchListname);//分支机构名称
// add.set("qeug_regstatusic",regStatus);//经营状态
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
// }
//
//
// /**
// * 5.建筑资质-注册人员_1009 ?pageSize=20&keyword=中煤科工集团北京华宇工程有限公司&pageNum=1
// */
// DynamicObjectCollection qeugReghumanentry = dynamicObject.getDynamicObjectCollection("qeug_reghumanentry");
// qeugReghumanentry.clear();
// String tyc_RegHuman = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_RegHuman
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"建筑资质-注册人员_1009");
// JSONObject tyc_RegHuman_results = JSONObject.parseObject(tyc_RegHuman);
// if (null != tyc_RegHuman_results) {
// JSONObject tyc_RegHuman_result = (JSONObject)tyc_RegHuman_results.get("result");
// if (null != tyc_RegHuman_result) {
// JSONArray items = tyc_RegHuman_result.getJSONArray("items");
// if (null != items) {
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeugReghumanentry.addNew();
// JSONObject branchList = (JSONObject)items.get(i);
// String humanName = (String) branchList.get("humanName");//注册人员名字
// String registerType = (String) branchList.get("registerType");//注册类别
// add.set("seq",i);
// add.set("qeug_humanname",humanName);//注册人员名字
// add.set("qeug_registertype",registerType);//注册类别
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
//
// }
// }
// }
// }
//
//
// /**
// * 6.建筑资质-工程项目_1011 ?pageSize=20&keyword=中煤科工集团北京华宇工程有限公司&pageNum=1
// */
// DynamicObjectCollection qeug_projectentry = dynamicObject.getDynamicObjectCollection("qeug_projectentry");
// qeug_projectentry.clear();
// String tyc_Project = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Project
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"建筑资质-工程项目_1011");
// JSONObject tyc_Project_results = JSONObject.parseObject(tyc_Project);
// if (null != tyc_Project_results) {
// JSONObject tyc_Project_result = (JSONObject)tyc_Project_results.get("result");
// if (null != tyc_Project_result) {
// JSONArray items = tyc_Project_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeug_projectentry.addNew();
// JSONObject o = (JSONObject)items.get(i);
// String proName = (String)o.get("proName");//项目名称
// String base = (String)o.get("base");//项目属地
// String proType = (String)o.get("proType");//项目类别
// String buildCompany = (String)o.get("buildCompany");//建设单位
// add.set("seq",i);
// add.set("qeug_proname",proName);//项目名称
// add.set("qeug_base",base);//项目属地
// add.set("qeug_protype",proType);//项目类别
// add.set("qeug_buildcompanys",buildCompany);//建设单位
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
//
// /**
// * 7.失信被执行人(人员)_1076 ?hid=2187083120&name=北京百乐文化传媒有限公司&humanName=贾跃亭&cid=34630712&pageSize=20&pageNum=1
// */
// String tyc_Human_Dishonest = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Human_Dishonest
// + "?name=" + tyc_Test_keyword,tyc_Test_keyword,"被执行人_1077");
// JSONObject tyc_Human_Dishonest_results = JSONObject.parseObject(tyc_Human_Dishonest);
// if (null != tyc_Human_Dishonest_results) {
// JSONObject tyc_Human_Dishonest_result = (JSONObject)tyc_Human_Dishonest_results.get("result");
// if (null != tyc_Human_Dishonest_result) {
// JSONArray items = tyc_Human_Dishonest_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// JSONObject o = (JSONObject)items.get(i);
// String courtname = (String)o.get("courtname");//法院
// String iname = (String)o.get("iname");//失信人名称
// String disrupttypename = (String)o.get("disrupttypename");//失信被执行人行为具体情形
// String performance = (String)o.get("performance");//履行情况
// String gistunit = (String)o.get("gistunit");//做出执行的依据单位
// String duty = (String)o.get("duty");//生效法律文书确定的义务
// }
// }
// }
//
//
// /**
// * todo 8.被执行(人员)_1077 ?name=宁夏泰华实业集团有限公司&humanName=禹学峰&cid=185429210&hid=2095668600&pageNum=1&pageSize=20
// */
//// String tyc_ZhiXingInfo = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_ZhiXingInfo
//// + "?name=" + tyc_Test_keyword);
//
// /**
// * 9.资质证书_880 ?name=北京百度网讯科技有限公司&certificateName=中国质量认证中心_CCC证书&pageSize=20&id=22822&pageNum=1
// */
// DynamicObjectCollection qeugCertificateentry = dynamicObject.getDynamicObjectCollection("qeug_certificateentry");
// qeugCertificateentry.clear();
// String tyc_Certificate = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Certificate
// + "?name=" + tyc_Test_keyword,tyc_Test_keyword,"证照_1081");
// JSONObject tyc_Certificate_results = JSONObject.parseObject(tyc_Certificate);
// if (null != tyc_Certificate_results) {
// JSONObject tyc_Certificate_result = (JSONObject)tyc_Certificate_results.get("result");
// if (null != tyc_Certificate_result) {
// JSONArray items = tyc_Certificate_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// JSONObject o = (JSONObject)items.get(i);
// DynamicObject add = qeugCertificateentry.addNew();
// String certNo = (String)o.get("certNo");//证书编号
// String certificateName = (String)o.get("certificateName");//证书类型
// String startDate = (String)o.get("startDate");//发证日期
// String endDate = (String)o.get("endDate");//截止日期
// add.set("seq",i);
// add.set("qeug_certno",certNo);
// add.set("qeug_certificatename",certificateName);
// add.set("qeug_startdate",startDate);
// add.set("qeug_enddate",endDate);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
// /**
// * 10.建筑资质-资质资格_1007 ?pageSize=20&keyword=河南省建筑设计研究院有限公司&pageNum=1
// */
// DynamicObjectCollection qeug_qualificationentry = dynamicObject.getDynamicObjectCollection("qeug_qualificationentry");
// qeug_qualificationentry.clear();
// String tyc_Qualification = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Qualification
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"建筑资质-资质资格_1007");
// JSONObject tyc_Qualification_results = JSONObject.parseObject(tyc_Qualification);
// if (null != tyc_Qualification_results) {
// JSONObject tyc_Qualification_result = (JSONObject)tyc_Qualification_results.get("result");
// if (null != tyc_Qualification_result) {
// JSONArray items = tyc_Qualification_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeug_qualificationentry.addNew();
// JSONObject o = (JSONObject)items.get(i);
// String certificateNum = (String)o.get("certificateNum");//资质证书号
// String qualificationName = (String)o.get("qualificationName");//资质名称
// String issuingCertificateTime = (String)o.get("issuingCertificateTime");//发证日期
// String effectiveTime = (String)o.get("effectiveTime");//证书有效期
// String organ = (String)o.get("organ");//发证机关
// add.set("seq",i);
// add.set("qeug_certificatenum",certificateNum);
// add.set("qeug_qualificationname",qualificationName);
// add.set("qeug_issuingcertificateti",issuingCertificateTime);
// add.set("qeug_effectivetime",effectiveTime);
// add.set("qeug_organ",organ);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
//
// }
// }
// }
//
//
// /**
// * 11.变更记录_822 ?keyword=北京百度网讯科技有限公司&pageNum=1&pageSize=20
// */
// DynamicObjectCollection qeugChangeinfo = dynamicObject.getDynamicObjectCollection("qeug_changeinfo");
// qeugChangeinfo.clear();
// String tyc_Changeinfo = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Changeinfo
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"变更记录_822");
// JSONObject tyc_Changeinfo_results = JSONObject.parseObject(tyc_Changeinfo);
// if (null != tyc_Changeinfo_results) {
// JSONObject tyc_Changeinfo_result = (JSONObject)tyc_Changeinfo_results.get("result");
// if (null != tyc_Changeinfo_result) {
// JSONArray items = tyc_Changeinfo_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// JSONObject o = (JSONObject)items.get(i);
// DynamicObject add = qeugChangeinfo.addNew();
// String changeItem = (String)o.get("changeItem");//变更事项
// String changeTime = (String)o.get("changeTime");//变更时间
// String contentBefore = (String)o.get("contentBefore");//变更前
// String contentAfter = (String)o.get("contentAfter");//变更后
// add.set("seq",i);
// add.set("qeug_changeitem",changeItem);
// add.set("qeug_changetime",changeTime);
// add.set("qeug_contentbefore",contentBefore);
// add.set("qeug_contentafter",contentAfter);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
// /**
// * 12.经营异常_848 ?pageSize=20&keyword=宁夏凯捷建设工程有限公司&pageNum=1
// */
// DynamicObjectCollection qeugAbnormal = dynamicObject.getDynamicObjectCollection("qeug_abnormal");
// qeugAbnormal.clear();
// String tyc_Abnormal = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Abnormal
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"经营异常_848");
// JSONObject tyc_Abnormal_results = JSONObject.parseObject(tyc_Abnormal);
// if (null != tyc_Abnormal_results) {
// JSONObject tyc_Abnormal_result = (JSONObject)tyc_Abnormal_results.get("result");
// if (null != tyc_Abnormal_result) {
// JSONArray items = tyc_Abnormal_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// JSONObject o = (JSONObject)items.get(i);
// DynamicObject add = qeugAbnormal.addNew();
// String putReason = (String)o.get("putReason");//列入异常名录原因
// String putDate = (String)o.get("putDate");//列入日期
// String removeReason = (String)o.get("removeReason");//移除异常名录原因
// String removeDate = (String)o.get("removeDate");//移出日期
// add.set("seq",i);
// add.set("qeug_putreason",putReason);
// add.set("qeug_putdate",putDate);
// add.set("qeug_removereason",removeReason);
// add.set("qeug_removedate",removeDate);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
// /**
// * 13.企业股东_821 ?pageSize=20&keyword=北京百度网讯科技有限公司&pageNum=1
// */
// DynamicObjectCollection qeugShareholderentry = dynamicObject.getDynamicObjectCollection("qeug_shareholderentry");
// qeugShareholderentry.clear();
// String tyc_Holder = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Holder
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"企业股东_821");
// JSONObject tyc_Holder_results = JSONObject.parseObject(tyc_Holder);
// if (null != tyc_Holder_results) {
// JSONObject tyc_Holder_result = (JSONObject)tyc_Holder_results.get("result");
// if (null != tyc_Holder_result) {
// JSONArray items = tyc_Holder_result.getJSONArray("items");
// for (Object item : items) {
// DynamicObject add = qeugShareholderentry.addNew();
// JSONObject o = (JSONObject) item;
// String name = (String) o.get("name");//股东名
// String typeName = "";//股东类型
// Integer type = (Integer) o.get("type");//股东类型 1-公司 2- 3-其它
// switch (type) {
// case 1:
// typeName = "公司";
// break;
// case 2:
// typeName = "";
// break;
// case 3:
// typeName = "其它";
// break;
// default:
// break;
// }
// add.set("qeug_name", name);//股东名
// add.set("qeug_typename", typeName);//股东类型 1-公司 2- 3-其它
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
// /**
// * 14.建筑资质-不良行为_1030 ?pageSize=20&keyword=湖北正大建设工程有限公司&pageNum=1
// */
// DynamicObjectCollection qeug_badconductentry = dynamicObject.getDynamicObjectCollection("qeug_badconductentry");
// qeug_badconductentry.clear();
// String tyc_BadConduct = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_BadConduct
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"建筑资质-不良行为_1030");
// JSONObject tyc_BadConduct_results = JSONObject.parseObject(tyc_BadConduct);
// if (null != tyc_BadConduct_results) {
// JSONObject tyc_BadConduct_result = (JSONObject)tyc_BadConduct_results.get("result");
// if (null != tyc_BadConduct_result) {
// JSONArray items = tyc_BadConduct_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeug_badconductentry.addNew();
// JSONObject o = (JSONObject)items.get(i);
// String integritySubject = (String)o.get("integritySubject");//诚信记录主体
// String creditIcon = (String)o.get("creditIcon");//标签
// String decisionContent = (String)o.get("decisionContent");//决定内容
// String decisionContent2 = (String)o.get("decisionContent2");//决定内容2
// String reasons = (String)o.get("reasons");//查看事由
// String decisionDate = (String)o.get("decisionDate");//决定日期
// String publishValidityPeriod = (String)o.get("publishValidityPeriod");//发布有效期
// add.set("seq",i);
// add.set("qeug_integritysubject",integritySubject);
// add.set("qeug_crediticon",creditIcon);
// add.set("qeug_decisioncontent",decisionContent);
// add.set("qeug_decisioncontent2",decisionContent2);
// add.set("qeug_reasons",reasons);
// add.set("qeug_decisiondate",decisionDate);
// add.set("qeug_publishvalidityperio",publishValidityPeriod);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
// /**
// * 15.企业三要素验证_1074 ?code=91110000802100433B&name=北京百度网讯科技有限公司&legalPersonName=梁志祥
// */
// String code = dynamicObject.getString("societycreditcode");//统一社会信用代码
// String name = dynamicObject.getString("name");//供应商名字
// String legalPersonName =dynamicObject.getString("artificialperson");//法人
// String tyc_Verify = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Verify
// + "?code="+code+"&name="+name+"&legalPersonName="+legalPersonName,tyc_Test_keyword,"企业三要素验证_1074");
// JSONObject tyc_Verify_results = JSONObject.parseObject(tyc_Verify);
// if (null != tyc_Verify_results) {
// JSONObject tyc_Verify_result = (JSONObject)tyc_Verify_results.get("result");
// String result = "";//三要素验证结果
// if (null != tyc_Verify_result) {
// Integer o = (Integer)tyc_Verify_result.get("result");//验证结果0-验证失败1-验证成功2-输入企业名疑似曾用名其他两要素一致
// switch (o){
// case 0:
// result = "验证失败";
// break;
// case 1:
// result = "验证成功";
// break;
// case 2:
// result = "输入企业名疑似曾用名,其他两要素一致";
// break;
// default:
// break;
// }
// }
// dynamicObject.set("qeug_verify",result);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
//
//
// /**
// * 16.行政处罚_1124 ?pageSize=20&keyword=北京百度网讯科技有限公司&pageNum=1 qeug_punishmentinfoentry
// */
// DynamicObjectCollection qeugPunishmentinfoentry = dynamicObject.getDynamicObjectCollection("qeug_punishmentinfoentry");
// qeugPunishmentinfoentry.clear();
// String tyc_PunishmentInfo = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_PunishmentInfo
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"行政处罚_1124");
// JSONObject tyc_PunishmentInfo_results = JSONObject.parseObject(tyc_PunishmentInfo);
// if (null != tyc_PunishmentInfo_results) {
// JSONObject tyc_PunishmentInfo_result = (JSONObject)tyc_PunishmentInfo_results.get("result");
// if (null != tyc_PunishmentInfo_result) {
// JSONArray items = tyc_PunishmentInfo_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeugPunishmentinfoentry.addNew();
// JSONObject o = (JSONObject)items.get(i);
// String decisionDate = (String)o.get("decisionDate");//处罚日期
// String punishNumber = (String)o.get("punishNumber");//决定文书号
// String reason = (String)o.get("punishNumber");//处罚事由/违法行为类型
// String content = (String)o.get("content");//处罚结果/内容
// String departmentName = (String)o.get("departmentName");//处罚单位
// String legalPersonName1 = (String)o.get("legalPersonName");//法定代表人
// String punishStatus = (String)o.get("punishStatus");//处罚状态
// String punishName = (String)o.get("punishName");//处罚名称
// add.set("seq",i);
// add.set("qeug_decisiondatepun",decisionDate);
// add.set("qeug_punishnumber",punishNumber);
// add.set("qeug_punishnumberpun",reason);
// add.set("qeug_content",content);
// add.set("qeug_departmentname",departmentName);
// add.set("qeug_legalpersonname",legalPersonName1);
// add.set("qeug_punishstatus",punishStatus);
// add.set("qeug_punishname",punishName);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
//
// /**
// * 17.严重违法_846 ?pageSize=20&keyword=武陟县佳翔汽车服务有限公司&pageNum=1
// */
// DynamicObjectCollection qeugIllegalinfoentry = dynamicObject.getDynamicObjectCollection("qeug_illegalinfoentry");
// qeugIllegalinfoentry.clear();
// String tyc_Illegalinfo = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Illegalinfo
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"严重违法_846");
// JSONObject tyc_Illegalinfo_results = JSONObject.parseObject(tyc_Illegalinfo);
// if (null != tyc_Illegalinfo_results) {
// JSONObject tyc_Illegalinfo_result = (JSONObject)tyc_Illegalinfo_results.get("result");
// if (null != tyc_Illegalinfo_result) {
// JSONArray items = tyc_Illegalinfo_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeugIllegalinfoentry.addNew();
// JSONObject o = (JSONObject) items.get(i);
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// String removedate = "";//移除日期
// Long removeDate = (Long) o.get("removeDate");//移除日期
// if (null != removeDate) {
// removedate = sdf.format(new Date(removeDate));
// }
// String putReason = (String) o.get("putReason");//列入原因
// String putDepartment = (String) o.get("putDepartment");//决定列入部门(作出决定机关)
// String removeDepartment = (String) o.get("removeDepartment");//决定移除部门
// String removeReason = (String) o.get("removeReason");//移除原因
// String putDate = (String) o.get("putDate");//列入日期
// add.set("seq", i);
// add.set("qeug_removedateil", removedate);
// add.set("qeug_putreasonil", putReason);
// add.set("qeug_putdepartment", putDepartment);
// add.set("qeug_removedepartment", removeDepartment);
// add.set("qeug_removereasonil", removeReason);
// add.set("qeug_putdateil", sdf.format(new Date(putDate)));
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
// /**
// * 18.法律诉讼_1114 ?keyword=北京百度网讯科技有限公司&pageNum=1&pageSize=20
// */
// DynamicObjectCollection qeugLawsuitentry = dynamicObject.getDynamicObjectCollection("qeug_lawsuitentry");
// qeugLawsuitentry.clear();
// String tyc_LawSuit = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_LawSuit
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"法律诉讼_1114");
// JSONObject tyc_LawSuit_results = JSONObject.parseObject(tyc_LawSuit);
// if (null != tyc_LawSuit_results) {
// JSONObject tyc_LawSuit_result = (JSONObject)tyc_LawSuit_results.get("result");
// if (null != tyc_LawSuit_result) {
// JSONArray items = tyc_LawSuit_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeugLawsuitentry.addNew();
// JSONObject o = (JSONObject) items.get(i);
// String docType = (String) o.get("docType");//文书类型
// String title = (String) o.get("title");//案件名称
// String court = (String) o.get("court");//审理法院
// String judgeTime = (String) o.get("judgeTime");//裁判日期
// String caseNo = (String) o.get("caseNo");//案号
// String caseType = (String) o.get("caseType");//案件类型
// String caseReason = (String) o.get("caseReason");//案由
// add.set("seq", i);
// add.set("qeug_doctype", docType);
// add.set("qeug_title", title);
// add.set("qeug_court", court);
// add.set("qeug_judgetime", judgeTime);
// add.set("qeug_caseno", caseNo);
// add.set("qeug_casetype", caseType);
// add.set("qeug_casereason", caseReason);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
//
//
// /**
// * 19.失信人_843 ?keyword=恩施鑫地源农业开发有限公司&pageNum=1&pageSize=1
// */
// DynamicObjectCollection qeugJrDishonestentry = dynamicObject.getDynamicObjectCollection("qeug_jr_dishonestentry");
// qeugJrDishonestentry.clear();
// String tyc_Jr_Dishonest = TycUtils.executeGet(TycUtils.tyc_Token, TycUtils.tyc_Jr_Dishonest
// + "?keyword=" + tyc_Test_keyword,tyc_Test_keyword,"失信人_843");
// JSONObject tyc_Jr_Dishonest_results = JSONObject.parseObject(tyc_Jr_Dishonest);
// if (null != tyc_Jr_Dishonest_results) {
// JSONObject tyc_Jr_Dishonest_result = (JSONObject)tyc_Jr_Dishonest_results.get("result");
// if (null != tyc_Jr_Dishonest_result) {
// JSONArray items = tyc_Jr_Dishonest_result.getJSONArray("items");
// for (int i = 0; i < items.size(); i++) {
// DynamicObject add = qeugJrDishonestentry.addNew();
// JSONObject o = (JSONObject) items.get(i);
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// String iname = (String) o.get("iname");//失信人名称
// String disrupttypename = (String) o.get("disrupttypename");//失信被执行人行为具体情形
// String casecode = (String) o.get("casecode");//案号
// String performance = (String) o.get("performance");//履行情况
// String regDate = "";//立案日期
// Long regdate = (Long) o.get("regdate");//立案时间
// if (null != regdate) {
// regDate = sdf.format(new Date(regdate));
// }
// String publishDate = "";//发布日期
// Long publishdate = (Long) o.get("publishdate");//发布时间
// if (null != publishdate) {
// publishDate = sdf.format(new Date(publishdate));
// }
// String gistunit = (String) o.get("gistunit");//做出执行的依据单位
//
// add.set("seq", i);
// add.set("qeug_iname", iname);
// add.set("qeug_disrupttypename", disrupttypename);
// add.set("qeug_casecode", casecode);
// add.set("qeug_performance", performance);
// add.set("qeug_regdate", regDate);
// add.set("qeug_publishdate", publishDate);
// add.set("qeug_gistunit", gistunit);
// SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
// }
// }
// }
// } catch (Exception ex) {
// DobeDWUtils.saveLog(tyc_Test_keyword,
// "天眼查",tyc_Test_keyword, ex.getMessage()+"\n"+ ex.getStackTrace()[0].getClassName()+"\n"+
// ex.getStackTrace()[0].getMethodName()+"\n"+ ex.getStackTrace()[0].getLineNumber(),
// false,"query_tyc");
// }
// }
// }
}
@Override
public void afterExecuteOperationTransaction(AfterOperationArgs e){

View File

@ -41,8 +41,8 @@ import java.util.*;
public class TycUtils {
//天眼查接口正式_token
// public static final String tyc_Token = "29493db8-db63-4efe-8530-7b87e0b4b87a";
public static final String tyc_Token = "6d62098a-b59a-43a0-8dd6-ec24a647efc5";//500次
public static final String tyc_Token = "29493db8-db63-4efe-8530-7b87e0b4b87a";//24000元
// public static final String tyc_Token = "6d62098a-b59a-43a0-8dd6-ec24a647efc5";//500次
//天眼查API_企业基本信息(含主要人员)_819
public static final String tyc_Baseinfo = "http://open.api.tianyancha.com/services/open/ic/baseinfoV3/2.0";
//天眼查API_疑似实际控制人_1123