main^2
黄海 11 months ago
parent b2da414cb7
commit 05db572c5f

@ -184,51 +184,4 @@ public class YltController extends Controller {
}
renderJson(CommonUtil.getRet(false, "发现了一个未知的闸机厂商,请联系开发人员!"));
}
/**
* id
* state: 0 1 2 3 4 5 6 7
* order_type: 1 3 4
* order_type =1 or 3 使
* order_type =4 使
*
*/
@Before({GET.class})
@IsLoginInterface({})
public void getHungUpOrder(String order_no) {
Record record = ym.getHungUpOrder(order_no);
if (record == null) {
renderJson(CommonUtil.getRet(false, "没有挂起订单!"));
return;
}
JSONObject res = new JSONObject();
res.put("data", record);
//订单类型
int order_type = record.getInt("order_type");
//订单状态 0 创建中 1准备充电中 2 充电中 3完成 4 取消 5挂起 6需要手动补单 7结算中
int state = record.getInt("state");
//互联互通
if (order_type == 4) {
/**
1---
2
0
*/
//MongoDB中集合notificationChargeOrderInfoReqDao.findOne(orderNo); 可以获取到互联互通平台传送过来的账单信息,可以提供出来让人来看
//TODO
} else {//直连
//最后一次通讯记录
JSONObject jo = query.use("equipmentOrder").eq("_id", order_no).findOne();
res.put("extInfo", jo);
//chargeBeginTime 开始充电时间
//chargeEndTime 结束充电时间
//charge_degree 充电度数
//chargeBeginSoc 充电开始soc
//chargeEndSoc 充电结束soc
//chargeDuration 充电时长 单位:秒
}
renderJson(CommonUtil.getRet(res, true, "获取数据成功!"));
}
}

@ -122,30 +122,4 @@ public class YltModel {
record.set("result", result);
Db.save("t_ext_dz_log", "order_no", record);
}
/**
*
*
* @param phone
* @return
*/
public List<Record> queryUserByPhone(String phone) {
String sql = "select * from t_user where relation_phone=? or phone=?";
List<Record> list = Db.find(sql, phone, phone);
return list;
}
/**
*
*
* state: 0 1 2 3 4 5 6 7
* order_type: 1 3 4
* order_type =1 or 3 使
* order_type =4 使
* @param order_no
*/
public Record getHungUpOrder(String order_no) {
String sql = "select order_no,state,order_type from t_equipment_charge_order where order_no=?";
return Db.findFirst(sql, order_no);
}
}

Loading…
Cancel
Save