立讯更新

This commit is contained in:
loujf
2022-07-29 14:52:21 +08:00
parent 9f7e4ac78e
commit 75408cdfec
2 changed files with 41 additions and 15 deletions

View File

@@ -550,21 +550,46 @@ public class AgvServiceImpl implements AgvService {
String state = arm_info.getString("task_status"); String state = arm_info.getString("task_status");
String state_name = null; String state_name = null;
if(StrUtil.equals(state,"0")){ //连接状态
state_name = "NONE"; int connection_status = jo.getInt("connection_status");
} else if(StrUtil.equals(state,"1")){ String is_error = jo.getString("is_error");
state_name = "WAITING"; //是否在执行任务
} else if(StrUtil.equals(state,"2")) { String procBusiness = jo.getString("procBusiness");
state_name = "RUNNING"; //是否在充电
} else if(StrUtil.equals(state,"3")){ String charging = rbk_report.getString("charging");
state_name = "SUSPENDED"; if (connection_status == 0) {
} else if(StrUtil.equals(state,"4")){ state_name = "UNAVAILABLE";
state_name = "COMPLETED"; } else {
} else if(StrUtil.equals(state,"5")){ if (is_error.equals("true")) {
state_name = "FAILED"; state_name = "ERROR";
} else if(StrUtil.equals(state,"6")){ } else {
state_name = "CANCELED"; 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"); String time = rbk_report.getString("time");
//累计运行时间 //累计运行时间
@@ -585,7 +610,7 @@ public class AgvServiceImpl implements AgvService {
String angle = rbk_report.getString("angle"); String angle = rbk_report.getString("angle");
String blocked = rbk_report.getString("blocked"); String blocked = rbk_report.getString("blocked");
String brake = rbk_report.getString("brake"); 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_humi = basic_info.getString("controller_humi");
String controller_temp = basic_info.getString("controller_temp"); String controller_temp = basic_info.getString("controller_temp");
String controller_voltage = basic_info.getString("controller_voltage"); String controller_voltage = basic_info.getString("controller_voltage");

View File

@@ -57,6 +57,7 @@ public class ToAgvDevice {
row.put("today_odo", agvDto.getToday_odo()); row.put("today_odo", agvDto.getToday_odo());
row.put("total_time", agvDto.getTotal_time()); row.put("total_time", agvDto.getTotal_time());
row.put("time", agvDto.getTime()); row.put("time", agvDto.getTime());
row.put("state", agvDto.getState());
agv_rows.add(row); agv_rows.add(row);
} }