diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java
index c5e210af..2d22985a 100644
--- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java
+++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingStationController.java
@@ -161,15 +161,6 @@ public class XhpcChargingStationController extends BaseController {
}
-
-
-
-
-
-
-
-
-
/**
* 编辑电站(基本信息)
*
diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java
index 7efb6f15..d51898cc 100644
--- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java
+++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java
@@ -17,6 +17,8 @@ import com.xhpc.common.domain.XhpcRate;
import com.xhpc.common.domain.XhpcRateModel;
import com.xhpc.common.domain.XhpcRateTime;
import com.xhpc.common.redis.service.RedisService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -47,6 +49,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
@Autowired
private RedisService redisService;
+ private static final Logger logger = LoggerFactory.getLogger(XhpcChargingStationServiceImpl.class);
/**
* 查询电站
*
@@ -398,7 +401,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
tfPricesSeq[number] = rateValues;
number = number + 1;
}
- } else if (k < list.size()) {
+ } else if (k < list.size()-1) {
//判断上条数据的结束时间是否等于现在这条数据的开始时间,不等于添加一条默认费率时段
String endTimeK = list.get(k - 1).getEndTime();
if (!endTimeK.equals(startTime)) {
@@ -445,9 +448,9 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
}
if (!endTime.equals("24:00:00")) {
//添加一条默认费率时段
- sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodId, startTime, "24:00:00", sort, 2, rateValue);
+ sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodId, endTime, "24:00:00", sort, 2, rateValue);
//时间差
- long betweenDay3 = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse("24:00:00"), DateUnit.SECOND);
+ long betweenDay3 = DateUtil.between(DateUtil.parse(endTime), DateUtil.parse("24:00:00"), DateUnit.SECOND);
int day7 = Math.toIntExact(betweenDay3 / 1800);
for (int l = 0; l < day7; l++) {
tfPricesSeq[number] = rateValue;
@@ -563,6 +566,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
xhpcRateTime.setSort(sort);
xhpcRateTime.setType(type);
xhpcRateTime.setRateValue(rateValue);
+ xhpcRateTime.setCreateTime(Calendar.getInstance().getTime());
xhpcChargingStationMapper.addXhpcRateTime(xhpcRateTime);
return sort++;
}
@@ -814,6 +818,9 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
}
//默认费率类型值
String rateValue = xhpcChargingStationDto.getDefaultPeriodId();
+
+ String[] tfPricesSeq = new String[48];
+ int number = 0;
int sort = 1;
for (int k = 0; k < list.size(); k++) {
XhpcRateTimeDto xhpcRateTimeDto = list.get(k);
@@ -825,32 +832,146 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
if (!"00:00:00".equals(xhpcRateTimeDto.getStartTime())) {
//添加一条默认费率时段
sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodId, "00:00:00", startTime, sort, 2, rateValue);
+ //时间差
+ long betweenDay = DateUtil.between(DateUtil.parse("00:00:00"), DateUtil.parse(startTime), DateUnit.SECOND);
+ int day1 = Math.toIntExact(betweenDay / 1800);
+ for (int l = 0; l < day1; l++) {
+ logger.info("下发费率>>>>>tfPricesSeq:["+number+"]"+rateValue);
+ tfPricesSeq[number] = rateValue;
+ number = number + 1;
+ }
}
//并把本条数据也添加上
sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodIdMap, startTime, endTime, sort, 1, rateValues);
- } else if (k < list.size()) {
+ //时间差
+ long betweenDay = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.SECOND);
+ int day2 = Math.toIntExact(betweenDay / 1800);
+ for (int l = 0; l < day2; l++) {
+ logger.info("下发费率>>>>>tfPricesSeq:["+number+"]"+rateValues);
+ tfPricesSeq[number] = rateValues;
+ number = number + 1;
+ }
+ } else if (k < list.size()-1) {
//判断上条数据的结束时间是否等于现在这条数据的开始时间,不等于添加一条默认费率时段
String endTimeK = list.get(k - 1).getEndTime();
if (!endTimeK.equals(startTime)) {
//添加一条默认费率时段
sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodId, endTimeK, startTime, sort, 2, rateValue);
+ //时间差
+ long betweenDay = DateUtil.between(DateUtil.parse(endTimeK), DateUtil.parse(startTime), DateUnit.SECOND);
+ int day3 = Math.toIntExact(betweenDay / 1800);
+ for (int l = 0; l < day3; l++) {
+ logger.info("下发费率>>>>>tfPricesSeq:["+number+"]"+rateValue);
+ tfPricesSeq[number] = rateValue;
+ number = number + 1;
+ }
}
//并把本条数据也添加上
sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodIdMap, startTime, endTime, sort, 1, rateValues);
+ //时间差
+ long betweenDay = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.SECOND);
+ int day4 = Math.toIntExact(betweenDay / 1800);
+ for (int l = 0; l < day4; l++) {
+ logger.info("下发费率>>>>>tfPricesSeq:["+number+"]"+rateValues);
+ tfPricesSeq[number] = rateValues;
+ number = number + 1;
+ }
} else {
- String endTimeK = list.get(k - 1).getEndTime();
+ String endTimeK = list.get(k-1).getEndTime();
if (!endTimeK.equals(startTime)) {
//添加一条默认费率时段
sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodId, endTimeK, startTime, sort, 2, rateValue);
+ //时间差
+ long betweenDay = DateUtil.between(DateUtil.parse(endTimeK), DateUtil.parse(startTime), DateUnit.SECOND);
+ int day5 = Math.toIntExact(betweenDay / 1800);
+ for (int l = 0; l < day5; l++) {
+ logger.info("下发费率最后1>>>>>tfPricesSeq:["+number+"]"+rateValue);
+ tfPricesSeq[number] = rateValue;
+ number = number + 1;
+ }
}
//并把本条数据也添加上
sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodIdMap, startTime, endTime, sort, 1, rateValues);
+ //时间差
+ long betweenDay1 = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.SECOND);
+ int day6 = Math.toIntExact(betweenDay1 / 1800);
+ for (int l = 0; l < day6; l++) {
+ logger.info("下发费率最后2>>>>>tfPricesSeq:["+number+"]"+rateValues);
+ tfPricesSeq[number] = rateValues;
+ number = number + 1;
+ }
if (!endTime.equals("24:00:00")) {
//添加一条默认费率时段
- sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodId, startTime, "24:00:00", sort, 2, rateValue);
+ sort = addXhpcRateTime(chargingStationId, rateModelId, defaultPeriodId, endTime, "24:00:00", sort, 2, rateValue);
+ //时间差
+ long betweenDay3 = DateUtil.between(DateUtil.parse(endTime), DateUtil.parse("24:00:00"), DateUnit.SECOND);
+ int day7 = Math.toIntExact(betweenDay3 / 1800);
+ for (int l = 0; l < day7; l++) {
+ logger.info("下发费率最后3>>>>>tfPricesSeq:["+number+"]"+rateValue);
+ tfPricesSeq[number] = rateValue;
+ number = number + 1;
+ }
}
}
}
+
+
+ //设置费率模型
+ CacheRateModel cacheRateModel = new CacheRateModel();
+ cacheRateModel.setLossRate(0);
+ BigDecimal valueSec = new BigDecimal(100000);
+ boolean t1 = true;
+ boolean t2 = true;
+ boolean t3 = true;
+ boolean t4 = true;
+ for (XhpcRateDto xhpcRateDto : xhpcRateList) {
+ BigDecimal powerFee = xhpcRateDto.getPowerFee();
+ BigDecimal serviceFee = xhpcRateDto.getServiceFee();
+ String id = xhpcRateDto.getId();
+ int i1 = powerFee.multiply(valueSec).intValue();
+ int i2 = serviceFee.multiply(valueSec).intValue();
+ if ("00".equals(id)) {
+ cacheRateModel.setT1Price(i1);
+ cacheRateModel.setT1SvcPrice(i2);
+ t1 = false;
+ } else if ("01".equals(id)) {
+ cacheRateModel.setT2Price(i1);
+ cacheRateModel.setT2SvcPrice(i2);
+ t2 = false;
+ } else if ("02".equals(id)) {
+ cacheRateModel.setT3Price(i1);
+ cacheRateModel.setT3SvcPrice(i2);
+ t3 = false;
+ } else if ("03".equals(id)) {
+ cacheRateModel.setT4Price(i1);
+ cacheRateModel.setT4SvcPrice(i2);
+ t4 = false;
+ }
+ }
+ if (t1) {
+ cacheRateModel.setT1Price(0);
+ cacheRateModel.setT1SvcPrice(0);
+ }
+ if (t2) {
+ cacheRateModel.setT2Price(0);
+ cacheRateModel.setT2SvcPrice(0);
+ }
+ if (t3) {
+ cacheRateModel.setT3Price(0);
+ cacheRateModel.setT3SvcPrice(0);
+ }
+ if (t4) {
+ cacheRateModel.setT4Price(0);
+ cacheRateModel.setT4SvcPrice(0);
+ }
+ cacheRateModel.setTfPricesSeq(tfPricesSeq);
+ logger.info("下发费率>>>>>chargingStationId:"+chargingStationId);
+ logger.info("下发费率>>>>>rateModelId:"+rateModelId);
+ logger.info("cacheRateModel>>>>>cacheRateModel:"+cacheRateModel.toString());
+ R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
+ System.out.println(r.getCode());
+ System.out.println(r.getMsg());
+
return AjaxResult.success();
}
diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml
index c52ed662..8c7ba7b7 100644
--- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml
+++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml
@@ -170,7 +170,7 @@
business_instructions = #{businessInstructions},
reminder_instructions = #{reminderInstructions},
img_id = #{imgId},
- station_type = #{stationType},
+ station_type = #{stationType}
where charging_station_id = #{chargingStationId}
@@ -741,7 +741,7 @@
#{rateModelId},
- sort,
+ #{sort},
#{status},
diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcChargeOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcChargeOrderController.java
index f958b31f..9b580b3e 100644
--- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcChargeOrderController.java
+++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcChargeOrderController.java
@@ -10,6 +10,8 @@ import com.xhpc.common.util.ConnectionRabbitMQUtil;
import com.xhpc.order.service.IXhpcChargeOrderService;
import com.xhpc.order.service.IXhpcHistoryOrderService;
import io.swagger.annotations.Api;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,7 +37,7 @@ public class XhpcChargeOrderController extends BaseController {
@Autowired
private IXhpcHistoryOrderService xhpcHistoryOrderService;
-
+ private static final Logger logger = LoggerFactory.getLogger(XhpcChargeOrderController.class);
/**
* 实时订单(微信)
*/
@@ -68,7 +70,8 @@ public class XhpcChargeOrderController extends BaseController {
*/
@GetMapping("/startUp")
public AjaxResult startUp(@RequestParam Long userId,@RequestParam String serialNumber,@RequestParam Integer type){
-
+ logger.info("<<<<<<<<<<<<<<<<<<<<<<<<启动充电>>>>>>>>>>>>>>>>>");
+ logger.info("<<<<<<<<<<<<<<<<<<<<<<<<启动充电>>>>>>>>>>>>>>>>>");
return iXhpcChargeOrderService.startUp(userId, serialNumber, type);
}
@@ -82,7 +85,8 @@ public class XhpcChargeOrderController extends BaseController {
*/
@GetMapping("/stopUp")
public AjaxResult stopUp(@RequestParam Long userId,@RequestParam String serialNumber,@RequestParam Long chargingOrderId){
-
+ logger.info("<<<<<<<<<<<<<<<<<<<<<<<<停止充电>>>>>>>>>>>>>>>>>");
+ logger.info("<<<<<<<<<<<<<<<<<<<<<<<<停止充电>>>>>>>>>>>>>>>>>");
return iXhpcChargeOrderService.stopUp(userId, serialNumber, chargingOrderId);
}
@@ -122,6 +126,10 @@ public class XhpcChargeOrderController extends BaseController {
@GetMapping("/getOrderMessage")
public void getOrderMessage(@RequestParam Long userId)
{
+ logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>");
+ logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>>"+userId);
+ logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>"+userId);
+ logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>");
Map orderMessage = iXhpcChargeOrderService.getOrderMessage(userId);
Map map =new HashMap<>();
map.put("code", 200);
@@ -140,13 +148,17 @@ public class XhpcChargeOrderController extends BaseController {
data.put("power", "0");
data.put("chargingDegree", decimal);
data.put("remainingTime","0");
+ data.put("chargingTimeNumber",0);
data.put("serialNumber","0");
data.put("parkingInstructions","在非充电情况下占用车位按照0.30元/分钟收费");
map.put("data", data);
}else{
map.put("data",orderMessage);
}
+
JSONObject json = new JSONObject(map);
+
+ logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<>>>>>>>>>>>>>>>>"+json.toString());
rabbimt(userId + "##" + json);
}
diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java
index 95d592e4..8365c805 100644
--- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java
+++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java
@@ -5,10 +5,12 @@ import cn.hutool.core.date.DateUtil;
import com.xhpc.common.core.web.controller.BaseController;
import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.core.web.page.TableDataInfo;
+import com.xhpc.order.domain.XhpcHistoryOrder;
import com.xhpc.order.domain.XhpcStatisticsTimeInterval;
import com.xhpc.order.dto.XhpcChargeHistoryOrder;
import com.xhpc.order.service.IXhpcChargeOrderService;
import com.xhpc.order.service.IXhpcHistoryOrderService;
+import com.xhpc.order.service.IXhpcStatisticsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.math.RoundingMode;
+import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -35,7 +38,7 @@ public class XhpcHistoryOrderController extends BaseController {
@Autowired
private IXhpcHistoryOrderService xhpcHistoryOrderService;
@Autowired
- private IXhpcChargeOrderService xhpcChargeOrderService;
+ private IXhpcStatisticsService xhpcStatisticsService;
/**
* 历史订单
@@ -48,7 +51,7 @@ public class XhpcHistoryOrderController extends BaseController {
* @param startTime 订单开始时间
* @param endTime 订单结束时间
* @param userId 用户id
- * @param status 1 平台 2 运营商 3流量方
+ * @param status 1 平台 2 运营商 3流量方
* @return
*/
@GetMapping("/getListPage")
@@ -85,83 +88,159 @@ public class XhpcHistoryOrderController extends BaseController {
Long userId =xhpcChargeHistoryOrder.getUserId();
Long operatorId =xhpcChargeHistoryOrder.getOperatorId();
Long chargeOrderId =xhpcChargeHistoryOrder.getChargeOrderId();
+ Long chargingStationId = xhpcChargeHistoryOrder.getChargingStationId();
+ Long terminalId = xhpcChargeHistoryOrder.getTerminalId();
+ Date data = Calendar.getInstance().getTime();
//充电时长
Long chargingTimeNumber =xhpcChargeHistoryOrder.getChargingTimeNumber();
- //电费
- BigDecimal powerPrice =new BigDecimal(0);
- //服务费
- BigDecimal servicePrice =new BigDecimal(0);
- //订单总价
- BigDecimal totalPrice =new BigDecimal(0);
- //电站活动抵扣--抵扣的总金额
- BigDecimal promotionDiscount =new BigDecimal(0);
- //实际价格-用户支付的钱
- BigDecimal actPrice =new BigDecimal(0);
- //实收电费-运营商电费
- BigDecimal actPowerPrice =new BigDecimal(0);
- //实收服务费-运营商服务费
- BigDecimal actServicePrice =new BigDecimal(0);
- //流量方总金额抽成
- BigDecimal internetCommission =new BigDecimal(0);
- //流量方服务费抽成
- BigDecimal internetSvcCommission =new BigDecimal(0);
- //平台总金额抽成
- BigDecimal platformCommission =new BigDecimal(0);
- //平台服务费抽成
- BigDecimal platformSvcCommission =new BigDecimal(0);
- //运维总抽成
- BigDecimal operationCommission =new BigDecimal(0);
- //运维服务费抽成
- BigDecimal operationSvcCommission =new BigDecimal(0);
long betweenDay = DateUtil.between(DateUtil.parse(xhpcChargeHistoryOrder.getStartTime().toString(), "yyyy-MM-dd"), DateUtil.parse(xhpcChargeHistoryOrder.getEndTime().toString(), "yyyy-MM-dd"), DateUnit.DAY);
if(betweenDay==0){
//没有跨天
//获取费率
+ //电费
+ BigDecimal powerPrice =xhpcChargeHistoryOrder.getActPowerPrice();
+ //服务费
+ BigDecimal servicePrice =xhpcChargeHistoryOrder.getActServicePrice();
+ //订单总价
+ BigDecimal totalPrice =xhpcChargeHistoryOrder.getTotalPrice();
+ //电站活动抵扣--抵扣的总金额
+ BigDecimal promotionDiscount =xhpcChargeHistoryOrder.getPromotionDiscount();
+ //实际价格-用户支付的钱
+ BigDecimal actPrice =xhpcChargeHistoryOrder.getActPrice();
+ //实收电费-运营商电费
+ BigDecimal actPowerPrice =xhpcChargeHistoryOrder.getActPowerPrice();
+ //实收服务费-运营商服务费
+ BigDecimal actServicePrice =xhpcChargeHistoryOrder.getActServicePrice();
+ //流量方总金额抽成
+ BigDecimal internetCommission =xhpcChargeHistoryOrder.getInternetCommission();
+ //流量方服务费抽成
+ BigDecimal internetSvcCommission =xhpcChargeHistoryOrder.getInternetSvcCommission();
+ //平台总金额抽成
+ BigDecimal platformCommission =xhpcChargeHistoryOrder.getPlatformCommission();
+ //平台服务费抽成
+ BigDecimal platformSvcCommission =xhpcChargeHistoryOrder.getPlatformSvcCommisssion();
+ //运维总抽成
+ BigDecimal operationCommission =xhpcChargeHistoryOrder.getOperationCommission();
+ //运维服务费抽成
+ BigDecimal operationSvcCommission =xhpcChargeHistoryOrder.getOperationSvcCommission();
+ //每分钟都少钱
+ BigDecimal pp1 = powerPrice.divide(new BigDecimal(chargingTimeNumber / 60), 2, RoundingMode.HALF_UP);
+ BigDecimal sp1 = servicePrice.divide(new BigDecimal(chargingTimeNumber / 60), 2, RoundingMode.HALF_UP);
+
String startTime1 = DateUtil.formatTime(startTime);
String endTime1 = DateUtil.formatTime(endTime);
int startHour = DateUtil.hour(startTime, true);
int endHour = DateUtil.hour(endTime, true);
if(endHour==startHour){
//没有跨时段
- List
- power
+ power,
+
+
+ create_time
@@ -250,7 +254,10 @@
#{amountCharged},
- #{power}
+ #{power},
+
+
+ #{createTime}
@@ -332,6 +339,7 @@
diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml
index 85e0afbd..5a169737 100644
--- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml
+++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml
@@ -274,9 +274,7 @@
start_soc = #{startSoc},
end_soc = #{endSoc},
- reconciliation_status =
- #{reconciliationStatus},
-
+ reconciliation_status =#{reconciliationStatus},
sorting_status = #{sortingStatus},
type = #{type},
status = #{status},
@@ -286,8 +284,9 @@
update_time = #{updateTime},
update_by = #{updateBy},
remark = #{remark},
- power_price_total = #{powerPriceTotal},
- service_price_total = #{servicePriceTotal}
+ state = #{state},
+ power_price_total = #{powerPriceTotal},
+ service_price_total = #{servicePriceTotal}
WHERE history_order_id = #{historyOrderId}
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 487122ec..a2666b5f 100644
--- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml
+++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml
@@ -246,7 +246,7 @@
and ss.create_time <=#{endTime}
- and ss.internet_user_id
+ and ss.internet_user_id in
#{internetId}
@@ -339,4 +339,167 @@
and charging_station_id =#{chargingStationId}
+
+
+ insert into xhpc_statistics_time_interval
+
+
+ status,
+
+
+ charging_degree,
+
+
+ charging_time,
+
+
+ charging_number,
+
+
+ power_price,
+
+
+ service_price,
+
+
+ total_price,
+
+
+ promotion_discount,
+
+
+ act_price,
+
+
+ act_power_price,
+
+
+ act_service_price,
+
+
+ internet_commission,
+
+
+ internet_svc_commission,
+
+
+ remaining_time,
+
+
+ platform_commission,
+
+
+ platform_svc_commisssion,
+
+
+ operation_commission,
+
+
+ operation_svc_commission,
+
+
+ internet_user_id,
+
+
+ operator_id,
+
+
+ charging_station_id,
+
+
+ del_flag,
+
+
+ create_time,
+
+
+ remark,
+
+
+ terminal_id
+
+
+
+
+ #{status},
+
+
+ #{chargingDegree},
+
+
+ #{chargingTime},
+
+
+ #{chargingNumber},
+
+
+ #{powerPrice},
+
+
+ #{servicePrice},
+
+
+ #{totalPrice},
+
+
+ #{promotionDiscount},
+
+
+ #{actPrice},
+
+
+ #{actPowerPrice},
+
+
+ #{actServicePrice},
+
+
+ #{internetCommission},
+
+
+ #{internetSvcCommission},
+
+
+ #{remainingTime},
+
+
+ #{platformCommission},
+
+
+ #{platformSvcCommisssion},
+
+
+ #{operationCommission},
+
+
+ #{operationSvcCommission},
+
+
+ #{internetUserId},
+
+
+ #{operatorId},
+
+
+ #{chargingStationId},
+
+
+ #{delFlag},
+
+
+ #{createTime},
+
+
+ #{remark},
+
+
+ #{terminalId},
+
+
+ #{chargingTimeNumber}
+
+
+
+
+
diff --git a/xhpc-modules/xhpc-wxma/src/main/java/com/xhpc/wxma/socket/OrderNotificationWebSocket.java b/xhpc-modules/xhpc-wxma/src/main/java/com/xhpc/wxma/socket/OrderNotificationWebSocket.java
index 9c66c10c..60e39e9b 100644
--- a/xhpc-modules/xhpc-wxma/src/main/java/com/xhpc/wxma/socket/OrderNotificationWebSocket.java
+++ b/xhpc-modules/xhpc-wxma/src/main/java/com/xhpc/wxma/socket/OrderNotificationWebSocket.java
@@ -104,6 +104,7 @@ public class OrderNotificationWebSocket {
data.put("amountCharged",decimal);
data.put("gunNumber","0");
data.put("chargingOrderId",0L);
+ data.put("chargingTimeNumber",0);
data.put("soc",0);
data.put("chargingTime","0");
data.put("electricCurrent",decimal);