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
992eee3b
Commit
992eee3b
authored
Aug 12, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix date
parent
1dc5dd2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
center-order/app/base/service/impl/dbneed/opneedinfoSve.js
+11
-11
No files found.
center-order/app/base/service/impl/dbneed/opneedinfoSve.js
View file @
992eee3b
...
@@ -4,14 +4,14 @@ const ServiceBase = require("../../sve.base");
...
@@ -4,14 +4,14 @@ const ServiceBase = require("../../sve.base");
const
settings
=
require
(
"../../../../config/settings"
);
const
settings
=
require
(
"../../../../config/settings"
);
var
moment
=
require
(
'moment'
)
var
moment
=
require
(
'moment'
)
class
NeedinfoService
extends
ServiceBase
{
class
NeedinfoService
extends
ServiceBase
{
constructor
()
{
constructor
()
{
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
NeedinfoService
));
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
NeedinfoService
));
this
.
execlient
=
system
.
getObject
(
"util.execClient"
);
this
.
execlient
=
system
.
getObject
(
"util.execClient"
);
this
.
needsolutionSve
=
system
.
getObject
(
"service.dbneed.needsolutionSve"
);
this
.
needsolutionSve
=
system
.
getObject
(
"service.dbneed.needsolutionSve"
);
this
.
needsolutionDao
=
system
.
getObject
(
"db.dbneed.needsolutionDao"
);
this
.
needsolutionDao
=
system
.
getObject
(
"db.dbneed.needsolutionDao"
);
this
.
needinfoDao
=
system
.
getObject
(
"db.dbneed.needinfoDao"
);
this
.
needinfoDao
=
system
.
getObject
(
"db.dbneed.needinfoDao"
);
}
}
async
getItemByNeedNo
(
pobj
)
{
async
getItemByNeedNo
(
pobj
)
{
var
item
=
await
this
.
dao
.
getItemByNeedNo
(
pobj
.
actionBody
.
needNo
);
var
item
=
await
this
.
dao
.
getItemByNeedNo
(
pobj
.
actionBody
.
needNo
);
console
.
log
(
system
.
getResultSuccess
(
item
));
console
.
log
(
system
.
getResultSuccess
(
item
));
if
(
!
item
)
{
if
(
!
item
)
{
...
@@ -20,7 +20,7 @@ class NeedinfoService extends ServiceBase {
...
@@ -20,7 +20,7 @@ class NeedinfoService extends ServiceBase {
return
system
.
getResultSuccess
(
item
);
return
system
.
getResultSuccess
(
item
);
}
}
async
opSubmitNeed
(
pobj
,
actionBody
,
req
)
{
async
opSubmitNeed
(
pobj
,
actionBody
,
req
)
{
var
needNo
=
await
this
.
getBusUid
(
"n"
);
var
needNo
=
await
this
.
getBusUid
(
"n"
);
if
(
!
actionBody
.
mobile
)
{
if
(
!
actionBody
.
mobile
)
{
return
system
.
getResultFail
(
-
5002
,
"mobile不能为空"
);
return
system
.
getResultFail
(
-
5002
,
"mobile不能为空"
);
...
@@ -47,7 +47,7 @@ class NeedinfoService extends ServiceBase {
...
@@ -47,7 +47,7 @@ class NeedinfoService extends ServiceBase {
return
system
.
getResultSuccess
(
r
);
return
system
.
getResultSuccess
(
r
);
}
}
async
opNeedList
(
pobj
,
actionBody
,
req
)
{
async
opNeedList
(
pobj
,
actionBody
,
req
)
{
// 时间段,分页,排序,需求状态 条件展示未做
// 时间段,分页,排序,需求状态 条件展示未做
console
.
log
(
pobj
);
console
.
log
(
pobj
);
console
.
log
(
pobj
.
actionBody
);
console
.
log
(
pobj
.
actionBody
);
...
@@ -76,15 +76,15 @@ class NeedinfoService extends ServiceBase {
...
@@ -76,15 +76,15 @@ class NeedinfoService extends ServiceBase {
if
(
actionBody
.
publishMobile
)
{
if
(
actionBody
.
publishMobile
)
{
sobj
.
search
.
publishMobile
=
actionBody
.
publishMobile
sobj
.
search
.
publishMobile
=
actionBody
.
publishMobile
}
}
if
(
actionBody
.
updatedAt
)
{
if
(
actionBody
.
stdate
&&
actionBody
.
endate
)
{
sobj
.
search
.
updated_at
=
actionBody
.
updatedAt
sobj
.
search
.
updated_at
=
{
[
this
.
db
.
Op
.
between
]:
[
actionBody
.
stdate
,
actionBody
.
endate
]
}
}
}
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
return
system
.
getResultSuccess
(
r
);
return
system
.
getResultSuccess
(
r
);
}
}
async
opNeedListBak
(
pobj
,
actionBody
,
req
)
{
async
opNeedListBak
(
pobj
,
actionBody
,
req
)
{
let
statusDic
=
[
'wts'
,
'yts'
,
'ygj'
,
'ygb'
,
'ycd'
]
let
statusDic
=
[
'wts'
,
'yts'
,
'ygj'
,
'ygb'
,
'ycd'
]
var
sobj
=
{
var
sobj
=
{
search
:
{
search
:
{
},
},
...
@@ -111,14 +111,14 @@ class NeedinfoService extends ServiceBase {
...
@@ -111,14 +111,14 @@ class NeedinfoService extends ServiceBase {
if
(
actionBody
.
publishMobile
)
{
if
(
actionBody
.
publishMobile
)
{
sobj
.
search
.
publishMobile
=
actionBody
.
publishMobile
sobj
.
search
.
publishMobile
=
actionBody
.
publishMobile
}
}
if
(
actionBody
.
updatedAt
)
{
if
(
actionBody
.
stdate
&&
actionBody
.
endate
)
{
sobj
.
search
.
updated_at
=
actionBody
.
updatedAt
sobj
.
search
.
updated_at
=
{
[
this
.
db
.
Op
.
between
]:
[
actionBody
.
stdate
,
actionBody
.
endate
]
}
}
}
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
return
system
.
getResultSuccess
(
r
);
return
system
.
getResultSuccess
(
r
);
}
}
async
opNeedClose
(
pobj
,
actionBody
,
req
)
{
async
opNeedClose
(
pobj
,
actionBody
,
req
)
{
var
needinfo
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
needNo
});
var
needinfo
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
needNo
});
if
(
!
needinfo
)
{
if
(
!
needinfo
)
{
return
system
.
getResultFail
(
-
5004
,
"需求不存在"
);
return
system
.
getResultFail
(
-
5004
,
"需求不存在"
);
...
...
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