Browse Source

增加非空处理

zhongwei
ty 7 months ago
parent
commit
f537f66cb2
  1. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java

@ -1,5 +1,6 @@
package com.hnac.hzinfo.inspect.task.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.druid.support.json.JSONUtils;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -49,6 +50,7 @@ import org.springblade.resource.vo.PushInfoVO;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
@ -119,7 +121,9 @@ public class TaskController extends BladeController {
if(entity.getLttd()!=null&&entity.getLgtd()!=null)
{points.add(entity.getLgtd().stripTrailingZeros().toPlainString()+","+entity.getLttd().stripTrailingZeros().toPlainString());}
}
detail.setPoint(points);
if (CollectionUtil.isNotEmpty(points)){
detail.setPoint(points);
}
return R.data(detail);
}

Loading…
Cancel
Save