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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
center-order/app/base/service/impl/dbneed/diagnosisSve.js
+16
-9
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
+1
-1
No files found.
center-order/app/base/service/impl/dbneed/diagnosisSve.js
View file @
a4d76490
...
@@ -4,11 +4,11 @@ const ServiceBase = require("../../sve.base");
...
@@ -4,11 +4,11 @@ const ServiceBase = require("../../sve.base");
const
settings
=
require
(
"../../../../config/settings"
);
const
settings
=
require
(
"../../../../config/settings"
);
var
moment
=
require
(
'moment'
)
var
moment
=
require
(
'moment'
)
class
DiagnosisService
extends
ServiceBase
{
class
DiagnosisService
extends
ServiceBase
{
constructor
()
{
constructor
()
{
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
DiagnosisService
));
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
DiagnosisService
));
}
}
async
manualEvaluation
(
pobj
)
{
async
manualEvaluation
(
pobj
)
{
var
actionBody
=
pobj
.
actionBody
;
var
actionBody
=
pobj
.
actionBody
;
var
diagnosisNeedNo
=
await
this
.
getBusUid
(
"n"
);
var
diagnosisNeedNo
=
await
this
.
getBusUid
(
"n"
);
if
(
!
actionBody
.
mobile
)
{
if
(
!
actionBody
.
mobile
)
{
...
@@ -39,16 +39,16 @@ class DiagnosisService extends ServiceBase {
...
@@ -39,16 +39,16 @@ class DiagnosisService extends ServiceBase {
brand_pic
:
actionBody
.
brandPic
,
brand_pic
:
actionBody
.
brandPic
,
industry_pic
:
actionBody
.
industryPic
industry_pic
:
actionBody
.
industryPic
}
}
if
(
actionBody
.
diagnosisMode
==
"zn"
)
{
if
(
actionBody
.
diagnosisMode
==
"zn"
)
{
nobj
.
diagnosis_result
=
actionBody
.
checkResult
.
data
.
isPass
==
false
?
"wtg"
:
"tg"
;
nobj
.
diagnosis_result
=
actionBody
.
checkResult
.
data
.
isPass
==
false
?
"wtg"
:
"tg"
;
nobj
.
status
=
"ywc"
nobj
.
status
=
"ywc"
nobj
.
diagnosis_result_data
=
actionBody
.
checkResult
;
// 诊断方式为智能时 channel会传来诊断结果,记录快照
nobj
.
diagnosis_result_data
=
actionBody
.
checkResult
;
// 诊断方式为智能时 channel会传来诊断结果,记录快照
}
}
await
this
.
dao
.
create
(
nobj
);
await
this
.
dao
.
create
(
nobj
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
(
{
diagnosis_no
:
diagnosisNeedNo
}
);
}
}
async
diagnosisInfo
(
pobj
)
{
async
diagnosisInfo
(
pobj
)
{
var
actionBody
=
pobj
.
actionBody
;
var
actionBody
=
pobj
.
actionBody
;
let
query
=
{
let
query
=
{
offset
:
((
actionBody
.
page
-
1
)
*
actionBody
.
pageSize
)
||
0
,
offset
:
((
actionBody
.
page
-
1
)
*
actionBody
.
pageSize
)
||
0
,
...
@@ -85,7 +85,7 @@ class DiagnosisService extends ServiceBase {
...
@@ -85,7 +85,7 @@ class DiagnosisService extends ServiceBase {
where
.
publish_name
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
actionBody
.
publish_name
}
%`
}
where
.
publish_name
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
actionBody
.
publish_name
}
%`
}
}
}
if
(
actionBody
.
stdate
&&
actionBody
.
endate
)
{
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
)
{
if
(
actionBody
.
corporateTypeName
)
{
where
.
corporate_type_name
=
actionBody
.
corporateTypeName
where
.
corporate_type_name
=
actionBody
.
corporateTypeName
...
@@ -96,6 +96,7 @@ class DiagnosisService extends ServiceBase {
...
@@ -96,6 +96,7 @@ class DiagnosisService extends ServiceBase {
let
res
=
await
this
.
dao
.
findAndCountAll
(
query
)
let
res
=
await
this
.
dao
.
findAndCountAll
(
query
)
return
system
.
getResultSuccess
(
res
);
return
system
.
getResultSuccess
(
res
);
}
}
<<<<<<<
HEAD
// 过滤数组 筛选出选择过的资质
// 过滤数组 筛选出选择过的资质
checkIsChoice
(
obj
)
{
checkIsChoice
(
obj
)
{
console
.
log
(
obj
)
console
.
log
(
obj
)
...
@@ -104,6 +105,12 @@ class DiagnosisService extends ServiceBase {
...
@@ -104,6 +105,12 @@ class DiagnosisService extends ServiceBase {
async
diagnosisDetail
(
pobj
)
{
async
diagnosisDetail
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
diagnosisNo
)
{
if
(
!
pobj
.
actionBody
.
diagnosisNo
)
{
return
system
.
getResultFail
(
-
5008
,
"诊断单号不能为空"
);
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
)
let
diagnosisResult
=
await
this
.
dao
.
findOneByDiagnosisNo
(
pobj
.
actionBody
.
diagnosisNo
)
diagnosisResult
.
needQualifications_pic
=
diagnosisResult
.
qualifications_pic
.
filter
(
this
.
checkIsChoice
);
diagnosisResult
.
needQualifications_pic
=
diagnosisResult
.
qualifications_pic
.
filter
(
this
.
checkIsChoice
);
...
@@ -112,11 +119,11 @@ class DiagnosisService extends ServiceBase {
...
@@ -112,11 +119,11 @@ class DiagnosisService extends ServiceBase {
return
system
.
getResultSuccess
(
diagnosisResult
);
return
system
.
getResultSuccess
(
diagnosisResult
);
}
}
async
enterpriseInfo
(
pobj
)
{
async
enterpriseInfo
(
pobj
)
{
let
diagnosisResult
=
await
this
.
dao
.
findOneOrderByCreateAt
(
pobj
.
userInfo
.
channel_userid
)
let
diagnosisResult
=
await
this
.
dao
.
findOneOrderByCreateAt
(
pobj
.
userInfo
.
channel_userid
)
if
(
diagnosisResult
)
{
if
(
diagnosisResult
)
{
diagnosisResult
.
auth_result_name
=
"未认证"
diagnosisResult
.
auth_result_name
=
"未认证"
if
(
diagnosisResult
.
diagnosis_result
==
"tg"
)
{
if
(
diagnosisResult
.
diagnosis_result
==
"tg"
)
{
diagnosisResult
.
auth_result_name
=
"已认证"
diagnosisResult
.
auth_result_name
=
"已认证"
}
}
return
system
.
getResultSuccess
(
diagnosisResult
);
return
system
.
getResultSuccess
(
diagnosisResult
);
...
...
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
View file @
a4d76490
...
@@ -46,7 +46,7 @@ class diagnosisneedbusService extends ServiceBase {
...
@@ -46,7 +46,7 @@ class diagnosisneedbusService extends ServiceBase {
where
.
publish_name
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
data
.
publishName
}
%`
}
where
.
publish_name
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
data
.
publishName
}
%`
}
}
}
if
(
data
.
stdate
&&
data
.
endate
)
{
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
)
{
if
(
data
.
corporateType
)
{
where
.
corporate_type
=
data
.
corporateType
where
.
corporate_type
=
data
.
corporateType
...
...
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