Commit 2ce64503 by 宋毅

tj

parent 78d8afe4
...@@ -12,12 +12,6 @@ class PublicLogsConsumer extends ConsumerBase { ...@@ -12,12 +12,6 @@ class PublicLogsConsumer extends ConsumerBase {
console.log("前置操作......", this.serviceName); console.log("前置操作......", this.serviceName);
} }
async subDoConsumer(queuedName, actionBody) { async subDoConsumer(queuedName, actionBody) {
var params = {
opTitle: actionBody.opTitle,
identifyCode: actionBody.identifyCode,
messageBody: actionBody.messageBody,
requestId: actionBody.requestId
}
var execResult = await this.esUtils.addEsLogs(queuedName, actionBody);; var execResult = await this.esUtils.addEsLogs(queuedName, actionBody);;
return execResult; return execResult;
} }
......
...@@ -189,27 +189,27 @@ class UtilsIcService extends AppServiceBase { ...@@ -189,27 +189,27 @@ class UtilsIcService extends AppServiceBase {
var fromTime = resultData.data.hits.hits[0]._source.from_time ? moment(resultData.data.hits.hits[0]._source.from_time * 1000).format("YYYY-MM-DD") : "";//营业期限开始日期 var fromTime = resultData.data.hits.hits[0]._source.from_time ? moment(resultData.data.hits.hits[0]._source.from_time * 1000).format("YYYY-MM-DD") : "";//营业期限开始日期
var toTime = resultData.data.hits.hits[0]._source.to_time ? moment(resultData.data.hits.hits[0]._source.to_time * 1000).format("YYYY-MM-DD") : "";//营业期限结束日期 var toTime = resultData.data.hits.hits[0]._source.to_time ? moment(resultData.data.hits.hits[0]._source.to_time * 1000).format("YYYY-MM-DD") : "";//营业期限结束日期
var item = { var item = {
"companyName": resultData.data.hits.hits[0]._source.company_name,//公司名称 companyName: resultData.data.hits.hits[0]._source.company_name,//公司名称
"companyOrgType": resultData.data.hits.hits[0]._source.company_org_type || "",//公司类型 companyOrgType: resultData.data.hits.hits[0]._source.company_org_type || "",//公司类型
"creditCode": resultData.data.hits.hits[0]._source.credit_code || "",//统一社会信用代码 creditCode: resultData.data.hits.hits[0]._source.credit_code || "",//统一社会信用代码
"legalPerson": resultData.data.hits.hits[0]._source.legal_person,//法人姓名 legalPerson: resultData.data.hits.hits[0]._source.legal_person,//法人姓名
"fromTime": fromTime,//营业期限开始日期 fromTime: fromTime,//营业期限开始日期
"toTime": toTime,//营业期限结束日期 toTime: toTime,//营业期限结束日期
"operatingPeriod ": (fromTime || "---") + " 至 " + (toTime || "---"), operatingPeriod: (fromTime || "---") + " 至 " + (toTime || "---"),
"estiblishTime": resultData.data.hits.hits[0]._source.estiblish_time ? moment(resultData.data.hits.hits[0]._source.estiblish_time * 1000).format("YYYY-MM-DD") : "",//成立时间 estiblishTime: resultData.data.hits.hits[0]._source.estiblish_time ? moment(resultData.data.hits.hits[0]._source.estiblish_time * 1000).format("YYYY-MM-DD") : "",//成立时间
"regStatus": resultData.data.hits.hits[0]._source.reg_status || "",//公司状态 regStatus: resultData.data.hits.hits[0]._source.reg_status || "",//公司状态
"regNumber": resultData.data.hits.hits[0]._source.reg_number || "",//注册号 regNumber: resultData.data.hits.hits[0]._source.reg_number || "",//注册号
"orgNumber": resultData.data.hits.hits[0]._source.org_number || "",//组织机构代码 orgNumber: resultData.data.hits.hits[0]._source.org_number || "",//组织机构代码
"regLocation": resultData.data.hits.hits[0]._source.reg_location || "",//公司地址 regLocation: resultData.data.hits.hits[0]._source.reg_location || "",//公司地址
"regCapital": resultData.data.hits.hits[0]._source.reg_capital || "",//注册资本 regCapital: resultData.data.hits.hits[0]._source.reg_capital || "",//注册资本
"regUnit": resultData.data.hits.hits[0]._source.reg_unit || "",//资本单位 regUnit: resultData.data.hits.hits[0]._source.reg_unit || "",//资本单位
"businessScope": resultData.data.hits.hits[0]._source.business_scope || "",//公司经营范围 businessScope: resultData.data.hits.hits[0]._source.business_scope || "",//公司经营范围
"regInstitute": resultData.data.hits.hits[0]._source.reg_institute || "",//登记机关 regInstitute: resultData.data.hits.hits[0]._source.reg_institute || "",//登记机关
"companyProvince": resultData.data.hits.hits[0]._source.company_province || "",//公司省份 companyProvince: resultData.data.hits.hits[0]._source.company_province || "",//公司省份
"companyCity": resultData.data.hits.hits[0]._source.company_city || "",//公司二级市 companyCity: resultData.data.hits.hits[0]._source.company_city || "",//公司二级市
"companyCate1": resultData.data.hits.hits[0]._source.company_cate_1 || "",//行业分类一级分类 companyCate1: resultData.data.hits.hits[0]._source.company_cate_1 || "",//行业分类一级分类
"companyCate2": resultData.data.hits.hits[0]._source.company_cate_2 || "",//行业分类二级分类 companyCate2: resultData.data.hits.hits[0]._source.company_cate_2 || "",//行业分类二级分类
"companyCate3": resultData.data.hits.hits[0]._source.company_cate_3 || ""//行业分类三级分类 companyCate3: resultData.data.hits.hits[0]._source.company_cate_3 || ""//行业分类三级分类
}; };
return system.getResultSuccess(item); return system.getResultSuccess(item);
} catch (error) { } catch (error) {
......
...@@ -17,7 +17,7 @@ class EsUtils { ...@@ -17,7 +17,7 @@ class EsUtils {
async addEsLogs(queuedName, actionBody) { async addEsLogs(queuedName, actionBody) {
var esIndexName = queuedName; var esIndexName = queuedName;
if (["SYTXPUBLIC-MSGQ-request", "SYTXPUBLIC-MSGQ-error"].indexOf(esIndexName) < 0) { if (["SYTXPUBLIC-MSGQ-request", "SYTXPUBLIC-MSGQ-error"].indexOf(esIndexName) < 0) {
esIndexName = queuedName + (actionBody.identifyCode ? "-" + actionBody.identifyCode : ""); esIndexName = queuedName + (actionBody.indexName ? "-" + actionBody.indexName : "");
} }
esIndexName = esIndexName.toLocaleLowerCase() + "/_doc?pretty"; esIndexName = esIndexName.toLocaleLowerCase() + "/_doc?pretty";
actionBody.resultInfo = typeof actionBody.resultInfo === 'object' ? JSON.stringify(actionBody.resultInfo) : actionBody.resultInfo; actionBody.resultInfo = typeof actionBody.resultInfo === 'object' ? JSON.stringify(actionBody.resultInfo) : actionBody.resultInfo;
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
"actionBody": { "actionBody": {
"opTitle": "",// N 操作的业务标题 "opTitle": "",// N 操作的业务标题
"identifyCode": "logs001",// Y 操作的业务标识 "identifyCode": "logs001",// Y 操作的业务标识
"indexName":"brg-user-center",// Y es索引值,同一个项目用一个值
"messageBody": {//日志的描述信息 "messageBody": {//日志的描述信息
"opUrl": "http://192.168.1.189:4012/api/test/testApi/springBoard",// N 操作的业务Url "opUrl": "http://192.168.1.189:4012/api/test/testApi/springBoard",// N 操作的业务Url
"message": ""// Y 日志消息描述 "message": ""// Y 日志消息描述
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment