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
cd6e5442
Commit
cd6e5442
authored
Feb 03, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
8b9516e3
fc1504ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+10
-5
TargetController.java
...haoban/manage/web/controller/target/TargetController.java
+9
-9
DataTargetHttpUtils.java
...c/haoban/manage/web/utils/target/DataTargetHttpUtils.java
+3
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
cd6e5442
...
...
@@ -469,15 +469,20 @@ public class StaffController extends WebBaseController {
*/
@RequestMapping
(
"staff-export"
)
public
HaobanResponse
staffExport
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
departmentId
,
Integer
activeFlag
,
Integer
relationFlag
,
String
keyWord
,
String
permitState
,
BasePageInfo
pageInfo
)
{
List
<
String
>
departmentIdSet
=
new
ArrayList
<>();
departmentIdSet
.
add
(
departmentId
);
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
boolean
needDep
=
true
;
if
(
StringUtils
.
isBlank
(
departmentId
)){
needDep
=
false
;
DepartmentDTO
dto
=
this
.
departmentApiService
.
getRootByEnterpriseId
(
wxEnterpriseId
)
;
departmentId
=
dto
.
getDepartmentId
()
;
}
List
<
String
>
departmentIdSet
=
new
ArrayList
<>();
departmentIdSet
.
add
(
departmentId
);
List
<
DepartmentDTO
>
relationList
=
departmentApiService
.
listSonByDepartmentIds
(
departmentIdSet
,
wxEnterpriseId
);
Map
<
String
,
DepartmentDTO
>
departmentMap
=
new
HashMap
<>(
);
Map
<
String
,
DepartmentDTO
>
departmentMap
=
relationList
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentDTO:
:
getDepartmentId
,
s
->
s
)
);
List
<
String
>
departmentIds
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
relationList
)){
departmentMap
=
relationList
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentDTO:
:
getDepartmentId
,
s
->
s
));
if
(!
needDep
)
{
departmentIds
=
relationList
.
stream
().
map
(
DepartmentDTO:
:
getDepartmentId
).
collect
(
Collectors
.
toList
());
}
List
<
StaffDTO
>
staffAllList
=
Lists
.
newArrayListWithCapacity
(
5000
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/target/TargetController.java
View file @
cd6e5442
...
...
@@ -151,9 +151,12 @@ public class TargetController {
@ResponseBody
public
RestResponse
getTargetAnalysisStoreDetail
(
QueryDataStatisticsCommonQO
qo
,
PageQo
pageQo
,
String
sortField
,
String
sortType
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
type
)
{
List
<
String
>
keyList
=
TargetAnalysisUtils
.
map
.
get
(
type
.
toString
());
JSONObject
jsonObject
=
getCommon
(
qo
,
type
<=
3
?
false
:
true
);
if
(
StringUtils
.
isNotBlank
(
sortField
))
{
jsonObject
.
put
(
"orderByField"
,
sortField
+
" "
+
sortType
);
}
else
{
jsonObject
.
put
(
"orderByField"
,
keyList
.
get
(
3
)
+
" desc "
);
}
Map
<
String
,
Object
>
res
=
DataTargetHttpUtils
.
http
(
DataTargetHttpUtils
.
getParam
(
pageQo
,
jsonObject
).
toJSONString
(),
type
<=
3
?
(
qo
.
getTimeType
()
==
1
?
"data_mbr_target_store_detail_year"
:
"data_mbr_target_store_detail_month"
)
:
(
qo
.
getTimeType
()
==
1
?
...
...
@@ -166,7 +169,6 @@ public class TargetController {
}
JSONObject
totalJson
=
(
JSONObject
)
totalRes
.
getResult
();
JSONObject
total
=
new
JSONObject
();
List
<
String
>
keyList
=
TargetAnalysisUtils
.
map
.
get
(
type
.
toString
());
for
(
String
key
:
keyList
)
{
total
.
put
(
key
,
totalJson
.
get
(
key
));
}
...
...
@@ -174,7 +176,7 @@ public class TargetController {
total
.
put
(
"storeName"
,
"合计"
);
total
.
put
(
"storeCode"
,
"合计"
);
List
<
JSONObject
>
dataList
=
page
.
getResult
();
List
<
JSONObject
>
resultList
=
page
.
getResult
();
List
<
JSONObject
>
resultList
=
new
ArrayList
<>
();
resultList
.
add
(
total
);
if
(
CollectionUtils
.
isNotEmpty
(
dataList
))
{
for
(
JSONObject
obj
:
dataList
)
{
...
...
@@ -230,13 +232,11 @@ public class TargetController {
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"entId"
,
qo
.
getEnterpriseId
());
jsonObject
.
put
(
"enterpriseId"
,
qo
.
getEnterpriseId
());
if
(
qo
.
getTimeType
()
==
1
)
{
jsonObject
.
put
(
"year"
,
qo
.
getTime
());
jsonObject
.
put
(
"yearDate"
,
qo
.
getTime
());
}
else
{
jsonObject
.
put
(
"month"
,
qo
.
getTime
());
jsonObject
.
put
(
"monthDate"
,
qo
.
getTime
());
}
jsonObject
.
put
(
"year"
,
qo
.
getTime
());
jsonObject
.
put
(
"yearDate"
,
qo
.
getTime
());
jsonObject
.
put
(
"month"
,
qo
.
getTime
());
jsonObject
.
put
(
"monthDate"
,
qo
.
getTime
());
jsonObject
.
put
(
"storeId"
,
getStoreIdList
(
qo
).
stream
().
collect
(
Collectors
.
joining
(
","
)));
return
jsonObject
;
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/utils/target/DataTargetHttpUtils.java
View file @
cd6e5442
...
...
@@ -131,6 +131,9 @@ public class DataTargetHttpUtils {
head
.
put
(
"Content-Type"
,
"application/json"
);
head
.
put
(
"API-TOKEN"
,
token
);
Map
<
String
,
Object
>
res
=
HttpClient
.
getWinxinResByJson
(
url
,
jsonParam
,
head
);
if
(!
isSuccess
(
res
))
{
throw
new
TargetException
((
String
)
res
.
get
(
"errorInfo"
));
}
LOGGER
.
info
(
"调用接口{},返回结果:{}"
,
url
,
res
);
return
res
;
}
...
...
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