opt: 增加任务提示和校验

This commit is contained in:
2023-12-20 10:51:58 +08:00
parent be68ffebb6
commit 76c8ba4df8
7 changed files with 43 additions and 30 deletions

View File

@@ -19,6 +19,8 @@ public enum EnEnum {
PickupTask("PickupTask", "PickupTask"),
StandardTask("StandardTask", "StandardTask"),
ReturnTask("Return to Rest", "ReturnTask"),
Return("Return to Rest Point", "Return"),
ReturnToRest("Low Battery Level, Return for Charging", "ReturnToRest"),
Completed("Completed", "Completed"),
ConfirmCompletion("Confirm Completion", "ConfirmCompletion"),
ContinueHandling("Continue Material handling", "ContinueHandling"),
@@ -27,19 +29,20 @@ public enum EnEnum {
Manual("Manual", "Manual"),
NormalOperation("Normal Operation", "NormalOperation"),
PendingExecution("Pending Execution", "PendingExecution"),
Return("Return to Resting Point", "Return"),
Run("Run", "Run"),
Standby("Standby", "Standby"),
TargetPoint("Target Point", "TargetPoint"),
TaskCode("Task Code", "TaskCode"),
ToNextTask("Confirm Completion to Proceed to the Next Task", "ToNextTask"),
//Confirmation Complete, Proceed to the Next Task Continue to the Next Task
ToNextTask("Confirm Completion, Continue Next Task", "ToNextTask"),
Updating("Updating", "Updating"),
UpdateCompleted("Update Completed", "UpdateCompleted"),
Deviation("Deviation", "Deviation"),
Normal("Normal", "Normal"),
Abnormal("Abnormal", "Abnormal"),
Other("Other", "Other");
Other(" ", "Other");
private final String name;
private final String code;

View File

@@ -16,10 +16,11 @@ public enum EnMsgEnum {
SentSuccess("Sent successful", "SentSuccess"),
QuerySuccess("Query Successful", "QuerySuccess"),
RequestSuccess("Request Successful", "RequestSuccess"),
LocationValidation("Location Id And Task Type Cannot Be Empty", "LocationValidation"),
PointValidation("Please Select Target Point", "PointValidation"),
TypeValidation("Please Select Task Type", "TypeValidation"),
LocationValidation("The Target Point and Task Type cannot be empty", "LocationValidation"),
LoginSuccess("Login Success", "LoginSuccess"),
MatchesLocation("Location Id Must Be A Number", "MatchesLocation"),
MatchesLocation("Target Point Id Must Be A Number", "MatchesLocation"),
OperationFailed("Operation Failed", "OperationFailed"),
ExternalLink("The External Link Must Start with http:// Or https://", "ExternalLink"),
AccountNotActivated("Account Not Activated", "AccountNotActivated"),
@@ -70,7 +71,7 @@ public enum EnMsgEnum {
TaskIsCurrently("The Task Is Currently In Progress, And New Tasks Cannot Be Assigned", "TaskIsCurrently"),
PackageIsNotEmpty("The Task Package Is Not Empty, And New Tasks Cannot Be Assigned", "PackageIsNotEmpty"),
Other("successful", "Other");
Other(" ", "Other");
private final String name;
private final String code;

View File

@@ -28,17 +28,18 @@ public enum ZhEnum {
NormalOperation("正常运行", "NormalOperation"),
PendingExecution("待执行", "PendingExecution"),
Return("返回休息点", "Return"),
ReturnToRest("电量过低,返回充电", "ReturnToRest"),
Run("运行", "Run"),
Standby("待机", "Standby"),
TargetPoint("目标点", "TargetPoint"),
TaskCode("任务号", "TaskCode"),
ToNextTask("确认完成继续下个任务", "ToNextTask"),
ToNextTask("确认完成继续下个任务", "ToNextTask"),
Updating("更新中", "Updating"),
UpdateCompleted("更新完成", "UpdateCompleted"),
Deviation("偏离", "Deviation"),
Normal("正常", "Normal"),
Abnormal("异常", "Abnormal"),
Other("其他", "Other");
Other(" ", "Other");
private final String name;
private final String code;

View File

@@ -53,8 +53,10 @@ public enum ZhMsgEnum {
UnableToSearch("无法搜索PathID", "UnableToSearch"),
TaskCountExceedsMaximum("任务数量超过最大值", "TaskCountExceedsMaximum"),
HasBeenReached("已到达该目标点,请取消任务", "HasBeenReached"),
LocationValidation("点位Id与任务类型不能为空", "LocationValidation"),
Return("Low Battery Level, Return for Charging", "Return"),
PointValidation("请选择目标点位", "PointValidation"),
TypeValidation("请选择任务类型", "TypeValidation"),
LocationValidation("点位信息与任务类型不能为空", "LocationValidation"),
SystemBusy("系统繁忙", "SystemBusy"),
ScreenCannotControlled("手动状态,显示屏无法控制", "ScreenCannotControlled"),
FixedProcess("固定流程使能,无法采用显示屏控制", "FixedProcess"),
@@ -71,7 +73,7 @@ public enum ZhMsgEnum {
AccountNotActivated("账号未激活", "AccountNotActivated"),
CorrespondingSystem("获取对应的系统菜单不存在", "CorrespondingSystem"),
Other("操作成功", "Other");
Other(" ", "Other");
private final String name;
private final String code;

View File

@@ -178,9 +178,9 @@ public class HomeServiceImpl implements HomeService {
homeInfo.setElectric(electric);
if (electric < 30) {
homeInfo.setButton_code("4");
homeInfo.setButton_name(LangUtils.getLanguage("Return", null));
homeInfo.setZh_button_name(LangUtils.getLanguage("Return", "zh"));
homeInfo.setEn_button_name(LangUtils.getLanguage("Return", "en"));
homeInfo.setButton_name(LangUtils.getLanguage("ReturnToRest", null));
homeInfo.setZh_button_name(LangUtils.getLanguage("ReturnToRest", "zh"));
homeInfo.setEn_button_name(LangUtils.getLanguage("ReturnToRest", "en"));
}
homeInfo.setDevice_info(debugInfoJson.getString("Env_CustomName") + debugInfoJson.getString("Env_VehicleType"));
}
@@ -474,7 +474,7 @@ public class HomeServiceImpl implements HomeService {
if ("prod".equals(isProd)) {
result = HttpUtil.get(urlInfo.get("javaUrl"));
} else {
result = "{\"Msg_DisplayState\":{\"AGV_ID\":255,\"Auto_In_Line_State\":1,\"Bosch_Car_Global_Theta\":-90.19221757272916,\"Bosch_Car_Global_rx\":-1.0619603784858553,\"Bosch_Car_Global_ry\":0.0020978358374357303,\"Bosch_Loc_State\":-2,\"Bosch_No_Rec_State\":0,\"Bosch_raw_age\":0.01389455795288086,\"Bosch_raw_epoch\":1,\"Bosch_raw_locState\":-2,\"Bosch_raw_qw\":0.9999999908132869,\"Bosch_raw_qx\":0.0,\"Bosch_raw_qy\":0.0,\"Bosch_raw_qz\":0.00013554861104682667,\"Bosch_raw_timestamp\":1695633231.1093392,\"Bosch_raw_uniqueId\":0,\"Bosch_raw_x\":0.0008994877773440588,\"Bosch_raw_x_odo\":0.0008994877773440588,\"Bosch_raw_y\":0.0006906610801896382,\"Bosch_raw_y_odo\":0.0006906610801896382,\"Bosch_raw_yaw\":0.00027109722292381746,\"Bosch_raw_yaw_odo\":0.0006906610801896382,\"Bosch_raw_z\":0.0,\"CAD_Or_TCS_Ctrl\":0,\"Car_Global_Theta\":-90.19221757272916,\"Car_Global_rx\":-1.0619603784858553,\"Car_Global_ry\":0.0020978358374357303,\"CurNodeID\":11,\"Cur_Stop_Info1_Authorized_Pass\":1,\"Cur_Stop_Info1_High_Precious_Enable\":1,\"Cur_Stop_Info1_Reached_Stop\":0,\"Cur_Stop_Info1_Set_Patht\":0.0,\"Cur_Stop_Info1_Set_Pathx\":0.0,\"Cur_Stop_Info1_Set_Pathy\":0.0,\"Cur_Stop_Info1_Single_Request_Sch\":0,\"Cur_Stop_Info1_Single_Stop_Sch\":0,\"Cur_Stop_Info1_StopEndNode\":0,\"Cur_Stop_Info1_StopStartNode\":0,\"Cur_Stop_Info1_Stop_Endt\":0.0,\"Cur_Stop_Info1_Stop_Endx\":0.0,\"Cur_Stop_Info1_Stop_Endy\":0.0,\"Cur_Stop_Info1_Stop_Num\":0,\"Cur_Stop_Info2_Authorized_Pass\":1,\"Cur_Stop_Info2_High_Precious_Enable\":1,\"Cur_Stop_Info2_Reached_Stop\":0,\"Cur_Stop_Info2_Set_Patht\":0.0,\"Cur_Stop_Info2_Set_Pathx\":0.0,\"Cur_Stop_Info2_Set_Pathy\":0.0,\"Cur_Stop_Info2_Single_Request_Sch\":0,\"Cur_Stop_Info2_Single_Stop_Sch\":0,\"Cur_Stop_Info2_StopEndNode\":0,\"Cur_Stop_Info2_StopStartNode\":0,\"Cur_Stop_Info2_Stop_Endt\":0.0,\"Cur_Stop_Info2_Stop_Endx\":0.0,\"Cur_Stop_Info2_Stop_Endy\":0.0,\"Cur_Stop_Info2_Stop_Num\":0,\"Curtis_Warning_Code_Pump\":0,\"Curtis_Warning_Code_Speed\":82,\"Curtis_Warning_Code_Steer\":0,\"EndNode\":0,\"Env_CustomName\":\"NobleLift\",\"Env_HMIUseJavaApp\":\"true\",\"Env_LearnEnable\":\"true\",\"Env_Lu_ROS_IP2\":\"\",\"Env_SoftwareVersion\":\"[Version]Magic4.1[Info]2023_09_21_20_41_37_Lu_ROS_magic4_waypointab_v31\",\"Env_VehicleType\":\"PS10LMT_HuaHai\",\"Get_Nav350_Curr_Layer\":0,\"Language\":1022739087,\"LastAltitudeExpectValue_mm\":0,\"LastGantryXExpectValue_mm\":0,\"LastGantryYExpectValue_mm\":0,\"Lateral_Deviation_m\":0.0,\"License_Info\":\"EC060800FFFBEBBF 6B7685747EBC EC060800FFFBEBBF 6B7685747EBC 2021/8/26 13:46:47 2021/8/26 13:46:47 1 UserClass5 Magic4_1\",\"LindeAgwSteerCenterPivotPlateAng\":0,\"LindeAgwSteerErrorFlag\":0,\"LindeAgwSteerModeSelectorState\":0,\"LindeAgwTracLiftErrorFlag\":0,\"LindeAgwTracLiftModeSelectorState\":0,\"LindeDriveErrCode1\":0,\"LindeDriveErrCode2\":0,\"LindeDriveErrCode3\":0,\"LindeDriveErrCode4\":0,\"LindeLiftErrCode1\":0,\"LindeLiftErrCode2\":0,\"LindeLiftErrCode3\":0,\"LindeLiftErrCode4\":0,\"LindeSteerErrCode1\":0,\"LindeSteerErrCode2\":0,\"LindeSteerErrCode3\":0,\"LindeSteerErrCode4\":0,\"Login_Info\":\"\",\"Min_Dist\":0.0,\"MissionCompleteAltitude_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryX_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryY_mm_RemoteOrHMI_FB\":0,\"Navi_Method\":3,\"ObstacleDetectState\":0,\"ObstacleTouchState\":0,\"Out_Of_Path_Times\":0,\"PFC_Sch\":0,\"PFC_State\":\"[PathFollow_Control_Handle_WLANJSON][PathFollow_Schedule_WLANJSON=0]\\n\",\"PLC_Warning_Code\":0,\"PWR_Percent\":99,\"PWR_Warn\":0,\"PathFollow_Enable\":0,\"PathFollow_Expect_AltitudeCtrlEnable\":0,\"PathFollow_Expect_GantryXCtrlEnable\":0,\"PathFollow_Expect_GantryYCtrlEnable\":0,\"Plate_Check_Err_Code\":0,\"ReachState\":0,\"RealAutoChargeState\":0,\"Ref_std_rt\":0.0,\"Ref_std_rx\":0.0,\"Ref_std_ry\":0.0,\"Remote_Or_HMI_Ctrl\":1,\"SVreal_angle\":0.0,\"Sche_JSON_Sche_Enable\":0,\"Speedm_Tmp\":0.0,\"StartNode\":0,\"Sub_Warning_Code0\":0,\"Sys_Mode\":4,\"Task_Sch\":0,\"Task_State\":\"\",\"Update_Sch\":0,\"Update_State\":\"\",\"VehicleCtrlExpThrottle\":0,\"VehicleCtrlRealAltitude_mm\":998,\"VehicleCtrlRealCustomStateByte0\":0,\"VehicleCtrlRealCustomStateByte1\":0,\"VehicleCtrlRealCustomStateByte2\":0,\"VehicleCtrlRealCustomStateByte3\":0,\"VehicleCtrlRealGantryX_mm\":0,\"VehicleCtrlRealGantryY_mm\":0,\"VehicleCtrlRealJoyEnable\":0,\"VehicleCtrlRealRCEnable\":0,\"VehicleCtrl_CAN_Err_Info\":0,\"Vertical_Deviation_deg\":0.0,\"Warning_Code\":754529,\"header\":{\"frame_id\":\"\",\"seq\":1904,\"stamp\":{\"nsec\":160948865,\"sec\":1695633231}}}}";
result = "{\"Msg_DisplayState\":{\"AGV_ID\":255,\"Auto_In_Line_State\":0,\"Bosch_Car_Global_Theta\":-90.19221757272916,\"Bosch_Car_Global_rx\":-1.0619603784858553,\"Bosch_Car_Global_ry\":0.0020978358374357303,\"Bosch_Loc_State\":-2,\"Bosch_No_Rec_State\":0,\"Bosch_raw_age\":0.01389455795288086,\"Bosch_raw_epoch\":1,\"Bosch_raw_locState\":-2,\"Bosch_raw_qw\":0.9999999908132869,\"Bosch_raw_qx\":0.0,\"Bosch_raw_qy\":0.0,\"Bosch_raw_qz\":0.00013554861104682667,\"Bosch_raw_timestamp\":1695633231.1093392,\"Bosch_raw_uniqueId\":0,\"Bosch_raw_x\":0.0008994877773440588,\"Bosch_raw_x_odo\":0.0008994877773440588,\"Bosch_raw_y\":0.0006906610801896382,\"Bosch_raw_y_odo\":0.0006906610801896382,\"Bosch_raw_yaw\":0.00027109722292381746,\"Bosch_raw_yaw_odo\":0.0006906610801896382,\"Bosch_raw_z\":0.0,\"CAD_Or_TCS_Ctrl\":0,\"Car_Global_Theta\":-90.19221757272916,\"Car_Global_rx\":-1.0619603784858553,\"Car_Global_ry\":0.0020978358374357303,\"CurNodeID\":11,\"Cur_Stop_Info1_Authorized_Pass\":1,\"Cur_Stop_Info1_High_Precious_Enable\":1,\"Cur_Stop_Info1_Reached_Stop\":0,\"Cur_Stop_Info1_Set_Patht\":0.0,\"Cur_Stop_Info1_Set_Pathx\":0.0,\"Cur_Stop_Info1_Set_Pathy\":0.0,\"Cur_Stop_Info1_Single_Request_Sch\":0,\"Cur_Stop_Info1_Single_Stop_Sch\":0,\"Cur_Stop_Info1_StopEndNode\":0,\"Cur_Stop_Info1_StopStartNode\":0,\"Cur_Stop_Info1_Stop_Endt\":0.0,\"Cur_Stop_Info1_Stop_Endx\":0.0,\"Cur_Stop_Info1_Stop_Endy\":0.0,\"Cur_Stop_Info1_Stop_Num\":0,\"Cur_Stop_Info2_Authorized_Pass\":1,\"Cur_Stop_Info2_High_Precious_Enable\":1,\"Cur_Stop_Info2_Reached_Stop\":0,\"Cur_Stop_Info2_Set_Patht\":0.0,\"Cur_Stop_Info2_Set_Pathx\":0.0,\"Cur_Stop_Info2_Set_Pathy\":0.0,\"Cur_Stop_Info2_Single_Request_Sch\":0,\"Cur_Stop_Info2_Single_Stop_Sch\":0,\"Cur_Stop_Info2_StopEndNode\":0,\"Cur_Stop_Info2_StopStartNode\":0,\"Cur_Stop_Info2_Stop_Endt\":0.0,\"Cur_Stop_Info2_Stop_Endx\":0.0,\"Cur_Stop_Info2_Stop_Endy\":0.0,\"Cur_Stop_Info2_Stop_Num\":0,\"Curtis_Warning_Code_Pump\":0,\"Curtis_Warning_Code_Speed\":82,\"Curtis_Warning_Code_Steer\":0,\"EndNode\":0,\"Env_CustomName\":\"NobleLift\",\"Env_HMIUseJavaApp\":\"true\",\"Env_LearnEnable\":\"true\",\"Env_Lu_ROS_IP2\":\"\",\"Env_SoftwareVersion\":\"[Version]Magic4.1[Info]2023_09_21_20_41_37_Lu_ROS_magic4_waypointab_v31\",\"Env_VehicleType\":\"PS10LMT_HuaHai\",\"Get_Nav350_Curr_Layer\":0,\"Language\":1022739087,\"LastAltitudeExpectValue_mm\":0,\"LastGantryXExpectValue_mm\":0,\"LastGantryYExpectValue_mm\":0,\"Lateral_Deviation_m\":0.0,\"License_Info\":\"EC060800FFFBEBBF 6B7685747EBC EC060800FFFBEBBF 6B7685747EBC 2021/8/26 13:46:47 2021/8/26 13:46:47 1 UserClass5 Magic4_1\",\"LindeAgwSteerCenterPivotPlateAng\":0,\"LindeAgwSteerErrorFlag\":0,\"LindeAgwSteerModeSelectorState\":0,\"LindeAgwTracLiftErrorFlag\":0,\"LindeAgwTracLiftModeSelectorState\":0,\"LindeDriveErrCode1\":0,\"LindeDriveErrCode2\":0,\"LindeDriveErrCode3\":0,\"LindeDriveErrCode4\":0,\"LindeLiftErrCode1\":0,\"LindeLiftErrCode2\":0,\"LindeLiftErrCode3\":0,\"LindeLiftErrCode4\":0,\"LindeSteerErrCode1\":0,\"LindeSteerErrCode2\":0,\"LindeSteerErrCode3\":0,\"LindeSteerErrCode4\":0,\"Login_Info\":\"\",\"Min_Dist\":0.0,\"MissionCompleteAltitude_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryX_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryY_mm_RemoteOrHMI_FB\":0,\"Navi_Method\":3,\"ObstacleDetectState\":0,\"ObstacleTouchState\":0,\"Out_Of_Path_Times\":0,\"PFC_Sch\":0,\"PFC_State\":\"[PathFollow_Control_Handle_WLANJSON][PathFollow_Schedule_WLANJSON=0]\\n\",\"PLC_Warning_Code\":0,\"PWR_Percent\":29,\"PWR_Warn\":0,\"PathFollow_Enable\":0,\"PathFollow_Expect_AltitudeCtrlEnable\":0,\"PathFollow_Expect_GantryXCtrlEnable\":0,\"PathFollow_Expect_GantryYCtrlEnable\":0,\"Plate_Check_Err_Code\":0,\"ReachState\":0,\"RealAutoChargeState\":0,\"Ref_std_rt\":0.0,\"Ref_std_rx\":0.0,\"Ref_std_ry\":0.0,\"Remote_Or_HMI_Ctrl\":1,\"SVreal_angle\":0.0,\"Sche_JSON_Sche_Enable\":1,\"Speedm_Tmp\":0.0,\"StartNode\":0,\"Sub_Warning_Code0\":0,\"Sys_Mode\":4,\"Task_Sch\":0,\"Task_State\":\"\",\"Update_Sch\":1,\"Update_State\":\"\",\"VehicleCtrlExpThrottle\":0,\"VehicleCtrlRealAltitude_mm\":998,\"VehicleCtrlRealCustomStateByte0\":0,\"VehicleCtrlRealCustomStateByte1\":0,\"VehicleCtrlRealCustomStateByte2\":0,\"VehicleCtrlRealCustomStateByte3\":0,\"VehicleCtrlRealGantryX_mm\":0,\"VehicleCtrlRealGantryY_mm\":0,\"VehicleCtrlRealJoyEnable\":0,\"VehicleCtrlRealRCEnable\":0,\"VehicleCtrl_CAN_Err_Info\":0,\"Vertical_Deviation_deg\":0.0,\"Warning_Code\":754529,\"header\":{\"frame_id\":\"\",\"seq\":1904,\"stamp\":{\"nsec\":160948865,\"sec\":1695633231}}}}";
}
//String result = HttpUtil.get(urlInfo.get("javaUrl"));
JSONObject json = JSONObject.parseObject(result);
@@ -545,7 +545,7 @@ public class HomeServiceImpl implements HomeService {
if ("prod".equals(isProd)) {
result = HttpUtil.get(urlInfo.get("javaUrl"));
} else {
result = "{\"Msg_DisplayState\":{\"AGV_ID\":255,\"Auto_In_Line_State\":1,\"Bosch_Car_Global_Theta\":-90.19221757272916,\"Bosch_Car_Global_rx\":-1.0619603784858553,\"Bosch_Car_Global_ry\":0.0020978358374357303,\"Bosch_Loc_State\":-2,\"Bosch_No_Rec_State\":0,\"Bosch_raw_age\":0.01389455795288086,\"Bosch_raw_epoch\":1,\"Bosch_raw_locState\":-2,\"Bosch_raw_qw\":0.9999999908132869,\"Bosch_raw_qx\":0.0,\"Bosch_raw_qy\":0.0,\"Bosch_raw_qz\":0.00013554861104682667,\"Bosch_raw_timestamp\":1695633231.1093392,\"Bosch_raw_uniqueId\":0,\"Bosch_raw_x\":0.0008994877773440588,\"Bosch_raw_x_odo\":0.0008994877773440588,\"Bosch_raw_y\":0.0006906610801896382,\"Bosch_raw_y_odo\":0.0006906610801896382,\"Bosch_raw_yaw\":0.00027109722292381746,\"Bosch_raw_yaw_odo\":0.0006906610801896382,\"Bosch_raw_z\":0.0,\"CAD_Or_TCS_Ctrl\":0,\"Car_Global_Theta\":-90.19221757272916,\"Car_Global_rx\":-1.0619603784858553,\"Car_Global_ry\":0.0020978358374357303,\"CurNodeID\":11,\"Cur_Stop_Info1_Authorized_Pass\":1,\"Cur_Stop_Info1_High_Precious_Enable\":1,\"Cur_Stop_Info1_Reached_Stop\":0,\"Cur_Stop_Info1_Set_Patht\":0.0,\"Cur_Stop_Info1_Set_Pathx\":0.0,\"Cur_Stop_Info1_Set_Pathy\":0.0,\"Cur_Stop_Info1_Single_Request_Sch\":0,\"Cur_Stop_Info1_Single_Stop_Sch\":0,\"Cur_Stop_Info1_StopEndNode\":0,\"Cur_Stop_Info1_StopStartNode\":0,\"Cur_Stop_Info1_Stop_Endt\":0.0,\"Cur_Stop_Info1_Stop_Endx\":0.0,\"Cur_Stop_Info1_Stop_Endy\":0.0,\"Cur_Stop_Info1_Stop_Num\":0,\"Cur_Stop_Info2_Authorized_Pass\":1,\"Cur_Stop_Info2_High_Precious_Enable\":1,\"Cur_Stop_Info2_Reached_Stop\":0,\"Cur_Stop_Info2_Set_Patht\":0.0,\"Cur_Stop_Info2_Set_Pathx\":0.0,\"Cur_Stop_Info2_Set_Pathy\":0.0,\"Cur_Stop_Info2_Single_Request_Sch\":0,\"Cur_Stop_Info2_Single_Stop_Sch\":0,\"Cur_Stop_Info2_StopEndNode\":0,\"Cur_Stop_Info2_StopStartNode\":0,\"Cur_Stop_Info2_Stop_Endt\":0.0,\"Cur_Stop_Info2_Stop_Endx\":0.0,\"Cur_Stop_Info2_Stop_Endy\":0.0,\"Cur_Stop_Info2_Stop_Num\":0,\"Curtis_Warning_Code_Pump\":0,\"Curtis_Warning_Code_Speed\":82,\"Curtis_Warning_Code_Steer\":0,\"EndNode\":0,\"Env_CustomName\":\"NobleLift\",\"Env_HMIUseJavaApp\":\"true\",\"Env_LearnEnable\":\"true\",\"Env_Lu_ROS_IP2\":\"\",\"Env_SoftwareVersion\":\"[Version]Magic4.1[Info]2023_09_21_20_41_37_Lu_ROS_magic4_waypointab_v31\",\"Env_VehicleType\":\"PS10LMT_HuaHai\",\"Get_Nav350_Curr_Layer\":0,\"Language\":1022739087,\"LastAltitudeExpectValue_mm\":0,\"LastGantryXExpectValue_mm\":0,\"LastGantryYExpectValue_mm\":0,\"Lateral_Deviation_m\":0.0,\"License_Info\":\"EC060800FFFBEBBF 6B7685747EBC EC060800FFFBEBBF 6B7685747EBC 2021/8/26 13:46:47 2021/8/26 13:46:47 1 UserClass5 Magic4_1\",\"LindeAgwSteerCenterPivotPlateAng\":0,\"LindeAgwSteerErrorFlag\":0,\"LindeAgwSteerModeSelectorState\":0,\"LindeAgwTracLiftErrorFlag\":0,\"LindeAgwTracLiftModeSelectorState\":0,\"LindeDriveErrCode1\":0,\"LindeDriveErrCode2\":0,\"LindeDriveErrCode3\":0,\"LindeDriveErrCode4\":0,\"LindeLiftErrCode1\":0,\"LindeLiftErrCode2\":0,\"LindeLiftErrCode3\":0,\"LindeLiftErrCode4\":0,\"LindeSteerErrCode1\":0,\"LindeSteerErrCode2\":0,\"LindeSteerErrCode3\":0,\"LindeSteerErrCode4\":0,\"Login_Info\":\"\",\"Min_Dist\":0.0,\"MissionCompleteAltitude_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryX_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryY_mm_RemoteOrHMI_FB\":0,\"Navi_Method\":3,\"ObstacleDetectState\":0,\"ObstacleTouchState\":0,\"Out_Of_Path_Times\":0,\"PFC_Sch\":0,\"PFC_State\":\"[PathFollow_Control_Handle_WLANJSON][PathFollow_Schedule_WLANJSON=0]\\n\",\"PLC_Warning_Code\":0,\"PWR_Percent\":99,\"PWR_Warn\":0,\"PathFollow_Enable\":0,\"PathFollow_Expect_AltitudeCtrlEnable\":0,\"PathFollow_Expect_GantryXCtrlEnable\":0,\"PathFollow_Expect_GantryYCtrlEnable\":0,\"Plate_Check_Err_Code\":0,\"ReachState\":0,\"RealAutoChargeState\":0,\"Ref_std_rt\":0.0,\"Ref_std_rx\":0.0,\"Ref_std_ry\":0.0,\"Remote_Or_HMI_Ctrl\":1,\"SVreal_angle\":0.0,\"Sche_JSON_Sche_Enable\":0,\"Speedm_Tmp\":0.0,\"StartNode\":0,\"Sub_Warning_Code0\":0,\"Sys_Mode\":4,\"Task_Sch\":0,\"Task_State\":\"\",\"Update_Sch\":0,\"Update_State\":\"\",\"VehicleCtrlExpThrottle\":0,\"VehicleCtrlRealAltitude_mm\":998,\"VehicleCtrlRealCustomStateByte0\":0,\"VehicleCtrlRealCustomStateByte1\":0,\"VehicleCtrlRealCustomStateByte2\":0,\"VehicleCtrlRealCustomStateByte3\":0,\"VehicleCtrlRealGantryX_mm\":0,\"VehicleCtrlRealGantryY_mm\":0,\"VehicleCtrlRealJoyEnable\":0,\"VehicleCtrlRealRCEnable\":0,\"VehicleCtrl_CAN_Err_Info\":0,\"Vertical_Deviation_deg\":0.0,\"Warning_Code\":754529,\"header\":{\"frame_id\":\"\",\"seq\":1904,\"stamp\":{\"nsec\":160948865,\"sec\":1695633231}}}}";
result = "{\"Msg_DisplayState\":{\"AGV_ID\":255,\"Auto_In_Line_State\":0,\"Bosch_Car_Global_Theta\":-90.19221757272916,\"Bosch_Car_Global_rx\":-1.0619603784858553,\"Bosch_Car_Global_ry\":0.0020978358374357303,\"Bosch_Loc_State\":-2,\"Bosch_No_Rec_State\":0,\"Bosch_raw_age\":0.01389455795288086,\"Bosch_raw_epoch\":1,\"Bosch_raw_locState\":-2,\"Bosch_raw_qw\":0.9999999908132869,\"Bosch_raw_qx\":0.0,\"Bosch_raw_qy\":0.0,\"Bosch_raw_qz\":0.00013554861104682667,\"Bosch_raw_timestamp\":1695633231.1093392,\"Bosch_raw_uniqueId\":0,\"Bosch_raw_x\":0.0008994877773440588,\"Bosch_raw_x_odo\":0.0008994877773440588,\"Bosch_raw_y\":0.0006906610801896382,\"Bosch_raw_y_odo\":0.0006906610801896382,\"Bosch_raw_yaw\":0.00027109722292381746,\"Bosch_raw_yaw_odo\":0.0006906610801896382,\"Bosch_raw_z\":0.0,\"CAD_Or_TCS_Ctrl\":0,\"Car_Global_Theta\":-90.19221757272916,\"Car_Global_rx\":-1.0619603784858553,\"Car_Global_ry\":0.0020978358374357303,\"CurNodeID\":11,\"Cur_Stop_Info1_Authorized_Pass\":1,\"Cur_Stop_Info1_High_Precious_Enable\":1,\"Cur_Stop_Info1_Reached_Stop\":0,\"Cur_Stop_Info1_Set_Patht\":0.0,\"Cur_Stop_Info1_Set_Pathx\":0.0,\"Cur_Stop_Info1_Set_Pathy\":0.0,\"Cur_Stop_Info1_Single_Request_Sch\":0,\"Cur_Stop_Info1_Single_Stop_Sch\":0,\"Cur_Stop_Info1_StopEndNode\":0,\"Cur_Stop_Info1_StopStartNode\":0,\"Cur_Stop_Info1_Stop_Endt\":0.0,\"Cur_Stop_Info1_Stop_Endx\":0.0,\"Cur_Stop_Info1_Stop_Endy\":0.0,\"Cur_Stop_Info1_Stop_Num\":0,\"Cur_Stop_Info2_Authorized_Pass\":1,\"Cur_Stop_Info2_High_Precious_Enable\":1,\"Cur_Stop_Info2_Reached_Stop\":0,\"Cur_Stop_Info2_Set_Patht\":0.0,\"Cur_Stop_Info2_Set_Pathx\":0.0,\"Cur_Stop_Info2_Set_Pathy\":0.0,\"Cur_Stop_Info2_Single_Request_Sch\":0,\"Cur_Stop_Info2_Single_Stop_Sch\":0,\"Cur_Stop_Info2_StopEndNode\":0,\"Cur_Stop_Info2_StopStartNode\":0,\"Cur_Stop_Info2_Stop_Endt\":0.0,\"Cur_Stop_Info2_Stop_Endx\":0.0,\"Cur_Stop_Info2_Stop_Endy\":0.0,\"Cur_Stop_Info2_Stop_Num\":0,\"Curtis_Warning_Code_Pump\":0,\"Curtis_Warning_Code_Speed\":82,\"Curtis_Warning_Code_Steer\":0,\"EndNode\":0,\"Env_CustomName\":\"NobleLift\",\"Env_HMIUseJavaApp\":\"true\",\"Env_LearnEnable\":\"true\",\"Env_Lu_ROS_IP2\":\"\",\"Env_SoftwareVersion\":\"[Version]Magic4.1[Info]2023_09_21_20_41_37_Lu_ROS_magic4_waypointab_v31\",\"Env_VehicleType\":\"PS10LMT_HuaHai\",\"Get_Nav350_Curr_Layer\":0,\"Language\":1022739087,\"LastAltitudeExpectValue_mm\":0,\"LastGantryXExpectValue_mm\":0,\"LastGantryYExpectValue_mm\":0,\"Lateral_Deviation_m\":0.0,\"License_Info\":\"EC060800FFFBEBBF 6B7685747EBC EC060800FFFBEBBF 6B7685747EBC 2021/8/26 13:46:47 2021/8/26 13:46:47 1 UserClass5 Magic4_1\",\"LindeAgwSteerCenterPivotPlateAng\":0,\"LindeAgwSteerErrorFlag\":0,\"LindeAgwSteerModeSelectorState\":0,\"LindeAgwTracLiftErrorFlag\":0,\"LindeAgwTracLiftModeSelectorState\":0,\"LindeDriveErrCode1\":0,\"LindeDriveErrCode2\":0,\"LindeDriveErrCode3\":0,\"LindeDriveErrCode4\":0,\"LindeLiftErrCode1\":0,\"LindeLiftErrCode2\":0,\"LindeLiftErrCode3\":0,\"LindeLiftErrCode4\":0,\"LindeSteerErrCode1\":0,\"LindeSteerErrCode2\":0,\"LindeSteerErrCode3\":0,\"LindeSteerErrCode4\":0,\"Login_Info\":\"\",\"Min_Dist\":0.0,\"MissionCompleteAltitude_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryX_mm_RemoteOrHMI_FB\":0,\"MissionCompleteGantryY_mm_RemoteOrHMI_FB\":0,\"Navi_Method\":3,\"ObstacleDetectState\":0,\"ObstacleTouchState\":0,\"Out_Of_Path_Times\":0,\"PFC_Sch\":0,\"PFC_State\":\"[PathFollow_Control_Handle_WLANJSON][PathFollow_Schedule_WLANJSON=0]\\n\",\"PLC_Warning_Code\":0,\"PWR_Percent\":29,\"PWR_Warn\":0,\"PathFollow_Enable\":0,\"PathFollow_Expect_AltitudeCtrlEnable\":0,\"PathFollow_Expect_GantryXCtrlEnable\":0,\"PathFollow_Expect_GantryYCtrlEnable\":0,\"Plate_Check_Err_Code\":0,\"ReachState\":0,\"RealAutoChargeState\":0,\"Ref_std_rt\":0.0,\"Ref_std_rx\":0.0,\"Ref_std_ry\":0.0,\"Remote_Or_HMI_Ctrl\":1,\"SVreal_angle\":0.0,\"Sche_JSON_Sche_Enable\":0,\"Speedm_Tmp\":0.0,\"StartNode\":0,\"Sub_Warning_Code0\":0,\"Sys_Mode\":4,\"Task_Sch\":0,\"Task_State\":\"\",\"Update_Sch\":1,\"Update_State\":\"\",\"VehicleCtrlExpThrottle\":0,\"VehicleCtrlRealAltitude_mm\":998,\"VehicleCtrlRealCustomStateByte0\":0,\"VehicleCtrlRealCustomStateByte1\":0,\"VehicleCtrlRealCustomStateByte2\":0,\"VehicleCtrlRealCustomStateByte3\":0,\"VehicleCtrlRealGantryX_mm\":0,\"VehicleCtrlRealGantryY_mm\":0,\"VehicleCtrlRealJoyEnable\":0,\"VehicleCtrlRealRCEnable\":0,\"VehicleCtrl_CAN_Err_Info\":0,\"Vertical_Deviation_deg\":0.0,\"Warning_Code\":754529,\"header\":{\"frame_id\":\"\",\"seq\":1904,\"stamp\":{\"nsec\":160948865,\"sec\":1695633231}}}}";
}
// String result = HttpUtil.get(urlInfo.get("javaUrl"));
JSONObject json = JSONObject.parseObject(result);

View File

@@ -37,7 +37,9 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Service;
import java.util.*;
import static org.nl.agv.service.impl.HomeServiceImpl.debugInfoJson;
import static org.nl.common.utils.LangUtils.getLanguage;
@@ -91,8 +93,8 @@ public class TaskServiceServiceImpl implements TaskService {
returnjo.put("rest_pointcode", rest_pointcode);
returnjo.put("result", arr);
} catch (Exception e) {
log.error("queryPoint-获取点位:{}",e.getMessage());
throw new BadRequestException(e.getMessage() == null ? "queryPoint:" + LangUtils.getMsgLanguage("CommunicationFail", null) :"queryPoint:" + e.getMessage());
log.error("queryPoint-获取点位:{}", e.getMessage());
throw new BadRequestException(e.getMessage() == null ? "queryPoint:" + LangUtils.getMsgLanguage("CommunicationFail", null) : "queryPoint:" + e.getMessage());
}
return returnjo;
}
@@ -106,27 +108,31 @@ public class TaskServiceServiceImpl implements TaskService {
String type = jsonObject.get("type");
JSONObject returnjo = new JSONObject();
JSONObject taskjo = new JSONObject();
if (StringUtils.isBlank(point_code)||StringUtils.isBlank((type))) {
if (StringUtils.isBlank(point_code) || StringUtils.isBlank((type))) {
if (StringUtils.isBlank(point_code)) {
returnjo.put("desc", LangUtils.getMsgLanguage("PointValidation", null));
} else if (StringUtils.isBlank((type))) {
returnjo.put("desc", LangUtils.getMsgLanguage("TypeValidation", null));
} else {
returnjo.put("desc", LangUtils.getMsgLanguage("LocationValidation", null));
}
returnjo.put("code", "0");
returnjo.put("desc", LangUtils.getMsgLanguage("LocationValidation", null));
return returnjo;
}else{
} else {
//目标点位只能为数字
if(!point_code.matches("\\d+"))
{
if (!point_code.matches("\\d+")) {
returnjo.put("code", "0");
returnjo.put("desc", LangUtils.getMsgLanguage("MatchesLocation", null));
return returnjo;
}
if(point_code.equals(debugInfoJson.getString("CurNodeID")))
{
if (point_code.equals(debugInfoJson.getString("CurNodeID"))) {
returnjo.put("code", "0");
returnjo.put("desc", LangUtils.getMsgLanguage("HasBeenReached", null));
return returnjo;
}
}
try {
String instruct = "";
String instruct;
int seq_num = 1;
String task_status = "00";
String task_status_name = getLanguage("GenerateNotExecuted", null);
@@ -156,7 +162,7 @@ public class TaskServiceServiceImpl implements TaskService {
int max_task_num = WQLObject.getWQLObject("ST_SYSTEM_PARAM").query("1=1").uniqueResult(0).getInteger("max_task_num");
if (num >= max_task_num) {
returnjo.put("code", "1");
returnjo.put("desc",LangUtils.getMsgLanguage("TaskCountExceedsMaximum", null));
returnjo.put("desc", LangUtils.getMsgLanguage("TaskCountExceedsMaximum", null));
return returnjo;
}
//查询未完成最大的顺序号
@@ -208,7 +214,7 @@ public class TaskServiceServiceImpl implements TaskService {
returnjo.put("desc", LangUtils.getMsgLanguage("OperationSuccess", null));
return returnjo;
} catch (Exception e) {
log.error("confirmPoint-下发任务:{}",e.getMessage());
log.error("confirmPoint-下发任务:{}", e.getMessage());
throw new BadRequestException(e.getMessage() == null ? "confirmPoint:" + LangUtils.getMsgLanguage("CommunicationFail", null) : "confirmPoint:" + e.getMessage());
}
}

View File

@@ -4,7 +4,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
data: