Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
cea7190f
Commit
cea7190f
authored
Dec 23, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
excel导出bug修复
parent
69acbff8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
30 deletions
+25
-30
StaffStatisticsAdminController.java
...rity/admin/rest/admin/StaffStatisticsAdminController.java
+4
-5
OrderReceivedStatisticsBiz.java
...m/xxfc/platform/order/biz/OrderReceivedStatisticsBiz.java
+9
-12
OrderMemberController.java
...a/com/xxfc/platform/order/rest/OrderMemberController.java
+0
-1
CompanyOrderReceivedStatiscsAdminController.java
...ckground/CompanyOrderReceivedStatiscsAdminController.java
+4
-5
OrderReceivedStatisticsAdminController.java
...st/background/OrderReceivedStatisticsAdminController.java
+5
-6
StaffStatisticsAdminController.java
...order/rest/background/StaffStatisticsAdminController.java
+3
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/StaffStatisticsAdminController.java
View file @
cea7190f
...
@@ -5,10 +5,8 @@ import com.github.wxiaoqi.security.admin.dto.StaffStatisticsFindDTO;
...
@@ -5,10 +5,8 @@ import com.github.wxiaoqi.security.admin.dto.StaffStatisticsFindDTO;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -22,7 +20,7 @@ import java.util.Map;
...
@@ -22,7 +20,7 @@ import java.util.Map;
* @description
* @description
* @data 2019/11/26 16:59
* @data 2019/11/26 16:59
*/
*/
@
Rest
Controller
@Controller
@RequestMapping
(
"/staff_statistics"
)
@RequestMapping
(
"/staff_statistics"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
public
class
StaffStatisticsAdminController
{
public
class
StaffStatisticsAdminController
{
...
@@ -30,6 +28,7 @@ public class StaffStatisticsAdminController {
...
@@ -30,6 +28,7 @@ public class StaffStatisticsAdminController {
private
final
StaffStatisticsBiz
staffStatisticsBiz
;
private
final
StaffStatisticsBiz
staffStatisticsBiz
;
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
@ResponseBody
public
ObjectRestResponse
<
Map
<
String
,
Object
>>
lisetStaffStatisticsWithPage
(
@RequestBody
StaffStatisticsFindDTO
staffStatisticsFindDTO
){
public
ObjectRestResponse
<
Map
<
String
,
Object
>>
lisetStaffStatisticsWithPage
(
@RequestBody
StaffStatisticsFindDTO
staffStatisticsFindDTO
){
Map
<
String
,
Object
>
result
=
staffStatisticsBiz
.
listStaffStatisticsWithPage
(
staffStatisticsFindDTO
);
Map
<
String
,
Object
>
result
=
staffStatisticsBiz
.
listStaffStatisticsWithPage
(
staffStatisticsFindDTO
);
return
ObjectRestResponse
.
succ
(
result
);
return
ObjectRestResponse
.
succ
(
result
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderReceivedStatisticsBiz.java
View file @
cea7190f
...
@@ -27,8 +27,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -27,8 +27,6 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -54,7 +52,6 @@ public class OrderReceivedStatisticsBiz extends BaseBiz<OrderReceivedStatisticsM
...
@@ -54,7 +52,6 @@ public class OrderReceivedStatisticsBiz extends BaseBiz<OrderReceivedStatisticsM
private
List
<
String
>
orderRentVehicleSigns
;
private
List
<
String
>
orderRentVehicleSigns
;
private
List
<
String
>
orderTourSigns
;
private
List
<
String
>
orderTourSigns
;
private
Map
<
String
,
String
>
signAndDescMap
;
private
Map
<
String
,
String
>
signAndDescMap
;
private
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
private
final
ThreadPoolTaskExecutor
executor
;
private
final
ThreadPoolTaskExecutor
executor
;
...
@@ -181,15 +178,15 @@ public class OrderReceivedStatisticsBiz extends BaseBiz<OrderReceivedStatisticsM
...
@@ -181,15 +178,15 @@ public class OrderReceivedStatisticsBiz extends BaseBiz<OrderReceivedStatisticsM
firstCell
.
setCellValue
(
DateUtil
.
format
(
orderReceivedStatisticsVo
.
getDate
(),
"yyyy.MM.dd"
));
firstCell
.
setCellValue
(
DateUtil
.
format
(
orderReceivedStatisticsVo
.
getDate
(),
"yyyy.MM.dd"
));
}
}
if
(
ReceivedStatisticsEnum
.
WEEK
.
getWayCode
()
==
statisticalWay
)
{
if
(
ReceivedStatisticsEnum
.
WEEK
.
getWayCode
()
==
statisticalWay
)
{
LocalDate
localDate
=
LocalDate
.
of
(
Integer
.
valueOf
(
orderReceivedStatisticsVo
.
getYear
()),
Integer
.
valueOf
(
orderReceivedStatisticsVo
.
getMonth
().
replace
(
orderReceivedStatisticsVo
.
getYear
(),
""
)),
1
);
Calendar
cal
=
Calendar
.
getInstance
(
);
int
dayOfYear
=
localDate
.
getDayOfYear
(
);
cal
.
setFirstDayOfWeek
(
Calendar
.
MONDAY
);
int
days
=
Integer
.
valueOf
(
orderReceivedStatisticsVo
.
getWeekOfYear
().
replace
(
orderReceivedStatisticsVo
.
getYear
(),
""
))
*
7
;
cal
.
set
(
Calendar
.
YEAR
,
Integer
.
valueOf
(
orderReceivedStatisticsVo
.
getYear
()))
;
int
betweenDays
=
days
-
dayOfYear
;
cal
.
set
(
Calendar
.
WEEK_OF_YEAR
,
Integer
.
valueOf
(
orderReceivedStatisticsVo
.
getWeekOfYear
().
replace
(
""
+
orderReceivedStatisticsVo
.
getYear
(),
""
)))
;
LocalDate
endLocalDate
=
localDate
.
withDayOfMonth
(
betweenDays
);
cal
.
set
(
Calendar
.
DAY_OF_WEEK
,
cal
.
getFirstDayOfWeek
()
);
LocalDate
startLocalDate
=
endLocalDate
.
minusDays
(
6
);
Date
startDate
=
cal
.
getTime
(
);
String
startDateStr
=
startLocalDate
.
format
(
dateTimeFormatter
);
cal
.
add
(
Calendar
.
DAY_OF_WEEK
,
6
);
String
endDateStr
=
endLocalDate
.
format
(
dateTimeFormatter
);
Date
endDate
=
cal
.
getTime
(
);
firstCell
.
setCellValue
(
String
.
format
(
"%s~%s"
,
startDateStr
,
endDateStr
));
firstCell
.
setCellValue
(
String
.
format
(
"%s~%s"
,
DateUtil
.
format
(
startDate
,
"yyyy-MM-dd"
),
DateUtil
.
format
(
endDate
,
"yyyy-MM-dd"
)
));
}
}
if
(
ReceivedStatisticsEnum
.
MONTH
.
getWayCode
()
==
statisticalWay
)
{
if
(
ReceivedStatisticsEnum
.
MONTH
.
getWayCode
()
==
statisticalWay
)
{
StringBuilder
sb
=
new
StringBuilder
(
orderReceivedStatisticsVo
.
getMonth
());
StringBuilder
sb
=
new
StringBuilder
(
orderReceivedStatisticsVo
.
getMonth
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderMemberController.java
View file @
cea7190f
...
@@ -76,7 +76,6 @@ public class OrderMemberController extends BaseController<OrderMemberDetailBiz,
...
@@ -76,7 +76,6 @@ public class OrderMemberController extends BaseController<OrderMemberDetailBiz,
}
}
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
void
exportMemberOrders
(
@RequestBody
MemberOrderFindDTO
memberOrderFindDTO
,
HttpServletResponse
response
){
public
void
exportMemberOrders
(
@RequestBody
MemberOrderFindDTO
memberOrderFindDTO
,
HttpServletResponse
response
){
try
{
try
{
String
name
=
DateTimeFormatter
.
ofPattern
(
"YYYYMMddHHmmss"
).
format
(
LocalDateTime
.
now
());
String
name
=
DateTimeFormatter
.
ofPattern
(
"YYYYMMddHHmmss"
).
format
(
LocalDateTime
.
now
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/CompanyOrderReceivedStatiscsAdminController.java
View file @
cea7190f
...
@@ -11,10 +11,8 @@ import io.swagger.annotations.ApiOperation;
...
@@ -11,10 +11,8 @@ import io.swagger.annotations.ApiOperation;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -29,7 +27,7 @@ import java.util.Date;
...
@@ -29,7 +27,7 @@ import java.util.Date;
* @data 2019/11/23 14:32
* @data 2019/11/23 14:32
*/
*/
@Slf4j
@Slf4j
@
Rest
Controller
@Controller
@RequestMapping
(
"/statistics"
)
@RequestMapping
(
"/statistics"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
public
class
CompanyOrderReceivedStatiscsAdminController
{
public
class
CompanyOrderReceivedStatiscsAdminController
{
...
@@ -37,6 +35,7 @@ public class CompanyOrderReceivedStatiscsAdminController {
...
@@ -37,6 +35,7 @@ public class CompanyOrderReceivedStatiscsAdminController {
private
final
CompanyPerformanceBiz
companyPerformanceBiz
;
private
final
CompanyPerformanceBiz
companyPerformanceBiz
;
@PostMapping
(
"/company_performance"
)
@PostMapping
(
"/company_performance"
)
@ResponseBody
public
ObjectRestResponse
<
PageDataVO
<
CompanyPerformanceBo
>>
companyPerformance
(
@RequestBody
CompanyPerformanceFindDTO
companyPerformanceFindDTO
){
public
ObjectRestResponse
<
PageDataVO
<
CompanyPerformanceBo
>>
companyPerformance
(
@RequestBody
CompanyPerformanceFindDTO
companyPerformanceFindDTO
){
if
(
companyPerformanceFindDTO
.
getStartDate
()
==
null
&&
companyPerformanceFindDTO
.
getEndDate
()==
null
){
if
(
companyPerformanceFindDTO
.
getStartDate
()
==
null
&&
companyPerformanceFindDTO
.
getEndDate
()==
null
){
Date
date
=
new
Date
();
Date
date
=
new
Date
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/OrderReceivedStatisticsAdminController.java
View file @
cea7190f
...
@@ -15,10 +15,8 @@ import lombok.RequiredArgsConstructor;
...
@@ -15,10 +15,8 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -37,7 +35,7 @@ import java.util.Map;
...
@@ -37,7 +35,7 @@ import java.util.Map;
*/
*/
@Slf4j
@Slf4j
@Api
(
tags
=
"订单统计"
)
@Api
(
tags
=
"订单统计"
)
@
Rest
Controller
@Controller
@RequestMapping
(
"admin/order/received_statistics"
)
@RequestMapping
(
"admin/order/received_statistics"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
public
class
OrderReceivedStatisticsAdminController
{
public
class
OrderReceivedStatisticsAdminController
{
...
@@ -45,6 +43,7 @@ public class OrderReceivedStatisticsAdminController {
...
@@ -45,6 +43,7 @@ public class OrderReceivedStatisticsAdminController {
@ApiOperation
(
"订单统计"
)
@ApiOperation
(
"订单统计"
)
@PostMapping
(
""
)
@PostMapping
(
""
)
@ResponseBody
public
ObjectRestResponse
<
Map
<
String
,
List
<
OrderReceivedStatisticsVo
>>>
orderReceivedStatistics
(
@RequestBody
@SimpleValid
OrderReceivedStatisticsFindDTO
orderReceivedStatisticsFindDTO
,
UserDTO
userDTO
){
public
ObjectRestResponse
<
Map
<
String
,
List
<
OrderReceivedStatisticsVo
>>>
orderReceivedStatistics
(
@RequestBody
@SimpleValid
OrderReceivedStatisticsFindDTO
orderReceivedStatisticsFindDTO
,
UserDTO
userDTO
){
orderReceivedStatisticsFindDTO
.
setCompanyId
(
Arrays
.
asList
(
userDTO
.
getCompanyId
()));
orderReceivedStatisticsFindDTO
.
setCompanyId
(
Arrays
.
asList
(
userDTO
.
getCompanyId
()));
if
(
orderReceivedStatisticsFindDTO
.
getStartDate
()==
null
&&
orderReceivedStatisticsFindDTO
.
getEndDate
()==
null
){
if
(
orderReceivedStatisticsFindDTO
.
getStartDate
()==
null
&&
orderReceivedStatisticsFindDTO
.
getEndDate
()==
null
){
...
@@ -59,7 +58,7 @@ public class OrderReceivedStatisticsAdminController {
...
@@ -59,7 +58,7 @@ public class OrderReceivedStatisticsAdminController {
}
}
@ApiOperation
(
"订单统计excel导出下载"
)
@ApiOperation
(
"订单统计excel导出下载"
)
@PostMapping
(
value
=
"/export"
,
consumes
=
MediaType
.
APPLICATION_JSON_UTF8
_VALUE
)
@PostMapping
(
value
=
"/export"
,
produces
=
MediaType
.
APPLICATION_OCTET_STREAM
_VALUE
)
public
ObjectRestResponse
<
Void
>
exportOrderReceivedStatistics
(
@RequestBody
@BeanValid
OrderReceivedStatisticsFindDTO
orderReceivedStatisticsFindDTO
,
UserDTO
userDTO
,
HttpServletResponse
response
){
public
ObjectRestResponse
<
Void
>
exportOrderReceivedStatistics
(
@RequestBody
@BeanValid
OrderReceivedStatisticsFindDTO
orderReceivedStatisticsFindDTO
,
UserDTO
userDTO
,
HttpServletResponse
response
){
try
{
try
{
orderReceivedStatisticsFindDTO
.
setCompanyId
(
Arrays
.
asList
(
userDTO
.
getCompanyId
()));
orderReceivedStatisticsFindDTO
.
setCompanyId
(
Arrays
.
asList
(
userDTO
.
getCompanyId
()));
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/StaffStatisticsAdminController.java
View file @
cea7190f
...
@@ -8,6 +8,7 @@ import com.xxfc.platform.order.pojo.bo.StaffStatisticsTotalBo;
...
@@ -8,6 +8,7 @@ import com.xxfc.platform.order.pojo.bo.StaffStatisticsTotalBo;
import
com.xxfc.platform.order.pojo.vo.StaffStatisticsVo
;
import
com.xxfc.platform.order.pojo.vo.StaffStatisticsVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
/**
/**
...
@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
* @description
* @description
* @data 2019/11/25 12:39
* @data 2019/11/25 12:39
*/
*/
@
Rest
Controller
@Controller
@RequestMapping
(
"/admin/staff_statistics"
)
@RequestMapping
(
"/admin/staff_statistics"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
public
class
StaffStatisticsAdminController
{
public
class
StaffStatisticsAdminController
{
...
@@ -24,6 +25,7 @@ public class StaffStatisticsAdminController {
...
@@ -24,6 +25,7 @@ public class StaffStatisticsAdminController {
private
final
StaffStatisticsBiz
staffStatisticsBiz
;
private
final
StaffStatisticsBiz
staffStatisticsBiz
;
@PostMapping
(
"/total_statistics"
)
@PostMapping
(
"/total_statistics"
)
@ResponseBody
public
ObjectRestResponse
<
StaffStatisticsTotalBo
>
staffStatisticsWithTotal
(
@RequestBody
StaffStatisticsFindDTO
staffStatisticsFindDTO
)
{
public
ObjectRestResponse
<
StaffStatisticsTotalBo
>
staffStatisticsWithTotal
(
@RequestBody
StaffStatisticsFindDTO
staffStatisticsFindDTO
)
{
StaffStatisticsTotalBo
staffStatisticsTotalVo
=
staffStatisticsBiz
.
staffStatisticsWithTotal
(
staffStatisticsFindDTO
);
StaffStatisticsTotalBo
staffStatisticsTotalVo
=
staffStatisticsBiz
.
staffStatisticsWithTotal
(
staffStatisticsFindDTO
);
return
ObjectRestResponse
.
succ
(
staffStatisticsTotalVo
);
return
ObjectRestResponse
.
succ
(
staffStatisticsTotalVo
);
...
...
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