diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java index 528bb293..7baa94a3 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java @@ -472,6 +472,14 @@ public class XhpcPileOrderController extends BaseController { }else{ money = powerPrice.add(servicePrice); } + if(money.compareTo(new BigDecimal(500)) > -1){ + logger.info("结算金额大于500>>"+money+">>>orderNo:" + orderNo); + xhpcChargeOrder.setStatus(2); + xhpcChargeOrder.setUpdateTime(new Date()); + xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder); + return R.fail(500,"无效订单号:"+orderNo); + } + //剩余的电费 BigDecimal surplusPowerPrice = powerPrice; //剩余的服务费 diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java index 84ad97bf..ecb18af7 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java @@ -398,7 +398,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe } }else{ if(cacheMap.get("startTime") !=null) { - xhpcChargeOrder.setEndTime(DateUtil.parse(cacheMap.get("startTime").toString(), "yyyy-MM-dd HH:mm:ss")); + xhpcChargeOrder.setStartTime(DateUtil.parse(cacheMap.get("startTime").toString(), "yyyy-MM-dd HH:mm:ss")); } } } diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml index 4529be56..163fd844 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -45,7 +45,7 @@ format(ifnull(sum(activity_power_price_total),0), 2) activityPowerPriceTotal, format(ifnull(sum(activity_service_price_total),0), 2) activityServicePriceTotal, format(ifnull(sum(activity_total_price),0), 2) activityTotalPrice, - format(ifnull(sum(charging_degree),0), 2) chargingDegree, + format(ifnull(sum(charging_degree),0), 4) chargingDegree, format(ifnull(sum(charging_time),0), 2) chargingTime, ifnull(sum(charging_number),0) chargingNumber, format(ifnull(sum(power_price),0), 2) powerPrice, @@ -127,7 +127,7 @@ select - format(ifnull(sum(ss.charging_degree),0), 2) chargingDegree, + format(ifnull(sum(ss.charging_degree),0), 4) chargingDegree, format(ifnull(sum(ss.charging_time),0), 2) chargingTime, ifnull(sum(ss.charging_number),0) chargingNumber, format(ifnull(sum(ss.power_price),0), 2) powerPrice, @@ -265,7 +265,7 @@ select - format(ifnull(sum(ss.charging_degree),0), 2) chargingDegree, + format(ifnull(sum(ss.charging_degree),0), 4) chargingDegree, format(ifnull(sum(ss.charging_time),0), 2) chargingTime, ifnull(sum(ss.charging_number),0) chargingNumber, format(ifnull(sum(ss.power_price),0), 2) powerPrice, @@ -382,7 +382,7 @@ select - format(ifnull(sum(charging_degree),0), 2) chargingDegree, + format(ifnull(sum(charging_degree),0), 4) chargingDegree, format(ifnull(sum(charging_time),0), 2) chargingTime, ifnull(sum(charging_number),0) chargingNumber, format(ifnull(sum(power_price),0), 2) powerPrice, @@ -1060,7 +1060,7 @@ select - count(xau.app_user_id) userSum, + count(DISTINCT(xau.phone)) userSum, (select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time1} and tenant_id =#{tenantId}) one, (select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time2} and tenant_id =#{tenantId}) two, (select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time3} and tenant_id =#{tenantId}) three,