|
|
@ -14,10 +14,7 @@ import com.shxy.xymanager_common.entity.TerminalStatus;
|
|
|
|
import com.shxy.xymanager_common.entity.Terminals;
|
|
|
|
import com.shxy.xymanager_common.entity.Terminals;
|
|
|
|
import com.shxy.xymanager_common.enums.CommonStatus;
|
|
|
|
import com.shxy.xymanager_common.enums.CommonStatus;
|
|
|
|
import com.shxy.xymanager_common.exception.Asserts;
|
|
|
|
import com.shxy.xymanager_common.exception.Asserts;
|
|
|
|
import com.shxy.xymanager_common.model.SystemConfigModel;
|
|
|
|
import com.shxy.xymanager_common.model.*;
|
|
|
|
import com.shxy.xymanager_common.model.TerminalGpsModel;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.model.TerminalListModel;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.model.TerminalModel;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.page.PageUtils;
|
|
|
|
import com.shxy.xymanager_common.page.PageUtils;
|
|
|
|
import com.shxy.xymanager_common.util.MyDateUtils;
|
|
|
|
import com.shxy.xymanager_common.util.MyDateUtils;
|
|
|
|
import com.shxy.xymanager_common.util.ProcessExecUtils;
|
|
|
|
import com.shxy.xymanager_common.util.ProcessExecUtils;
|
|
|
@ -79,7 +76,7 @@ public class TerminalGpsServiceImpl implements TerminalGpsService {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
status = CommonStatus.DELETE.value();
|
|
|
|
status = CommonStatus.DELETE.value();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String cmd = Constants.CMD+"gpsctrl --cmdid="+vo.getCmdId() +"\t" +"--ctrl="+ status;
|
|
|
|
String cmd = Constants.CMD+"gpsctrl --flag=1 --cmdid="+vo.getCmdId() +"\t" +"--ctrl="+ status;
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
if (set) {
|
|
|
|
if (set) {
|
|
|
|
TerminalStatus record = new TerminalStatus();
|
|
|
|
TerminalStatus record = new TerminalStatus();
|
|
|
@ -129,10 +126,13 @@ public class TerminalGpsServiceImpl implements TerminalGpsService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ServiceBody<Integer> getReturnedGPS(TerminalGpsVo vo) {
|
|
|
|
public ServiceBody<GetModel> getReturnedGPS(TerminalGpsVo vo) {
|
|
|
|
String cmd = Constants.CMD+"gpsinfo --cmdid="+vo.getCmdId()+ "\t" +"--clientid=10 --reqid="+ Constants.REQUEST_ID;
|
|
|
|
GetModel model = new GetModel();
|
|
|
|
|
|
|
|
String cmd = Constants.CMD+"gpsinfo --flag=0 --cmdid="+vo.getCmdId()+ "\t" +"--clientid=10 --reqid="+ Constants.REQUEST_ID;
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
return Asserts.success(Constants.REQUEST_ID.addAndGet(1));
|
|
|
|
model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString()));
|
|
|
|
|
|
|
|
Constants.REQUEST_ID.addAndGet(1);
|
|
|
|
|
|
|
|
return Asserts.success(model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|