提交 ac15cb47 作者: 925993793@qq.com

生成ppt逻辑调整、测试bug修改

上级 517eeb6a
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
inner join event_category t2 on t1.event_type =t2.id inner join event_category t2 on t1.event_type =t2.id
INNER JOIN INNER JOIN
( (
select stm.subject_id,st.type_name as subjectTypeName from subject_type_map stm inner join subject_type st on stm.type_id = st.id select stm.subject_id,st.type_name as subjectTypeName from subject_type_map stm inner join subject_type st on
stm.type_id = st.id
where 1=1 where 1=1
<if test="typeIds!=null and typeIds.size()>0"> <if test="typeIds!=null and typeIds.size()>0">
and stm.type_id in and stm.type_id in
...@@ -353,7 +354,8 @@ ...@@ -353,7 +354,8 @@
inner join event_collect_map ecm on t1.id = ecm.event_id inner join event_collect_map ecm on t1.id = ecm.event_id
inner join project_subject_map m on t1.id = m.subject_id inner join project_subject_map m on t1.id = m.subject_id
left join event_tag t3 on t1.id=t3.event_id left join event_tag t3 on t1.id=t3.event_id
where t1.publish_status = 1 and ecm.user_id = #{userId} and m.project_id = #{projectId} where t1.publish_status = 1 and t1.face_public = 1
and ecm.user_id = #{userId} and m.project_id = #{projectId}
<if test="tenant != null and tenant != ''"> <if test="tenant != null and tenant != ''">
and t1.tenant = #{tenant} and t1.tenant = #{tenant}
</if> </if>
......
...@@ -376,26 +376,27 @@ public class AnalysisServiceImpl implements AnalysisService { ...@@ -376,26 +376,27 @@ public class AnalysisServiceImpl implements AnalysisService {
} }
EventAnalysisVersionRecord coreSummaryRecord = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.CORE_SUMMARY, eventDescribe); EventAnalysisVersionRecord coreSummaryRecord = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.CORE_SUMMARY, eventDescribe);
records.add(coreSummaryRecord); records.add(coreSummaryRecord);
log.info("{}-事件分析【{}】重新生成逻辑完成。", eventName, AnalysisColumnEnum.CORE_SUMMARY.getName());
//事件脉络 //事件脉络
List<Map<String, Object>> eventContext = eventContextService.eventContext(eventId); List<Map<String, Object>> eventContext = eventContextService.eventContext(eventId);
if (CollectionUtils.isNotEmpty(eventContext)) { if (CollectionUtils.isNotEmpty(eventContext)) {
EventAnalysisVersionRecord record = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.EVENT_CONTEXT, JSON.toJSONString(eventContext)); EventAnalysisVersionRecord record = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.EVENT_CONTEXT, JSON.toJSONString(eventContext));
records.add(record); records.add(record);
log.info("{}-事件分析【{}】重新生成逻辑完成。", eventName, "事件脉络"); log.info("{}-事件分析【{}】重新生成逻辑完成。", eventName, AnalysisColumnEnum.EVENT_CONTEXT.getName());
} }
//关键词趋势分析 //关键词趋势分析
List<CountVO> wordTrend = this.wordTrend(eventId, null, null); List<CountVO> wordTrend = this.wordTrend(eventId, null, null);
if (CollectionUtils.isNotEmpty(wordTrend)) { if (CollectionUtils.isNotEmpty(wordTrend)) {
EventAnalysisVersionRecord record = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.KEYWORD_TREND, JSON.toJSONString(wordTrend)); EventAnalysisVersionRecord record = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.KEYWORD_TREND, JSON.toJSONString(wordTrend));
records.add(record); records.add(record);
log.info("{}-事件分析【{}】重新生成逻辑完成。", eventName, "关键词趋势分析"); log.info("{}-事件分析【{}】重新生成逻辑完成。", eventName, AnalysisColumnEnum.KEYWORD_TREND.getName());
} }
//关键词共现关系 //关键词共现关系
List<CoOccurrenceVO> coOccurrenceVOS = this.coOccurrence(eventId, null, null); List<CoOccurrenceVO> coOccurrenceVOS = this.coOccurrence(eventId, null, null);
if (CollectionUtils.isNotEmpty(coOccurrenceVOS)) { if (CollectionUtils.isNotEmpty(coOccurrenceVOS)) {
EventAnalysisVersionRecord record = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.CO_OCCURRENCE, JSON.toJSONString(coOccurrenceVOS)); EventAnalysisVersionRecord record = EventAnalysisVersionRecord.of(versionId, AnalysisColumnEnum.CO_OCCURRENCE, JSON.toJSONString(coOccurrenceVOS));
records.add(record); records.add(record);
log.info("{}-事件分析【{}】重新生成逻辑完成。",eventName,"关键词共现关系"); log.info("{}-事件分析【{}】重新生成逻辑完成。",eventName,AnalysisColumnEnum.CO_OCCURRENCE.getName());
} }
//大模型相关逻辑生成的结果(影响评估,举措建议等) //大模型相关逻辑生成的结果(影响评估,举措建议等)
List<EventLlmConfig> collect = configList.stream().filter(e -> !e.getColumnCode().equals(AnalysisColumnEnum.CORE_SUMMARY.getCode())).collect(Collectors.toList()); List<EventLlmConfig> collect = configList.stream().filter(e -> !e.getColumnCode().equals(AnalysisColumnEnum.CORE_SUMMARY.getCode())).collect(Collectors.toList());
...@@ -417,7 +418,7 @@ public class AnalysisServiceImpl implements AnalysisService { ...@@ -417,7 +418,7 @@ public class AnalysisServiceImpl implements AnalysisService {
String eventName = event.getEventName(); String eventName = event.getEventName();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("eventName", eventName); params.put("eventName", eventName);
params.put("dataList", content); params.put("dataList", JSON.toJSONString(content));
List<SysDictItem> dictItemList = dictItemService.listByDictCode("xunfei_ppt"); List<SysDictItem> dictItemList = dictItemService.listByDictCode("xunfei_ppt");
long timestamp = System.currentTimeMillis() / 1000; long timestamp = System.currentTimeMillis() / 1000;
for (SysDictItem dictItem : dictItemList) { for (SysDictItem dictItem : dictItemList) {
...@@ -436,7 +437,7 @@ public class AnalysisServiceImpl implements AnalysisService { ...@@ -436,7 +437,7 @@ public class AnalysisServiceImpl implements AnalysisService {
} }
String outline = outlineResponse.getData().getOutline(); String outline = outlineResponse.getData().getOutline();
log.info("大纲生成完毕:{}", outline); log.info("大纲生成完毕:{}", outline);
String pptPrompt = "结合大纲及以下正文内容生成ppt。正文内容:"; String pptPrompt = "结合大纲及以下正文内容生成ppt。正文内容:" + JSON.toJSONString(params);
CreateResponse pptResponse = PPTUtil.createByOutline(appId, String.valueOf(timestamp), signature, pptPrompt, outline); CreateResponse pptResponse = PPTUtil.createByOutline(appId, String.valueOf(timestamp), signature, pptPrompt, outline);
if (pptResponse == null || !pptResponse.isFlag()) { if (pptResponse == null || !pptResponse.isFlag()) {
continue; continue;
......
...@@ -80,6 +80,7 @@ public class PPTUtil { ...@@ -80,6 +80,7 @@ public class PPTUtil {
jsonObject.put("outline", outlineJson); jsonObject.put("outline", outlineJson);
jsonObject.put("query", query); jsonObject.put("query", query);
jsonObject.put("templateId", templateId); jsonObject.put("templateId", templateId);
jsonObject.put("author", "汇报人");
RequestBody requestBody = RequestBody.create(jsonObject.toString(), MediaType.get("application/json; charset=utf-8")); RequestBody requestBody = RequestBody.create(jsonObject.toString(), MediaType.get("application/json; charset=utf-8"));
Request request = new Request.Builder() Request request = new Request.Builder()
.url(baseUrl + "/createPptByOutline") .url(baseUrl + "/createPptByOutline")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论