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
d27e0830
Commit
d27e0830
authored
Aug 12, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Plain Diff
diagnosis uupdate
parents
909e465a
54e1b2ab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
21 deletions
+110
-21
center-order/app/base/api/impl/action/diagnosis.js
+9
-3
center-order/app/base/api/impl/action/diagnosisneedbus.js
+8
-1
center-order/app/base/db/impl/dbneed/diagnosisDao.js
+5
-1
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
+39
-15
center-order/app/base/service/impl/dbneed/opneedinfoSve.js
+49
-1
No files found.
center-order/app/base/api/impl/action/diagnosis.js
View file @
d27e0830
...
@@ -2,23 +2,24 @@ var APIBase = require("../../api.base");
...
@@ -2,23 +2,24 @@ var APIBase = require("../../api.base");
var
system
=
require
(
"../../../system"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
DiagnosisAPI
extends
APIBase
{
class
DiagnosisAPI
extends
APIBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
diagnosisSve
=
system
.
getObject
(
"service.dbneed.diagnosisSve"
);
this
.
diagnosisSve
=
system
.
getObject
(
"service.dbneed.diagnosisSve"
);
this
.
needSve
=
system
.
getObject
(
'service.dbneed.opneedinfoSve'
)
}
}
/**
/**
* 接口跳转-POST请求
* 接口跳转-POST请求
* action_type 执行的类型
* action_type 执行的类型
* action_body 执行的参数
* action_body 执行的参数
*/
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionType
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
return
result
;
}
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"manualEvaluation"
:
case
"manualEvaluation"
:
...
@@ -30,6 +31,11 @@ class DiagnosisAPI extends APIBase {
...
@@ -30,6 +31,11 @@ class DiagnosisAPI extends APIBase {
case
"enterpriseInfo"
:
case
"enterpriseInfo"
:
opResult
=
await
this
.
diagnosisSve
.
enterpriseInfo
(
pobj
,
pobj
.
actionBody
,
req
);
opResult
=
await
this
.
diagnosisSve
.
enterpriseInfo
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
break
;
case
'getNeedList'
:
// 需求列表 20 08 12 liang
opResult
=
await
this
.
needSve
.
opNeedList
(
pobj
,
pobj
.
actionBody
,
req
);
break
case
'getNeedDetail'
:
// 需求详情 20 08 12 liang
opResult
=
await
this
.
needSve
.
getItemByNeedNo
(
pobj
);
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-order/app/base/api/impl/action/diagnosisneedbus.js
View file @
d27e0830
...
@@ -4,8 +4,9 @@ class DiagnosisNeedBusAPI extends APIBase {
...
@@ -4,8 +4,9 @@ class DiagnosisNeedBusAPI extends APIBase {
constructor
()
{
constructor
()
{
super
();
super
();
this
.
dnbSve
=
system
.
getObject
(
"service.dbneed.diagnosisneedbusSve"
);
this
.
dnbSve
=
system
.
getObject
(
"service.dbneed.diagnosisneedbusSve"
);
this
.
needSve
=
system
.
getObject
(
'service.dbneed.opneedinfoSve'
)
}
}
async
springBoard
(
pobj
,
qobj
,
req
)
{
async
springBoard
(
pobj
,
qobj
,
req
)
{
// if (!pobj.actionType) {
// if (!pobj.actionType) {
// return system.getResult(null, "actionType参数不能为空");
// return system.getResult(null, "actionType参数不能为空");
...
@@ -33,6 +34,12 @@ class DiagnosisNeedBusAPI extends APIBase {
...
@@ -33,6 +34,12 @@ class DiagnosisNeedBusAPI extends APIBase {
case
"doEAV"
:
// 审核
case
"doEAV"
:
// 审核
opResult
=
await
this
.
dnbSve
.
doEAV
(
pobj
,
pobj
.
actionBody
,
req
);
opResult
=
await
this
.
dnbSve
.
doEAV
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
break
;
case
'getNeedList'
:
// 需求列表
opResult
=
await
this
.
needSve
.
opNeedListBak
(
pobj
,
pobj
.
actionBody
,
req
);
break
case
'getNeedDetail'
:
// 需求详情
opResult
=
await
this
.
needSve
.
getItemByNeedNo
(
pobj
);
break
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"actionType参数错误"
);
opResult
=
system
.
getResult
(
null
,
"actionType参数错误"
);
break
;
break
;
...
...
center-order/app/base/db/impl/dbneed/diagnosisDao.js
View file @
d27e0830
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
class
diagnosisDao
extends
Dao
{
class
diagnosisDao
extends
Dao
{
constructor
()
{
constructor
()
{
super
(
Dao
.
getModelName
(
diagnosisDao
));
super
(
Dao
.
getModelName
(
diagnosisDao
));
}
}
async
findAndCountAll
(
query
)
{
async
findAndCountAll
(
query
)
{
...
@@ -11,6 +11,7 @@ class diagnosisDao extends Dao {
...
@@ -11,6 +11,7 @@ class diagnosisDao extends Dao {
return
await
this
.
model
.
update
(
param
,
{
where
:
{
id
}
})
return
await
this
.
model
.
update
(
param
,
{
where
:
{
id
}
})
}
}
<<<<<<<
HEAD
async
findOneOrderByCreateAt
(
uid
)
{
async
findOneOrderByCreateAt
(
uid
)
{
return
await
this
.
model
.
findOne
({
return
await
this
.
model
.
findOne
({
where
:
{
where
:
{
...
@@ -22,5 +23,7 @@ class diagnosisDao extends Dao {
...
@@ -22,5 +23,7 @@ class diagnosisDao extends Dao {
raw
:
true
raw
:
true
});
});
}
}
=======
>>>>>>>
54
e1b2abd183bb4b792de95cff06b721a760daa4
}
}
module
.
exports
=
diagnosisDao
;
module
.
exports
=
diagnosisDao
;
\ No newline at end of file
center-order/app/base/service/impl/dbneed/diagnosisneedbusSve.js
View file @
d27e0830
const
System
=
require
(
'../../../system'
)
const
ServiceBase
=
require
(
"../../sve.base"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
System
=
require
(
'../../../system'
);
class
diagnosisneedbusService
extends
ServiceBase
{
class
diagnosisneedbusService
extends
ServiceBase
{
constructor
()
{
constructor
()
{
super
(
"dbneed"
,
'diagnosisDao'
);
super
(
"dbneed"
,
'diagnosisDao'
);
}
}
async
getList
(
pobj
,
data
,
req
)
{
async
getList
(
pobj
,
data
,
req
)
{
let
query
=
{
let
query
=
{
offset
:
((
data
.
page
-
1
)
*
data
.
pageSize
)
||
1
,
offset
:
((
data
.
page
-
1
)
*
data
.
pageSize
)
||
0
,
limit
:
data
.
pageSize
||
10
limit
:
data
.
pageSize
||
10
,
attributes
:
[
'id'
,
'diagnosis_no'
,
'corporate_type'
,
'corporate_type_name'
,
'corporate_name'
,
'publish_name'
,
'publish_mobile'
,
'status'
,
'status_name'
],
order
:
[[
"updated_at"
,
'desc'
]]
}
}
let
where
=
{}
let
where
=
{}
if
(
data
.
diagnosisNo
)
{
if
(
data
.
diagnosisNo
)
{
...
@@ -20,8 +32,8 @@ class diagnosisneedbusService extends ServiceBase {
...
@@ -20,8 +32,8 @@ class diagnosisneedbusService extends ServiceBase {
if
(
data
.
publishName
)
{
if
(
data
.
publishName
)
{
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
.
updatedAt
)
{
where
.
updated
At
=
{
[
this
.
db
.
Op
.
between
]:
[
data
.
stdate
,
data
.
endate
]
}
where
.
updated
_at
=
{
[
this
.
db
.
Op
.
between
]:
data
.
updatedAt
}
}
}
if
(
data
.
corporateType
)
{
if
(
data
.
corporateType
)
{
where
.
corporate_type
=
data
.
corporateType
where
.
corporate_type
=
data
.
corporateType
...
@@ -29,21 +41,34 @@ class diagnosisneedbusService extends ServiceBase {
...
@@ -29,21 +41,34 @@ class diagnosisneedbusService extends ServiceBase {
if
(
Object
.
keys
(
where
).
length
>
0
)
{
if
(
Object
.
keys
(
where
).
length
>
0
)
{
query
.
where
=
where
query
.
where
=
where
}
}
let
res
=
await
this
.
dao
.
findAndCountAll
(
query
)
try
{
return
res
let
res
=
await
this
.
dao
.
findAndCountAll
(
query
)
return
System
.
getResultSuccess
(
res
)
}
catch
(
error
)
{
return
System
.
getResultFail
(
-
1
,
error
.
message
)
}
}
}
async
getDetail
(
pobj
,
id
)
{
async
getDetail
(
pobj
,
id
)
{
let
res
=
await
this
.
dniDao
.
findById
(
id
)
try
{
return
res
let
res
=
await
this
.
dao
.
findById
(
id
)
return
System
.
getResultSuccess
(
res
)
}
catch
(
error
)
{
return
System
.
getResultFail
(
-
1
,
error
.
message
)
}
}
}
async
doEAV
(
pobj
,
data
,
req
)
{
async
doEAV
(
pobj
,
data
,
req
)
{
let
query
=
{
let
query
=
{
status
:
'ywc'
,
status
:
'ywc'
,
diagnosisResult
:
data
.
diagnosisResult
diagnosis_result
:
data
.
diagnosisResult
}
let
res
=
await
this
.
dao
.
update
(
query
,
data
.
id
)
try
{
return
System
.
getResultSuccess
(
res
)
}
catch
(
error
)
{
return
System
.
getResultFail
(
-
1
,
error
.
message
)
}
}
let
res
=
await
this
.
dniDao
.
update
(
query
,
data
.
id
)
}
}
}
}
module
.
exports
=
diagnosisneedbusService
;
module
.
exports
=
diagnosisneedbusService
;
\ No newline at end of file
center-order/app/base/service/impl/dbneed/opneedinfoSve.js
View file @
d27e0830
...
@@ -63,9 +63,57 @@ class NeedinfoService extends ServiceBase {
...
@@ -63,9 +63,57 @@ class NeedinfoService extends ServiceBase {
if
(
actionBody
.
ConsultType
)
{
if
(
actionBody
.
ConsultType
)
{
sobj
.
search
.
consult_type
=
actionBody
.
consultType
;
sobj
.
search
.
consult_type
=
actionBody
.
consultType
;
}
}
if
(
actionBody
.
status
)
{
// liang 追加筛选条件
if
(
actionBody
.
status
&&
statusDic
.
indexOf
(
actionBody
.
status
)
!=
-
1
)
{
sobj
.
search
.
status
=
actionBody
.
status
;
sobj
.
search
.
status
=
actionBody
.
status
;
}
}
if
(
actionBody
.
needNo
)
{
sobj
.
search
.
needNo
=
actionBody
.
needNo
}
if
(
actionBody
.
publishName
)
{
sobj
.
search
.
publishName
=
actionBody
.
publishName
}
if
(
actionBody
.
publishMobile
)
{
sobj
.
search
.
publishMobile
=
actionBody
.
publishMobile
}
if
(
actionBody
.
updatedAt
)
{
sobj
.
search
.
updated_at
=
actionBody
.
updatedAt
}
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
return
system
.
getResultSuccess
(
r
);
}
async
opNeedListBak
(
pobj
,
actionBody
,
req
)
{
let
statusDic
=
[
'wts'
,
'yts'
,
'ygj'
,
'ygb'
,
'ycd'
]
var
sobj
=
{
search
:
{
},
pageInfo
:
{
pageNo
:
Number
(
actionBody
.
pageNumber
)
||
1
,
pageSize
:
Number
(
actionBody
.
pageSize
)
||
10
}
}
if
(
pobj
.
appInfo
.
uapp_id
)
{
sobj
.
search
.
uapp_id
=
pobj
.
appInfo
.
uapp_id
}
if
(
actionBody
.
typeCode
)
{
sobj
.
search
.
typeCode
=
actionBody
.
typeCode
;
}
if
(
actionBody
.
status
&&
statusDic
.
indexOf
(
actionBody
.
status
)
!=
-
1
)
{
sobj
.
search
.
status
=
actionBody
.
status
;
}
if
(
actionBody
.
needNo
)
{
sobj
.
search
.
needNo
=
actionBody
.
needNo
}
if
(
actionBody
.
publishName
)
{
sobj
.
search
.
publishName
=
actionBody
.
publishName
}
if
(
actionBody
.
publishMobile
)
{
sobj
.
search
.
publishMobile
=
actionBody
.
publishMobile
}
if
(
actionBody
.
updatedAt
)
{
sobj
.
search
.
updated_at
=
actionBody
.
updatedAt
}
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
return
system
.
getResultSuccess
(
r
);
return
system
.
getResultSuccess
(
r
);
}
}
...
...
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