|
|
@ -14,6 +14,7 @@ import com.shxy.xymanager_common.model.TerminalGpsModel;
|
|
|
|
import com.shxy.xymanager_common.model.TerminalListModel;
|
|
|
|
import com.shxy.xymanager_common.model.TerminalListModel;
|
|
|
|
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.vo.*;
|
|
|
|
import com.shxy.xymanager_common.vo.*;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalPositionsDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalPositionsDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalStatusDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalStatusDao;
|
|
|
@ -62,12 +63,12 @@ public class TerminalGpsServiceImpl implements TerminalGpsService {
|
|
|
|
Integer status;
|
|
|
|
Integer status;
|
|
|
|
Integer gpsstatus = vo.getGpsstatus();
|
|
|
|
Integer gpsstatus = vo.getGpsstatus();
|
|
|
|
if (gpsstatus == 0) {
|
|
|
|
if (gpsstatus == 0) {
|
|
|
|
// set = cma.turnOnGps(vo.getTermid().toString());
|
|
|
|
|
|
|
|
status = CommonStatus.EFFECTIVE.value();
|
|
|
|
status = CommonStatus.EFFECTIVE.value();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// set = cma.turnOffGps(vo.getTermid().toString());
|
|
|
|
|
|
|
|
status = CommonStatus.DELETE.value();
|
|
|
|
status = CommonStatus.DELETE.value();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=gpsctrl --cmdid="+vo.getCmdId() +"\t" +"--ctrl="+ status;
|
|
|
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
if (set) {
|
|
|
|
if (set) {
|
|
|
|
TerminalStatus record = new TerminalStatus();
|
|
|
|
TerminalStatus record = new TerminalStatus();
|
|
|
|
record.setTermId(vo.getTermid());
|
|
|
|
record.setTermId(vo.getTermid());
|
|
|
|