Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
16ee9d3a
Commit
16ee9d3a
authored
Jan 04, 2024
by
guojx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
年补齐
parent
3704404d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
DataController.java
...gic/haoban/manage/web/controller/data/DataController.java
+15
-3
DateFillUtils.java
...n/java/com/gic/haoban/manage/web/utils/DateFillUtils.java
+12
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/data/DataController.java
View file @
16ee9d3a
...
@@ -350,8 +350,10 @@ public class DataController {
...
@@ -350,8 +350,10 @@ public class DataController {
apolloKey
.
contains
(
"week"
))
apolloKey
.
contains
(
"week"
))
&&
jsonObject
.
containsKey
(
"storeGroup"
)
&&
&&
jsonObject
.
containsKey
(
"storeGroup"
)
&&
((
apolloKey
.
contains
(
"data_sales"
)
&&
((
apolloKey
.
contains
(
"data_sales"
)
&&
(
jsonObject
.
getInteger
(
"storeGroup"
)
==
3
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
4
))
(
jsonObject
.
getInteger
(
"storeGroup"
)
==
3
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
4
||
(
apolloKey
.
contains
(
"data_mbr"
)
&&
jsonObject
.
getInteger
(
"storeGroup"
)
==
2
));
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
5
))
||
(
apolloKey
.
contains
(
"data_mbr"
)
&&
(
jsonObject
.
getInteger
(
"storeGroup"
)
==
2
||
jsonObject
.
getInteger
(
"storeGroup"
)
==
5
)));
if
(
isNeedFill
)
{
if
(
isNeedFill
)
{
log
.
info
(
"需要补零"
);
log
.
info
(
"需要补零"
);
List
<
JSONObject
>
resultList
=
DataApiUtils
.
getDataList
(
res
);
List
<
JSONObject
>
resultList
=
DataApiUtils
.
getDataList
(
res
);
...
@@ -362,7 +364,17 @@ public class DataController {
...
@@ -362,7 +364,17 @@ public class DataController {
if
(
apolloKey
.
contains
(
"day"
))
{
if
(
apolloKey
.
contains
(
"day"
))
{
dateTypeList
=
DateFillUtils
.
getDay
(
jsonObject
.
getString
(
"bizDate"
));
dateTypeList
=
DateFillUtils
.
getDay
(
jsonObject
.
getString
(
"bizDate"
));
}
else
if
(
apolloKey
.
contains
(
"month"
))
{
}
else
if
(
apolloKey
.
contains
(
"month"
))
{
dateTypeList
=
DateFillUtils
.
getMonth
(
jsonObject
.
getString
(
"startDate"
).
substring
(
0
,
7
));
//data_sales_perf_anal_cont_clerk_month_overview
//data_sales_perf_anal_cont_month_overview
//data_mbr_scale_stat_month_clerk_overview
//data_mbr_scale_stat_new_month_overview
//data_mbr_scale_stat_new_month_clerk_overview
boolean
isYearMonthQuery
=
jsonObject
.
getInteger
(
"storeGroup"
)
==
5
;
if
(
isYearMonthQuery
)
{
dateTypeList
=
DateFillUtils
.
getMonthOfYear
(
jsonObject
.
getString
(
"startDate"
).
substring
(
0
,
4
));
}
else
{
dateTypeList
=
DateFillUtils
.
getMonth
(
jsonObject
.
getString
(
"startDate"
).
substring
(
0
,
7
));
}
}
else
if
(
apolloKey
.
contains
(
"week"
))
{
}
else
if
(
apolloKey
.
contains
(
"week"
))
{
dateTypeList
=
DateFillUtils
.
getWeek
(
jsonObject
.
getString
(
"startDate"
));
dateTypeList
=
DateFillUtils
.
getWeek
(
jsonObject
.
getString
(
"startDate"
));
}
else
if
(
apolloKey
.
contains
(
"custm"
))
{
}
else
if
(
apolloKey
.
contains
(
"custm"
))
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/utils/DateFillUtils.java
View file @
16ee9d3a
...
@@ -120,6 +120,18 @@ public class DateFillUtils {
...
@@ -120,6 +120,18 @@ public class DateFillUtils {
return
dateList
;
return
dateList
;
}
}
public
static
List
<
String
>
getMonthOfYear
(
String
date
)
{
List
<
String
>
dateList
=
new
ArrayList
<>();
for
(
int
i
=
1
;
i
<=
12
;
i
++)
{
if
(
i
<
10
)
{
dateList
.
add
(
date
+
"-0"
+
i
);
}
else
{
dateList
.
add
(
date
+
"-"
+
i
);
}
}
return
dateList
;
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
log
.
info
(
""
+
JSONObject
.
toJSONString
(
getWeek
(
"2023-11-27"
)));
log
.
info
(
""
+
JSONObject
.
toJSONString
(
getWeek
(
"2023-11-27"
)));
}
}
...
...
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