Merge remote-tracking branch 'origin/master'

This commit is contained in:
yuyang 2021-09-23 10:42:47 +08:00
commit 962b29cd9f
3 changed files with 840 additions and 336 deletions

View File

@ -14,6 +14,32 @@ public class XhpcChargeHistoryOrder {
* 历史订单id * 历史订单id
*/ */
private Long historyOrderId; private Long historyOrderId;
/**
* 电站id
*/
private Long chargingStationId;
/**
* 充电订单id
*/
private Long chargeOrderId;
/**
* 终端id
*/
private Long terminalId;
/**
* 流水号
*/
private String serialNumber;
/**
* 互联网订单流水号
*/
private String internetSerialNumber;
/** /**
* 订单总价 * 订单总价
*/ */
@ -75,18 +101,35 @@ public class XhpcChargeHistoryOrder {
private Integer source; private Integer source;
/** /**
* 充电订单id * 开始充电soc
*/ */
private Long chargeOrderId; private String startSoc;
/** /**
* 电站id * 结束时soc
*/ */
private Long chargingStationId; private String endSoc;
/** /**
* 终端id * 对账状态0待确认 1已确认2待提交3待审核
*/ */
private Long terminalId; private Integer reconciliationStatus;
/**
* 清分状态0待清分 1清分在途2已提现3待提交4待审核
*/
private Integer sortingStatus;
/**
* 1 自动结算 2 平台结算
*/
private Integer type;
/**
* 状态0正常 1停用
*/
private Integer status;
/** /**
* 开始时间 * 开始时间
@ -108,6 +151,11 @@ public class XhpcChargeHistoryOrder {
*/ */
private BigDecimal chargingDegree; private BigDecimal chargingDegree;
/**
* 删除标志0代表存在 2代表删除
*/
private Integer delFlag;
/** /**
* 运营商id * 运营商id
*/ */
@ -127,15 +175,104 @@ public class XhpcChargeHistoryOrder {
* 电桩id * 电桩id
*/ */
private Long chargingPileId; private Long chargingPileId;
/** /**
* 总电费 * 总电费
*/ */
private BigDecimal powerPriceTotal; private BigDecimal powerPriceTotal;
/** /**
* 总服务费 * 总服务费
*/ */
private BigDecimal servicePriceTotal; private BigDecimal servicePriceTotal;
/**
* 0未统计 1已统计
*/
private Integer state;
/**
* VIN
*/
private String vinNormal;
/**
* 充电电量
*/
private Double totalPower;
/**
* 0:用户手动停止充电
* 1:客户归属地运营商平台停止充电
* 2BMS 停止充电
* 3充电机设备故障
* 4连接器断开
* 5-99 自定义
*/
private Integer stopReasonEvcs = 0;
/**
* 运营商/场站OperatorID
*/
private String operatorIdEvcs;
/**
* 流量方OperatorID
*/
private String operatorId3rdptyEvcs;
/**
* 终端客户开启充电方式
* 0未知
* 1/省级平台无卡启动
* 2有卡启动
* 3其他无卡启动
*/
private int chargeModelEvcs;
/**
* 实际充电的客户在运营商侧的名称,<=20字符
*/
private String userNameEvcs;
/**
* 接口额定功率
* 单位kW, 小数点后 1
*/
private Double connectorPowerEvcs;
/**
* 电表总起值
* 单位:, 小数点后2位
*/
private Double meterValueStartEvcs;
/**
* 电表总结束值
* 单位:, 小数点后2位
*/
private Double meterValueEndEvcs;
public Double getMeterValueEndEvcs() {
return meterValueEndEvcs;
}
public void setMeterValueEndEvcs(Double meterValueEndEvcs) {
this.meterValueEndEvcs = meterValueEndEvcs;
}
public String getUserNameEvcs() {
return userNameEvcs;
}
public void setUserNameEvcs(String userNameEvcs) {
this.userNameEvcs = userNameEvcs;
}
public Long getHistoryOrderId() { public Long getHistoryOrderId() {
return historyOrderId; return historyOrderId;
@ -146,9 +283,69 @@ public class XhpcChargeHistoryOrder {
this.historyOrderId = historyOrderId; this.historyOrderId = historyOrderId;
} }
public Long getChargingStationId() {
return chargingStationId == null ? 0 : chargingStationId;
}
public void setChargingStationId(Long chargingStationId) {
this.chargingStationId = chargingStationId;
}
public Long getChargeOrderId() {
return chargeOrderId;
}
public void setChargeOrderId(Long chargeOrderId) {
this.chargeOrderId = chargeOrderId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getTerminalId() {
return terminalId;
}
public void setTerminalId(Long terminalId) {
this.terminalId = terminalId;
}
public String getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(String serialNumber) {
this.serialNumber = serialNumber;
}
public String getInternetSerialNumber() {
return internetSerialNumber;
}
public void setInternetSerialNumber(String internetSerialNumber) {
this.internetSerialNumber = internetSerialNumber;
}
public BigDecimal getTotalPrice() { public BigDecimal getTotalPrice() {
return totalPrice; return totalPrice == null ? BigDecimal.ZERO : totalPrice;
} }
public void setTotalPrice(BigDecimal totalPrice) { public void setTotalPrice(BigDecimal totalPrice) {
@ -256,124 +453,74 @@ public class XhpcChargeHistoryOrder {
this.operationSvcCommission = operationSvcCommission; this.operationSvcCommission = operationSvcCommission;
} }
public Integer getSource() { public String getStartSoc() {
return source; return startSoc;
} }
public void setSource(Integer source) { public void setStartSoc(String startSoc) {
this.source = source; this.startSoc = startSoc;
} }
public Long getChargeOrderId() { public String getEndSoc() {
return chargeOrderId; return endSoc;
} }
public void setChargeOrderId(Long chargeOrderId) { public void setEndSoc(String endSoc) {
this.chargeOrderId = chargeOrderId; this.endSoc = endSoc;
} }
public Long getChargingStationId() { public Integer getReconciliationStatus() {
return chargingStationId; return reconciliationStatus;
} }
public void setChargingStationId(Long chargingStationId) { public void setReconciliationStatus(Integer reconciliationStatus) {
this.chargingStationId = chargingStationId; this.reconciliationStatus = reconciliationStatus;
} }
public Long getTerminalId() { public Integer getSortingStatus() {
return terminalId; return sortingStatus;
} }
public void setTerminalId(Long terminalId) { public void setSortingStatus(Integer sortingStatus) {
this.terminalId = terminalId; this.sortingStatus = sortingStatus;
} }
public Date getStartTime() { public Integer getType() {
return startTime; return type;
} }
public void setStartTime(Date startTime) { public void setType(Integer type) {
this.startTime = startTime; this.type = type;
} }
public Date getEndTime() { public Integer getStatus() {
return endTime; return status;
} }
public void setEndTime(Date endTime) { public void setStatus(Integer status) {
this.endTime = endTime; this.status = status;
} }
public Long getChargingTimeNumber() { public Integer getDelFlag() {
return chargingTimeNumber; return delFlag;
} }
public void setChargingTimeNumber(Long chargingTimeNumber) { public void setDelFlag(Integer delFlag) {
this.chargingTimeNumber = chargingTimeNumber; this.delFlag = delFlag;
}
public Long getOperatorId() {
return operatorId;
}
public void setOperatorId(Long operatorId) {
this.operatorId = operatorId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getRateModelId() {
return rateModelId;
}
public void setRateModelId(Long rateModelId) {
this.rateModelId = rateModelId;
}
public BigDecimal getChargingDegree() {
return chargingDegree;
}
public void setChargingDegree(BigDecimal chargingDegree) {
this.chargingDegree = chargingDegree;
}
public Long getChargingPileId() {
return chargingPileId;
}
public void setChargingPileId(Long chargingPileId) {
this.chargingPileId = chargingPileId;
} }
public BigDecimal getPowerPriceTotal() { public BigDecimal getPowerPriceTotal() {
@ -388,7 +535,7 @@ public class XhpcChargeHistoryOrder {
public BigDecimal getServicePriceTotal() { public BigDecimal getServicePriceTotal() {
return servicePriceTotal; return servicePriceTotal == null ? BigDecimal.ZERO : servicePriceTotal;
} }
public void setServicePriceTotal(BigDecimal servicePriceTotal) { public void setServicePriceTotal(BigDecimal servicePriceTotal) {
@ -396,4 +543,174 @@ public class XhpcChargeHistoryOrder {
this.servicePriceTotal = servicePriceTotal; this.servicePriceTotal = servicePriceTotal;
} }
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public String getVinNormal() {
return vinNormal;
}
public void setVinNormal(String vinNormal) {
this.vinNormal = vinNormal;
}
public Double getTotalPower() {
return totalPower;
}
public void setTotalPower(Double totalPower) {
this.totalPower = totalPower;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Integer getStopReasonEvcs() {
return stopReasonEvcs;
}
public void setStopReasonEvcs(Integer stopReasonEvcs) {
this.stopReasonEvcs = stopReasonEvcs;
}
public String getOperatorIdEvcs() {
return operatorIdEvcs;
}
public void setOperatorIdEvcs(String operatorIdEvcs) {
this.operatorIdEvcs = operatorIdEvcs;
}
public String getOperatorId3rdptyEvcs() {
return operatorId3rdptyEvcs;
}
public void setOperatorId3rdptyEvcs(String operatorId3rdptyEvcs) {
this.operatorId3rdptyEvcs = operatorId3rdptyEvcs;
}
public int getChargeModelEvcs() {
return chargeModelEvcs;
}
public void setChargeModelEvcs(int chargeModelEvcs) {
this.chargeModelEvcs = chargeModelEvcs;
}
public Double getConnectorPowerEvcs() {
return connectorPowerEvcs;
}
public void setConnectorPowerEvcs(Double connectorPowerEvcs) {
this.connectorPowerEvcs = connectorPowerEvcs;
}
public Double getMeterValueStartEvcs() {
return meterValueStartEvcs;
}
public void setMeterValueStartEvcs(Double meterValueStartEvcs) {
this.meterValueStartEvcs = meterValueStartEvcs;
}
public Integer getSource() {
return source;
}
public void setSource(Integer source) {
this.source = source;
}
public Long getChargingTimeNumber() {
return chargingTimeNumber;
}
public void setChargingTimeNumber(Long chargingTimeNumber) {
this.chargingTimeNumber = chargingTimeNumber;
}
public BigDecimal getChargingDegree() {
return chargingDegree;
}
public void setChargingDegree(BigDecimal chargingDegree) {
this.chargingDegree = chargingDegree;
}
public Long getRateModelId() {
return rateModelId;
}
public void setRateModelId(Long rateModelId) {
this.rateModelId = rateModelId;
}
public Long getChargingPileId() {
return chargingPileId;
}
public void setChargingPileId(Long chargingPileId) {
this.chargingPileId = chargingPileId;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Long getOperatorId() {
return operatorId;
}
public void setOperatorId(Long operatorId) {
this.operatorId = operatorId;
}
} }

View File

@ -318,7 +318,6 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
xhpcHistoryOrder.setChargingStationId(xhpcChargeOrder.getChargingStationId()); xhpcHistoryOrder.setChargingStationId(xhpcChargeOrder.getChargingStationId());
xhpcHistoryOrder.setUserId(userId); xhpcHistoryOrder.setUserId(userId);
xhpcHistoryOrder.setTerminalId(xhpcChargeOrder.getTerminalId()); xhpcHistoryOrder.setTerminalId(xhpcChargeOrder.getTerminalId());
xhpcHistoryOrder.setGunId(xhpcChargeOrder.getGunId());
xhpcHistoryOrder.setStartTime(xhpcChargeOrder.getStartTime()); xhpcHistoryOrder.setStartTime(xhpcChargeOrder.getStartTime());
xhpcHistoryOrder.setStopReasonEvcs(xhpcChargeOrder.getStopReasonEvcs());//todo 从头开始设置所有evcs字段 xhpcHistoryOrder.setStopReasonEvcs(xhpcChargeOrder.getStopReasonEvcs());//todo 从头开始设置所有evcs字段
xhpcHistoryOrder.setChargeModelEvcs(xhpcChargeOrder.getChargeModelEvcs()); xhpcHistoryOrder.setChargeModelEvcs(xhpcChargeOrder.getChargeModelEvcs());

View File

@ -5,237 +5,339 @@
<mapper namespace="com.xhpc.order.mapper.XhpcHistoryOrderMapper"> <mapper namespace="com.xhpc.order.mapper.XhpcHistoryOrderMapper">
<resultMap type="com.xhpc.order.domain.XhpcHistoryOrder" id="XhpcHistoryOrderResult"> <resultMap type="com.xhpc.order.domain.XhpcHistoryOrder" id="XhpcHistoryOrderResult">
<result column="history_order_id" property="historyOrderId"/> <id column="history_order_id" jdbcType="BIGINT" property="historyOrderId"/>
<result column="charging_station_id" property="chargingStationId"/> <result column="charging_station_id" jdbcType="BIGINT" property="chargingStationId"/>
<result column="charging_order_id" property="chargeOrderId"/> <result column="charge_order_id" jdbcType="BIGINT" property="chargeOrderId"/>
<result column="user_id" property="userId"/> <result column="user_id" jdbcType="BIGINT" property="userId"/>
<result column="terminal_id" property="terminalId"/> <result column="terminal_id" jdbcType="BIGINT" property="terminalId"/>
<result column="serial_number" property="serialNumber"/> <result column="serial_number" jdbcType="VARCHAR" property="serialNumber"/>
<result column="internet_serial_number" property="internetSerialNumber"/> <result column="internet_serial_number" jdbcType="VARCHAR" property="internetSerialNumber"/>
<result column="total_price" property="totalPrice"/> <result column="power_price_total" jdbcType="DECIMAL" property="powerPriceTotal"/>
<result column="promotion_discount" property="promotionDiscount"/> <result column="service_price_total" jdbcType="DECIMAL" property="servicePriceTotal"/>
<result column="act_price" property="actPrice"/> <result column="total_price" jdbcType="DECIMAL" property="totalPrice"/>
<result column="act_power_price" property="actPowerPrice"/> <result column="promotion_discount" jdbcType="DECIMAL" property="promotionDiscount"/>
<result column="act_service_price" property="actServicePrice"/> <result column="act_price" jdbcType="DECIMAL" property="actPrice"/>
<result column="internet_commission" property="internetCommission"/> <result column="act_power_price" jdbcType="DECIMAL" property="actPowerPrice"/>
<result column="internet_svc_commission" property="internetSvcCommission"/> <result column="act_service_price" jdbcType="DECIMAL" property="actServicePrice"/>
<result column="platform_commission" property="platformCommission"/> <result column="internet_commission" jdbcType="DECIMAL" property="internetCommission"/>
<result column="platform_svc_commisssion" property="platformSvcCommisssion"/> <result column="internet_svc_commission" jdbcType="DECIMAL" property="internetSvcCommission"/>
<result column="operation_commission" property="operationCommission"/> <result column="platform_commission" jdbcType="DECIMAL" property="platformCommission"/>
<result column="start_soc" property="startSoc"/> <result column="platform_svc_commisssion" jdbcType="DECIMAL" property="platformSvcCommisssion"/>
<result column="end_soc" property="endSoc"/> <result column="operation_commission" jdbcType="DECIMAL" property="operationCommission"/>
<result column="reconciliation_status" property="reconciliationStatus"/> <result column="operation_svc_commission" jdbcType="DECIMAL" property="operationSvcCommission"/>
<result column="sorting_status" property="sortingStatus"/> <result column="start_soc" jdbcType="VARCHAR" property="startSoc"/>
<result column="type" property="type"/> <result column="end_soc" jdbcType="VARCHAR" property="endSoc"/>
<result column="status" property="status"/> <result column="reconciliation_status" jdbcType="INTEGER" property="reconciliationStatus"/>
<result column="del_flag" property="delFlag"/> <result column="sorting_status" jdbcType="INTEGER" property="sortingStatus"/>
<result column="create_time" property="createTime"/> <result column="type" jdbcType="TINYINT" property="type"/>
<result column="create_by" property="createBy"/> <result column="status" jdbcType="INTEGER" property="status"/>
<result column="update_time" property="updateTime"/> <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
<result column="update_by" property="updateBy"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="remark" property="remark"/> <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="power_price_total" property="powerPriceTotal"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="service_price_total" property="servicePriceTotal"/> <result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="state" property="state"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="vin_normal" jdbcType="VARCHAR" property="vinNormal"/>
<result column="search_value" jdbcType="VARCHAR" property="searchValue"/>
<result column="operator_id_evcs" jdbcType="VARCHAR" property="operatorIdEvcs"/>
<result column="charge_model_evcs" jdbcType="INTEGER" property="chargeModelEvcs"/>
<result column="connector_power_evcs" jdbcType="DOUBLE" property="connectorPowerEvcs"/>
<result column="meter_value_end_evcs" jdbcType="DOUBLE" property="meterValueEndEvcs"/>
<result column="meter_value_start_evcs" jdbcType="DOUBLE" property="meterValueStartEvcs"/>
<result column="operator_id3rdpty_evcs" jdbcType="VARCHAR" property="operatorId3rdptyEvcs"/>
<result column="start_time" jdbcType="TIMESTAMP" property="startTime"/>
<result column="stop_reason_evcs" jdbcType="INTEGER" property="stopReasonEvcs"/>
<result column="total_power" jdbcType="DOUBLE" property="totalPower"/>
<result column="user_name_evcs" jdbcType="VARCHAR" property="userNameEvcs"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
</resultMap> </resultMap>
<sql id="Base_Column_List">
history_order_id, charging_station_id, charge_order_id, user_id, terminal_id, serial_number,
internet_serial_number, power_price_total, service_price_total, total_price, promotion_discount,
act_price, act_power_price, act_service_price, internet_commission, internet_svc_commission,
platform_commission, platform_svc_commisssion, operation_commission, operation_svc_commission,
start_soc, end_soc, reconciliation_status, sorting_status, `type`, `status`, del_flag,
create_time, create_by, update_time, update_by, remark, `state`, vin_normal, search_value,
operator_id_evcs, charge_model_evcs, connector_power_evcs, meter_value_end_evcs,
meter_value_start_evcs, operator_id3rdpty_evcs, start_time, stop_reason_evcs, total_power,
user_name_evcs, phone
</sql>
<insert id="insert" parameterType="com.xhpc.order.domain.XhpcHistoryOrder" useGeneratedKeys="true" <insert id="insert" parameterType="com.xhpc.order.domain.XhpcHistoryOrder" useGeneratedKeys="true"
keyProperty="historyOrderId"> keyProperty="historyOrderId">
INSERT INTO xhpc_history_order INSERT INTO xhpc_history_order
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null != chargingStationId and '' != chargingStationId"> <if test="chargingStationId != null">
charging_station_id, charging_station_id,
</if> </if>
<if test="null != chargeOrderId and '' != chargeOrderId"> <if test="chargeOrderId != null">
charge_order_id, charge_order_id,
</if> </if>
<if test="null != userId and '' != userId"> <if test="userId != null">
user_id, user_id,
</if> </if>
<if test="null != terminalId and '' != terminalId"> <if test="terminalId != null">
terminal_id, terminal_id,
</if> </if>
<if test="null != serialNumber and '' != serialNumber"> <if test="serialNumber != null">
serial_number, serial_number,
</if> </if>
<if test="null != internetSerialNumber and '' != internetSerialNumber"> <if test="internetSerialNumber != null">
internet_serial_number, internet_serial_number,
</if> </if>
<if test="null != totalPrice and '' != totalPrice"> <if test="powerPriceTotal != null">
total_price,
</if>
<if test="null != promotionDiscount and '' != promotionDiscount">
promotion_discount,
</if>
<if test="null != actPrice and '' != actPrice">
act_price,
</if>
<if test="null != actPowerPrice and '' != actPowerPrice">
act_power_price,
</if>
<if test="null != actServicePrice and '' != actServicePrice">
act_service_price,
</if>
<if test="null != internetCommission and '' != internetCommission">
internet_commission,
</if>
<if test="null != internetSvcCommission and '' != internetSvcCommission">
internet_svc_commission,
</if>
<if test="null != platformCommission and '' != platformCommission">
platform_commission,
</if>
<if test="null != platformSvcCommisssion and '' != platformSvcCommisssion">
platform_svc_commisssion,
</if>
<if test="null != operationCommission and '' != operationCommission">
operation_commission,
</if>
<if test="null != operationSvcCommission and '' != operationSvcCommission">
operation_svc_commission,
</if>
<if test="null != startSoc and '' != startSoc">
start_soc,
</if>
<if test="null != endSoc and '' != endSoc">
end_soc,
</if>
<if test="null != reconciliationStatus and '' != reconciliationStatus">
reconciliation_status,
</if>
<if test="null != sortingStatus and '' != sortingStatus">
sorting_status,
</if>
<if test="null != type and '' != type">
type,
</if>
<if test="null != status and '' != status">
status,
</if>
<if test="null != delFlag and '' != delFlag">
del_flag,
</if>
<if test="null != createTime ">
create_time,
</if>
<if test="null != createBy and '' != createBy">
create_by,
</if>
<if test="null != updateTime">
update_time,
</if>
<if test="null != updateBy and '' != updateBy">
update_by,
</if>
<if test="null != remark and '' != remark">
remark,
</if>
<if test="null != powerPriceTotal and '' != powerPriceTotal">
power_price_total, power_price_total,
</if> </if>
<if test="null != servicePriceTotal and '' != servicePriceTotal"> <if test="servicePriceTotal != null">
service_price_total, service_price_total,
</if> </if>
<if test="null != vinNormal and '' != vinNormal"> <if test="totalPrice != null">
vin_normal total_price,
</if>
<if test="promotionDiscount != null">
promotion_discount,
</if>
<if test="actPrice != null">
act_price,
</if>
<if test="actPowerPrice != null">
act_power_price,
</if>
<if test="actServicePrice != null">
act_service_price,
</if>
<if test="internetCommission != null">
internet_commission,
</if>
<if test="internetSvcCommission != null">
internet_svc_commission,
</if>
<if test="platformCommission != null">
platform_commission,
</if>
<if test="platformSvcCommisssion != null">
platform_svc_commisssion,
</if>
<if test="operationCommission != null">
operation_commission,
</if>
<if test="operationSvcCommission != null">
operation_svc_commission,
</if>
<if test="startSoc != null">
start_soc,
</if>
<if test="endSoc != null">
end_soc,
</if>
<if test="reconciliationStatus != null">
reconciliation_status,
</if>
<if test="sortingStatus != null">
sorting_status,
</if>
<if test="type != null">
`type`,
</if>
<if test="status != null">
`status`,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="remark != null">
remark,
</if>
<if test="state != null">
`state`,
</if>
<if test="vinNormal != null">
vin_normal,
</if>
<if test="searchValue != null">
search_value,
</if>
<if test="operatorIdEvcs != null">
operator_id_evcs,
</if>
<if test="chargeModelEvcs != null">
charge_model_evcs,
</if>
<if test="connectorPowerEvcs != null">
connector_power_evcs,
</if>
<if test="meterValueEndEvcs != null">
meter_value_end_evcs,
</if>
<if test="meterValueStartEvcs != null">
meter_value_start_evcs,
</if>
<if test="operatorId3rdptyEvcs != null">
operator_id3rdpty_evcs,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="stopReasonEvcs != null">
stop_reason_evcs,
</if>
<if test="totalPower != null">
total_power,
</if>
<if test="userNameEvcs != null">
user_name_evcs,
</if>
<if test="phone != null">
phone,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null != chargingStationId and '' != chargingStationId"> <if test="chargingStationId != null">
#{chargingStationId}, #{chargingStationId,jdbcType=BIGINT},
</if> </if>
<if test="null != chargeOrderId and '' != chargeOrderId"> <if test="chargeOrderId != null">
#{chargeOrderId}, #{chargeOrderId,jdbcType=BIGINT},
</if> </if>
<if test="null != userId and '' != userId"> <if test="userId != null">
#{userId}, #{userId,jdbcType=BIGINT},
</if> </if>
<if test="null != terminalId and '' != terminalId"> <if test="terminalId != null">
#{terminalId}, #{terminalId,jdbcType=BIGINT},
</if> </if>
<if test="null != serialNumber and '' != serialNumber"> <if test="serialNumber != null">
#{serialNumber}, #{serialNumber,jdbcType=VARCHAR},
</if> </if>
<if test="null != internetSerialNumber and '' != internetSerialNumber"> <if test="internetSerialNumber != null">
#{internetSerialNumber}, #{internetSerialNumber,jdbcType=VARCHAR},
</if> </if>
<if test="null != totalPrice and '' != totalPrice"> <if test="powerPriceTotal != null">
#{totalPrice}, #{powerPriceTotal,jdbcType=DECIMAL},
</if> </if>
<if test="null != promotionDiscount and '' != promotionDiscount"> <if test="servicePriceTotal != null">
#{promotionDiscount}, #{servicePriceTotal,jdbcType=DECIMAL},
</if> </if>
<if test="null != actPrice and '' != actPrice"> <if test="totalPrice != null">
#{actPrice}, #{totalPrice,jdbcType=DECIMAL},
</if> </if>
<if test="null != actPowerPrice and '' != actPowerPrice"> <if test="promotionDiscount != null">
#{actPowerPrice}, #{promotionDiscount,jdbcType=DECIMAL},
</if> </if>
<if test="null != actServicePrice and '' != actServicePrice"> <if test="actPrice != null">
#{actServicePrice}, #{actPrice,jdbcType=DECIMAL},
</if> </if>
<if test="null != internetCommission and '' != internetCommission"> <if test="actPowerPrice != null">
#{internetCommission}, #{actPowerPrice,jdbcType=DECIMAL},
</if> </if>
<if test="null != internetSvcCommission and '' != internetSvcCommission"> <if test="actServicePrice != null">
#{internetSvcCommission}, #{actServicePrice,jdbcType=DECIMAL},
</if> </if>
<if test="null != platformCommission and '' != platformCommission"> <if test="internetCommission != null">
#{platformCommission}, #{internetCommission,jdbcType=DECIMAL},
</if> </if>
<if test="null != platformSvcCommisssion and '' != platformSvcCommisssion"> <if test="internetSvcCommission != null">
#{platformSvcCommisssion}, #{internetSvcCommission,jdbcType=DECIMAL},
</if> </if>
<if test="null != operationCommission and '' != operationCommission"> <if test="platformCommission != null">
#{operationCommission}, #{platformCommission,jdbcType=DECIMAL},
</if> </if>
<if test="null != operationSvcCommission and '' != operationSvcCommission"> <if test="platformSvcCommisssion != null">
#{operationSvcCommission}, #{platformSvcCommisssion,jdbcType=DECIMAL},
</if> </if>
<if test="null != startSoc and '' != startSoc"> <if test="operationCommission != null">
#{startSoc}, #{operationCommission,jdbcType=DECIMAL},
</if> </if>
<if test="null != endSoc and '' != endSoc"> <if test="operationSvcCommission != null">
#{endSoc}, #{operationSvcCommission,jdbcType=DECIMAL},
</if> </if>
<if test="null != reconciliationStatus and '' != reconciliationStatus"> <if test="startSoc != null">
#{reconciliationStatus}, #{startSoc,jdbcType=VARCHAR},
</if> </if>
<if test="null != sortingStatus and '' != sortingStatus"> <if test="endSoc != null">
#{sortingStatus}, #{endSoc,jdbcType=VARCHAR},
</if> </if>
<if test="null != type and '' != type"> <if test="reconciliationStatus != null">
#{type}, #{reconciliationStatus,jdbcType=INTEGER},
</if> </if>
<if test="null != status and '' != status"> <if test="sortingStatus != null">
#{status}, #{sortingStatus,jdbcType=INTEGER},
</if> </if>
<if test="null != delFlag and '' != delFlag"> <if test="type != null">
#{delFlag}, #{type,jdbcType=TINYINT},
</if> </if>
<if test="null != createTime "> <if test="status != null">
#{createTime}, #{status,jdbcType=INTEGER},
</if> </if>
<if test="null != createBy and '' != createBy"> <if test="delFlag != null">
#{createBy}, #{delFlag,jdbcType=INTEGER},
</if> </if>
<if test="null != updateTime"> <if test="createTime != null">
#{updateTime}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="null != updateBy and '' != updateBy"> <if test="createBy != null">
#{updateBy}, #{createBy,jdbcType=VARCHAR},
</if> </if>
<if test="null != remark and '' != remark"> <if test="updateTime != null">
#{remark}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="null != powerPriceTotal and '' != powerPriceTotal"> <if test="updateBy != null">
#{powerPriceTotal}, #{updateBy,jdbcType=VARCHAR},
</if> </if>
<if test="null != servicePriceTotal and '' != servicePriceTotal"> <if test="remark != null">
#{servicePriceTotal}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="null != vinNormal and '' != vinNormal"> <if test="state != null">
#{vinNormal} #{state,jdbcType=INTEGER},
</if>
<if test="vinNormal != null">
#{vinNormal,jdbcType=VARCHAR},
</if>
<if test="searchValue != null">
#{searchValue,jdbcType=VARCHAR},
</if>
<if test="operatorIdEvcs != null">
#{operatorIdEvcs,jdbcType=VARCHAR},
</if>
<if test="chargeModelEvcs != null">
#{chargeModelEvcs,jdbcType=INTEGER},
</if>
<if test="connectorPowerEvcs != null">
#{connectorPowerEvcs,jdbcType=DOUBLE},
</if>
<if test="meterValueEndEvcs != null">
#{meterValueEndEvcs,jdbcType=DOUBLE},
</if>
<if test="meterValueStartEvcs != null">
#{meterValueStartEvcs,jdbcType=DOUBLE},
</if>
<if test="operatorId3rdptyEvcs != null">
#{operatorId3rdptyEvcs,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="stopReasonEvcs != null">
#{stopReasonEvcs,jdbcType=INTEGER},
</if>
<if test="totalPower != null">
#{totalPower,jdbcType=DOUBLE},
</if>
<if test="userNameEvcs != null">
#{userNameEvcs,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if> </if>
</trim> </trim>
</insert> </insert>
@ -243,58 +345,143 @@
<update id="update" parameterType="com.xhpc.order.domain.XhpcHistoryOrder"> <update id="update" parameterType="com.xhpc.order.domain.XhpcHistoryOrder">
UPDATE xhpc_history_order UPDATE xhpc_history_order
<set> <set>
<if test="null != chargingStationId and '' != chargingStationId">charging_station_id = <if test="chargingStationId != null">
#{chargingStationId}, charging_station_id = #{chargingStationId,jdbcType=BIGINT},
</if> </if>
<if test="null != chargeOrderId and '' != chargeOrderId">charge_order_id = #{chargeOrderId},</if> <if test="chargeOrderId != null">
<if test="null != userId and '' != userId">user_id = #{userId},</if> charge_order_id = #{chargeOrderId,jdbcType=BIGINT},
<if test="null != terminalId and '' != terminalId">terminal_id = #{terminalId},</if>
<if test="null != serialNumber and '' != serialNumber">serial_number = #{serialNumber},</if>
<if test="null != internetSerialNumber and '' != internetSerialNumber">internet_serial_number =
#{internetSerialNumber},
</if> </if>
<if test="null != totalPrice">total_price = #{totalPrice},</if> <if test="userId != null">
<if test="null != promotionDiscount">promotion_discount = user_id = #{userId,jdbcType=BIGINT},
#{promotionDiscount},
</if> </if>
<if test="null != actPrice">act_price = #{actPrice},</if> <if test="terminalId != null">
<if test="null != actPowerPrice">act_power_price = #{actPowerPrice},</if> terminal_id = #{terminalId,jdbcType=BIGINT},
<if test="null != actServicePrice">act_service_price = #{actServicePrice},</if>
<if test="null != internetCommission ">internet_commission =
#{internetCommission},
</if> </if>
<if test="null != internetSvcCommission">internet_svc_commission = <if test="serialNumber != null">
#{internetSvcCommission}, serial_number = #{serialNumber,jdbcType=VARCHAR},
</if> </if>
<if test="null != platformCommission">platform_commission = <if test="internetSerialNumber != null">
#{platformCommission}, internet_serial_number = #{internetSerialNumber,jdbcType=VARCHAR},
</if> </if>
<if test="null != platformSvcCommisssion">platform_svc_commisssion = <if test="powerPriceTotal != null">
#{platformSvcCommisssion}, power_price_total = #{powerPriceTotal,jdbcType=DECIMAL},
</if> </if>
<if test="null != operationCommission ">operation_commission = <if test="servicePriceTotal != null">
#{operationCommission}, service_price_total = #{servicePriceTotal,jdbcType=DECIMAL},
</if> </if>
<if test="null != operationSvcCommission">operation_svc_commission = <if test="totalPrice != null">
#{operationSvcCommission}, total_price = #{totalPrice,jdbcType=DECIMAL},
</if>
<if test="promotionDiscount != null">
promotion_discount = #{promotionDiscount,jdbcType=DECIMAL},
</if>
<if test="actPrice != null">
act_price = #{actPrice,jdbcType=DECIMAL},
</if>
<if test="actPowerPrice != null">
act_power_price = #{actPowerPrice,jdbcType=DECIMAL},
</if>
<if test="actServicePrice != null">
act_service_price = #{actServicePrice,jdbcType=DECIMAL},
</if>
<if test="internetCommission != null">
internet_commission = #{internetCommission,jdbcType=DECIMAL},
</if>
<if test="internetSvcCommission != null">
internet_svc_commission = #{internetSvcCommission,jdbcType=DECIMAL},
</if>
<if test="platformCommission != null">
platform_commission = #{platformCommission,jdbcType=DECIMAL},
</if>
<if test="platformSvcCommisssion != null">
platform_svc_commisssion = #{platformSvcCommisssion,jdbcType=DECIMAL},
</if>
<if test="operationCommission != null">
operation_commission = #{operationCommission,jdbcType=DECIMAL},
</if>
<if test="operationSvcCommission != null">
operation_svc_commission = #{operationSvcCommission,jdbcType=DECIMAL},
</if>
<if test="startSoc != null">
start_soc = #{startSoc,jdbcType=VARCHAR},
</if>
<if test="endSoc != null">
end_soc = #{endSoc,jdbcType=VARCHAR},
</if>
<if test="reconciliationStatus != null">
reconciliation_status = #{reconciliationStatus,jdbcType=INTEGER},
</if>
<if test="sortingStatus != null">
sorting_status = #{sortingStatus,jdbcType=INTEGER},
</if>
<if test="type != null">
`type` = #{type,jdbcType=TINYINT},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="state != null">
`state` = #{state,jdbcType=INTEGER},
</if>
<if test="vinNormal != null">
vin_normal = #{vinNormal,jdbcType=VARCHAR},
</if>
<if test="searchValue != null">
search_value = #{searchValue,jdbcType=VARCHAR},
</if>
<if test="operatorIdEvcs != null">
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR},
</if>
<if test="chargeModelEvcs != null">
charge_model_evcs = #{chargeModelEvcs,jdbcType=INTEGER},
</if>
<if test="connectorPowerEvcs != null">
connector_power_evcs = #{connectorPowerEvcs,jdbcType=DOUBLE},
</if>
<if test="meterValueEndEvcs != null">
meter_value_end_evcs = #{meterValueEndEvcs,jdbcType=DOUBLE},
</if>
<if test="meterValueStartEvcs != null">
meter_value_start_evcs = #{meterValueStartEvcs,jdbcType=DOUBLE},
</if>
<if test="operatorId3rdptyEvcs != null">
operator_id3rdpty_evcs = #{operatorId3rdptyEvcs,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="stopReasonEvcs != null">
stop_reason_evcs = #{stopReasonEvcs,jdbcType=INTEGER},
</if>
<if test="totalPower != null">
total_power = #{totalPower,jdbcType=DOUBLE},
</if>
<if test="userNameEvcs != null">
user_name_evcs = #{userNameEvcs,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if> </if>
<if test="null != startSoc and '' != startSoc">start_soc = #{startSoc},</if>
<if test="null != endSoc and '' != endSoc">end_soc = #{endSoc},</if>
<if test="null != reconciliationStatus ">reconciliation_status =#{reconciliationStatus},</if>
<if test="null != sortingStatus ">sorting_status = #{sortingStatus},</if>
<if test="null != type">type = #{type},</if>
<if test="null != status">status = #{status},</if>
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
<if test="null != createTime ">create_time = #{createTime},</if>
<if test="null != createBy and '' != createBy">create_by = #{createBy},</if>
<if test="null != updateTime">update_time = #{updateTime},</if>
<if test="null != updateBy and '' != updateBy">update_by = #{updateBy},</if>
<if test="null != remark and '' != remark">remark = #{remark},</if>
<if test="null != state and '' != state">state = #{state},</if>
<if test="null != powerPriceTotal and '' != powerPriceTotal">power_price_total = #{powerPriceTotal},</if>
<if test="null != servicePriceTotal and '' != servicePriceTotal">service_price_total = #{servicePriceTotal}</if>
</set> </set>
WHERE history_order_id = #{historyOrderId} where history_order_id = #{historyOrderId,jdbcType=BIGINT}
</update> </update>
<select id="info" parameterType="java.lang.Long" resultMap="XhpcHistoryOrderResult"> <select id="info" parameterType="java.lang.Long" resultMap="XhpcHistoryOrderResult">
@ -522,36 +709,37 @@
<select id="getStatistisList" resultType="com.xhpc.order.dto.XhpcChargeHistoryOrder"> <select id="getStatistisList" resultType="com.xhpc.order.dto.XhpcChargeHistoryOrder">
select select
ho.history_order_id as historyOrderId, ho.history_order_id as historyOrderId,
ho.power_price_total as powerPriceTotal, ho.power_price_total as powerPriceTotal,
ho.service_price_total as servicePriceTotal, ho.service_price_total as servicePriceTotal,
ho.promotion_discount as promotionDiscount, ho.promotion_discount as promotionDiscount,
ho.total_price as totalPrice, ho.total_price as totalPrice,
ho.act_price as actPrice, ho.act_price as actPrice,
ho.act_power_price as actPowerPrice, ho.act_power_price as actPowerPrice,
ho.act_service_price as actServicePrice, ho.act_service_price as actServicePrice,
ho.internet_commission as internetCommission, ho.internet_commission as internetCommission,
ho.internet_svc_commission as internetSvcCommission, ho.internet_svc_commission as internetSvcCommission,
ho.platform_commission as platformCommission, ho.platform_commission as platformCommission,
ho.platform_svc_commisssion as platformSvcCommisssion, ho.platform_svc_commisssion as platformSvcCommisssion,
ho.operation_commission as operationCommission, ho.operation_commission as operationCommission,
ho.operation_svc_commission as operationSvcCommission, ho.operation_svc_commission as operationSvcCommission,
co.source as source, co.source as source,
co.charge_order_id as chargeOrderId, co.charge_order_id as chargeOrderId,
co.charging_station_id as chargingStationId, co.charging_station_id as chargingStationId,
co.terminal_id as terminalId, co.terminal_id as terminalId,
co.start_time as startTime, co.start_time as startTime,
co.end_time as endTime, co.end_time as endTime,
co.charging_time_number as chargingTimeNumber, co.charging_time_number as chargingTimeNumber,
co.charging_degree as chargingDegree, co.charging_degree as chargingDegree,
co.rate_model_id as rateModelId, co.rate_model_id as rateModelId,
cs.operator_id as operatorId, cs.operator_id as operatorId,
te.charging_pile_id as chargingPileId, te.charging_pile_id as chargingPileId,
co.user_id as userId co.user_id as userId
from xhpc_history_order ho from xhpc_history_order ho
left join xhpc_charge_order co on co.charge_order_id =ho.charge_order_id 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_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 left join xhpc_terminal as te on te.terminal_id = ho.terminal_id
where state =#{state} limit 0,#{number} where state = #{state}
limit 0,#{number}
</select> </select>
</mapper> </mapper>