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
49e9d4df
Commit
49e9d4df
authored
Aug 12, 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
fffd6693
d27e0830
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
2 deletions
+77
-2
center-order/app/base/api/impl/action/diagnosis.js
+7
-1
center-order/app/base/db/impl/dbneed/diagnosisDao.js
+15
-0
center-order/app/base/db/models/dbneed/diagnosisneedinfo.js
+2
-0
center-order/app/base/service/impl/dbneed/diagnosisSve.js
+53
-1
No files found.
center-order/app/base/api/impl/action/diagnosis.js
View file @
49e9d4df
...
...
@@ -22,9 +22,15 @@ class DiagnosisAPI extends APIBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"manualEvaluation"
:
//提交需求 2020 0807 lin 新增
case
"manualEvaluation"
:
opResult
=
await
this
.
diagnosisSve
.
manualEvaluation
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"diagnosisInfo"
:
opResult
=
await
this
.
diagnosisSve
.
diagnosisInfo
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"enterpriseInfo"
:
opResult
=
await
this
.
diagnosisSve
.
enterpriseInfo
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
'getNeedList'
:
// 需求列表 20 08 12 liang
opResult
=
await
this
.
needSve
.
opNeedList
(
pobj
,
pobj
.
actionBody
,
req
);
break
...
...
center-order/app/base/db/impl/dbneed/diagnosisDao.js
View file @
49e9d4df
...
...
@@ -11,5 +11,19 @@ class diagnosisDao extends Dao {
return
await
this
.
model
.
update
(
param
,
{
where
:
{
id
}
})
}
<<<<<<<
HEAD
async
findOneOrderByCreateAt
(
uid
)
{
return
await
this
.
model
.
findOne
({
where
:
{
channel_user_Id
:
uid
},
order
:
[
[
"updated_at"
,
"desc"
]
],
raw
:
true
});
}
=======
>>>>>>>
54
e1b2abd183bb4b792de95cff06b721a760daa4
}
module
.
exports
=
diagnosisDao
;
\ No newline at end of file
center-order/app/base/db/models/dbneed/diagnosisneedinfo.js
View file @
49e9d4df
...
...
@@ -45,7 +45,9 @@ module.exports = (db, DataTypes) => {
}
},
diagnosis_result_name
:
DataTypes
.
STRING
,
//诊断结果名字 通过/未通过/人工审核中 --暂不用
diagnosis_result_data
:
DataTypes
.
JSON
,
// 智能诊断结果返回值 人工目前没用到
status_name
:
DataTypes
.
STRING
,
//状态 dcl/gtz/dqrfa/ygb/ywc
main_class
:
DataTypes
.
STRING
,
// 主营类目(一级分类-二级分类)
qualifications_pic
:
DataTypes
.
JSON
,
// 基础资质json {}
brand_pic
:
DataTypes
.
JSON
,
// 品牌资质json {}
industry_pic
:
DataTypes
.
JSON
,
// 行业资质json {}
...
...
center-order/app/base/service/impl/dbneed/diagnosisSve.js
View file @
49e9d4df
...
...
@@ -6,8 +6,8 @@ var moment = require('moment')
class
DiagnosisService
extends
ServiceBase
{
constructor
()
{
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
DiagnosisService
));
this
.
diagnosisDao
=
system
.
getObject
(
"db.dbneed.diagnosisDao"
);
}
async
manualEvaluation
(
pobj
)
{
var
actionBody
=
pobj
.
actionBody
;
var
diagnosisNeedNo
=
await
this
.
getBusUid
(
"n"
);
...
...
@@ -34,12 +34,63 @@ class DiagnosisService extends ServiceBase {
diagnosis_mode
:
actionBody
.
diagnosisMode
,
// 诊断方式,这里由channel项目调用带参数
diagnosis_result
:
"rgshz"
,
// 创建订单时 人工审核中 前台用
status
:
"dcl"
,
// 创建订单时 待处理 后台用
main_class
=
actionBody
.
mainClass
,
// 运营后台-诊断详情-主营类目
qualifications_pic
:
actionBody
.
qualificationsPic
,
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会传来诊断结果,记录快照
}
await
this
.
dao
.
create
(
nobj
);
return
system
.
getResultSuccess
();
}
async
diagnosisInfo
(
pobj
)
{
var
actionBody
=
pobj
.
actionBody
;
let
query
=
{
offset
:
((
actionBody
.
page
-
1
)
*
actionBody
.
pageSize
)
||
0
,
limit
:
actionBody
.
pageSize
||
10
,
attributes
:
[
"diagnosis_no"
,
// 申请编号
"corporate_name"
,
// 公司名称
"publish_mobile"
,
// 联系人手机号
"diagnosis_type_name"
,
// 诊断类型
"diagnosis_mode_name"
,
// 诊断方式
"diagnosis_result_name"
,
// 诊断结果
"updated_at"
],
// 修改时间
order
:
[
[
"updated_at"
,
"desc"
]
]
}
let
where
=
{}
if
(
actionBody
.
diagnosisNo
)
{
where
.
diagnosis_no
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
actionBody
.
diagnosis_no
}
%`
}
}
if
(
actionBody
.
status
)
{
where
.
status
=
actionBody
.
status
}
if
(
actionBody
.
publishName
)
{
where
.
publish_name
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
actionBody
.
publish_name
}
%`
}
}
if
(
actionBody
.
stdate
&&
actionBody
.
endate
)
{
where
.
updatedAt
=
{
[
this
.
db
.
Op
.
between
]:
[
actionBody
.
stdate
,
actionBody
.
endate
]}
}
if
(
actionBody
.
corporateType
)
{
where
.
corporate_type
=
actionBody
.
corporateType
}
if
(
Object
.
keys
(
where
).
length
>
0
)
{
query
.
where
=
where
}
let
res
=
await
this
.
dao
.
findAndCountAll
(
query
)
return
system
.
getResultSuccess
(
res
);
}
async
enterpriseInfo
(
pobj
)
{
let
diagnosisResult
=
await
this
.
dao
.
findOneOrderByCreateAt
(
pobj
.
userInfo
.
channel_userid
)
return
system
.
getResultSuccess
(
diagnosisResult
);
}
}
module
.
exports
=
DiagnosisService
;
\ No newline at end of file
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