소스 검색

修复 水稻测温病导出报错

zhaiyifei 10 달 전
부모
커밋
a5f23fc805
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      src/main/java/com/yunfeiyun/agmp/iotm/device/bzy/controller/IotDeviceBzyController.java

+ 4 - 1
src/main/java/com/yunfeiyun/agmp/iotm/device/bzy/controller/IotDeviceBzyController.java

@@ -202,8 +202,11 @@ public class IotDeviceBzyController extends BaseController {
         if(iotDevice == null){
             throw new IotBizException(ErrorCode.INVALID_PARAMETER.getCode(),"设备不存在");
         }
+        JSONObject jsonObject = new JSONObject();
         IotDeviceconfig iotDeviceconfig = iIotDeviceconfigService.selectIotDeviceConfigByDevBid(devBid);
-        JSONObject jsonObject = JSONObject.parseObject(iotDeviceconfig.getDevcfgContext());
+        if(iotDeviceconfig != null){
+            jsonObject = JSONObject.parseObject(iotDeviceconfig.getDevcfgContext());
+        }
         return AjaxResult.success(jsonObject);
     }