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
ca406b28
Commit
ca406b28
authored
Aug 17, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of
http://gitlab.gongsibao.com/jiangyong/zhichan
into center-channel
parents
6624c6ca
faeed4c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
39 deletions
+42
-39
center-channel/app/base/api/impl/zzzd/diagnosisneedbus.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsNdbSve.js
+41
-38
No files found.
center-channel/app/base/api/impl/zzzd/diagnosisneedbus.js
View file @
ca406b28
...
...
@@ -62,7 +62,7 @@ class diagnosisNeedBus extends WEBBase {
break
;
case
'licenseCompare'
:
opResult
=
await
this
.
unSve
.
licenseCompare
(
pobj
);
opResult
=
await
this
.
unSve
.
licenseCompare
(
pobj
.
actionBody
);
break
default
:
opResult
=
system
.
getResult
(
null
,
"actionType参数错误"
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsNdbSve.js
View file @
ca406b28
...
...
@@ -7,6 +7,7 @@ class FblicenseService extends AppServiceBase {
super
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
()
this
.
restClient
=
system
.
getObject
(
"util.restClient"
)
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
)
};
//获取列表、检索
...
...
@@ -72,44 +73,34 @@ class FblicenseService extends AppServiceBase {
}
async
licenseCompare
(
pobj
)
{
let
res
=
{
"Message"
:
"查询成功"
,
"OrderNumber"
:
null
,
"Result"
:
{
"Data"
:
{
"中央厨房"
:
"否"
,
"主体业态"
:
"单位食堂"
,
"住所"
:
"新疆维吾尔自治区伊犁州伊宁县伊东工业园管委会"
,
"发证日期"
:
"2018年07月19日"
,
"发证机关"
:
"伊宁县市场监督管理局"
,
"散装熟食销售"
:
"否"
,
"日常监督管理人员"
:
"杜爱洪加拉斯"
,
"日常监督管理机构"
:
"伊宁县市场监督管理局"
,
"有效期至"
:
"2023年07月18日"
,
"法定代表人(负责人)"
:
"霍庆华"
,
"监督举报电话"
:
""
,
"签发人"
:
"马江平"
,
"经营场所"
:
"新疆维吾尔自治区伊犁州伊宁县伊东工业园管委会"
,
"经营者名称"
:
"新疆庆华能源集团有限公司"
,
"经营项目"
:
"热食类食品制售,"
,
"网络经营"
:
"否"
,
"许可证状态"
:
"有效"
,
"许可证编号"
:
"JY36540210003935"
,
"集体用餐配送单位"
:
"否"
},
"Id"
:
"85eb513de02c7ff8199bda197992888c"
,
"Schema"
:
null
},
"Status"
:
"200"
}
if
(
res
.
Status
==
200
)
{
let
result
=
res
.
Result
.
Data
let
keys
=
Object
.
keys
(
result
)
for
(
let
i
of
keys
)
{
if
(
!
result
[
i
])
{
delete
result
[
i
]
}
let
key
=
`
${
pobj
.
companyName
}
_
${
pobj
.
picName
}
`
let
resCache
=
await
this
.
redisClient
.
get
(
key
)
if
(
resCache
)
{
return
{
status
:
0
,
msg
:
"success"
,
data
:
JSON
.
parse
(
resCache
)
}
}
else
{
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
'http://106.13.228.212/gsb/api/qualificationsDetail'
)
result
=
JSON
.
parse
(
result
.
stdout
)
if
(
result
.
status
==
0
)
{
let
result
=
res
.
data
result
=
this
.
ObjTrim
(
result
)
result
=
{
许可名称
:
result
.
Name
,
许可证编号
:
result
.
No
,
有效期自
:
result
.
StartDate
,
有效期至
:
result
.
EndDate
}
// result = {
// 许可证编号: result.许可证编号,
// 证照名称: result.证照名称,
// 有效期限: result.有效期限,
// 有效期限: result.有效期限,
// 发证机关: result.发证机关
// }
await
this
.
redisClient
.
setWithEx
(
key
,
JSON
.
stringify
(
result
),
3600
);
return
{
status
:
0
,
msg
:
"success"
,
...
...
@@ -118,9 +109,21 @@ class FblicenseService extends AppServiceBase {
}
else
{
return
{
status
:
-
1
,
msg
:
res
.
Message
msg
:
result
.
message
}
}
}
}
ObjTrim
(
data
)
{
let
k
=
Object
.
keys
(
data
)
for
(
let
i
of
k
)
{
if
(
!
data
[
i
])
{
delete
data
[
i
]
}
}
console
.
log
(
data
)
return
data
}
}
...
...
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