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
6f7f9378
Commit
6f7f9378
authored
Jun 23, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 支持搜索年报状态
parent
6784d013
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
19 deletions
+36
-19
icp-deliver/app/base/db/dao.base.js
+2
-2
icp-deliver/app/base/db/impl/delivery/deliverDao.js
+31
-16
icp-deliver/app/base/service/impl/delivery/deliverSve.js
+3
-1
No files found.
icp-deliver/app/base/db/dao.base.js
View file @
6f7f9378
...
...
@@ -101,7 +101,7 @@ class Dao {
qc
.
where
=
{};
if
(
search
)
{
Object
.
keys
(
search
).
forEach
(
k
=>
{
console
.
log
(
search
[
k
],
":search[k]search[k]search[k]"
);
// console.log(search[k], ":search[k]search[k]search[k]");
if
(
search
[
k
]
&&
search
[
k
]
!=
'undefined'
&&
search
[
k
]
!=
""
)
{
if
((
k
.
indexOf
(
"Date"
)
>=
0
||
k
.
indexOf
(
"_at"
)
>=
0
))
{
if
(
search
[
k
]
!=
""
&&
search
[
k
])
{
...
...
@@ -140,7 +140,7 @@ class Dao {
if
(
extraFilter
)
{
qc
[
extraFilter
.
key
]
=
extraFilter
.
value
;
}
console
.
log
(
"
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
"
);
console
.
log
(
"
------------ 传入 的 查询 条件 -------------
"
);
console
.
log
(
qc
);
return
qc
;
}
...
...
icp-deliver/app/base/db/impl/delivery/deliverDao.js
View file @
6f7f9378
...
...
@@ -32,6 +32,37 @@ class DeliverDao extends Dao {
[
this
.
db
.
Op
.
in
]:
[
system
.
SERVICECODE
.
EDIANNUALREPORT
,
system
.
SERVICECODE
.
ICPANNUALREPORT
]
}
// ---- 兼容 年报 状态 未申报、已申报 start
let
status
;
if
([
system
.
ANNUALREPORT
.
WAITDECLARE
,
system
.
ANNUALREPORT
.
DECLARESUCCESS
].
includes
(
qc
.
where
.
delivery_status
))
{
status
=
qc
.
where
.
delivery_status
;
delete
qc
.
where
.
delivery_status
;
qobj
.
bizpath
=
"/annualReport/wait"
;
}
let
include
=
{
model
:
this
.
db
.
models
.
annualreport
,
attributes
:
[
'status'
,
"year"
],
where
:
{
year
:
{
[
this
.
db
.
Op
.
or
]:
[
new
Date
().
getFullYear
(),
null
]
},
},
required
:
false
}
if
(
status
)
{
include
.
where
.
status
=
status
;
delete
include
.
required
;
}
qc
.
include
=
[
include
]
// ---- 兼容 年报 状态 未申报、已申报 end
switch
(
qobj
.
bizpath
)
{
case
"/annualReport/wait"
:
qc
.
where
.
delivery_status
=
qc
.
where
.
delivery_status
||
{
...
...
@@ -45,22 +76,6 @@ class DeliverDao extends Dao {
break
}
qc
.
include
=
[
{
model
:
this
.
db
.
models
.
annualreport
,
attributes
:
[
'status'
,
"year"
],
where
:
{
year
:
{
[
this
.
db
.
Op
.
or
]:
[
new
Date
().
getFullYear
(),
null
]
}
},
required
:
false
}
]
}
return
qw
;
...
...
icp-deliver/app/base/service/impl/delivery/deliverSve.js
View file @
6f7f9378
...
...
@@ -155,7 +155,9 @@ class DeliverService extends ServiceBase {
}
});
if
(
annualReportData
&&
annualReportData
.
delivery_status
===
System
.
ANNUALREPORT
.
RECEIVED
)
{
let
year
=
annualReportData
.
delivery_info
&&
annualReportData
.
delivery_info
.
numYear
||
5
// TODO: let year = annualReportData.delivery_info && annualReportData.delivery_info.numYear || 5
let
year
=
5
;
for
(
let
i
=
new
Date
().
getFullYear
();
i
<
new
Date
().
getFullYear
()
+
year
;
i
++
)
{
annualReportArry
.
push
({
year
:
i
,
...
...
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