35 lines
831 B
Java
35 lines
831 B
Java
package com.tenwa.httpclient.controller;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.amarsoft.are.jbo.JBOException;
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
import com.tenwa.httpclient.ResultMessage;
|
|
import com.tenwa.httpclient.service.GPSService;
|
|
import com.tenwa.httpclient.serviceimpl.GPSServiceImpl;
|
|
|
|
public class GPSController {
|
|
private String imei;
|
|
|
|
public String getImei() {
|
|
return imei;
|
|
}
|
|
|
|
public void setImei(String imei) {
|
|
this.imei = imei;
|
|
}
|
|
|
|
public String GetCarStateInfo(JBOTransaction tx) throws JBOException {
|
|
GPSService gpsService = new GPSServiceImpl();
|
|
String result = "";
|
|
try {
|
|
result = gpsService.GetCarStateInfo(imei);
|
|
Object obj = JSON.parse(result);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
tx.rollback();
|
|
return ResultMessage.get("410");
|
|
}
|
|
return result;
|
|
}
|
|
}
|