Commit 13fa48d7 authored by 李秀明's avatar 李秀明

fix: 处理空指针异常

parent 8cdd3573
......@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexMoment;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -238,7 +239,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
@RequestParam(value = "startTime", required = false) String startTime,
@RequestParam(value = "endTime", required = false) String endTime
) {
if(address.isEmpty()||statioName.isEmpty()||equipmentName.isEmpty()||arae.isEmpty()){
if(StringUtils.isEmpty(address) || StringUtils.isEmpty(statioName) || StringUtils.isEmpty(equipmentName) || StringUtils.isEmpty(arae)){
throw new RuntimeException("片区,场站,设备名称,子系统,分析变量不能为空");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment