Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
128db83a
authored
Sep 18, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat,疾病报告
parent
5b1adab2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
server-service/src/main/java/com/makeit/dto/saas/analysis/SaasSleepEvaluateReportDTO.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasDiseaseReportServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasSleepEvaluateReportServiceImpl.java
server-service/src/main/java/com/makeit/dto/saas/analysis/SaasSleepEvaluateReportDTO.java
View file @
128db83a
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
;
}
server-service/src/main/java/com/makeit/service/saas/impl/SaasDiseaseReportServiceImpl.java
View file @
128db83a
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
);
}
...
...
server-service/src/main/java/com/makeit/service/saas/impl/SaasSleepEvaluateReportServiceImpl.java
View file @
128db83a
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment