Commit 4d7c161f authored by libin's avatar libin

Merge branch 'order_received_statistics' into dev

parents 09d70be7 e5d253dd
......@@ -137,6 +137,7 @@ public enum StatisticsStatusEnum {
feeTypeBo.setNoDeductibleAmount(feeTypeBo.getNoDeductibleAmount().add(dameSafeAmount));
}
//订单金额(不包含免赔和押金)
feeTypeBo.setTotalAmount(feeTypeBo.getTotalAmount().add(accountDetailEntity.getOrderAmount()).subtract(feeTypeBo.getNoDeductibleAmount()));
} else {
//退款订单押金
......
......@@ -41,7 +41,7 @@ public class OrderDTO {
/**
* 费用其他明细 租车使用
*/
protected String costDetailExtend;
protected String costDetail;
/**
* 会员相关
*/
......@@ -55,6 +55,6 @@ public class OrderDTO {
}
public JSONObject getData() {
return StringUtils.hasText(costDetailExtend)?JSONUtil.parseObj(costDetailExtend):new JSONObject();
return StringUtils.hasText(costDetail)?JSONUtil.parseObj(costDetail):new JSONObject();
}
}
......@@ -441,7 +441,7 @@
<select id="selectOrdersByTypeAndTime" resultType="com.xxfc.platform.order.pojo.dto.OrderDTO">
select bo.id,bo.type,bo.status,bo.order_amount,bo.real_amount,bo.order_origin,bo.parent_user_id as `userId`,bo.parent_position_id as `postionId`,
bo.has_pay,bo.pay_way,omd.memberLevel,IFNULL(IFNULL(orvd.start_company_id,otd.start_company_id),`parent_user_company_id`) AS `companyId`,
orvd.deposit,orvd.cost_detail_extend AS `costDetailExtend`
orvd.deposit,orvd.cost_detail AS `costDetail`
from (select * from `base_order` where 1=1
<if test="hasPay!=null">
and `has_pay`=#{hasPay}
......@@ -452,7 +452,7 @@
separator=",">
#{type}
</foreach> ) AS `bo`
LEFT JOIN (select `order_id`,`start_company_id`,`deposit`,`cost_detail_extend` from `order_rent_vehicle_detail`) AS `orvd` ON
LEFT JOIN (select `order_id`,`start_company_id`,`deposit`,`cost_detail` from `order_rent_vehicle_detail`) AS `orvd` ON
orvd.order_id=bo.id
LEFT JOIN (select `order_id`,`start_company_id` from `order_tour_detail`) AS `otd` ON otd.order_id=bo.id
LEFT JOIN (select `order_id`,`member_level` AS `memberLevel` from `order_member_detail`) AS `omd` ON
......
......@@ -84,7 +84,7 @@
bo.pay_way,
bo.has_pay,
IFNULL(brvd.start_company_id,IFNULL(otd.start_company_id,bo.parent_user_company_id)) AS `companyId`,
brvd.cost_detail_extend AS `costDetailExtend`,
brvd.cost_detail AS `costDetail`,
brvd.damage_safe AS `damageSafe`,
omd.member_level AS `memberLevel`
......
......@@ -63,7 +63,7 @@
SELECT
ors.*,
IFNULL(ovss.departureNum,0) as `departureNum`,
IFNULL(ovss.rentDays,0) as `departureNum`,
IFNULL(ovss.rentDays,0) as `rentDays`,
IFNULL(ovss.arrivalNum,0) as `arrivalNum`
FROM
(
......
......@@ -107,7 +107,7 @@ public class ServiceTest {
@Test
public void testRentVehicleStatistics(){
Date date = DateTime.parse("2019-11-15").toDate();
Date date = DateTime.parse("2019-11-29").toDate();
Date startDate = DateUtil.beginOfDay(date).toJdkDate();
Date endDate = DateUtil.endOfDay(date).toJdkDate();
Map<Integer, String> companyMap = vehicleFeign.findCompanyMap();
......@@ -126,17 +126,17 @@ public class ServiceTest {
@Test
@SneakyThrows
public void testOrderReceivedStatisticsJobHandler(){
cn.hutool.core.date.DateTime dateTime = DateUtil.parse("2019-10-01", "yyyy-MM-dd");
cn.hutool.core.date.DateTime offset = DateUtil.offset(dateTime, DateField.DAY_OF_MONTH, 1);
LocalDate startLocalDate = LocalDate.of(2019, 10, 1);
cn.hutool.core.date.DateTime dateTime = DateUtil.parse("2019-11-29", "yyyy-MM-dd");
// cn.hutool.core.date.DateTime offset = DateUtil.offset(dateTime, DateField.DAY_OF_MONTH, 1);
orderReceivedStatisticsJobHandler.execute("2019-11-29");
/* LocalDate startLocalDate = LocalDate.of(2019, 10, 1);
LocalDate endLocalDate = LocalDate.of(2019,11,29);
while (startLocalDate.isBefore(endLocalDate)){
String dateStr = startLocalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
startLocalDate = startLocalDate.plusDays(1);
orderReceivedStatisticsJobHandler.execute(dateStr);
}
*/
}
}
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