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
386179e7
Commit
386179e7
authored
Aug 11, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
1eae4ae6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
5 deletions
+97
-5
center-order/app/base/api/impl/action/diagnosisneedbus.js
+45
-0
center-order/app/base/db/impl/dbneed/diagnosisneedinfoDao.js
+12
-2
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
+40
-3
No files found.
center-order/app/base/api/impl/action/diagnosisneedbus.js
0 → 100644
View file @
386179e7
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
class
DiagnosisNeedBusAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
dnbSve
=
system
.
getObject
(
"service.dbneed.diagnosisneedbusSve"
);
}
async
springBoard
(
pobj
,
qobj
,
req
)
{
// if (!pobj.actionType) {
// return system.getResult(null, "actionType参数不能为空");
// }
// if (pobj.actionType == 'TODO: 认证结果 / 方案') {
// if (!pobj.userInfo) {
// return system.getResult(system.noLogin, "user no login!");
// }
// if (!pobj.appInfo) {
// return system.getResult(system.noLogin, "app is null!");
// }
// }
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"getList"
:
// 获取列表
opResult
=
await
this
.
dnbSve
.
getList
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"getDetail"
:
// 获取详情
opResult
=
await
this
.
dnbSve
.
getDetail
(
pobj
,
pobj
.
actionBody
.
id
);
break
;
case
"doEAV"
:
// 审核
opResult
=
await
this
.
dnbSve
.
doEAV
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"actionType参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
DiagnosisNeedBusAPI
;
\ No newline at end of file
center-order/app/base/db/impl/dbneed/diagnosisneedinfoDao.js
View file @
386179e7
const
Dao
=
require
(
"../../dao.base"
);
class
diagnosisneedinfoDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
diagnosisneedinfoDao
));
constructor
()
{
super
(
'needinfo'
);
}
async
findAndCountAll
(
query
)
{
console
.
log
(
this
.
model
)
return
await
this
.
model
.
findAndCountAll
(
query
)
}
async
update
(
param
,
id
)
{
return
await
this
.
model
.
update
(
param
,
{
where
:
{
id
}
})
}
}
module
.
exports
=
diagnosisneedinfoDao
;
\ No newline at end of file
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
View file @
386179e7
const
System
=
require
(
'../../../system'
)
const
ServiceBase
=
require
(
"../../sve.base"
);
class
diagnosisneedbusService
extends
ServiceBase
{
constructor
()
{
super
();
super
(
"dbneed"
,
'diagnosisneedinfoDao'
);
this
.
dniDao
=
System
.
getObject
(
"db.dbneed.diagnosisneedinfoDao"
);
}
async
test
()
{
return
'test'
async
getList
(
pobj
,
data
,
req
)
{
let
query
=
{
offset
:
((
data
.
page
-
1
)
*
data
.
pageSize
)
||
1
,
limit
:
data
.
pageSize
||
10
}
let
where
=
{}
if
(
data
.
diagnosisNo
)
{
where
.
diagnosisNo
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
data
.
diagnosisNo
}
%`
}
}
if
(
data
.
status
)
{
where
.
status
=
data
.
status
}
if
(
data
.
publishName
)
{
where
.
publishName
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
data
.
publishName
}
%`
}
}
if
(
data
.
stdate
&&
data
.
endate
)
{
where
.
updatedAt
=
{
[
this
.
db
.
Op
.
between
]:
[
data
.
stdate
,
data
.
endate
]}
}
if
(
Object
.
keys
(
where
).
length
>
0
)
{
query
.
where
=
where
}
let
res
=
await
this
.
dao
.
findAndCountAll
(
query
)
return
res
}
async
getDetail
(
pobj
,
id
)
{
let
res
=
await
this
.
dniDao
.
findById
(
id
)
return
res
}
async
doEAV
(
pobj
,
data
,
req
)
{
let
query
=
{
status
:
'ywc'
,
diagnosisResult
:
data
.
diagnosisResult
}
let
res
=
await
this
.
dniDao
.
update
(
query
,
data
.
id
)
}
}
module
.
exports
=
diagnosisneedbusService
;
\ 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