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
78d8afe4
Commit
78d8afe4
authored
Jun 25, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
c2db161d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
27 deletions
+46
-27
brg-queue-center/app/base/api/api.base.js
+2
-2
brg-queue-center/app/base/api/impl/icAction/icQuery.js
+4
-0
brg-queue-center/app/base/api/impl/queueAction/producer.js
+3
-0
brg-queue-center/app/base/api/impl/test/testData.js
+0
-0
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
+7
-2
brg-queue-center/app/base/utils/esUtils.js
+4
-1
brg-queue-center/app/config/settings.js
+2
-2
brg-queue-center/readme.txt
+24
-20
No files found.
brg-queue-center/app/base/api/api.base.js
View file @
78d8afe4
...
...
@@ -27,7 +27,7 @@ class APIBase {
pobj
.
actionBody
.
resultInfo
=
result
;
pobj
.
actionBody
.
requestId
=
result
.
requestId
;
pobj
.
actionBody
.
opTitle
=
"reqPath:"
+
req
.
path
;
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"
api-req
"
,
pobj
.
actionBody
);
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"
-request
"
,
pobj
.
actionBody
);
}
return
result
;
}
catch
(
error
)
{
...
...
@@ -37,7 +37,7 @@ class APIBase {
pobj
.
actionBody
.
requestId
=
await
this
.
getBusUid
(
"err"
);
pobj
.
actionBody
.
errorInfo
=
stackStr
;
pobj
.
actionBody
.
opTitle
=
",reqPath:"
+
req
.
path
;
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"
apidoexec
-error"
,
pobj
.
actionBody
);
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"-error"
,
pobj
.
actionBody
);
return
rtnerror
;
}
}
...
...
brg-queue-center/app/base/api/impl/icAction/icQuery.js
View file @
78d8afe4
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
IcQueryAPI
extends
APIBase
{
constructor
()
{
...
...
@@ -19,6 +20,9 @@ class IcQueryAPI extends APIBase {
return
result
;
}
async
opActionType
(
pobj
,
actionType
,
req
)
{
if
(
settings
.
queuedName
!=
"SYTXPUBLIC-MSGQ"
)
{
return
system
.
getResult
(
null
,
"请求地址有误!"
);
}
var
opResult
=
null
;
switch
(
actionType
)
{
case
"getListByLikeCompanyName"
:
...
...
brg-queue-center/app/base/api/impl/queueAction/producer.js
View file @
78d8afe4
...
...
@@ -23,6 +23,9 @@ class ProducerAPI extends APIBase {
var
opResult
=
null
;
switch
(
actionType
)
{
case
"produceData"
:
if
(
settings
.
queuedName
!=
"SYTXPUBLIC-MSGQ"
)
{
return
system
.
getResult
(
null
,
"请求地址有误!"
);
}
opResult
=
await
this
.
utilsProduceSve
.
produceData
(
pobj
,
req
);
break
;
case
"produceLogsData"
:
...
...
brg-queue-center/app/base/api/impl/test/testData.js
deleted
100755 → 0
View file @
c2db161d
This diff is collapsed.
Click to expand it.
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
View file @
78d8afe4
...
...
@@ -159,6 +159,7 @@ class UtilsIcService extends AppServiceBase {
"org_number"
,
//组织机构代码
"reg_location"
,
//公司地址
"reg_capital"
,
//注册资本
"reg_unit"
,
//资本单位
"business_scope"
,
//公司经营范围
"reg_institute"
,
//登记机关
"company_province"
,
//公司省份
...
...
@@ -185,19 +186,23 @@ class UtilsIcService extends AppServiceBase {
if
(
!
resultData
.
data
.
hits
.
hits
||
resultData
.
data
.
hits
.
hits
.
length
===
0
)
{
return
system
.
getResult
(
null
,
"data is empty!"
);
}
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
item
=
{
"companyName"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
company_name
,
//公司名称
"companyOrgType"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
company_org_type
||
""
,
//公司类型
"creditCode"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
credit_code
||
""
,
//统一社会信用代码
"legalPerson"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
legal_person
,
//法人姓名
"fromTime"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
from_time
?
moment
(
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
from_time
*
1000
).
format
(
"YYYY-MM-DD"
)
:
""
,
//营业期限开始日期
"toTime"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
to_time
?
moment
(
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
to_time
*
1000
).
format
(
"YYYY-MM-DD"
)
:
""
,
//营业期限结束日期
"fromTime"
:
fromTime
,
//营业期限开始日期
"toTime"
:
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"
)
:
""
,
//成立时间
"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
||
""
,
//公司地址
"regCapital"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
reg_capital
||
""
,
//注册资本
"regUnit"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
reg_unit
||
""
,
//资本单位
"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
||
""
,
//公司省份
...
...
brg-queue-center/app/base/utils/esUtils.js
View file @
78d8afe4
...
...
@@ -15,7 +15,10 @@ class EsUtils {
* @param {*} actionBody 日志信息
*/
async
addEsLogs
(
queuedName
,
actionBody
)
{
var
esIndexName
=
queuedName
+
(
actionBody
.
identifyCode
?
"-"
+
actionBody
.
identifyCode
:
""
);
var
esIndexName
=
queuedName
;
if
([
"SYTXPUBLIC-MSGQ-request"
,
"SYTXPUBLIC-MSGQ-error"
].
indexOf
(
esIndexName
)
<
0
)
{
esIndexName
=
queuedName
+
(
actionBody
.
identifyCode
?
"-"
+
actionBody
.
identifyCode
:
""
);
}
esIndexName
=
esIndexName
.
toLocaleLowerCase
()
+
"/_doc?pretty"
;
actionBody
.
resultInfo
=
typeof
actionBody
.
resultInfo
===
'object'
?
JSON
.
stringify
(
actionBody
.
resultInfo
)
:
actionBody
.
resultInfo
;
actionBody
.
errorInfo
=
typeof
actionBody
.
errorInfo
===
'object'
?
JSON
.
stringify
(
actionBody
.
errorInfo
)
:
actionBody
.
errorInfo
;
...
...
brg-queue-center/app/config/settings.js
View file @
78d8afe4
...
...
@@ -10,8 +10,8 @@ var ENVINPUT = {
REDIS_DB
:
process
.
env
.
QUEUE_REDIS_DB
,
DB_NAME
:
process
.
env
.
QUEUE_DB_NAME
,
APP_ENV
:
process
.
env
.
APP_ENV
?
process
.
env
.
APP_ENV
:
"test"
,
//运行环境
CONSUMER_NAME
:
process
.
env
.
CONSUMER_NAME
||
"public
Logs.publicLogs
Consumer"
,
//消费者名称
QUEUED_NAME
:
process
.
env
.
QUEUED_NAME
||
"
LOGS-
SYTXPUBLIC-MSGQ"
,
//队列名称,FAIL-失败队列(队列和失败队列一对存在进行部署)
CONSUMER_NAME
:
process
.
env
.
CONSUMER_NAME
||
"public
ServiceAllocation.public
Consumer"
,
//消费者名称
QUEUED_NAME
:
process
.
env
.
QUEUED_NAME
||
"SYTXPUBLIC-MSGQ"
,
//队列名称,FAIL-失败队列(队列和失败队列一对存在进行部署)
};
var
settings
=
{
env
:
ENVINPUT
.
APP_ENV
,
...
...
brg-queue-center/readme.txt
View file @
78d8afe4
...
...
@@ -166,35 +166,37 @@
{
"actionType":"getItemByCompanyName",
"actionBody":{
"companyName":"
上海汉玉实业
有限公司"
"companyName":"
西安广发彩钢结构
有限公司"
}
}
返回参数:
{
{
"status": 1,
"message": "success",
"data": {
"companyName": "
上海汉玉实业
有限公司",
"companyName": "
西安广发彩钢结构
有限公司",
"companyOrgType": "有限责任公司",
"creditCode": "",
"legalPerson": "曹雪静",
"fromTime": "2008-03-20",
"toTime": "2018-03-19",
"estiblishTime": "2008-03-20",
"regStatus": "注销",
"regNumber": "310228001075786",
"orgNumber": " ",
"regLocation": "上海市金山区卫昌路229号2幢220室",
"regCapital": "3.000",
"businessScope": "化妆品,日用百货,服装鞋帽,健身器材销售,投资咨询、商务咨询(除经纪)(涉及行政许可的凭许可证经营)。",
"regInstitute": "金山区市场监管局",
"companyProvince": "上海",
"companyCity": "金山区",
"creditCode": "916111050810200881",
"legalPerson": "陈鑫宇",
"fromTime": "2013-11-22",
"toTime": "",
"operatingPeriod ": "2013-11-22 至 ---",
"estiblishTime": "2013-11-22",
"regStatus": "存续",
"regNumber": "610100100600621",
"orgNumber": "081020088",
"regLocation": "陕西省西安市未央区六村堡街道(北徐寨)石化大道88号",
"regCapital": "108.000",
"regUnit": "万人民币",
"businessScope": "钢结构、彩钢板、彩钢夹心板、铝型材的设计、加工、销售、安装;五金交电、电线电缆、金属材料、建筑材料的销售。(依法须经批准的项目,经相关部门批准后方可开展经营活动)",
"regInstitute": "西安市工商行政管理局灞桥分局",
"companyProvince": "陕西",
"companyCity": "西安市",
"companyCate1": "批发和零售业",
"companyCate2": "
批发
业",
"companyCate3": "
纺织、服装及家庭用品批发
"
"companyCate2": "
零售
业",
"companyCate3": "
货摊、无店铺及其他零售业
"
},
"requestId": "SCZ202006
181604MJBns
"
"requestId": "SCZ202006
251651HBUiV
"
}
参数说明:
...
...
@@ -205,12 +207,14 @@
"legalPerson": "曹雪静",//法人姓名
"fromTime": "2008-03-20",//营业期限开始日期
"toTime": "2018-03-19",//营业期限结束日期
"operatingPeriod ": "2008-03-20 至 2018-03-19",//营业期限范围
"estiblishTime": "2008-03-20",//成立时间
"regStatus": "注销",//公司状态
"regNumber": "310228001075786",//注册号
"orgNumber": " ",//组织机构代码
"regLocation": "上海市金山区卫昌路229号2幢220室",//公司地址
"regCapital": "3.000",//注册资本
"regUnit": "万人民币",//资本单位
"businessScope": "化妆品,日用百货,服装鞋帽,健身器材销售,投资咨询、商务咨询(除经纪)(涉及行政许可的凭许可证经营)。",//公司经营范围
"regInstitute": "金山区市场监管局",//登记机关
"companyProvince": "上海",//公司省份
...
...
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