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
a4d76490
Commit
a4d76490
authored
Aug 14, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Plain Diff
opneedInfo update
parents
6aa57898
12fbd04b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
24 deletions
+31
-24
center-order/app/base/service/impl/dbneed/diagnosisSve.js
+28
-21
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
+3
-3
No files found.
center-order/app/base/service/impl/dbneed/diagnosisSve.js
View file @
a4d76490
...
...
@@ -4,11 +4,11 @@ const ServiceBase = require("../../sve.base");
const
settings
=
require
(
"../../../../config/settings"
);
var
moment
=
require
(
'moment'
)
class
DiagnosisService
extends
ServiceBase
{
constructor
()
{
constructor
()
{
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
DiagnosisService
));
}
async
manualEvaluation
(
pobj
)
{
async
manualEvaluation
(
pobj
)
{
var
actionBody
=
pobj
.
actionBody
;
var
diagnosisNeedNo
=
await
this
.
getBusUid
(
"n"
);
if
(
!
actionBody
.
mobile
)
{
...
...
@@ -22,7 +22,7 @@ class DiagnosisService extends ServiceBase {
}
if
(
!
actionBody
.
diagnosisType
)
{
return
system
.
getResultFail
(
-
5007
,
"诊断类型不能为空"
);
}
}
var
nobj
=
{
uapp_id
:
pobj
.
appInfo
.
uapp_id
,
diagnosis_no
:
diagnosisNeedNo
,
// uuid
...
...
@@ -39,16 +39,16 @@ class DiagnosisService extends ServiceBase {
brand_pic
:
actionBody
.
brandPic
,
industry_pic
:
actionBody
.
industryPic
}
if
(
actionBody
.
diagnosisMode
==
"zn"
)
{
nobj
.
diagnosis_result
=
actionBody
.
checkResult
.
data
.
isPass
==
false
?
"wtg"
:
"tg"
;
nobj
.
status
=
"ywc"
nobj
.
diagnosis_result_data
=
actionBody
.
checkResult
;
// 诊断方式为智能时 channel会传来诊断结果,记录快照
}
if
(
actionBody
.
diagnosisMode
==
"zn"
)
{
nobj
.
diagnosis_result
=
actionBody
.
checkResult
.
data
.
isPass
==
false
?
"wtg"
:
"tg"
;
nobj
.
status
=
"ywc"
nobj
.
diagnosis_result_data
=
actionBody
.
checkResult
;
// 诊断方式为智能时 channel会传来诊断结果,记录快照
}
await
this
.
dao
.
create
(
nobj
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
(
{
diagnosis_no
:
diagnosisNeedNo
}
);
}
async
diagnosisInfo
(
pobj
)
{
async
diagnosisInfo
(
pobj
)
{
var
actionBody
=
pobj
.
actionBody
;
let
query
=
{
offset
:
((
actionBody
.
page
-
1
)
*
actionBody
.
pageSize
)
||
0
,
...
...
@@ -67,8 +67,8 @@ class DiagnosisService extends ServiceBase {
}
let
where
=
{}
if
(
pobj
.
userInfo
.
channel_userid
)
{
where
.
channel_user_Id
=
pobj
.
userInfo
.
channel_userid
}
where
.
channel_user_Id
=
pobj
.
userInfo
.
channel_userid
}
if
(
actionBody
.
diagnosisNo
)
{
where
.
diagnosis_no
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
actionBody
.
diagnosisNo
}
%`
}
}
...
...
@@ -85,7 +85,7 @@ class DiagnosisService extends ServiceBase {
where
.
publish_name
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
actionBody
.
publish_name
}
%`
}
}
if
(
actionBody
.
stdate
&&
actionBody
.
endate
)
{
where
.
updated_at
=
{
[
this
.
db
.
Op
.
between
]:
[
actionBody
.
stdate
,
actionBody
.
endate
]}
where
.
updated_at
=
{
[
this
.
db
.
Op
.
between
]:
[
actionBody
.
stdate
,
actionBody
.
endate
]
}
}
if
(
actionBody
.
corporateTypeName
)
{
where
.
corporate_type_name
=
actionBody
.
corporateTypeName
...
...
@@ -96,6 +96,7 @@ class DiagnosisService extends ServiceBase {
let
res
=
await
this
.
dao
.
findAndCountAll
(
query
)
return
system
.
getResultSuccess
(
res
);
}
<<<<<<<
HEAD
// 过滤数组 筛选出选择过的资质
checkIsChoice
(
obj
)
{
console
.
log
(
obj
)
...
...
@@ -104,6 +105,12 @@ class DiagnosisService extends ServiceBase {
async
diagnosisDetail
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
diagnosisNo
)
{
return
system
.
getResultFail
(
-
5008
,
"诊断单号不能为空"
);
=======
async
diagnosisDetail
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
diagnosisNo
)
{
return
system
.
getResultFail
(
-
5008
,
"诊断单号不能为空"
);
>>>>>>>
12
fbd04b2d9c1d2ff1e7164a1cfe49808f252f60
}
let
diagnosisResult
=
await
this
.
dao
.
findOneByDiagnosisNo
(
pobj
.
actionBody
.
diagnosisNo
)
diagnosisResult
.
needQualifications_pic
=
diagnosisResult
.
qualifications_pic
.
filter
(
this
.
checkIsChoice
);
...
...
@@ -112,16 +119,16 @@ class DiagnosisService extends ServiceBase {
return
system
.
getResultSuccess
(
diagnosisResult
);
}
async
enterpriseInfo
(
pobj
)
{
async
enterpriseInfo
(
pobj
)
{
let
diagnosisResult
=
await
this
.
dao
.
findOneOrderByCreateAt
(
pobj
.
userInfo
.
channel_userid
)
if
(
diagnosisResult
)
{
diagnosisResult
.
auth_result_name
=
"未认证"
if
(
diagnosisResult
.
diagnosis_result
==
"tg"
)
{
diagnosisResult
.
auth_result_name
=
"已认证"
}
return
system
.
getResultSuccess
(
diagnosisResult
);
if
(
diagnosisResult
)
{
diagnosisResult
.
auth_result_name
=
"未认证"
if
(
diagnosisResult
.
diagnosis_result
==
"tg"
)
{
diagnosisResult
.
auth_result_name
=
"已认证"
}
return
system
.
getResultSuccess
(
diagnosisResult
);
}
else
{
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
}
...
...
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
View file @
a4d76490
...
...
@@ -46,7 +46,7 @@ class diagnosisneedbusService extends ServiceBase {
where
.
publish_name
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
data
.
publishName
}
%`
}
}
if
(
data
.
stdate
&&
data
.
endate
)
{
where
.
updated_at
=
{
[
this
.
db
.
Op
.
between
]:
[
data
.
stdate
,
data
.
endate
]}
where
.
updated_at
=
{
[
this
.
db
.
Op
.
between
]:
[
data
.
stdate
,
data
.
endate
]
}
}
if
(
data
.
corporateType
)
{
where
.
corporate_type
=
data
.
corporateType
...
...
@@ -65,7 +65,7 @@ class diagnosisneedbusService extends ServiceBase {
}
}
async
getDetail
(
pobj
,
id
)
{
async
getDetail
(
pobj
,
id
)
{
try
{
let
res
=
await
this
.
dao
.
findById
(
id
)
if
(
res
)
{
...
...
@@ -86,7 +86,7 @@ class diagnosisneedbusService extends ServiceBase {
try
{
let
o
=
await
this
.
dao
.
findById
(
data
.
id
)
if
(
o
&&
o
.
diagnosis_mode
!=
'rg'
)
{
return
System
.
getResultFail
(
-
1
,
'非人工诊断单 不能修改认证结果'
)
return
System
.
getResultFail
(
-
1
,
'非人工诊断单 不能修改认证结果'
)
}
else
{
let
res
=
await
this
.
dao
.
update
(
query
,
data
.
id
)
return
System
.
getResultSuccess
(
res
)
...
...
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