订单回调,优化实时数据
This commit is contained in:
parent
3ddc900bc9
commit
f46f060f0a
@ -261,17 +261,17 @@ public class XhpcPileOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
if(!"0".equals(cacheOrderData.getT2PowerQuantity().toString())){
|
if(!"0".equals(cacheOrderData.getT2PowerQuantity().toString())){
|
||||||
BigDecimal multiply = new BigDecimal(cacheOrderData.getT2PowerQuantity()).divide(bigDecimal).multiply(t2powerFee);
|
BigDecimal multiply = new BigDecimal(cacheOrderData.getT2PowerQuantity()).divide(bigDecimal).multiply(t2powerFee);
|
||||||
totalPower =totalPower+cacheOrderData.getT1PowerQuantity();
|
totalPower =totalPower+cacheOrderData.getT2PowerQuantity();
|
||||||
powerPrice=powerPrice.add(multiply);
|
powerPrice=powerPrice.add(multiply);
|
||||||
}
|
}
|
||||||
if(!"0".equals(cacheOrderData.getT3PowerQuantity().toString())){
|
if(!"0".equals(cacheOrderData.getT3PowerQuantity().toString())){
|
||||||
BigDecimal multiply = new BigDecimal(cacheOrderData.getT3PowerQuantity()).divide(bigDecimal).multiply(t3powerFee);
|
BigDecimal multiply = new BigDecimal(cacheOrderData.getT3PowerQuantity()).divide(bigDecimal).multiply(t3powerFee);
|
||||||
totalPower =totalPower+cacheOrderData.getT1PowerQuantity();
|
totalPower =totalPower+cacheOrderData.getT3PowerQuantity();
|
||||||
powerPrice=powerPrice.add(multiply);
|
powerPrice=powerPrice.add(multiply);
|
||||||
}
|
}
|
||||||
if(!"0".equals(cacheOrderData.getT4PowerQuantity().toString())){
|
if(!"0".equals(cacheOrderData.getT4PowerQuantity().toString())){
|
||||||
BigDecimal multiply = new BigDecimal(cacheOrderData.getT4PowerQuantity()).divide(bigDecimal).multiply(t4powerFee);
|
BigDecimal multiply = new BigDecimal(cacheOrderData.getT4PowerQuantity()).divide(bigDecimal).multiply(t4powerFee);
|
||||||
totalPower =totalPower+cacheOrderData.getT1PowerQuantity();
|
totalPower =totalPower+cacheOrderData.getT4PowerQuantity();
|
||||||
powerPrice=powerPrice.add(multiply);
|
powerPrice=powerPrice.add(multiply);
|
||||||
}
|
}
|
||||||
//总服务费
|
//总服务费
|
||||||
@ -334,7 +334,7 @@ public class XhpcPileOrderController extends BaseController {
|
|||||||
|
|
||||||
xhpcHistoryOrder.setPowerPriceTotal(powerPrice);
|
xhpcHistoryOrder.setPowerPriceTotal(powerPrice);
|
||||||
xhpcHistoryOrder.setServicePriceTotal(servicePrice);
|
xhpcHistoryOrder.setServicePriceTotal(servicePrice);
|
||||||
xhpcHistoryOrder.setTotalPower(totalPower.doubleValue()/1000);
|
xhpcHistoryOrder.setTotalPower(totalPower.doubleValue()/10000);
|
||||||
xhpcHistoryOrder.setMeterValueStartEvcs(cacheOrderData.getElectricMeterStart().doubleValue());
|
xhpcHistoryOrder.setMeterValueStartEvcs(cacheOrderData.getElectricMeterStart().doubleValue());
|
||||||
xhpcHistoryOrder.setMeterValueEndEvcs(cacheOrderData.getElectricMeterEnd().doubleValue());
|
xhpcHistoryOrder.setMeterValueEndEvcs(cacheOrderData.getElectricMeterEnd().doubleValue());
|
||||||
Map<String, Object> userMessage = xhpcChargeOrderService.getUserMessage(userId);
|
Map<String, Object> userMessage = xhpcChargeOrderService.getUserMessage(userId);
|
||||||
@ -347,7 +347,7 @@ public class XhpcPileOrderController extends BaseController {
|
|||||||
R.ok();
|
R.ok();
|
||||||
}
|
}
|
||||||
//结算
|
//结算
|
||||||
xhpcRealTimeOrderService.addSettlement(powerPrice,servicePrice,money,surplusPowerPrice,surplusServicePrice,xhpcChargeOrder,userId,userMessage,1,cacheOrderData.getVinNormal());
|
xhpcRealTimeOrderService.addSettlement(powerPrice,servicePrice,money,surplusPowerPrice,surplusServicePrice,xhpcChargeOrder,userId,userMessage,1,cacheOrderData.getVinNormal(),xhpcHistoryOrder);
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("code", 500);
|
map.put("code", 500);
|
||||||
map.put("userId", userId);
|
map.put("userId", userId);
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import com.xhpc.order.service.IXhpcHistoryOrderService;
|
|||||||
import com.xhpc.order.service.IXhpcStatisticsService;
|
import com.xhpc.order.service.IXhpcStatisticsService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@ -75,73 +76,30 @@ public class XhpcHistoryOrderController extends BaseController {
|
|||||||
* 终端统计
|
* 终端统计
|
||||||
*/
|
*/
|
||||||
@GetMapping("/test3")
|
@GetMapping("/test3")
|
||||||
|
@Scheduled(cron = "0 0 12 * * ?")
|
||||||
public void test3(){
|
public void test3(){
|
||||||
add(500,3);
|
add(100,3);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 场站统计
|
* 场站统计
|
||||||
*/
|
*/
|
||||||
@GetMapping("/test2")
|
@GetMapping("/test2")
|
||||||
|
@Scheduled(cron = "0 0 11 * * ?")
|
||||||
public void test2(){
|
public void test2(){
|
||||||
add(500,2);
|
add(100,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void add(int number,int type){
|
|
||||||
//获取500条待统计历史订单
|
|
||||||
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(number,type);
|
|
||||||
//场站、运营商、流量方
|
|
||||||
if(list !=null && list.size()>0){
|
|
||||||
for (XhpcChargeHistoryOrder xhpc:list) {
|
|
||||||
XhpcStatisticsStation xhpcSt =new XhpcStatisticsStation();
|
|
||||||
xhpcSt.setChargingDegree(xhpc.getChargingDegree());
|
|
||||||
BigDecimal decimal = new BigDecimal(xhpc.getChargingTimeNumber() / 3600).setScale(2, RoundingMode.HALF_UP);
|
|
||||||
xhpcSt.setChargingTime(decimal);
|
|
||||||
xhpcSt.setChargingNumber(1);
|
|
||||||
xhpcSt.setPowerPrice(xhpc.getPowerPriceTotal());
|
|
||||||
xhpcSt.setServicePrice(xhpc.getServicePriceTotal());
|
|
||||||
xhpcSt.setTotalPrice(xhpc.getTotalPrice());
|
|
||||||
xhpcSt.setPromotionDiscount(xhpc.getPromotionDiscount());
|
|
||||||
xhpcSt.setActPrice(xhpc.getActPrice());
|
|
||||||
xhpcSt.setInternetCommission(xhpc.getInternetCommission());
|
|
||||||
xhpcSt.setInternetSvcCommission(xhpc.getInternetSvcCommission());
|
|
||||||
xhpcSt.setPlatformCommission(xhpc.getPlatformCommission());
|
|
||||||
xhpcSt.setPlatformSvcCommisssion(xhpc.getPlatformSvcCommisssion());
|
|
||||||
xhpcSt.setOperationCommission(xhpc.getOperationCommission());
|
|
||||||
xhpcSt.setOperationSvcCommission(xhpc.getOperationSvcCommission());
|
|
||||||
xhpcSt.setActPowerPrice(xhpc.getActPowerPrice());
|
|
||||||
xhpcSt.setActServicePrice(xhpc.getActServicePrice());
|
|
||||||
if(xhpc.getSource()==1){
|
|
||||||
xhpcSt.setInternetUserId(xhpc.getUserId());
|
|
||||||
}
|
|
||||||
xhpcSt.setOperatorId(xhpc.getOperatorId());
|
|
||||||
xhpcSt.setChargingStationId(xhpc.getChargingStationId());
|
|
||||||
xhpcSt.setCreateTime(Calendar.getInstance().getTime());
|
|
||||||
xhpcSt.setTerminalId(xhpc.getTerminalId());
|
|
||||||
xhpcSt.setHistoryOrderId(xhpc.getHistoryOrderId());
|
|
||||||
xhpcSt.setChargingPileId(xhpc.getChargingPileId());
|
|
||||||
xhpcSt.setType(type);
|
|
||||||
xhpcStatisticsService.addStatisticsStation(xhpcSt);
|
|
||||||
|
|
||||||
|
|
||||||
//修改历史订单表状态
|
|
||||||
XhpcHistoryOrder xhpcHistoryOrder =new XhpcHistoryOrder();
|
|
||||||
xhpcHistoryOrder.setHistoryOrderId(xhpc.getHistoryOrderId());
|
|
||||||
xhpcHistoryOrder.setState(type+1);
|
|
||||||
xhpcHistoryOrderService.update(xhpcHistoryOrder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 日期统计
|
* 日期统计
|
||||||
*/
|
*/
|
||||||
@GetMapping("/test1")
|
@GetMapping("/test1")
|
||||||
|
@Scheduled(cron = "0 0 00 * * ?")
|
||||||
public void test1(){
|
public void test1(){
|
||||||
//获取500条待统计历史订单
|
//获取500条待统计历史订单
|
||||||
//跨时段,跨费率,计费模型
|
//跨时段,跨费率,计费模型
|
||||||
//日期统计
|
//日期统计
|
||||||
int type =1;
|
int type =1;
|
||||||
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(500,type);
|
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(100,type);
|
||||||
//是否跨天
|
//是否跨天
|
||||||
if(list !=null && list.size()>0){
|
if(list !=null && list.size()>0){
|
||||||
for (XhpcChargeHistoryOrder xhpc:list) {
|
for (XhpcChargeHistoryOrder xhpc:list) {
|
||||||
@ -209,75 +167,16 @@ public class XhpcHistoryOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void addStation(XhpcChargeHistoryOrder xhpc,BigDecimal chargingTime,int type,String startTime,String endTime,BigDecimal divide) {
|
|
||||||
|
|
||||||
BigDecimal chargingDegree1 =new BigDecimal(0);
|
|
||||||
BigDecimal powerPrice1 =new BigDecimal(0);
|
|
||||||
BigDecimal servicePrice1 =new BigDecimal(0);
|
|
||||||
List<Map<String, Object>> reatTimeList = xhpcHistoryOrderService.getReatTimeList(startTime, endTime, xhpc.getRateModelId());
|
|
||||||
if(reatTimeList !=null && reatTimeList.size()>0){
|
|
||||||
for (int i = 0; i <reatTimeList.size() ; i++) {
|
|
||||||
Map<String, Object> objectMap = reatTimeList.get(i);
|
|
||||||
BigDecimal powerPrice =new BigDecimal(objectMap.get("powerFee").toString());
|
|
||||||
BigDecimal servicePrice =new BigDecimal(objectMap.get("serviceFee").toString());
|
|
||||||
String startTime1 = objectMap.get("startTime").toString();
|
|
||||||
String endTime1 = objectMap.get("endTime").toString();
|
|
||||||
//总度数
|
|
||||||
BigDecimal chargingDegree2 = new BigDecimal((DateUtil.parse(endTime1).getTime() - DateUtil.parse(startTime1).getTime())/60000).multiply(divide).setScale(2, RoundingMode.HALF_UP);
|
|
||||||
chargingDegree1 =chargingDegree1.add(chargingDegree2);
|
|
||||||
powerPrice1 =powerPrice1.add(powerPrice.multiply(chargingDegree2).setScale(2, RoundingMode.HALF_UP));
|
|
||||||
servicePrice1 =servicePrice1.add(servicePrice.multiply(chargingDegree2).setScale(2, RoundingMode.HALF_UP));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XhpcStatisticsStation xhpcSt =new XhpcStatisticsStation();
|
|
||||||
xhpcSt.setChargingDegree(chargingDegree1);
|
|
||||||
xhpcSt.setChargingTime(chargingTime);
|
|
||||||
xhpcSt.setChargingNumber(1);
|
|
||||||
xhpcSt.setPowerPrice(powerPrice1);
|
|
||||||
xhpcSt.setServicePrice(servicePrice1);
|
|
||||||
xhpcSt.setTotalPrice(powerPrice1.add(servicePrice1));
|
|
||||||
BigDecimal promotion =new BigDecimal(2);
|
|
||||||
xhpcSt.setPromotionDiscount(xhpc.getPromotionDiscount().divide(promotion,2, RoundingMode.HALF_UP));
|
|
||||||
xhpcSt.setActPrice(xhpcSt.getTotalPrice().subtract(xhpcSt.getPromotionDiscount()));
|
|
||||||
xhpcSt.setInternetCommission(xhpc.getInternetCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
|
||||||
xhpcSt.setInternetSvcCommission(xhpc.getInternetSvcCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
|
||||||
xhpcSt.setPlatformCommission(xhpc.getPlatformCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
|
||||||
xhpcSt.setPlatformSvcCommisssion(xhpc.getPlatformSvcCommisssion().divide(promotion,2, RoundingMode.HALF_UP));
|
|
||||||
xhpcSt.setOperationCommission(xhpc.getOperationCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
|
||||||
xhpcSt.setOperationSvcCommission(xhpc.getOperationSvcCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
|
||||||
|
|
||||||
//抽成费用
|
|
||||||
BigDecimal money = xhpcSt.getPlatformCommission().add(xhpcSt.getPlatformSvcCommisssion())
|
|
||||||
.add(xhpcSt.getInternetCommission()).add(xhpcSt.getInternetSvcCommission())
|
|
||||||
.add(xhpcSt.getOperationCommission()).add(xhpcSt.getOperationSvcCommission());
|
|
||||||
xhpcSt.setActPowerPrice(powerPrice1.subtract(money));
|
|
||||||
xhpcSt.setActServicePrice(servicePrice1.subtract(money));
|
|
||||||
if(xhpc.getSource()==1){
|
|
||||||
xhpcSt.setInternetUserId(xhpc.getUserId());
|
|
||||||
}
|
|
||||||
xhpcSt.setOperatorId(xhpc.getOperatorId());
|
|
||||||
xhpcSt.setChargingStationId(xhpc.getChargingStationId());
|
|
||||||
xhpcSt.setCreateTime(Calendar.getInstance().getTime());
|
|
||||||
xhpcSt.setTerminalId(xhpc.getTerminalId());
|
|
||||||
xhpcSt.setHistoryOrderId(xhpc.getHistoryOrderId());
|
|
||||||
xhpcSt.setChargingPileId(xhpc.getChargingPileId());
|
|
||||||
xhpcSt.setType(type);
|
|
||||||
xhpcStatisticsService.addStatisticsStation(xhpcSt);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小时统计
|
* 小时统计
|
||||||
*/
|
*/
|
||||||
@GetMapping("/test")
|
@GetMapping("/test")
|
||||||
|
@Scheduled(cron = "0 0 * * * ?")
|
||||||
public void test(){
|
public void test(){
|
||||||
//获取500条待统计历史订单
|
//获取500条待统计历史订单
|
||||||
//跨时段,跨费率,计费模型
|
//跨时段,跨费率,计费模型
|
||||||
//小时统计
|
//小时统计
|
||||||
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(500,0);
|
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(50,0);
|
||||||
if(list !=null && list.size()>0){
|
if(list !=null && list.size()>0){
|
||||||
for (XhpcChargeHistoryOrder xhpc:list) {
|
for (XhpcChargeHistoryOrder xhpc:list) {
|
||||||
//开始时间、结束时间、模型id、状态、用户id、运营商、订单id、场站id、终端id、历史订单id、时间
|
//开始时间、结束时间、模型id、状态、用户id、运营商、订单id、场站id、终端id、历史订单id、时间
|
||||||
@ -369,6 +268,109 @@ public class XhpcHistoryOrderController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void add(int number,int type){
|
||||||
|
//获取500条待统计历史订单
|
||||||
|
List<XhpcChargeHistoryOrder> list = xhpcHistoryOrderService.getStatistisList(number,type);
|
||||||
|
//场站、运营商、流量方
|
||||||
|
if(list !=null && list.size()>0){
|
||||||
|
for (XhpcChargeHistoryOrder xhpc:list) {
|
||||||
|
XhpcStatisticsStation xhpcSt =new XhpcStatisticsStation();
|
||||||
|
xhpcSt.setChargingDegree(xhpc.getChargingDegree());
|
||||||
|
BigDecimal decimal = new BigDecimal(xhpc.getChargingTimeNumber() / 3600).setScale(2, RoundingMode.HALF_UP);
|
||||||
|
xhpcSt.setChargingTime(decimal);
|
||||||
|
xhpcSt.setChargingNumber(1);
|
||||||
|
xhpcSt.setPowerPrice(xhpc.getPowerPriceTotal());
|
||||||
|
xhpcSt.setServicePrice(xhpc.getServicePriceTotal());
|
||||||
|
xhpcSt.setTotalPrice(xhpc.getTotalPrice());
|
||||||
|
xhpcSt.setPromotionDiscount(xhpc.getPromotionDiscount());
|
||||||
|
xhpcSt.setActPrice(xhpc.getActPrice());
|
||||||
|
xhpcSt.setInternetCommission(xhpc.getInternetCommission());
|
||||||
|
xhpcSt.setInternetSvcCommission(xhpc.getInternetSvcCommission());
|
||||||
|
xhpcSt.setPlatformCommission(xhpc.getPlatformCommission());
|
||||||
|
xhpcSt.setPlatformSvcCommisssion(xhpc.getPlatformSvcCommisssion());
|
||||||
|
xhpcSt.setOperationCommission(xhpc.getOperationCommission());
|
||||||
|
xhpcSt.setOperationSvcCommission(xhpc.getOperationSvcCommission());
|
||||||
|
xhpcSt.setActPowerPrice(xhpc.getActPowerPrice());
|
||||||
|
xhpcSt.setActServicePrice(xhpc.getActServicePrice());
|
||||||
|
if(xhpc.getSource()==1){
|
||||||
|
xhpcSt.setInternetUserId(xhpc.getUserId());
|
||||||
|
}
|
||||||
|
xhpcSt.setOperatorId(xhpc.getOperatorId());
|
||||||
|
xhpcSt.setChargingStationId(xhpc.getChargingStationId());
|
||||||
|
xhpcSt.setCreateTime(Calendar.getInstance().getTime());
|
||||||
|
xhpcSt.setTerminalId(xhpc.getTerminalId());
|
||||||
|
xhpcSt.setHistoryOrderId(xhpc.getHistoryOrderId());
|
||||||
|
xhpcSt.setChargingPileId(xhpc.getChargingPileId());
|
||||||
|
xhpcSt.setType(type);
|
||||||
|
xhpcStatisticsService.addStatisticsStation(xhpcSt);
|
||||||
|
|
||||||
|
|
||||||
|
//修改历史订单表状态
|
||||||
|
XhpcHistoryOrder xhpcHistoryOrder =new XhpcHistoryOrder();
|
||||||
|
xhpcHistoryOrder.setHistoryOrderId(xhpc.getHistoryOrderId());
|
||||||
|
xhpcHistoryOrder.setState(type+1);
|
||||||
|
xhpcHistoryOrderService.update(xhpcHistoryOrder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addStation(XhpcChargeHistoryOrder xhpc,BigDecimal chargingTime,int type,String startTime,String endTime,BigDecimal divide) {
|
||||||
|
|
||||||
|
BigDecimal chargingDegree1 =new BigDecimal(0);
|
||||||
|
BigDecimal powerPrice1 =new BigDecimal(0);
|
||||||
|
BigDecimal servicePrice1 =new BigDecimal(0);
|
||||||
|
List<Map<String, Object>> reatTimeList = xhpcHistoryOrderService.getReatTimeList(startTime, endTime, xhpc.getRateModelId());
|
||||||
|
if(reatTimeList !=null && reatTimeList.size()>0){
|
||||||
|
for (int i = 0; i <reatTimeList.size() ; i++) {
|
||||||
|
Map<String, Object> objectMap = reatTimeList.get(i);
|
||||||
|
BigDecimal powerPrice =new BigDecimal(objectMap.get("powerFee").toString());
|
||||||
|
BigDecimal servicePrice =new BigDecimal(objectMap.get("serviceFee").toString());
|
||||||
|
String startTime1 = objectMap.get("startTime").toString();
|
||||||
|
String endTime1 = objectMap.get("endTime").toString();
|
||||||
|
//总度数
|
||||||
|
BigDecimal chargingDegree2 = new BigDecimal((DateUtil.parse(endTime1).getTime() - DateUtil.parse(startTime1).getTime())/60000).multiply(divide).setScale(2, RoundingMode.HALF_UP);
|
||||||
|
chargingDegree1 =chargingDegree1.add(chargingDegree2);
|
||||||
|
powerPrice1 =powerPrice1.add(powerPrice.multiply(chargingDegree2).setScale(2, RoundingMode.HALF_UP));
|
||||||
|
servicePrice1 =servicePrice1.add(servicePrice.multiply(chargingDegree2).setScale(2, RoundingMode.HALF_UP));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XhpcStatisticsStation xhpcSt =new XhpcStatisticsStation();
|
||||||
|
xhpcSt.setChargingDegree(chargingDegree1);
|
||||||
|
xhpcSt.setChargingTime(chargingTime);
|
||||||
|
xhpcSt.setChargingNumber(1);
|
||||||
|
xhpcSt.setPowerPrice(powerPrice1);
|
||||||
|
xhpcSt.setServicePrice(servicePrice1);
|
||||||
|
xhpcSt.setTotalPrice(powerPrice1.add(servicePrice1));
|
||||||
|
BigDecimal promotion =new BigDecimal(2);
|
||||||
|
xhpcSt.setPromotionDiscount(xhpc.getPromotionDiscount().divide(promotion,2, RoundingMode.HALF_UP));
|
||||||
|
xhpcSt.setActPrice(xhpcSt.getTotalPrice().subtract(xhpcSt.getPromotionDiscount()));
|
||||||
|
xhpcSt.setInternetCommission(xhpc.getInternetCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
||||||
|
xhpcSt.setInternetSvcCommission(xhpc.getInternetSvcCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
||||||
|
xhpcSt.setPlatformCommission(xhpc.getPlatformCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
||||||
|
xhpcSt.setPlatformSvcCommisssion(xhpc.getPlatformSvcCommisssion().divide(promotion,2, RoundingMode.HALF_UP));
|
||||||
|
xhpcSt.setOperationCommission(xhpc.getOperationCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
||||||
|
xhpcSt.setOperationSvcCommission(xhpc.getOperationSvcCommission().divide(promotion,2, RoundingMode.HALF_UP));
|
||||||
|
|
||||||
|
//抽成费用
|
||||||
|
BigDecimal money = xhpcSt.getPlatformCommission().add(xhpcSt.getPlatformSvcCommisssion())
|
||||||
|
.add(xhpcSt.getInternetCommission()).add(xhpcSt.getInternetSvcCommission())
|
||||||
|
.add(xhpcSt.getOperationCommission()).add(xhpcSt.getOperationSvcCommission());
|
||||||
|
xhpcSt.setActPowerPrice(powerPrice1.subtract(money));
|
||||||
|
xhpcSt.setActServicePrice(servicePrice1.subtract(money));
|
||||||
|
if(xhpc.getSource()==1){
|
||||||
|
xhpcSt.setInternetUserId(xhpc.getUserId());
|
||||||
|
}
|
||||||
|
xhpcSt.setOperatorId(xhpc.getOperatorId());
|
||||||
|
xhpcSt.setChargingStationId(xhpc.getChargingStationId());
|
||||||
|
xhpcSt.setCreateTime(Calendar.getInstance().getTime());
|
||||||
|
xhpcSt.setTerminalId(xhpc.getTerminalId());
|
||||||
|
xhpcSt.setHistoryOrderId(xhpc.getHistoryOrderId());
|
||||||
|
xhpcSt.setChargingPileId(xhpc.getChargingPileId());
|
||||||
|
xhpcSt.setType(type);
|
||||||
|
xhpcStatisticsService.addStatisticsStation(xhpcSt);
|
||||||
|
}
|
||||||
|
|
||||||
private void addStatisTime(XhpcChargeHistoryOrder xhpc, Date startTime, Date endTime, Long rateModelId, Long operatorId, Long chargingStationId, Long terminalId, Long historyOrderId, int startHour, int endHour,String yyyyMMdd,BigDecimal multiply) {
|
private void addStatisTime(XhpcChargeHistoryOrder xhpc, Date startTime, Date endTime, Long rateModelId, Long operatorId, Long chargingStationId, Long terminalId, Long historyOrderId, int startHour, int endHour,String yyyyMMdd,BigDecimal multiply) {
|
||||||
|
|
||||||
BigDecimal number = new BigDecimal(endHour + 1 - startHour);
|
BigDecimal number = new BigDecimal(endHour + 1 - startHour);
|
||||||
|
|||||||
@ -15,6 +15,10 @@ public class XhpcOrderRedisRecord extends BaseEntity {
|
|||||||
* 充电订单id
|
* 充电订单id
|
||||||
*/
|
*/
|
||||||
private Long chargeOrderId;
|
private Long chargeOrderId;
|
||||||
|
/**
|
||||||
|
* 充电订单号
|
||||||
|
*/
|
||||||
|
private String serialNumber;
|
||||||
/**
|
/**
|
||||||
* 历史订单id
|
* 历史订单id
|
||||||
*/
|
*/
|
||||||
@ -220,4 +224,14 @@ public class XhpcOrderRedisRecord extends BaseEntity {
|
|||||||
this.orderData = orderData;
|
this.orderData = orderData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSerialNumber() {
|
||||||
|
|
||||||
|
return serialNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerialNumber(String serialNumber) {
|
||||||
|
|
||||||
|
this.serialNumber = serialNumber;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public interface IXhpcRealTimeOrderService {
|
|||||||
* @param type 0 不发短信 1发短信
|
* @param type 0 不发短信 1发短信
|
||||||
* @param vinNormal VUN 码
|
* @param vinNormal VUN 码
|
||||||
*/
|
*/
|
||||||
void addSettlement(BigDecimal powerPrice, BigDecimal servicePrice, BigDecimal money, BigDecimal surplusPowerPrice, BigDecimal surplusServicePrice, XhpcChargeOrder xhpcChargeOrder, Long userId, Map<String, Object> userMessage,Integer type,String vinNormal);
|
void addSettlement(BigDecimal powerPrice, BigDecimal servicePrice, BigDecimal money, BigDecimal surplusPowerPrice, BigDecimal surplusServicePrice, XhpcChargeOrder xhpcChargeOrder, Long userId, Map<String, Object> userMessage,Integer type,String vinNormal,XhpcHistoryOrder xhpcHistoryOrder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加redis到数据库
|
* 添加redis到数据库
|
||||||
|
|||||||
@ -22,6 +22,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yuyang
|
* @author yuyang
|
||||||
@ -45,6 +47,9 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SmsService smsService;
|
private SmsService smsService;
|
||||||
|
|
||||||
|
private ExecutorService executorService = Executors.newFixedThreadPool(20);
|
||||||
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(XhpcRealTimeOrderServiceImpl.class);
|
private static final Logger logger = LoggerFactory.getLogger(XhpcRealTimeOrderServiceImpl.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -180,7 +185,8 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
return AjaxResult.error("用户id:" + userId + "为空");
|
return AjaxResult.error("用户id:" + userId + "为空");
|
||||||
}
|
}
|
||||||
//生成一条历史订单
|
//生成一条历史订单
|
||||||
addSettlement(powerPrice, servicePrice, money, surplusPowerPrice, surplusServicePrice, xhpcChargeOrder, userId, userMessage,0,null);
|
XhpcHistoryOrder xhpcHistoryOrder = new XhpcHistoryOrder();
|
||||||
|
addSettlement(powerPrice, servicePrice, money, surplusPowerPrice, surplusServicePrice, xhpcChargeOrder, userId, userMessage,0,null,xhpcHistoryOrder);
|
||||||
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
@ -198,8 +204,7 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
* @param type 0 不发短信 1发短信
|
* @param type 0 不发短信 1发短信
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addSettlement(BigDecimal powerPrice, BigDecimal servicePrice, BigDecimal money, BigDecimal surplusPowerPrice, BigDecimal surplusServicePrice, XhpcChargeOrder xhpcChargeOrder, Long userId, Map<String, Object> userMessage,Integer type,String vinNormal) {
|
public void addSettlement(BigDecimal powerPrice, BigDecimal servicePrice, BigDecimal money, BigDecimal surplusPowerPrice, BigDecimal surplusServicePrice, XhpcChargeOrder xhpcChargeOrder, Long userId, Map<String, Object> userMessage,Integer type,String vinNormal,XhpcHistoryOrder xhpcHistoryOrder) {
|
||||||
XhpcHistoryOrder xhpcHistoryOrder =new XhpcHistoryOrder();
|
|
||||||
xhpcHistoryOrder.setPowerPriceTotal(powerPrice);
|
xhpcHistoryOrder.setPowerPriceTotal(powerPrice);
|
||||||
xhpcHistoryOrder.setServicePriceTotal(servicePrice);
|
xhpcHistoryOrder.setServicePriceTotal(servicePrice);
|
||||||
xhpcHistoryOrder.setVinNormal(vinNormal);
|
xhpcHistoryOrder.setVinNormal(vinNormal);
|
||||||
@ -363,7 +368,7 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
xhpcChargeOrder.setErroRemark("扣钱失败");
|
xhpcChargeOrder.setErroRemark("扣钱失败");
|
||||||
}else{
|
}else{
|
||||||
xhpcHistoryOrderService.insert(xhpcHistoryOrder);
|
xhpcHistoryOrderService.insert(xhpcHistoryOrder);
|
||||||
addPileEndOrder(xhpcHistoryOrder, xhpcChargeOrder, xhpcChargeOrder.getSerialNumber(),1);
|
|
||||||
//添加流水
|
//添加流水
|
||||||
xhpcChargeOrderService.addUserAccountStatement(userId, actPrice.negate(), subtract, xhpcChargeOrder.getChargeOrderId(), 3, date);
|
xhpcChargeOrderService.addUserAccountStatement(userId, actPrice.negate(), subtract, xhpcChargeOrder.getChargeOrderId(), 3, date);
|
||||||
try{
|
try{
|
||||||
@ -383,6 +388,13 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
logger.info("<<<<<<<<<<<<<<<<发送短信失败>>>>>>>>>>>>>>>>>");
|
logger.info("<<<<<<<<<<<<<<<<发送短信失败>>>>>>>>>>>>>>>>>");
|
||||||
}
|
}
|
||||||
|
// 另起线程处理业务上传redis数据
|
||||||
|
executorService.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
addPileEndOrder(xhpcHistoryOrder, xhpcChargeOrder, xhpcChargeOrder.getSerialNumber(),1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder);
|
xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder);
|
||||||
}
|
}
|
||||||
@ -461,6 +473,7 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
//添加redis到数据库
|
//添加redis到数据库
|
||||||
XhpcOrderRedisRecord xhpcOrderRedisRecord =new XhpcOrderRedisRecord();
|
XhpcOrderRedisRecord xhpcOrderRedisRecord =new XhpcOrderRedisRecord();
|
||||||
xhpcOrderRedisRecord.setChargeOrderId(chargeOrderId);
|
xhpcOrderRedisRecord.setChargeOrderId(chargeOrderId);
|
||||||
|
xhpcOrderRedisRecord.setSerialNumber(xhpcHistoryOrder.getSerialNumber());
|
||||||
xhpcOrderRedisRecord.setHistoryOrderOd(xhpcHistoryOrder.getHistoryOrderId());
|
xhpcOrderRedisRecord.setHistoryOrderOd(xhpcHistoryOrder.getHistoryOrderId());
|
||||||
if(cacheMap.get("endSoc") !=null){
|
if(cacheMap.get("endSoc") !=null){
|
||||||
xhpcOrderRedisRecord.setEndSoc(cacheMap.get("endSoc").toString());
|
xhpcOrderRedisRecord.setEndSoc(cacheMap.get("endSoc").toString());
|
||||||
@ -498,9 +511,9 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
}
|
}
|
||||||
xhpcOrderRedisRecord.setCreateTime(date);
|
xhpcOrderRedisRecord.setCreateTime(date);
|
||||||
xhpcChargeOrderService.addXhpcOrderRedisRecord(xhpcOrderRedisRecord);
|
xhpcChargeOrderService.addXhpcOrderRedisRecord(xhpcOrderRedisRecord);
|
||||||
|
|
||||||
//删除redis
|
//删除redis
|
||||||
//redisService.deleteObject("order:"+orderNo);
|
redisService.deleteObject("order:"+orderNo);
|
||||||
|
redisService.deleteObject("order:"+orderNo+".lord");
|
||||||
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>>>>>>>>>");
|
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>>>>>>>>>");
|
||||||
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>>>>>>>>>");
|
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>>>>>>>>>");
|
||||||
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>>>>>>>>>");
|
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>>>>>>>>>");
|
||||||
|
|||||||
@ -403,7 +403,10 @@
|
|||||||
remark,
|
remark,
|
||||||
</if>
|
</if>
|
||||||
<if test="null != orderData ">
|
<if test="null != orderData ">
|
||||||
order_data
|
order_data,
|
||||||
|
</if>
|
||||||
|
<if test="null != serialNumber ">
|
||||||
|
serial_number
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
@ -459,7 +462,10 @@
|
|||||||
#{remark},
|
#{remark},
|
||||||
</if>
|
</if>
|
||||||
<if test="null != orderData ">
|
<if test="null != orderData ">
|
||||||
#{orderData}
|
#{orderData},
|
||||||
|
</if>
|
||||||
|
<if test="null != serialNumber ">
|
||||||
|
#{serialNumber}
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
@ -200,144 +200,144 @@
|
|||||||
user_name_evcs,
|
user_name_evcs,
|
||||||
</if>
|
</if>
|
||||||
<if test="phone != null">
|
<if test="phone != null">
|
||||||
phone,
|
phone
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="chargingStationId != null">
|
<if test="chargingStationId != null">
|
||||||
#{chargingStationId,jdbcType=BIGINT},
|
#{chargingStationId},
|
||||||
</if>
|
</if>
|
||||||
<if test="chargeOrderId != null">
|
<if test="chargeOrderId != null">
|
||||||
#{chargeOrderId,jdbcType=BIGINT},
|
#{chargeOrderId},
|
||||||
</if>
|
</if>
|
||||||
<if test="userId != null">
|
<if test="userId != null">
|
||||||
#{userId,jdbcType=BIGINT},
|
#{userId},
|
||||||
</if>
|
</if>
|
||||||
<if test="terminalId != null">
|
<if test="terminalId != null">
|
||||||
#{terminalId,jdbcType=BIGINT},
|
#{terminalId},
|
||||||
</if>
|
</if>
|
||||||
<if test="serialNumber != null">
|
<if test="serialNumber != null">
|
||||||
#{serialNumber,jdbcType=VARCHAR},
|
#{serialNumber},
|
||||||
</if>
|
</if>
|
||||||
<if test="internetSerialNumber != null">
|
<if test="internetSerialNumber != null">
|
||||||
#{internetSerialNumber,jdbcType=VARCHAR},
|
#{internetSerialNumber},
|
||||||
</if>
|
</if>
|
||||||
<if test="powerPriceTotal != null">
|
<if test="powerPriceTotal != null">
|
||||||
#{powerPriceTotal,jdbcType=DECIMAL},
|
#{powerPriceTotal},
|
||||||
</if>
|
</if>
|
||||||
<if test="servicePriceTotal != null">
|
<if test="servicePriceTotal != null">
|
||||||
#{servicePriceTotal,jdbcType=DECIMAL},
|
#{servicePriceTotal},
|
||||||
</if>
|
</if>
|
||||||
<if test="totalPrice != null">
|
<if test="totalPrice != null">
|
||||||
#{totalPrice,jdbcType=DECIMAL},
|
#{totalPrice},
|
||||||
</if>
|
</if>
|
||||||
<if test="promotionDiscount != null">
|
<if test="promotionDiscount != null">
|
||||||
#{promotionDiscount,jdbcType=DECIMAL},
|
#{promotionDiscount},
|
||||||
</if>
|
</if>
|
||||||
<if test="actPrice != null">
|
<if test="actPrice != null">
|
||||||
#{actPrice,jdbcType=DECIMAL},
|
#{actPrice},
|
||||||
</if>
|
</if>
|
||||||
<if test="actPowerPrice != null">
|
<if test="actPowerPrice != null">
|
||||||
#{actPowerPrice,jdbcType=DECIMAL},
|
#{actPowerPrice},
|
||||||
</if>
|
</if>
|
||||||
<if test="actServicePrice != null">
|
<if test="actServicePrice != null">
|
||||||
#{actServicePrice,jdbcType=DECIMAL},
|
#{actServicePrice},
|
||||||
</if>
|
</if>
|
||||||
<if test="internetCommission != null">
|
<if test="internetCommission != null">
|
||||||
#{internetCommission,jdbcType=DECIMAL},
|
#{internetCommission},
|
||||||
</if>
|
</if>
|
||||||
<if test="internetSvcCommission != null">
|
<if test="internetSvcCommission != null">
|
||||||
#{internetSvcCommission,jdbcType=DECIMAL},
|
#{internetSvcCommission},
|
||||||
</if>
|
</if>
|
||||||
<if test="platformCommission != null">
|
<if test="platformCommission != null">
|
||||||
#{platformCommission,jdbcType=DECIMAL},
|
#{platformCommission},
|
||||||
</if>
|
</if>
|
||||||
<if test="platformSvcCommisssion != null">
|
<if test="platformSvcCommisssion != null">
|
||||||
#{platformSvcCommisssion,jdbcType=DECIMAL},
|
#{platformSvcCommisssion},
|
||||||
</if>
|
</if>
|
||||||
<if test="operationCommission != null">
|
<if test="operationCommission != null">
|
||||||
#{operationCommission,jdbcType=DECIMAL},
|
#{operationCommission},
|
||||||
</if>
|
</if>
|
||||||
<if test="operationSvcCommission != null">
|
<if test="operationSvcCommission != null">
|
||||||
#{operationSvcCommission,jdbcType=DECIMAL},
|
#{operationSvcCommission},
|
||||||
</if>
|
</if>
|
||||||
<if test="startSoc != null">
|
<if test="startSoc != null">
|
||||||
#{startSoc,jdbcType=VARCHAR},
|
#{startSoc},
|
||||||
</if>
|
</if>
|
||||||
<if test="endSoc != null">
|
<if test="endSoc != null">
|
||||||
#{endSoc,jdbcType=VARCHAR},
|
#{endSoc},
|
||||||
</if>
|
</if>
|
||||||
<if test="reconciliationStatus != null">
|
<if test="reconciliationStatus != null">
|
||||||
#{reconciliationStatus,jdbcType=INTEGER},
|
#{reconciliationStatus},
|
||||||
</if>
|
</if>
|
||||||
<if test="sortingStatus != null">
|
<if test="sortingStatus != null">
|
||||||
#{sortingStatus,jdbcType=INTEGER},
|
#{sortingStatus},
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
#{type,jdbcType=TINYINT},
|
#{type},
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
#{status,jdbcType=INTEGER},
|
#{status},
|
||||||
</if>
|
</if>
|
||||||
<if test="delFlag != null">
|
<if test="delFlag != null">
|
||||||
#{delFlag,jdbcType=INTEGER},
|
#{delFlag},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
#{createTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="createBy != null">
|
<if test="createBy != null">
|
||||||
#{createBy,jdbcType=VARCHAR},
|
#{createBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
#{updateTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateBy != null">
|
<if test="updateBy != null">
|
||||||
#{updateBy,jdbcType=VARCHAR},
|
#{updateBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="remark != null">
|
<if test="remark != null">
|
||||||
#{remark,jdbcType=VARCHAR},
|
#{remark},
|
||||||
</if>
|
</if>
|
||||||
<if test="state != null">
|
<if test="state != null">
|
||||||
#{state,jdbcType=INTEGER},
|
#{state},
|
||||||
</if>
|
</if>
|
||||||
<if test="vinNormal != null">
|
<if test="vinNormal != null">
|
||||||
#{vinNormal,jdbcType=VARCHAR},
|
#{vinNormal},
|
||||||
</if>
|
</if>
|
||||||
<if test="searchValue != null">
|
<if test="searchValue != null">
|
||||||
#{searchValue,jdbcType=VARCHAR},
|
#{searchValue},
|
||||||
</if>
|
</if>
|
||||||
<if test="operatorIdEvcs != null">
|
<if test="operatorIdEvcs != null">
|
||||||
#{operatorIdEvcs,jdbcType=VARCHAR},
|
#{operatorIdEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="chargeModelEvcs != null">
|
<if test="chargeModelEvcs != null">
|
||||||
#{chargeModelEvcs,jdbcType=INTEGER},
|
#{chargeModelEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="connectorPowerEvcs != null">
|
<if test="connectorPowerEvcs != null">
|
||||||
#{connectorPowerEvcs,jdbcType=DOUBLE},
|
#{connectorPowerEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="meterValueEndEvcs != null">
|
<if test="meterValueEndEvcs != null">
|
||||||
#{meterValueEndEvcs,jdbcType=DOUBLE},
|
#{meterValueEndEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="meterValueStartEvcs != null">
|
<if test="meterValueStartEvcs != null">
|
||||||
#{meterValueStartEvcs,jdbcType=DOUBLE},
|
#{meterValueStartEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="operatorId3rdptyEvcs != null">
|
<if test="operatorId3rdptyEvcs != null">
|
||||||
#{operatorId3rdptyEvcs,jdbcType=VARCHAR},
|
#{operatorId3rdptyEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null">
|
<if test="startTime != null">
|
||||||
#{startTime,jdbcType=TIMESTAMP},
|
#{startTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="stopReasonEvcs != null">
|
<if test="stopReasonEvcs != null">
|
||||||
#{stopReasonEvcs,jdbcType=INTEGER},
|
#{stopReasonEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="totalPower != null">
|
<if test="totalPower != null">
|
||||||
#{totalPower,jdbcType=DOUBLE},
|
#{totalPower},
|
||||||
</if>
|
</if>
|
||||||
<if test="userNameEvcs != null">
|
<if test="userNameEvcs != null">
|
||||||
#{userNameEvcs,jdbcType=VARCHAR},
|
#{userNameEvcs},
|
||||||
</if>
|
</if>
|
||||||
<if test="phone != null">
|
<if test="phone != null">
|
||||||
#{phone,jdbcType=VARCHAR},
|
#{phone}
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user