This commit is contained in:
root
2025-12-14 20:56:52 +05:00
parent 0b75ef34c3
commit 56ff3b7e53
@@ -711,7 +711,8 @@ public class MarketingAnalysisService {
}
/**
* Генерация текстового отчёта на основе JSON (простое объединение без AI-суммирования)
* Генерация текстового отчёта на основе JSON (простое объединение без
* AI-суммирования)
*/
private String generateDeepTextReport(Map<String, Object> analysisJson) {
if (analysisJson == null || analysisJson.isEmpty()) {
@@ -746,7 +747,7 @@ public class MarketingAnalysisService {
Map<String, Object> seasonality = (Map<String, Object>) analysisJson.get("seasonality");
@SuppressWarnings("unchecked")
Map<String, Object> market = (Map<String, Object>) analysisJson.get("market");
if (seasonality != null) {
Object description = seasonality.get("description");
if (description != null) {
@@ -754,7 +755,7 @@ public class MarketingAnalysisService {
}
fullReport.append("[[CHART_SEASONALITY]]\n\n");
}
if (market != null) {
Object marketSize = market.get("marketSize");
Object growthRate = market.get("growthRate");
@@ -806,7 +807,7 @@ public class MarketingAnalysisService {
Object motivation = segment.get("motivation");
Object triggers = segment.get("triggers");
Object barriers = segment.get("barriers");
if (name != null) {
fullReport.append("### Сегмент: ").append(name);
if (sharePercent != null) {
@@ -842,9 +843,10 @@ public class MarketingAnalysisService {
if (marketShareComment != null) {
fullReport.append(marketShareComment).append("\n\n");
}
@SuppressWarnings("unchecked")
List<Map<String, Object>> competitorsDetails = (List<Map<String, Object>>) competitorAnalysis.get("competitorsDetails");
List<Map<String, Object>> competitorsDetails = (List<Map<String, Object>>) competitorAnalysis
.get("competitorsDetails");
if (competitorsDetails != null && !competitorsDetails.isEmpty()) {
for (Map<String, Object> competitor : competitorsDetails) {
Object compName = competitor.get("name");
@@ -852,7 +854,7 @@ public class MarketingAnalysisService {
Object contentStrategy = competitor.get("contentStrategy");
@SuppressWarnings("unchecked")
Map<String, Object> swot = (Map<String, Object>) competitor.get("swot");
if (compName != null) {
fullReport.append("### ").append(compName).append("\n");
}
@@ -899,7 +901,7 @@ public class MarketingAnalysisService {
List<String> opportunities = (List<String>) swot.get("opportunities");
@SuppressWarnings("unchecked")
List<String> threats = (List<String>) swot.get("threats");
if (strengths != null && !strengths.isEmpty()) {
fullReport.append("Сильные стороны:\n");
for (String strength : strengths) {
@@ -1001,7 +1003,8 @@ public class MarketingAnalysisService {
// X. Рекомендации по контенту
fullReport.append("X. Рекомендации по контенту\n\n");
@SuppressWarnings("unchecked")
Map<String, Object> contentRecommendations = (Map<String, Object>) analysisJson.get("contentRecommendations");
Map<String, Object> contentRecommendations = (Map<String, Object>) analysisJson
.get("contentRecommendations");
if (contentRecommendations != null) {
@SuppressWarnings("unchecked")
List<String> salesContent = (List<String>) contentRecommendations.get("sales");
@@ -1011,7 +1014,7 @@ public class MarketingAnalysisService {
List<String> trustContent = (List<String>) contentRecommendations.get("trust");
@SuppressWarnings("unchecked")
List<String> entertainmentContent = (List<String>) contentRecommendations.get("entertainment");
if (salesContent != null && !salesContent.isEmpty()) {
fullReport.append("Контент для продаж:\n");
for (String content : salesContent) {