|
|
|
@ -2,6 +2,7 @@ package com.dsideal.ZhuQue.Ylt.Controller;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.dsideal.ZhuQue.Interceptor.EmptyInterface;
|
|
|
|
|
import com.dsideal.ZhuQue.Interceptor.IsLoginInterface;
|
|
|
|
|
import com.dsideal.ZhuQue.Util.CommonUtil;
|
|
|
|
|
import com.dsideal.ZhuQue.Util.SignUtils;
|
|
|
|
@ -14,6 +15,7 @@ import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -21,33 +23,31 @@ public class YltController extends Controller {
|
|
|
|
|
Logger log = LoggerFactory.getLogger(YltController.class);
|
|
|
|
|
YltModel ym = new YltModel();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能:测试依赖JWT的TOKEN数据的方法
|
|
|
|
|
* 功能:获取用户的车牌列表
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void getListWithAuth() {
|
|
|
|
|
public void getCarList() {
|
|
|
|
|
//获取当前登录人员信息
|
|
|
|
|
Record user = ym.getUser(getRequest());
|
|
|
|
|
String userId = user.get("userId");
|
|
|
|
|
String phone = user.get("phone");
|
|
|
|
|
|
|
|
|
|
System.out.println(userId);
|
|
|
|
|
System.out.println(phone);
|
|
|
|
|
renderJson(CommonUtil.getRet(true, "获取成功!"));
|
|
|
|
|
int userId = Integer.parseInt(user.get("userId"));
|
|
|
|
|
List<Record> list = ym.getCarList(userId);
|
|
|
|
|
renderJson(CommonUtil.getRet(list, true, "获取成功!"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能: 向第三方道闸同步充电桩支付信息
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@EmptyInterface({"order_no","charge_plate_no"})
|
|
|
|
|
// 非指定闸机场地
|
|
|
|
|
// http://10.10.21.20:8888/ZhuQue/Ylt/SyncChargePilePay?order_no=2020092315154430479
|
|
|
|
|
// 科拓闸机场地
|
|
|
|
|
// http://10.10.21.20:8888/ZhuQue/Ylt/SyncChargePilePay?order_no=2022012911045715187
|
|
|
|
|
public void SyncChargePilePay(String order_no) {
|
|
|
|
|
public void SyncChargePilePay(String order_no,String charge_plate_no) { //订单号,车牌号
|
|
|
|
|
//根据订单号获取到第三方方面提供的车场信息
|
|
|
|
|
Record thirdPartyStation = ym.getThirdPartyStation(order_no);
|
|
|
|
|
if (thirdPartyStation == null) {
|
|
|
|
@ -68,7 +68,6 @@ public class YltController extends Controller {
|
|
|
|
|
|
|
|
|
|
//订单信息
|
|
|
|
|
Record dingDanRecord = ym.getOrderByNo(order_no);
|
|
|
|
|
String charge_plate_no = dingDanRecord.getStr("charge_plate_no");//车牌号
|
|
|
|
|
String charge_begin_time = dingDanRecord.getStr("charge_begin_time");//充电开始时间
|
|
|
|
|
String charge_end_time = dingDanRecord.getStr("charge_end_time");//充电结束时间
|
|
|
|
|
int stationId = dingDanRecord.getInt("station_id");//电站ID
|
|
|
|
|