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
6de1d0ef
Commit
6de1d0ef
authored
Dec 22, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单统计概况修改
parent
d8a72079
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
CompanyPerformanceBo.java
...java/com/xxfc/platform/order/bo/CompanyPerformanceBo.java
+4
-0
CompanyOrderReceivedStatiscsAdminController.java
...ckground/CompanyOrderReceivedStatiscsAdminController.java
+11
-2
OrderReceivedStatisticsMapper.xml
...c/main/resources/mapper/OrderReceivedStatisticsMapper.xml
+15
-3
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/bo/CompanyPerformanceBo.java
View file @
6de1d0ef
...
@@ -31,6 +31,7 @@ public class CompanyPerformanceBo {
...
@@ -31,6 +31,7 @@ public class CompanyPerformanceBo {
private
BigDecimal
travelAmount
;
private
BigDecimal
travelAmount
;
private
BigDecimal
noDeductibleAmount
;
private
BigDecimal
noDeductibleAmount
;
private
BigDecimal
depositAmount
;
private
BigDecimal
depositAmount
;
private
BigDecimal
depositRefundAmount
;
private
Integer
rentDays
;
private
Integer
rentDays
;
private
BigDecimal
extralAmount
;
private
BigDecimal
extralAmount
;
private
Integer
departureNum
;
private
Integer
departureNum
;
...
@@ -38,6 +39,9 @@ public class CompanyPerformanceBo {
...
@@ -38,6 +39,9 @@ public class CompanyPerformanceBo {
private
String
startDate
;
private
String
startDate
;
private
String
endDate
;
private
String
endDate
;
private
String
dateStr
;
private
String
dateStr
;
private
BigDecimal
lossSpecifiedAmount
;
private
BigDecimal
lateFeeAmount
;
public
BigDecimal
getMemberAmount
()
{
public
BigDecimal
getMemberAmount
()
{
return
memberAmount
==
null
?
BigDecimal
.
ZERO
:
memberAmount
;
return
memberAmount
==
null
?
BigDecimal
.
ZERO
:
memberAmount
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/CompanyOrderReceivedStatiscsAdminController.java
View file @
6de1d0ef
package
com
.
xxfc
.
platform
.
order
.
rest
.
background
;
package
com
.
xxfc
.
platform
.
order
.
rest
.
background
;
import
cn.hutool.core.date.DateUtil
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.order.biz.CompanyPerformanceBiz
;
import
com.xxfc.platform.order.biz.CompanyPerformanceBiz
;
import
com.xxfc.platform.order.pojo.dto.CompanyPerformanceFindDTO
;
import
com.xxfc.platform.order.bo.CompanyPerformanceBo
;
import
com.xxfc.platform.order.bo.CompanyPerformanceBo
;
import
com.xxfc.platform.order.pojo.dto.CompanyPerformanceFindDTO
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -19,6 +20,7 @@ import javax.servlet.ServletOutputStream;
...
@@ -19,6 +20,7 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Date
;
/**
/**
* @author libin
* @author libin
...
@@ -36,6 +38,13 @@ public class CompanyOrderReceivedStatiscsAdminController {
...
@@ -36,6 +38,13 @@ public class CompanyOrderReceivedStatiscsAdminController {
@PostMapping
(
"/company_performance"
)
@PostMapping
(
"/company_performance"
)
public
ObjectRestResponse
<
PageDataVO
<
CompanyPerformanceBo
>>
companyPerformance
(
@RequestBody
CompanyPerformanceFindDTO
companyPerformanceFindDTO
){
public
ObjectRestResponse
<
PageDataVO
<
CompanyPerformanceBo
>>
companyPerformance
(
@RequestBody
CompanyPerformanceFindDTO
companyPerformanceFindDTO
){
if
(
companyPerformanceFindDTO
.
getStartDate
()
==
null
&&
companyPerformanceFindDTO
.
getEndDate
()==
null
){
Date
date
=
new
Date
();
Date
startDate
=
DateUtil
.
beginOfMonth
(
date
).
toJdkDate
();
Date
endDate
=
DateUtil
.
endOfMonth
(
date
).
toJdkDate
();
companyPerformanceFindDTO
.
setStartDate
(
startDate
);
companyPerformanceFindDTO
.
setEndDate
(
endDate
);
}
PageDataVO
<
CompanyPerformanceBo
>
dataVO
=
companyPerformanceBiz
.
selectCompanyPerformancePage
(
companyPerformanceFindDTO
);
PageDataVO
<
CompanyPerformanceBo
>
dataVO
=
companyPerformanceBiz
.
selectCompanyPerformancePage
(
companyPerformanceFindDTO
);
return
ObjectRestResponse
.
succ
(
dataVO
);
return
ObjectRestResponse
.
succ
(
dataVO
);
}
}
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderReceivedStatisticsMapper.xml
View file @
6de1d0ef
...
@@ -135,7 +135,10 @@
...
@@ -135,7 +135,10 @@
SUM(`travel_amount`-`travel_refund_amount` ) AS `travelAmount`,
SUM(`travel_amount`-`travel_refund_amount` ) AS `travelAmount`,
SUM(`rent_vehicle_amount`-`rent_vehicle_refund_amount`) AS `rentVehilceAmount`,
SUM(`rent_vehicle_amount`-`rent_vehicle_refund_amount`) AS `rentVehilceAmount`,
SUM(`no_deductible_amount` - `no_deductible_refund_amount`) as `noDeductibleAmount`,
SUM(`no_deductible_amount` - `no_deductible_refund_amount`) as `noDeductibleAmount`,
SUM(`deposit_amount` - `deposit_refund_amount`) as `depositAmount`
SUM(`deposit_amount` - `deposit_refund_amount`) as `depositAmount`,
SUM(`deposit_refund_amount`) as `depositRefundAmount`,
SUM(`loss_specified_amount`) as `lossSpecifiedAmount`,
SUM(`late_fee_amount`) as `lateFeeAmount`
FROM
FROM
`order_received_statistics` WHERE `has_pay`=1
`order_received_statistics` WHERE `has_pay`=1
<if
test=
"companyName!=null and companyName!=''"
>
<if
test=
"companyName!=null and companyName!=''"
>
...
@@ -163,6 +166,7 @@
...
@@ -163,6 +166,7 @@
`company_id` ,
`company_id` ,
`year`,
`year`,
`date`
`date`
order by `date` desc
<if
test=
"page!=null and limit!=null"
>
<if
test=
"page!=null and limit!=null"
>
limit #{startIndex},#{endInex}
limit #{startIndex},#{endInex}
</if>
</if>
...
@@ -220,7 +224,10 @@
...
@@ -220,7 +224,10 @@
SUM(`travel_amount`-`travel_refund_amount` ) AS `travelAmount`,
SUM(`travel_amount`-`travel_refund_amount` ) AS `travelAmount`,
SUM(`rent_vehicle_amount`-`rent_vehicle_refund_amount`) AS `rentVehilceAmount`,
SUM(`rent_vehicle_amount`-`rent_vehicle_refund_amount`) AS `rentVehilceAmount`,
SUM(`no_deductible_amount` - `no_deductible_refund_amount`) as `noDeductibleAmount`,
SUM(`no_deductible_amount` - `no_deductible_refund_amount`) as `noDeductibleAmount`,
SUM(`deposit_amount` - `deposit_refund_amount`) as `depositAmount`
SUM(`deposit_amount` - `deposit_refund_amount`) as `depositAmount`,
SUM(`deposit_refund_amount`) as `depositRefundAmount`,
SUM(`loss_specified_amount`) as `lossSpecifiedAmount`,
SUM(`late_fee_amount`) as `lateFeeAmount`
FROM
FROM
`order_received_statistics` WHERE `has_pay`=1
`order_received_statistics` WHERE `has_pay`=1
<if
test=
"companyName!=null and companyName!=''"
>
<if
test=
"companyName!=null and companyName!=''"
>
...
@@ -248,6 +255,7 @@
...
@@ -248,6 +255,7 @@
company_id,
company_id,
`year`,
`year`,
`month`
`month`
order by `month` desc
<if
test=
"page!=null and limit!=null"
>
<if
test=
"page!=null and limit!=null"
>
limit #{startIndex},#{endInex}
limit #{startIndex},#{endInex}
</if>
</if>
...
@@ -304,7 +312,10 @@
...
@@ -304,7 +312,10 @@
SUM(`travel_amount`-`travel_refund_amount` ) AS `travelAmount`,
SUM(`travel_amount`-`travel_refund_amount` ) AS `travelAmount`,
SUM(`rent_vehicle_amount`-`rent_vehicle_refund_amount`) AS `rentVehilceAmount`,
SUM(`rent_vehicle_amount`-`rent_vehicle_refund_amount`) AS `rentVehilceAmount`,
SUM(`no_deductible_amount` - `no_deductible_refund_amount`) as `noDeductibleAmount`,
SUM(`no_deductible_amount` - `no_deductible_refund_amount`) as `noDeductibleAmount`,
SUM(`deposit_amount` - `deposit_refund_amount`) as `depositAmount`
SUM(`deposit_amount` - `deposit_refund_amount`) as `depositAmount`,
SUM(`deposit_refund_amount`) as `depositRefundAmount`,
SUM(`loss_specified_amount`) as `lossSpecifiedAmount`,
SUM(`late_fee_amount`) as `lateFeeAmount`
FROM
FROM
`order_received_statistics` WHERE `has_pay`=1
`order_received_statistics` WHERE `has_pay`=1
<if
test=
"companyName!=null and companyName!=''"
>
<if
test=
"companyName!=null and companyName!=''"
>
...
@@ -332,6 +343,7 @@
...
@@ -332,6 +343,7 @@
company_id,
company_id,
`year`,
`year`,
`week_of_year`
`week_of_year`
order by `week_of_year` desc
<if
test=
"page!=null and limit!=null"
>
<if
test=
"page!=null and limit!=null"
>
limit #{startIndex},#{endInex}
limit #{startIndex},#{endInex}
</if>
</if>
...
...
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