fix: 修复区域表把点位类型删除之后,点位管理查询报错

This commit is contained in:
2023-04-04 14:08:22 +08:00
parent 3b05bf4318
commit 2b34529494

View File

@@ -69,7 +69,7 @@ public class PointServiceImpl implements PointService {
String point_status_explain = ObjectUtil.isNotEmpty(regionDto.getPoint_status_explain())?regionDto.getPoint_status_explain():null;
String point_type_explain = ObjectUtil.isNotEmpty(regionDto.getPoint_type_explain())?regionDto.getPoint_type_explain():null;
// 获取点位状态名称
if (ObjectUtil.isNotEmpty(point_status)) {
if (ObjectUtil.isNotEmpty(point_status) && ObjectUtil.isNotEmpty(point_status_explain)) {
JSONObject statusArr = new JSONObject();
String[] split = point_status_explain.split("");
for ( int j = 0; j < split.length; j++) {
@@ -79,7 +79,7 @@ public class PointServiceImpl implements PointService {
object.put("point_status_name", statusArr.getString(point_status));
}
// 获取点位类型
if (ObjectUtil.isNotEmpty(point_type)) {
if (ObjectUtil.isNotEmpty(point_type) && ObjectUtil.isNotEmpty(point_type_explain)) {
JSONObject typeArr = new JSONObject();
String[] split = point_type_explain.split("");
for ( int j = 0; j < split.length; j++) {