Merge branch 'feature-claimVerification-warrantyReport-epic' into 'feature-20250710-release'

refactor(ai-analytic-center-biz): 优化 ClaimVerificationServiceImpl 中的 getJsonObjectToNewBie 方法

See merge request nsc/chinavolvoaidrives/ai-analytic-center!39
This commit is contained in:
YLIU335
2025-07-09 19:45:34 +08:00

View File

@@ -245,16 +245,15 @@ public class ClaimVerificationServiceImpl implements ClaimVerificationService {
@NotNull @NotNull
private static JSONObject getJsonObjectToNewBie(JSONObject diFyObject, ClaimVerificationFileDTO claimVerificationFileAnalysisDTO, String aiAnalysisRequestId) { private static JSONObject getJsonObjectToNewBie(JSONObject diFyObject, ClaimVerificationFileDTO claimVerificationFileAnalysisDTO, String aiAnalysisRequestId) {
if (diFyObject.containsKey("answer") && !diFyObject.getJSONObject("answer").isEmpty()) { JSONObject warrantyAuditReport = diFyObject.getJSONObject("warrantyAuditReport");
diFyObject = diFyObject.getJSONObject("answer"); if (warrantyAuditReport.containsKey("answer") && !warrantyAuditReport.getJSONObject("answer").isEmpty()) {
warrantyAuditReport = warrantyAuditReport.getJSONObject("answer");
} }
String warrantyAuditReport = diFyObject.getString("warrantyAuditReport");
warrantyAuditReport = StringEscapeUtils.unescapeJava(warrantyAuditReport);
JSONObject audiResToAfter = JSON.parseObject(warrantyAuditReport);
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
data.put("newBieAfterSalesId", claimVerificationFileAnalysisDTO.getNewBieAfterSalesId()); data.put("newBieAfterSalesId", claimVerificationFileAnalysisDTO.getNewBieAfterSalesId());
data.put("businessType", claimVerificationFileAnalysisDTO.getBusinessType()); data.put("businessType", claimVerificationFileAnalysisDTO.getBusinessType());
data.put("warrantyAuditReport", audiResToAfter); data.put("warrantyAuditReport", warrantyAuditReport);
data.put("aiAnalysisRequestId", aiAnalysisRequestId); data.put("aiAnalysisRequestId", aiAnalysisRequestId);
return data; return data;
} }