mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update
This commit is contained in:
@@ -29,6 +29,8 @@ import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.domain.ykcCommond.StopChargingCommand;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
||||
import com.jsowell.pile.service.orderlogic.OrderLogicFactory;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
@@ -1078,23 +1080,23 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 推送启动充电结果(调用接口 notification_start_charge_result)
|
||||
String url = urlAddress + "notification_start_charge_result";
|
||||
|
||||
String orderStatus = orderInfo.getOrderStatus();
|
||||
// 订单状态统一
|
||||
if (StringUtils.equals(OrderStatusEnum.IN_THE_CHARGING.getValue(), orderStatus)) {
|
||||
// 充电中
|
||||
orderStatus = "2";
|
||||
} else if (StringUtils.equals(OrderStatusEnum.NOT_START.getValue(), orderStatus)) {
|
||||
// 未启动
|
||||
orderStatus = "1";
|
||||
} else {
|
||||
// 其他状态都为 未知
|
||||
orderStatus = "5";
|
||||
}
|
||||
// String orderStatus = orderInfo.getOrderStatus();
|
||||
// // 订单状态统一
|
||||
// if (StringUtils.equals(OrderStatusEnum.IN_THE_CHARGING.getValue(), orderStatus)) {
|
||||
// // 充电中
|
||||
// orderStatus = "2";
|
||||
// } else if (StringUtils.equals(OrderStatusEnum.NOT_START.getValue(), orderStatus)) {
|
||||
// // 未启动
|
||||
// orderStatus = "1";
|
||||
// } else {
|
||||
// // 其他状态都为 未知
|
||||
// orderStatus = "5";
|
||||
// }
|
||||
// 拼装参数
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("StartChargeSeq", orderCode);
|
||||
json.put("ConnectorID", orderInfo.getPileConnectorCode());
|
||||
json.put("StartChargeSeqStat", Integer.valueOf(orderStatus));
|
||||
json.put("StartChargeSeqStat", 2); // 一定要给 2-充电中
|
||||
json.put("StartTime", orderInfo.getChargeStartTime());
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
@@ -1221,25 +1223,25 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
String url = urlAddress + "notification_stop_charge_result";
|
||||
|
||||
String orderStatus = orderInfo.getOrderStatus();
|
||||
String successFlag = "1";
|
||||
if (StringUtils.equals(orderStatus, OrderStatusEnum.IN_THE_CHARGING.getValue())) {
|
||||
// 充电中
|
||||
orderStatus = "2";
|
||||
} else if (StringUtils.equals(orderStatus, OrderStatusEnum.ORDER_COMPLETE.getValue())) {
|
||||
// 订单完成
|
||||
orderStatus = "4";
|
||||
successFlag = "0";
|
||||
} else {
|
||||
orderStatus = "5";
|
||||
}
|
||||
// String orderStatus = orderInfo.getOrderStatus();
|
||||
// String successFlag = "0";
|
||||
// if (StringUtils.equals(orderStatus, OrderStatusEnum.IN_THE_CHARGING.getValue())) {
|
||||
// // 充电中
|
||||
// orderStatus = "2";
|
||||
// } else if (StringUtils.equals(orderStatus, OrderStatusEnum.ORDER_COMPLETE.getValue())) {
|
||||
// // 订单完成
|
||||
// orderStatus = "4";
|
||||
// successFlag = "0";
|
||||
// } else {
|
||||
// orderStatus = "5";
|
||||
// }
|
||||
|
||||
// 拼装联联平台参数
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("StartChargeSeq", orderCode);
|
||||
json.put("StartChargeSeqStat", Integer.valueOf(orderStatus));
|
||||
json.put("StartChargeSeqStat", 4); // 只能给 4-已结束
|
||||
json.put("ConnectorID", orderInfo.getPileConnectorCode());
|
||||
json.put("SuccStat", successFlag);
|
||||
json.put("SuccStat", 0);
|
||||
json.put("FailReason", 0);
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
@@ -1307,6 +1309,9 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
json.put("StopReason", 2); // 2:BMS 停止充电
|
||||
|
||||
String jsonString = JSONObject.toJSONString(json);
|
||||
|
||||
|
||||
|
||||
// 获取令牌
|
||||
String token = "";
|
||||
String result = "";
|
||||
|
||||
Reference in New Issue
Block a user