修改
This commit is contained in:
@@ -2,6 +2,7 @@ package com.peanut.modules.common.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.common.utils.ShiroUtils;
|
||||
import com.peanut.modules.common.entity.MedicalRecords;
|
||||
@@ -95,6 +96,7 @@ public class MedicalRecordsController {
|
||||
个人信息等如果存在要进行脱敏处理,用*代替;
|
||||
如果有标题放到一般信息中,开头必须是1.一般信息,1.一般信息这种要h1样式;
|
||||
如果有刻诊内容,应该放到体格检查中;
|
||||
每个模块之间用end分割;
|
||||
结果必须是markdown格式;
|
||||
按照以下模板整理:
|
||||
1.一般信息
|
||||
@@ -109,7 +111,7 @@ public class MedicalRecordsController {
|
||||
4.既往史
|
||||
...
|
||||
end
|
||||
5.家族史
|
||||
5.个人史与家族史
|
||||
...
|
||||
end
|
||||
6.体格检查
|
||||
@@ -159,9 +161,9 @@ public class MedicalRecordsController {
|
||||
//查询正在拆分的医案
|
||||
@RequestMapping(value = "/medicalRecordsQuerySplit")
|
||||
public R medicalRecordsQuerySplit(@RequestBody Map<String,Object> parmas) {
|
||||
List<MedicalRecords> list = medicalRecordsService.list(new LambdaQueryWrapper<MedicalRecords>()
|
||||
.eq(MedicalRecords::getId, parmas.get("id")));
|
||||
for (MedicalRecords mr : list){
|
||||
MedicalRecords mr = medicalRecordsService.getOne(new MPJLambdaWrapper<MedicalRecords>()
|
||||
.disableLogicDel()
|
||||
.eq(MedicalRecords::getId,parmas.get("id").toString()));
|
||||
MedicalRecordsToLabel toLabel = medicalRecordsToLabelService.getOne(new LambdaQueryWrapper<MedicalRecordsToLabel>()
|
||||
.eq(MedicalRecordsToLabel::getRecordId,mr.getId()));
|
||||
if (toLabel!=null){
|
||||
@@ -171,8 +173,7 @@ public class MedicalRecordsController {
|
||||
mr.setLabelTitle(label.getTitle());
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok().put("medicalRecords",list.size()>0?list.get(0):null);
|
||||
return R.ok().put("medicalRecords",mr);
|
||||
}
|
||||
|
||||
//暂存或者保存医案
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@RestController("masterMedicalRecordsController")
|
||||
@@ -44,7 +43,9 @@ public class MedicalRecordsController {
|
||||
wrapper.leftJoin(MedicalRecordsLabel.class,MedicalRecordsLabel::getId,MedicalRecordsToLabel::getLabelId);
|
||||
wrapper.selectAs(MedicalRecordsLabel::getTitle,"labelTitle");
|
||||
}
|
||||
wrapper.leftJoin(MyUserEntity.class,MyUserEntity::getId,MedicalRecords::getUserId);
|
||||
if ("0".equals(params.get("state"))){
|
||||
wrapper.eq(MedicalRecords::getUserId,"1");
|
||||
}
|
||||
wrapper.selectAll(MedicalRecords.class);
|
||||
wrapper.eq(MedicalRecords::getState,params.get("state"));
|
||||
Page<MedicalRecords> page = medicalRecordsService.page(new Page<>(
|
||||
@@ -102,6 +103,11 @@ public class MedicalRecordsController {
|
||||
if (toLabel!=null){
|
||||
toLabel.setLabelId(medicalRecords.getLabelId());
|
||||
toLabelService.updateById(toLabel);
|
||||
}else {
|
||||
toLabel = new MedicalRecordsToLabel();
|
||||
toLabel.setRecordId(medicalRecords.getId());
|
||||
toLabel.setLabelId(medicalRecords.getLabelId());
|
||||
toLabelService.save(toLabel);
|
||||
}
|
||||
medicalRecordsService.updateById(medicalRecords);
|
||||
return R.ok();
|
||||
|
||||
Reference in New Issue
Block a user