Administrator
2024-06-18 26d63d120e517624be6fcf70ae9620c3582a91dd
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
@@ -111,7 +111,7 @@
        // 取水口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");
@@ -343,7 +343,7 @@
        // 阀控器地址换取水口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");
@@ -384,7 +384,7 @@
                    //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());
                }
                // 回调成功,再判断执行是否成功
@@ -527,7 +527,13 @@
        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());
        }
@@ -544,7 +550,7 @@
        // 阀控器地址换取水口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");
@@ -585,7 +591,7 @@
                    //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());
                }
                // 回调成功,再判断执行是否成功