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
b4e43509
Commit
b4e43509
authored
Aug 11, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diagnosis add
parent
1eae4ae6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
8 deletions
+90
-8
center-order/app/base/api/impl/action/diagnosis.js
+36
-0
center-order/app/base/db/impl/dbneed/diagnosisDao.js
+4
-4
center-order/app/base/db/models/dbneed/diagnosisneedinfo.js
+4
-4
center-order/app/base/service/impl/dbneed/diagnosisSve.js
+46
-0
No files found.
center-order/app/base/api/impl/action/diagnosis.js
0 → 100644
View file @
b4e43509
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
DiagnosisAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
diagnosisSve
=
system
.
getObject
(
"service.dbneed.diagnosisSve"
);
}
/**
* 接口跳转-POST请求
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"manualEvaluation"
:
//提交需求 2020 0807 lin 新增
opResult
=
await
this
.
diagnosisSve
.
manualEvaluation
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
DiagnosisAPI
;
\ No newline at end of file
center-order/app/base/db/impl/dbneed/diagnosis
needinfo
Dao.js
→
center-order/app/base/db/impl/dbneed/diagnosisDao.js
View file @
b4e43509
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
class
diagnosis
needinfo
Dao
extends
Dao
{
class
diagnosisDao
extends
Dao
{
constructor
()
{
constructor
()
{
super
(
Dao
.
getModelName
(
diagnosis
needinfo
Dao
));
super
(
Dao
.
getModelName
(
diagnosisDao
));
}
}
}
}
module
.
exports
=
diagnosisneedinfoDao
;
module
.
exports
=
diagnosisDao
;
\ No newline at end of file
\ No newline at end of file
center-order/app/base/db/models/dbneed/diagnosisneedinfo.js
View file @
b4e43509
...
@@ -2,11 +2,11 @@ const system = require("../../../system");
...
@@ -2,11 +2,11 @@ const system = require("../../../system");
const
settings
=
require
(
"../../../../config/settings"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"
needinfo
"
,
{
return
db
.
define
(
"
diagnosis
"
,
{
uapp_id
:
DataTypes
.
INTEGER
,
uapp_id
:
DataTypes
.
INTEGER
,
channel
UserI
d
:
DataTypes
.
STRING
(
128
),
//渠道用户唯一码
channel
_user_i
d
:
DataTypes
.
STRING
(
128
),
//渠道用户唯一码
diagnosisNo
:
DataTypes
.
STRING
(
128
),
//诊断单号/申请编号
diagnosisNo
:
DataTypes
.
STRING
(
128
),
//诊断单号/申请编号
corporateN
n
ame
:
DataTypes
.
INTEGER
,
//公司名称
corporateName
:
DataTypes
.
INTEGER
,
//公司名称
publishName
:
DataTypes
.
STRING
,
//联系人名字
publishName
:
DataTypes
.
STRING
,
//联系人名字
publishMobile
:
DataTypes
.
STRING
(
50
),
//联系人手机号
publishMobile
:
DataTypes
.
STRING
(
50
),
//联系人手机号
corporateType
:
{
//店铺类型 电商诊断:qjd/zmd/zyd,直播诊断:qy/gtgsh/mbfqy/flfw
corporateType
:
{
//店铺类型 电商诊断:qjd/zmd/zyd,直播诊断:qy/gtgsh/mbfqy/flfw
...
@@ -51,7 +51,7 @@ module.exports = (db, DataTypes) => {
...
@@ -51,7 +51,7 @@ module.exports = (db, DataTypes) => {
industryPic
:
DataTypes
.
JSON
,
// 行业资质json {}
industryPic
:
DataTypes
.
JSON
,
// 行业资质json {}
notes
:
DataTypes
.
STRING
,
//备注
notes
:
DataTypes
.
STRING
,
//备注
status
:
{
//状态 后台用 dcl/gtz/dqrfa/ygb/ywc
status
:
{
//状态 后台用 dcl/gtz/dqrfa/ygb/ywc
//
wts未推送,yts已推送,ygj已跟进,ycd已成单
//
2020 0811 lin 修改 目标枚举只有dcl 待处理,ywc已完成
type
:
DataTypes
.
ENUM
,
type
:
DataTypes
.
ENUM
,
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
diagnosis_status
),
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
diagnosis_status
),
set
:
function
(
val
)
{
set
:
function
(
val
)
{
...
...
center-order/app/base/service/impl/dbneed/diagnosisSve.js
0 → 100644
View file @
b4e43509
const
uuidv4
=
require
(
'uuid/v4'
);
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
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"
);
if
(
!
actionBody
.
mobile
)
{
return
system
.
getResultFail
(
-
5004
,
"联系电话不能为空"
);
}
if
(
!
actionBody
.
enterprise
)
{
return
system
.
getResultFail
(
-
5005
,
"企业名称不能为空"
);
}
if
(
!
actionBody
.
corporateType
)
{
return
system
.
getResultFail
(
-
5005
,
"店铺类型不能为空"
);
}
if
(
!
actionBody
.
diagnosisType
)
{
return
system
.
getResultFail
(
-
5005
,
"诊断类型不能为空"
);
}
var
nobj
=
{
uapp_id
:
pobj
.
appInfo
.
uapp_id
,
diagnosisNo
:
diagnosisNeedNo
,
// uuid
channelUserId
:
pobj
.
userInfo
.
channel_userid
,
// 用户id
corporateName
:
actionBody
.
enterprise
,
// 公司名称
publishMobile
:
actionBody
.
mobile
,
// 联系电话
corporateType
:
actionBody
.
corporateType
,
// 店铺类型
diagnosisType
:
actionBody
.
diagnosisType
,
// 诊断类型
diagnosisMode
:
actionBody
.
diagnosisMode
,
// 诊断方式,这里由channel项目调用带参数
diagnosisResult
:
"rgshz"
,
// 创建订单时 人工审核中 前台用
status
:
"dcl"
,
// 创建订单时 待处理 后台用
qualificationsPic
:
actionBody
.
qualificationsPic
,
brandPic
:
actionBody
.
brandPic
,
industryPic
:
actionBody
.
industryPic
}
await
this
.
dao
.
create
(
nobj
);
return
system
.
getResultSuccess
();
}
}
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