立讯更新
This commit is contained in:
@@ -550,21 +550,46 @@ public class AgvServiceImpl implements AgvService {
|
||||
|
||||
String state = arm_info.getString("task_status");
|
||||
String state_name = null;
|
||||
if(StrUtil.equals(state,"0")){
|
||||
state_name = "NONE";
|
||||
} else if(StrUtil.equals(state,"1")){
|
||||
state_name = "WAITING";
|
||||
} else if(StrUtil.equals(state,"2")) {
|
||||
state_name = "RUNNING";
|
||||
} else if(StrUtil.equals(state,"3")){
|
||||
state_name = "SUSPENDED";
|
||||
} else if(StrUtil.equals(state,"4")){
|
||||
state_name = "COMPLETED";
|
||||
} else if(StrUtil.equals(state,"5")){
|
||||
state_name = "FAILED";
|
||||
} else if(StrUtil.equals(state,"6")){
|
||||
state_name = "CANCELED";
|
||||
//连接状态
|
||||
int connection_status = jo.getInt("connection_status");
|
||||
String is_error = jo.getString("is_error");
|
||||
//是否在执行任务
|
||||
String procBusiness = jo.getString("procBusiness");
|
||||
//是否在充电
|
||||
String charging = rbk_report.getString("charging");
|
||||
if (connection_status == 0) {
|
||||
state_name = "UNAVAILABLE";
|
||||
} else {
|
||||
if (is_error.equals("true")) {
|
||||
state_name = "ERROR";
|
||||
} else {
|
||||
if (charging.equals("true")) {
|
||||
state_name = "CHARGING";
|
||||
} else {
|
||||
if (procBusiness.equals("true")){
|
||||
state_name = "EXECUTING";
|
||||
} else {
|
||||
state_name = "IDLE";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if(StrUtil.equals(state,"0")){
|
||||
// state_name = "NONE";
|
||||
// } else if(StrUtil.equals(state,"1")){
|
||||
// state_name = "WAITING";
|
||||
// } else if(StrUtil.equals(state,"2")) {
|
||||
// state_name = "RUNNING";
|
||||
// } else if(StrUtil.equals(state,"3")){
|
||||
// state_name = "SUSPENDED";
|
||||
// } else if(StrUtil.equals(state,"4")){
|
||||
// state_name = "COMPLETED";
|
||||
// } else if(StrUtil.equals(state,"5")){
|
||||
// state_name = "FAILED";
|
||||
// } else if(StrUtil.equals(state,"6")){
|
||||
// state_name = "CANCELED";
|
||||
// }
|
||||
//本次运行时间(开机后到当前的时间)
|
||||
String time = rbk_report.getString("time");
|
||||
//累计运行时间
|
||||
@@ -585,7 +610,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
String angle = rbk_report.getString("angle");
|
||||
String blocked = rbk_report.getString("blocked");
|
||||
String brake = rbk_report.getString("brake");
|
||||
String charging = rbk_report.getString("charging");
|
||||
// String charging = rbk_report.getString("charging");
|
||||
String controller_humi = basic_info.getString("controller_humi");
|
||||
String controller_temp = basic_info.getString("controller_temp");
|
||||
String controller_voltage = basic_info.getString("controller_voltage");
|
||||
|
||||
@@ -57,6 +57,7 @@ public class ToAgvDevice {
|
||||
row.put("today_odo", agvDto.getToday_odo());
|
||||
row.put("total_time", agvDto.getTotal_time());
|
||||
row.put("time", agvDto.getTime());
|
||||
row.put("state", agvDto.getState());
|
||||
|
||||
agv_rows.add(row);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user