| | |
| | | // 取水口ID换阀控器地址及通讯协议 |
| | | JSONObject job_rtu = getRtu(intakeId, null); |
| | | if(job_rtu == null) { |
| | | return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | |
| | | // 阀控器地址换取水口ID和通讯协议 |
| | | JSONObject job_rtu = getRtu(null, rtuAddr); |
| | | if(job_rtu == null) { |
| | | return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | } |
| | | Long intakeId = job_rtu.getLong("intakeId"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | |
| | | //rmCommandHistory.setResult((byte)0); |
| | | //commandSv.updateCommandResult(rmCommandHistory); |
| | | return BaseResponseUtils.buildFail(response_CallBack.getMsg()); |
| | | //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage()); |
| | | //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage()); |
| | | } |
| | | |
| | | // 回调成功,再判断执行是否成功 |
| | |
| | | Long intakeId = dtoBase.getIntakeId(); |
| | | Long operator = dtoBase.getOperator(); |
| | | |
| | | VoUnclosedParam voUnclosedParam = commandSv.getUncloseParam(intakeId); |
| | | VoUnclosedParam voUnclosedParam = null; |
| | | try { |
| | | voUnclosedParam = commandSv.getUncloseParam(intakeId); |
| | | }catch (Exception e) { |
| | | return BaseResponseUtils.buildErrorMsg("获取未关阀信息错误"); |
| | | } |
| | | |
| | | if(voUnclosedParam == null) { |
| | | return BaseResponseUtils.buildSuccess(RemoteResultCode.VALVE_CLOSED.getMessage()); |
| | | } |
| | |
| | | // 阀控器地址换取水口ID和通讯协议 |
| | | JSONObject job_rtu = getRtu(null, rtuAddr); |
| | | if(job_rtu == null) { |
| | | return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | } |
| | | //Long intakeId = job_rtu.getLong("intakeId"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | |
| | | //rmCommandHistory.setResult((byte)0); |
| | | //commandSv.updateCommandResult(rmCommandHistory); |
| | | return BaseResponseUtils.buildFail(response_CallBack.getMsg()); |
| | | //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage()); |
| | | //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage()); |
| | | } |
| | | |
| | | // 回调成功,再判断执行是否成功 |