Commit 6de1d0ef authored by libin's avatar libin

订单统计概况修改

parent d8a72079
...@@ -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;
......
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);
} }
......
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment