病历夹列表添加here标志
This commit is contained in:
@@ -27,6 +27,8 @@ public class AiRecordFolder implements Serializable {
|
|||||||
|
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer here;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class AiRecordFolderChat implements Serializable {
|
|||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
//病历夹id
|
//病历夹id
|
||||||
private String folderId;
|
private Integer folderId;
|
||||||
|
|
||||||
//患者姓名
|
//患者姓名
|
||||||
private String patientName;
|
private String patientName;
|
||||||
@@ -32,6 +32,10 @@ public class AiRecordFolderChat implements Serializable {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String description;
|
private String description;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String chatAssistantName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String diagnosis;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,10 @@ public class AiRecordFolderController {
|
|||||||
.eq(AiChatContent::getChatId,recordFolderChat.getChatId())
|
.eq(AiChatContent::getChatId,recordFolderChat.getChatId())
|
||||||
.orderByAsc(AiChatContent::getCreateTime));
|
.orderByAsc(AiChatContent::getCreateTime));
|
||||||
if (chatContent.size()>0){
|
if (chatContent.size()>0){
|
||||||
recordFolderChat.setDescription(chatContent.get(0).getContent());
|
String des = chatContent.get(0).getContent();
|
||||||
|
recordFolderChat.setDescription(des);
|
||||||
|
recordFolderChat.setChatAssistantName(chatContent.get(0).getChatAssistantName());
|
||||||
|
recordFolderChat.setDiagnosis(des.contains("诊断:")?des.substring(des.indexOf("诊断:")+3,des.indexOf(",病情为:")):des);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return R.ok().put("list",list);
|
return R.ok().put("list",list);
|
||||||
@@ -56,15 +59,22 @@ public class AiRecordFolderController {
|
|||||||
@RequestMapping("/getRecordFolders")
|
@RequestMapping("/getRecordFolders")
|
||||||
public R getRecordFolders(@RequestBody Map<String,Object> params){
|
public R getRecordFolders(@RequestBody Map<String,Object> params){
|
||||||
MPJLambdaWrapper<AiRecordFolder> wrapper = new MPJLambdaWrapper();
|
MPJLambdaWrapper<AiRecordFolder> wrapper = new MPJLambdaWrapper();
|
||||||
wrapper.leftJoin(AiRecordFolderChat.class,AiRecordFolderChat::getFolderId,AiRecordFolder::getId);
|
|
||||||
wrapper.selectAll(AiRecordFolder.class);
|
|
||||||
wrapper.distinct();
|
|
||||||
wrapper.eq(AiRecordFolder::getUserId, ShiroUtils.getUId());
|
wrapper.eq(AiRecordFolder::getUserId, ShiroUtils.getUId());
|
||||||
wrapper.like(StringUtils.isNotEmpty(params.get("folderName").toString()), AiRecordFolder::getFolderName,params.get("folderName"));
|
wrapper.like(StringUtils.isNotEmpty(params.get("folderName").toString()), AiRecordFolder::getFolderName,params.get("folderName"));
|
||||||
wrapper.like(StringUtils.isNotEmpty(params.get("patientName").toString()), AiRecordFolderChat::getPatientName,params.get("patientName"));
|
|
||||||
wrapper.orderByAsc(AiRecordFolder::getSort);
|
wrapper.orderByAsc(AiRecordFolder::getSort);
|
||||||
wrapper.orderByDesc(AiRecordFolderChat::getCreateTime);
|
wrapper.orderByDesc(AiRecordFolder::getCreateTime);
|
||||||
List<AiRecordFolder> list = aiRecordFolderService.list(wrapper);
|
List<AiRecordFolder> list = aiRecordFolderService.list(wrapper);
|
||||||
|
for (AiRecordFolder aiRecordFolder:list){
|
||||||
|
aiRecordFolder.setHere(0);
|
||||||
|
List<AiRecordFolderChat> chats = aiRecordFolderChatService.list(new LambdaQueryWrapper<AiRecordFolderChat>()
|
||||||
|
.eq(AiRecordFolderChat::getChatAssistantId,params.get("assistantId"))
|
||||||
|
.eq(AiRecordFolderChat::getChatId,params.get("chatId")));
|
||||||
|
for (AiRecordFolderChat folderChat:chats){
|
||||||
|
if (folderChat.getFolderId().equals(aiRecordFolder.getId())){
|
||||||
|
aiRecordFolder.setHere(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return R.ok().put("list",list);
|
return R.ok().put("list",list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +92,19 @@ public class AiRecordFolderController {
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//修改病历夹患者名称
|
||||||
|
@RequestMapping("/updateRecordFolderChat")
|
||||||
|
public R updateRecordFolderChat(@RequestBody Map<String,Object> params){
|
||||||
|
List<AiRecordFolderChat> chats = aiRecordFolderChatService.list(new LambdaQueryWrapper<AiRecordFolderChat>()
|
||||||
|
.eq(AiRecordFolderChat::getChatAssistantId,params.get("chatAssistantId"))
|
||||||
|
.eq(AiRecordFolderChat::getChatId,params.get("chatId")));
|
||||||
|
for (AiRecordFolderChat chat:chats){
|
||||||
|
chat.setPatientName(params.get("patientName").toString());
|
||||||
|
aiRecordFolderChatService.updateById(chat);
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
//修改病例夹
|
//修改病例夹
|
||||||
@RequestMapping("/updateRecordFolder")
|
@RequestMapping("/updateRecordFolder")
|
||||||
public R updateRecordFolder(@RequestBody AiRecordFolder aiRecordFolder){
|
public R updateRecordFolder(@RequestBody AiRecordFolder aiRecordFolder){
|
||||||
|
|||||||
Reference in New Issue
Block a user