Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
2ce64503
Commit
2ce64503
authored
Jun 25, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
78d8afe4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
28 deletions
+23
-28
brg-queue-center/app/base/db/consumer/publicLogs/publicLogsConsumer.js
+0
-6
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
+21
-21
brg-queue-center/app/base/utils/esUtils.js
+1
-1
brg-queue-center/readme.txt
+1
-0
No files found.
brg-queue-center/app/base/db/consumer/publicLogs/publicLogsConsumer.js
View file @
2ce64503
...
@@ -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
;
}
}
...
...
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
View file @
2ce64503
...
@@ -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
)
{
...
...
brg-queue-center/app/base/utils/esUtils.js
View file @
2ce64503
...
@@ -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
.
i
dentifyCode
?
"-"
+
actionBody
.
identifyCod
e
:
""
);
esIndexName
=
queuedName
+
(
actionBody
.
i
ndexName
?
"-"
+
actionBody
.
indexNam
e
:
""
);
}
}
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
;
...
...
brg-queue-center/readme.txt
View file @
2ce64503
...
@@ -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 日志消息描述
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment