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
5c37ec57
Commit
5c37ec57
authored
Aug 14, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add lc
parent
1016efff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
165 additions
and
117 deletions
+165
-117
center-channel/app/base/api/impl/zzzd/diagnosisneedbus.js
+65
-60
center-channel/app/base/service/impl/utilsSve/utilsNdbSve.js
+100
-57
No files found.
center-channel/app/base/api/impl/zzzd/diagnosisneedbus.js
View file @
5c37ec57
...
...
@@ -2,70 +2,74 @@ var WEBBase = require("../../web.base");
var
system
=
require
(
"../../../system"
);
class
diagnosisNeedBus
extends
WEBBase
{
constructor
()
{
super
();
this
.
unSve
=
system
.
getObject
(
'service.utilsSve.utilsNdbSve'
)
}
constructor
()
{
super
();
this
.
unSve
=
system
.
getObject
(
'service.utilsSve.utilsNdbSve'
)
}
async
springBoard
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
springBoard
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"getDnList"
:
// 获取人工列表
pobj
.
actionBody
.
diagnosis_mode
=
'rg'
if
(
Object
.
keys
(
pobj
.
actionBody
).
length
<
1
)
{
return
system
.
getResult
(
null
,
`参数不能为空`
)
}
opResult
=
await
this
.
unSve
.
getList
(
pobj
);
break
;
case
'getDnListPending'
:
// 获取待处理列表
pobj
.
actionBody
.
status
=
'dcl'
;
pobj
.
actionBody
.
diagnosis_mode
=
'rg'
opResult
=
await
this
.
unSve
.
getList
(
pobj
);
break
;
case
"getDnListAll"
:
// 获取人工列表
if
(
Object
.
keys
(
pobj
.
actionBody
).
length
<
1
)
{
return
system
.
getResult
(
null
,
`参数不能为空`
)
}
opResult
=
await
this
.
unSve
.
getList
(
pobj
);
break
;
case
'getDnDetail'
:
// 获取详情
if
(
!
pobj
.
actionBody
.
id
)
{
return
system
.
getResult
(
null
,
`id不能为空`
)
}
opResult
=
await
this
.
unSve
.
getDetail
(
pobj
);
break
;
case
'doDnEAV'
:
//认证
if
(
!
pobj
.
actionBody
.
id
)
{
return
system
.
getResult
(
null
,
`id不能为空`
)
}
if
(
!
pobj
.
actionBody
.
diagnosisResult
)
{
return
system
.
getResult
(
null
,
`诊断结果不能为空`
)
}
opResult
=
await
this
.
unSve
.
doEAV
(
pobj
);
break
;
case
'getDnNeedList'
:
//获取需求列表
opResult
=
await
this
.
unSve
.
getNeedList
(
pobj
);
break
;
case
'getDnNeedDetail'
:
//获取需求详情
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
`needNo不能为空`
)
}
opResult
=
await
this
.
unSve
.
getNeedDetail
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"actionType参数错误"
);
break
;
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"getDnList"
:
// 获取人工列表
pobj
.
actionBody
.
diagnosis_mode
=
'rg'
if
(
Object
.
keys
(
pobj
.
actionBody
).
length
<
1
)
{
return
system
.
getResult
(
null
,
`参数不能为空`
)
}
opResult
=
await
this
.
unSve
.
getList
(
pobj
);
break
;
case
'getDnListPending'
:
// 获取待处理列表
pobj
.
actionBody
.
status
=
'dcl'
;
pobj
.
actionBody
.
diagnosis_mode
=
'rg'
opResult
=
await
this
.
unSve
.
getList
(
pobj
);
break
;
case
"getDnListAll"
:
// 获取人工列表
if
(
Object
.
keys
(
pobj
.
actionBody
).
length
<
1
)
{
return
system
.
getResult
(
null
,
`参数不能为空`
)
}
opResult
=
await
this
.
unSve
.
getList
(
pobj
);
break
;
case
'getDnDetail'
:
// 获取详情
if
(
!
pobj
.
actionBody
.
id
)
{
return
system
.
getResult
(
null
,
`id不能为空`
)
}
return
opResult
;
opResult
=
await
this
.
unSve
.
getDetail
(
pobj
);
break
;
case
'doDnEAV'
:
//认证
if
(
!
pobj
.
actionBody
.
id
)
{
return
system
.
getResult
(
null
,
`id不能为空`
)
}
if
(
!
pobj
.
actionBody
.
diagnosisResult
)
{
return
system
.
getResult
(
null
,
`诊断结果不能为空`
)
}
opResult
=
await
this
.
unSve
.
doEAV
(
pobj
);
break
;
case
'getDnNeedList'
:
//获取需求列表
opResult
=
await
this
.
unSve
.
getNeedList
(
pobj
);
break
;
case
'getDnNeedDetail'
:
//获取需求详情
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
`needNo不能为空`
)
}
opResult
=
await
this
.
unSve
.
getNeedDetail
(
pobj
);
break
;
case
'licenseCompare'
:
opResult
=
await
this
.
unSve
.
licenseCompare
(
pobj
);
break
default
:
opResult
=
system
.
getResult
(
null
,
"actionType参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
diagnosisNeedBus
;
\ No newline at end of file
center-channel/app/base/service/impl/utilsSve/utilsNdbSve.js
View file @
5c37ec57
...
...
@@ -3,73 +3,116 @@ var settings = require("../../../../config/settings");
const
AppServiceBase
=
require
(
"../../app.base"
);
class
FblicenseService
extends
AppServiceBase
{
constructor
()
{
super
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
()
this
.
restClient
=
system
.
getObject
(
"util.restClient"
)
};
constructor
()
{
super
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
()
this
.
restClient
=
system
.
getObject
(
"util.restClient"
)
};
//获取列表、检索
async
getList
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getList'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
//获取列表、检索
async
getList
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getList'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
}
// 获取详情
async
getDetail
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getDetail'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
let
data
=
JSON
.
parse
(
result
.
stdout
)
if
(
data
.
status
!=
0
)
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
return
data
;
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
// 获取详情
async
getDetail
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getDetail'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
let
data
=
JSON
.
parse
(
result
.
stdout
)
if
(
data
.
status
!=
0
)
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
return
data
;
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
}
// 认证
async
doEAV
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'doEAV'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
// 认证
async
doEAV
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'doEAV'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
}
// 获取需求列表
async
getNeedList
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getNeedList'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
// 获取需求列表
async
getNeedList
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getNeedList'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
}
// 获取需求详情
async
getNeedDetail
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getNeedDetail'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
}
}
async
licenseCompare
(
pobj
)
{
let
res
=
{
"Message"
:
"查询成功"
,
"OrderNumber"
:
null
,
"Result"
:
{
"Data"
:
{
"中央厨房"
:
"否"
,
"主体业态"
:
"单位食堂"
,
"住所"
:
"新疆维吾尔自治区伊犁州伊宁县伊东工业园管委会"
,
"发证日期"
:
"2018年07月19日"
,
"发证机关"
:
"伊宁县市场监督管理局"
,
"散装熟食销售"
:
"否"
,
"日常监督管理人员"
:
"杜爱洪加拉斯"
,
"日常监督管理机构"
:
"伊宁县市场监督管理局"
,
"有效期至"
:
"2023年07月18日"
,
"法定代表人(负责人)"
:
"霍庆华"
,
"监督举报电话"
:
""
,
"签发人"
:
"马江平"
,
"经营场所"
:
"新疆维吾尔自治区伊犁州伊宁县伊东工业园管委会"
,
"经营者名称"
:
"新疆庆华能源集团有限公司"
,
"经营项目"
:
"热食类食品制售,"
,
"网络经营"
:
"否"
,
"许可证状态"
:
"有效"
,
"许可证编号"
:
"JY36540210003935"
,
"集体用餐配送单位"
:
"否"
},
"Id"
:
"85eb513de02c7ff8199bda197992888c"
,
"Schema"
:
null
},
"Status"
:
"200"
}
// 获取需求详情
async
getNeedDetail
(
pobj
)
{
try
{
let
url
=
`
${
this
.
centerOrderUrl
}
action/diagnosisneedbus/springBoard`
pobj
.
actionType
=
'getNeedDetail'
let
result
=
await
this
.
restClient
.
execPost
(
pobj
,
url
)
return
JSON
.
parse
(
result
.
stdout
)
}
catch
(
error
)
{
return
system
.
getResultFail
(
-
1
,
error
.
message
||
'failed'
)
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
]
}
}
return
result
}
}
}
module
.
exports
=
FblicenseService
;
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