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
1e938689
Commit
1e938689
authored
Dec 14, 2019
by
赵庆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
77635807
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
bpo-stat/app/base/controller/ctl.base.js
+23
-0
bpo-stat/app/base/controller/impl/all/merchantCtl.js
+7
-0
bpo-stat/app/base/controller/impl/all/taxinfoCtl.js
+3
-0
bpo-stat/app/base/service/impl/all/merchantSve.js
+2
-2
No files found.
bpo-stat/app/base/controller/ctl.base.js
View file @
1e938689
const
system
=
require
(
"../system"
);
const
settings
=
require
(
"../../config/settings"
);
const
moment
=
require
(
"moment"
);
class
CtlBase
{
constructor
(
gname
,
sname
)
{
this
.
serviceName
=
sname
;
...
...
@@ -145,5 +146,27 @@ class CtlBase {
}
return
source
.
substring
(
source
.
length
-
str
.
length
)
==
str
;
}
getMonthDays
(
month
)
{
let
begin
=
moment
(
month
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
;
let
end
=
moment
(
begin
).
add
(
1
,
"months"
).
subtract
(
1
,
'days'
).
format
(
"YYYY-MM-DD"
)
+
" 23:59:59"
;
return
this
.
getDays
(
end
);
}
getDays
(
end
)
{
var
days
=
[];
var
month
=
moment
(
end
).
format
(
"YYYY-MM"
);
var
endDay
=
Number
(
moment
(
end
).
format
(
"DD"
));
for
(
var
i
=
1
;
i
<=
endDay
;
i
++
)
{
if
(
i
<
10
)
{
days
.
push
(
month
+
"-0"
+
i
);
}
else
{
days
.
push
(
month
+
"-"
+
i
);
}
}
return
days
;
}
}
module
.
exports
=
CtlBase
;
bpo-stat/app/base/controller/impl/all/merchantCtl.js
View file @
1e938689
...
...
@@ -20,6 +20,9 @@ class MerchantCtl extends CtlBase {
//数据概览
async
dataSummarize
(
qobj
){
var
params
=
qobj
||
{};
var
date
=
this
.
getMonthDays
(
params
);
params
.
signBegin
=
date
[
0
];
params
.
signEnd
=
date
[
date
.
length
-
1
];
this
.
doTimeCondition
(
params
,
[
"signBegin"
,
"signEnd"
]);
try
{
var
page
=
await
this
.
service
.
dataSummarize
(
params
);
...
...
@@ -33,6 +36,10 @@ class MerchantCtl extends CtlBase {
//首页图表
async
dataChart
(
qobj
){
var
params
=
qobj
||
{};
var
date
=
this
.
getMonthDays
(
params
);
params
.
signBegin
=
date
[
0
];
params
.
signEnd
=
date
[
date
.
length
-
1
];
this
.
doTimeCondition
(
params
,
[
"signBegin"
,
"signEnd"
]);
try
{
var
page
=
await
this
.
service
.
dataChart
(
params
);
return
system
.
getResult2
(
page
);
...
...
bpo-stat/app/base/controller/impl/all/taxinfoCtl.js
View file @
1e938689
...
...
@@ -8,6 +8,9 @@ class TaxinfoCtl extends CtlBase {
async
allList
(
qobj
){
var
params
=
qobj
||
{};
var
date
=
this
.
getMonthDays
(
params
);
params
.
signBegin
=
date
[
0
];
params
.
signEnd
=
date
[
date
.
length
-
1
];
this
.
doTimeCondition
(
params
,
[
"signBegin"
,
"signEnd"
]);
try
{
var
page
=
await
this
.
service
.
signPage
(
params
);
...
...
bpo-stat/app/base/service/impl/all/merchantSve.js
View file @
1e938689
...
...
@@ -152,8 +152,8 @@ class MerchantService extends ServiceBase {
sqls
=
sqls
+
" AND sign_body = '"
+
params
.
sign_body
+
"'"
;
}
if
(
params
.
signBegin
||
params
.
signEnd
)
{
sql
=
sql
+
" AND completed_date >= '"
+
params
.
signBegin
+
"
00:00:00' AND completed_date <= '"
+
params
.
signEnd
+
" 23:59:59
'"
;
sqls
=
sqls
+
" AND transaction_time >= '"
+
params
.
signBegin
+
"
00:00:00' AND transaction_time <= '"
+
params
.
signEnd
+
" 23:59:59
'"
;
sql
=
sql
+
" AND completed_date >= '"
+
params
.
signBegin
+
"
' AND completed_date <= '"
+
params
.
signEnd
+
"
'"
;
sqls
=
sqls
+
" AND transaction_time >= '"
+
params
.
signBegin
+
"
' AND transaction_time <= '"
+
params
.
signEnd
+
"
'"
;
}
sql
=
sql
+
" GROUP BY days ORDER BY days ASC"
;
sqls
=
sqls
+
" GROUP BY days ORDER BY days ASC"
;
...
...
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