Commit 128db83a by huangjy

feat,疾病报告

parent 5b1adab2
package com.makeit.dto.saas.analysis;
import com.makeit.common.entity.BaseBusEntity;
import com.makeit.module.iot.vo.analysis.EvaluateReportVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* <p>
* 睡眠质量分析模型评估结果
......@@ -21,7 +24,9 @@ public class SaasSleepEvaluateReportDTO {
private String id;
@ApiModelProperty(value = "评估结果 json字符串 {\"number:\"1\",scoreRange:\"~隔开\",\"result\":\"\",evaluate:\"\"\"}")
private String resultContent;
private List<EvaluateReportVO> resultContent;
}
package com.makeit.service.saas.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.dto.saas.analysis.SaasSleepEvaluateReportDTO;
import com.makeit.entity.saas.analysis.SaasDiseaseReport;
......@@ -20,14 +21,16 @@ public class SaasDiseaseReportServiceImpl extends ServiceImpl<SaasDiseaseReportM
@Override
public void add(SaasSleepEvaluateReportDTO dto) {
SaasDiseaseReport entity = new SaasDiseaseReport();
BeanUtils.copyProperties(dto, entity);
String result = JSON.toJSONString(dto.getResultContent());
entity.setResultContent(result);
save(entity);
}
@Override
public void edit(SaasSleepEvaluateReportDTO dto) {
SaasDiseaseReport entity = getById(dto.getId());
BeanUtils.copyProperties(dto, entity);
String result = JSON.toJSONString(dto.getResultContent());
entity.setResultContent(result);
saveOrUpdate(entity);
}
......
......@@ -34,14 +34,16 @@ public class SaasSleepEvaluateReportServiceImpl extends ServiceImpl<SaasSleepEva
@Override
public void add(SaasSleepEvaluateReportDTO dto) {
SaasSleepEvaluateReport entity = new SaasSleepEvaluateReport();
BeanUtils.copyProperties(dto, entity);
String result = JSON.toJSONString(dto.getResultContent());
entity.setResultContent(result);
save(entity);
}
@Override
public void edit(SaasSleepEvaluateReportDTO dto) {
SaasSleepEvaluateReport entity = getById(dto.getId());
BeanUtils.copyProperties(dto, entity);
String result = JSON.toJSONString(dto.getResultContent());
entity.setResultContent(result);
saveOrUpdate(entity);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment