pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/ToRtuMwCom.java
@@ -5,6 +5,7 @@
import com.dy.common.mw.protocol.CommandType;
import com.dy.common.softUpgrade.state.UpgradeTaskVo;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -90,8 +91,13 @@
            response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, BaseResponse.class);
        } catch (Exception e) {
            e.printStackTrace();
            return BaseResponseUtils.buildError("后端系统出错,中间件调用异常");
        }
        if(response == null){
            return BaseResponseUtils.buildError("后端系统出错,中间件调用异常");
        }else{
        return response.getBody();
        }
    }
@@ -114,7 +120,12 @@
            response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, BaseResponse.class);
        } catch (Exception e) {
            e.printStackTrace();
            return BaseResponseUtils.buildError("后端系统出错,中间件调用异常");
        }
        if(response == null){
            return BaseResponseUtils.buildError("后端系统出错,中间件调用异常");
        }else{
        return response.getBody();
    }
}
}