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
e14771a4
Commit
e14771a4
authored
Aug 13, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-order' of gitlab.gongsibao.com:jiangyong/zhichan into center-order
parents
7124e522
6a74a04a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
center-order/app/base/api/impl/action/diagnosis.js
+3
-0
center-order/app/base/db/impl/dbneed/diagnosisDao.js
+14
-0
center-order/app/base/service/impl/dbneed/diagnosisSve.js
+13
-2
No files found.
center-order/app/base/api/impl/action/diagnosis.js
View file @
e14771a4
...
...
@@ -28,6 +28,9 @@ class DiagnosisAPI extends APIBase {
case
"diagnosisInfo"
:
opResult
=
await
this
.
diagnosisSve
.
diagnosisInfo
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"diagnosisDetail"
:
opResult
=
await
this
.
diagnosisSve
.
diagnosisDetail
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"enterpriseInfo"
:
opResult
=
await
this
.
diagnosisSve
.
enterpriseInfo
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
...
...
center-order/app/base/db/impl/dbneed/diagnosisDao.js
View file @
e14771a4
...
...
@@ -31,5 +31,18 @@ class diagnosisDao extends Dao {
raw
:
true
});
}
async
findOneByDiagnosisNo
(
diagnosisNo
)
{
return
await
this
.
model
.
findOne
({
where
:
{
diagnosis_no
:
diagnosisNo
},
attributes
:
[
"diagnosis_no"
,
"diagnosis_result_name"
,
"diagnosis_result_data"
],
raw
:
true
});
}
}
module
.
exports
=
diagnosisDao
;
\ No newline at end of file
center-order/app/base/service/impl/dbneed/diagnosisSve.js
View file @
e14771a4
...
...
@@ -18,10 +18,10 @@ class DiagnosisService extends ServiceBase {
return
system
.
getResultFail
(
-
5005
,
"企业名称不能为空"
);
}
if
(
!
actionBody
.
corporateType
)
{
return
system
.
getResultFail
(
-
500
5
,
"店铺类型不能为空"
);
return
system
.
getResultFail
(
-
500
6
,
"店铺类型不能为空"
);
}
if
(
!
actionBody
.
diagnosisType
)
{
return
system
.
getResultFail
(
-
500
5
,
"诊断类型不能为空"
);
return
system
.
getResultFail
(
-
500
7
,
"诊断类型不能为空"
);
}
var
nobj
=
{
uapp_id
:
pobj
.
appInfo
.
uapp_id
,
...
...
@@ -66,6 +66,9 @@ class DiagnosisService extends ServiceBase {
]
}
let
where
=
{}
if
(
pobj
.
userInfo
.
channel_userid
)
{
where
.
channel_user_Id
=
pobj
.
userInfo
.
channel_userid
}
if
(
actionBody
.
diagnosisNo
)
{
where
.
diagnosis_no
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
actionBody
.
diagnosisNo
}
%`
}
}
...
...
@@ -94,6 +97,14 @@ class DiagnosisService extends ServiceBase {
return
system
.
getResultSuccess
(
res
);
}
async
diagnosisDetail
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
diagnosisNo
)
{
return
system
.
getResultFail
(
-
5008
,
"诊断单号不能为空"
);
}
let
diagnosisResult
=
await
this
.
dao
.
findOneByDiagnosisNo
(
pobj
.
actionBody
.
diagnosisNo
)
return
system
.
getResultSuccess
(
diagnosisResult
);
}
async
enterpriseInfo
(
pobj
)
{
let
diagnosisResult
=
await
this
.
dao
.
findOneOrderByCreateAt
(
pobj
.
userInfo
.
channel_userid
)
if
(
diagnosisResult
)
{
...
...
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