处理空值
This commit is contained in:
@@ -315,7 +315,7 @@ public class ClaimVerificationServiceImpl implements ClaimVerificationService {
|
||||
|
||||
private String getPartHoursList(JSONObject warrantyJson) {
|
||||
if (warrantyJson == null || !warrantyJson.containsKey("warrantyReport")) {
|
||||
return null;
|
||||
return " ";
|
||||
}
|
||||
|
||||
// 获取warrantyReport对象
|
||||
@@ -323,11 +323,11 @@ public class ClaimVerificationServiceImpl implements ClaimVerificationService {
|
||||
|
||||
// 检查partItems是否存在且是数组
|
||||
if (!warrantyReport.containsKey("partItems")) {
|
||||
return null;
|
||||
return " ";
|
||||
} else {
|
||||
Object value = warrantyReport.get("partItems");
|
||||
if (!(value instanceof JSONArray)) {
|
||||
return null;
|
||||
return " ";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,11 +345,11 @@ public class ClaimVerificationServiceImpl implements ClaimVerificationService {
|
||||
}
|
||||
}
|
||||
if (partNoList.isEmpty()) {
|
||||
return null;
|
||||
return " ";
|
||||
}
|
||||
List<ClaimVerificationPartHoursDTO> result = tmClaimVerificationPartHoursMappingMapper.queryConfigByPartId(partNoList);
|
||||
if (result.isEmpty()) {
|
||||
return null;
|
||||
return " ";
|
||||
}
|
||||
return JSONObject.toJSONString(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user