Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
82018cba
Commit
82018cba
authored
Apr 24, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知详情修改
parent
b52f1363
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
IndexModuleController.java
.../gic/enterprise/web/controller/IndexModuleController.java
+23
-5
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/IndexModuleController.java
View file @
82018cba
package
com
.
gic
.
enterprise
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.ChannelResourceDTO
;
...
...
@@ -179,7 +180,10 @@ public class IndexModuleController {
result
.
add
(
map
);
}
}
return
RestResponse
.
success
(
result
);
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"data"
,
result
);
data
.
put
(
"legend"
,
this
.
getLegend
(
enterpriseId
,
null
));
return
RestResponse
.
success
(
data
);
}
@RequestMapping
(
"store-city-data"
)
...
...
@@ -234,7 +238,10 @@ public class IndexModuleController {
}
}
}
return
RestResponse
.
success
(
result
);
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"data"
,
result
);
data
.
put
(
"legend"
,
this
.
getLegend
(
enterpriseId
,
provinceId
));
return
RestResponse
.
success
(
data
);
}
...
...
@@ -345,12 +352,23 @@ public class IndexModuleController {
return
RestResponse
.
success
(
result
);
}
private
void
getLegend
(
Integer
enterpriseId
,
String
provinceId
){
private
List
<
Integer
>
getLegend
(
Integer
enterpriseId
,
String
provinceId
){
Integer
storeNum
=
this
.
getStoreNum
(
enterpriseId
,
null
,
provinceId
);
List
<
Integer
>
legend
=
new
ArrayList
<>();
if
(
storeNum
<=
21
){
int
index
=
1
;
while
(
storeNum
>
0
){
legend
.
add
(
index
*
1
);
storeNum
-=
index
*
1
;
index
++;
}
}
else
{
int
sig
=
storeNum
%
21
==
0
?
storeNum
/
21
:
storeNum
/
21
+
1
;
for
(
int
i
=
1
;
i
<=
6
;
i
++){
legend
.
add
(
i
*
sig
);
}
}
return
legend
;
}
private
Integer
getStoreNum
(
Integer
enterpriseId
,
Integer
status
,
String
provinceId
){
...
...
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