统计除空白订单,其余都统计
This commit is contained in:
parent
8b7c6d9e7d
commit
8beb13fe0a
@ -129,7 +129,7 @@ public class XhpcHistoryOrderController extends BaseController {
|
||||
@GetMapping("/test1")
|
||||
@Scheduled(cron = "0 0/2 * * * ?")
|
||||
public void test1(){
|
||||
add(500,1);
|
||||
add(3000,1);
|
||||
}
|
||||
/**
|
||||
* 日期统计(已废弃)
|
||||
@ -423,7 +423,7 @@ public class XhpcHistoryOrderController extends BaseController {
|
||||
logger.info(">>>>>>>>>>>>>>>>>>>>>>>小时统计定时任务>>>>>>>>>>>>>>>>>>>>>");
|
||||
logger.info(">>>>>>>>>>>>>>>>>>>>>>>小时统计定时任务>>>>>>>>>>>>>>>>>>>>>");
|
||||
//小时统计
|
||||
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(500,0);
|
||||
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(3000,0);
|
||||
if(list !=null && list.size()>0){
|
||||
for (XhpcChargeHistoryOrder xhpc:list) {
|
||||
|
||||
@ -436,18 +436,18 @@ public class XhpcHistoryOrderController extends BaseController {
|
||||
Long chargingStationId = xhpc.getChargingStationId();
|
||||
Long terminalId = xhpc.getTerminalId();
|
||||
Long historyOrderId = xhpc.getHistoryOrderId();
|
||||
Date data = Calendar.getInstance().getTime();
|
||||
if(xhpc.getTotalPrice().compareTo(new BigDecimal(0)) !=1){
|
||||
continue;
|
||||
}
|
||||
if(xhpc.getChargingDegree().compareTo(new BigDecimal(0)) !=1){
|
||||
continue;
|
||||
}
|
||||
//Date data = Calendar.getInstance().getTime();
|
||||
// if(xhpc.getTotalPrice().compareTo(new BigDecimal(0)) !=1){
|
||||
// continue;
|
||||
// }
|
||||
// if(xhpc.getChargingDegree().compareTo(new BigDecimal(0)) !=1){
|
||||
// continue;
|
||||
// }
|
||||
//每分钟多少度电
|
||||
BigDecimal v = new BigDecimal((endTime.getTime() - startTime.getTime())).divide(new BigDecimal(60000),2,BigDecimal.ROUND_DOWN);
|
||||
if(v.compareTo(new BigDecimal(0)) !=1){
|
||||
continue;
|
||||
}
|
||||
//BigDecimal v = new BigDecimal((endTime.getTime() - startTime.getTime())).divide(new BigDecimal(60000),2,BigDecimal.ROUND_DOWN);
|
||||
// if(v.compareTo(new BigDecimal(0)) !=1){
|
||||
// continue;
|
||||
// }
|
||||
int endHour = DateUtil.hour(endTime, true);
|
||||
//没有跨时段
|
||||
XhpcStatisticsTimeInterval xhpcSt = new XhpcStatisticsTimeInterval();
|
||||
@ -472,13 +472,12 @@ public class XhpcHistoryOrderController extends BaseController {
|
||||
xhpcSt.setOperationSvcCommission(xhpc.getOperationSvcCommission());
|
||||
xhpcSt.setOperatorId(operatorId);
|
||||
xhpcSt.setChargingStationId(chargingStationId);
|
||||
xhpcSt.setCreateTime(data);
|
||||
//xhpcSt.setCreateTime(data);
|
||||
xhpcSt.setTerminalId(terminalId);
|
||||
xhpcSt.setHistoryOrderId(historyOrderId);
|
||||
if(xhpc.getSource()==1){
|
||||
xhpcSt.setInternetUserId(xhpc.getUserId());
|
||||
}
|
||||
|
||||
//时间没有跨天
|
||||
xhpcSt.setInternetDegreeCommission(xhpc.getInternetDegreeCommission());
|
||||
xhpcSt.setStartTimeEvcs(DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss"));
|
||||
|
||||
@ -164,7 +164,7 @@ public class XhpcHistoryOrderServiceImpl implements IXhpcHistoryOrderService {
|
||||
writer.addHeaderAlias("startTime", "开始充电时间");
|
||||
writer.addHeaderAlias("endTime", "结束充电时间");
|
||||
writer.addHeaderAlias("updateTime", "结算时间");
|
||||
writer.addHeaderAlias("internetName", "订单来源");
|
||||
writer.addHeaderAlias("chargingModeName", "订单来源");
|
||||
// writer.addHeaderAlias("plateNum", "电站名称");
|
||||
// writer.addHeaderAlias("disputeOrderStatus", "桩编号");
|
||||
|
||||
|
||||
@ -251,7 +251,7 @@
|
||||
#{totalPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="promotionDiscount != null">
|
||||
#{promotionDiscount,jdbcType=DECIMAL},
|
||||
#{promotionDiscount},
|
||||
</if>
|
||||
<if test="actPrice != null">
|
||||
#{actPrice,jdbcType=DECIMAL},
|
||||
@ -650,6 +650,7 @@
|
||||
ho.platform_svc_commisssion as platformSvcCommisssion,
|
||||
ho.operation_commission as operationCommission,
|
||||
ho.operation_svc_commission as operationSvcCommission,
|
||||
ho.charging_mode as chargingModeName,
|
||||
case when co.source=0 then "C端用户"
|
||||
when co.source=1 then "流量方用户"
|
||||
when co.source=2 then "社区用户"
|
||||
@ -868,7 +869,7 @@
|
||||
left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id
|
||||
left join xhpc_charging_station cs on cs.charging_station_id = co.charging_station_id
|
||||
left join xhpc_terminal as te on te.terminal_id = ho.terminal_id
|
||||
where ho.state = #{state} and ho.total_price >0 and ho.end_time > ho.start_time and ho.power_price_total !=0
|
||||
where ho.state = #{state} and ho.total_price is not null
|
||||
limit 0,#{number}
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user