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
c4cdecf4
Commit
c4cdecf4
authored
Jun 26, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
25499944
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
90 deletions
+17
-90
brg-queue-center/app/base/db/consumer.base.js
+4
-1
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
+3
-64
brg-queue-center/app/base/utils/redisClient.js
+1
-1
brg-queue-center/readme.txt
+9
-24
No files found.
brg-queue-center/app/base/db/consumer.base.js
View file @
c4cdecf4
...
@@ -46,7 +46,7 @@ class ConsumerBase {
...
@@ -46,7 +46,7 @@ class ConsumerBase {
const
notifyQueuedName
=
"NOTIFY-SYTXPUBLIC-MSGQ"
;
const
notifyQueuedName
=
"NOTIFY-SYTXPUBLIC-MSGQ"
;
this
.
subBeforeConsumer
(
queuedName
,
actionBody
);
this
.
subBeforeConsumer
(
queuedName
,
actionBody
);
actionBody
.
requestId
=
await
this
.
getBusUid
(
"PUB-"
);
actionBody
.
requestId
=
await
this
.
getBusUid
(
"PUB-"
);
if
(
"SYTXFAIL-SYTXPUBLIC-MSGQ"
!=
queuedName
)
{
if
(
"SYTXFAIL-SYTXPUBLIC-MSGQ"
!=
queuedName
&&
"LOGSFAIL-SYTXPUBLIC-MSGQ"
!=
queuedName
)
{
execResult
=
await
this
.
subDoConsumer
(
queuedName
,
actionBody
);
execResult
=
await
this
.
subDoConsumer
(
queuedName
,
actionBody
);
if
(
notifyQueuedName
!=
queuedName
)
{
if
(
notifyQueuedName
!=
queuedName
)
{
actionBody
.
resultInfo
=
execResult
;
actionBody
.
resultInfo
=
execResult
;
...
@@ -65,6 +65,9 @@ class ConsumerBase {
...
@@ -65,6 +65,9 @@ class ConsumerBase {
return
;
return
;
}
}
var
failQueuedName
=
"SYTXFAIL-SYTXPUBLIC-MSGQ"
;
var
failQueuedName
=
"SYTXFAIL-SYTXPUBLIC-MSGQ"
;
if
(
"LOGS-SYTXPUBLIC-MSGQ"
===
queuedName
)
{
failQueuedName
=
"LOGSFAIL-SYTXPUBLIC-MSGQ"
;
}
actionBody
.
queuedName
=
queuedName
;
actionBody
.
queuedName
=
queuedName
;
actionBody
.
counter
=
actionBody
.
counter
?
actionBody
.
counter
:
1
;
actionBody
.
counter
=
actionBody
.
counter
?
actionBody
.
counter
:
1
;
await
this
.
redisClient
.
lpushData
(
failQueuedName
,
actionBody
);
await
this
.
redisClient
.
lpushData
(
failQueuedName
,
actionBody
);
...
...
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
View file @
c4cdecf4
...
@@ -26,7 +26,7 @@ class UtilsIcService extends AppServiceBase {
...
@@ -26,7 +26,7 @@ class UtilsIcService extends AppServiceBase {
from
=
0
;
from
=
0
;
}
}
var
esIndexName
=
"tx_ic_bigdata_business_index/_search"
;
var
esIndexName
=
"tx_ic_bigdata_business_
heming_
index/_search"
;
var
params
=
{
var
params
=
{
"query"
:
{
"query"
:
{
"bool"
:
{
"bool"
:
{
...
@@ -44,31 +44,7 @@ class UtilsIcService extends AppServiceBase {
...
@@ -44,31 +44,7 @@ class UtilsIcService extends AppServiceBase {
"size"
:
pageSize
,
"size"
:
pageSize
,
"_source"
:
[
"_source"
:
[
"company_name"
//公司名称
"company_name"
//公司名称
// "company_org_type",//公司类型
// "credit_code",//统一社会信用代码
// "legal_person",//法人姓名
// "from_time",//营业期限开始日期
// "to_time",//营业期限结束日期
// "estiblish_time",//成立时间
// "reg_status",//公司状态
// "reg_number",//注册号
// "org_number",//组织机构代码
// "reg_location",//公司地址
// "reg_capital",//注册资本
// "business_scope",//公司经营范围
// "reg_institute",//登记机关
// "company_province",//公司省份
// "company_city",//公司二级市
// "company_cate_1",//行业分类一级分类
// "company_cate_2",//行业分类二级分类
// "company_cate_3"//行业分类三级分类
]
]
// ,
// "sort": [
// {
// "reg_capital": "desc"
// }
// ]
}
}
...
@@ -91,25 +67,6 @@ class UtilsIcService extends AppServiceBase {
...
@@ -91,25 +67,6 @@ class UtilsIcService extends AppServiceBase {
resultData
.
data
.
hits
.
hits
.
forEach
(
function
(
c
)
{
resultData
.
data
.
hits
.
hits
.
forEach
(
function
(
c
)
{
var
source
=
{
var
source
=
{
"companyName"
:
c
.
_source
.
company_name
//公司名称
"companyName"
:
c
.
_source
.
company_name
//公司名称
// "companyOrgType": c._source.company_org_type || "",//公司类型
// "creditCode": c._source.credit_code || "",//统一社会信用代码
// "legalPerson": c._source.legal_person,//法人姓名
// "fromTime": c._source.from_time ? moment(c._source.from_time * 1000).format("YYYY-MM-DD") : "",//营业期限开始日期
// "toTime": c._source.to_time ? moment(c._source.to_time * 1000).format("YYYY-MM-DD") : "",//营业期限结束日期
// "estiblishTime": c._source.estiblish_time ? moment(c._source.estiblish_time * 1000).format("YYYY-MM-DD") : "",//成立时间
// "regStatus": c._source.reg_status || "",//公司状态
// "regNumber": c._source.reg_number || "",//注册号
// "orgNumber": c._source.org_number || "",//组织机构代码
// "regLocation": c._source.reg_location || "",//公司地址
// "regCapital": c._source.reg_capital || "",//注册资本
// "businessScope": c._source.business_scope || "",//公司经营范围
// "regInstitute": c._source.reg_institute || "",//登记机关
// "companyProvince": c._source.company_province || "",//公司省份
// "companyCity": c._source.company_city || "",//公司二级市
// "companyCate1": c._source.company_cate_1 || "",//行业分类一级分类
// "companyCate2": c._source.company_cate_2 || "",//行业分类二级分类
// "companyCate3": c._source.company_cate_3 || ""//行业分类三级分类
};
};
sources
.
push
(
source
);
sources
.
push
(
source
);
});
});
...
@@ -154,19 +111,10 @@ class UtilsIcService extends AppServiceBase {
...
@@ -154,19 +111,10 @@ class UtilsIcService extends AppServiceBase {
"from_time"
,
//营业期限开始日期
"from_time"
,
//营业期限开始日期
"to_time"
,
//营业期限结束日期
"to_time"
,
//营业期限结束日期
"estiblish_time"
,
//成立时间
"estiblish_time"
,
//成立时间
"reg_status"
,
//公司状态
"reg_number"
,
//注册号
"org_number"
,
//组织机构代码
"reg_location"
,
//公司地址
"reg_location"
,
//公司地址
"reg_capital"
,
//注册资本
"reg_capital"
,
//注册资本
"reg_unit"
,
//资本单位
"reg_unit"
,
//资本单位
"business_scope"
,
//公司经营范围
"business_scope"
//公司经营范围
"reg_institute"
,
//登记机关
"company_province"
,
//公司省份
"company_city"
,
//公司二级市
"company_cate_1"
,
//行业分类一级分类
"company_cate_2"
,
//行业分类二级分类
"company_cate_3"
//行业分类三级分类
]
]
// ,
// ,
// "sort": [
// "sort": [
...
@@ -197,19 +145,10 @@ class UtilsIcService extends AppServiceBase {
...
@@ -197,19 +145,10 @@ class UtilsIcService extends AppServiceBase {
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
||
""
,
//公司状态
regNumber
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
reg_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
||
""
,
//登记机关
companyProvince
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
company_province
||
""
,
//公司省份
companyCity
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
company_city
||
""
,
//公司二级市
companyCate1
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
company_cate_1
||
""
,
//行业分类一级分类
companyCate2
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
company_cate_2
||
""
,
//行业分类二级分类
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/redisClient.js
View file @
c4cdecf4
...
@@ -28,7 +28,7 @@ class RedisClient {
...
@@ -28,7 +28,7 @@ class RedisClient {
if
(
!
opResult
||
opResult
.
length
==
0
)
{
if
(
!
opResult
||
opResult
.
length
==
0
)
{
return
;
return
;
}
}
if
(
"SYTXFAIL-SYTXPUBLIC-MSGQ"
!=
opResult
[
0
])
{
if
(
"SYTXFAIL-SYTXPUBLIC-MSGQ"
!=
opResult
[
0
]
&&
"LOGSFAIL-SYTXPUBLIC-MSGQ"
!=
opResult
[
0
]
)
{
return
;
return
;
}
}
var
lock
=
await
self
.
enter
(
opResult
[
1
]);
var
lock
=
await
self
.
enter
(
opResult
[
1
]);
...
...
brg-queue-center/readme.txt
View file @
c4cdecf4
...
@@ -7,13 +7,16 @@
...
@@ -7,13 +7,16 @@
公共业务失败配置:
公共业务失败配置:
消费者名称(CONSUMER_NAME):publicFail.publicFailConsumer
消费者名称(CONSUMER_NAME):publicFail.publicFailConsumer
队列名称 (QUEUED_NAME):SYTXFAIL-SYTXPUBLIC-MSGQ
队列名称 (QUEUED_NAME):SYTXFAIL-SYTXPUBLIC-MSGQ
公共通知配置:
通知者名称(CONSUMER_NAME):publicNotify.publicNotifyConsumer
队列名称 (QUEUED_NAME):NOTIFY-SYTXPUBLIC-MSGQ
公共日志配置:
公共日志配置:
消费者名称(CONSUMER_NAME):publicLogs.publicLogsConsumer
消费者名称(CONSUMER_NAME):publicLogs.publicLogsConsumer
队列名称 (QUEUED_NAME):LOGS-SYTXPUBLIC-MSGQ
队列名称 (QUEUED_NAME):LOGS-SYTXPUBLIC-MSGQ
公共
通知
配置:
公共
日志失败
配置:
通知者名称(CONSUMER_NAME):publicNotify.publicNotify
Consumer
消费者名称(CONSUMER_NAME):publicFail.publicFail
Consumer
队列名称 (QUEUED_NAME):
NOTIFY-SYTXPUBLIC-MSGQ
队列名称 (QUEUED_NAME):
LOGSFAIL-SYTXPUBLIC-MSGQ
二.公共队列接口
二.公共队列接口
1.生产业务数据供消费者消费
1.生产业务数据供消费者消费
...
@@ -183,19 +186,10 @@
...
@@ -183,19 +186,10 @@
"toTime": "",
"toTime": "",
"operatingPeriod ": "2013-11-22 至 ---",
"operatingPeriod ": "2013-11-22 至 ---",
"estiblishTime": "2013-11-22",
"estiblishTime": "2013-11-22",
"regStatus": "存续",
"regNumber": "610100100600621",
"orgNumber": "081020088",
"regLocation": "陕西省西安市未央区六村堡街道(北徐寨)石化大道88号",
"regLocation": "陕西省西安市未央区六村堡街道(北徐寨)石化大道88号",
"regCapital": "108.000",
"regCapital": "108.000",
"regUnit": "万人民币",
"regUnit": "万人民币",
"businessScope": "钢结构、彩钢板、彩钢夹心板、铝型材的设计、加工、销售、安装;五金交电、电线电缆、金属材料、建筑材料的销售。(依法须经批准的项目,经相关部门批准后方可开展经营活动)",
"businessScope": "钢结构、彩钢板、彩钢夹心板、铝型材的设计、加工、销售、安装;五金交电、电线电缆、金属材料、建筑材料的销售。(依法须经批准的项目,经相关部门批准后方可开展经营活动)"
"regInstitute": "西安市工商行政管理局灞桥分局",
"companyProvince": "陕西",
"companyCity": "西安市",
"companyCate1": "批发和零售业",
"companyCate2": "零售业",
"companyCate3": "货摊、无店铺及其他零售业"
},
},
"requestId": "SCZ202006251651HBUiV"
"requestId": "SCZ202006251651HBUiV"
}
}
...
@@ -210,16 +204,7 @@
...
@@ -210,16 +204,7 @@
"toTime": "2018-03-19",//营业期限结束日期
"toTime": "2018-03-19",//营业期限结束日期
"operatingPeriod ": "2008-03-20 至 2018-03-19",//营业期限范围
"operatingPeriod ": "2008-03-20 至 2018-03-19",//营业期限范围
"estiblishTime": "2008-03-20",//成立时间
"estiblishTime": "2008-03-20",//成立时间
"regStatus": "注销",//公司状态
"regNumber": "310228001075786",//注册号
"orgNumber": " ",//组织机构代码
"regLocation": "上海市金山区卫昌路229号2幢220室",//公司地址
"regLocation": "上海市金山区卫昌路229号2幢220室",//公司地址
"regCapital": "3.000",//注册资本
"regCapital": "3.000",//注册资本
"regUnit": "万人民币",//资本单位
"regUnit": "万人民币",//资本单位
"businessScope": "化妆品,日用百货,服装鞋帽,健身器材销售,投资咨询、商务咨询(除经纪)(涉及行政许可的凭许可证经营)。",//公司经营范围
"businessScope": "化妆品,日用百货,服装鞋帽,健身器材销售,投资咨询、商务咨询(除经纪)(涉及行政许可的凭许可证经营)。",//公司经营范围
"regInstitute": "金山区市场监管局",//登记机关
\ No newline at end of file
"companyProvince": "上海",//公司省份
"companyCity": "金山区",//公司二级市
"companyCate1": "批发和零售业",//行业分类一级分类
"companyCate2": "批发业",//行业分类二级分类
"companyCate3": "纺织、服装及家庭用品批发"//行业分类三级分类
\ No newline at end of file
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