Commit fbb06ab5 by huangjy

feat,模型实体类定义

parent d1825ad4
...@@ -4,6 +4,7 @@ package com.makeit.controller.analysis; ...@@ -4,6 +4,7 @@ package com.makeit.controller.analysis;
import com.makeit.common.dto.BaseIdDTO; import com.makeit.common.dto.BaseIdDTO;
import com.makeit.common.response.ApiResponseEntity; import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils; import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.saas.analysis.SaasDiseaseEvaluateReportDTO;
import com.makeit.dto.saas.analysis.SaasSleepEvaluateReportDTO; import com.makeit.dto.saas.analysis.SaasSleepEvaluateReportDTO;
import com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport; import com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport;
import com.makeit.entity.saas.analysis.SaasSleepEvaluateReport; import com.makeit.entity.saas.analysis.SaasSleepEvaluateReport;
...@@ -47,7 +48,7 @@ public class SaasDiseaseEvaluateReportController { ...@@ -47,7 +48,7 @@ public class SaasDiseaseEvaluateReportController {
@Action(module = "报告管理-呼吸心率慢性病模型评估结果", name = "新增", code = "saas:diseaseEvaluateReport:add") @Action(module = "报告管理-呼吸心率慢性病模型评估结果", name = "新增", code = "saas:diseaseEvaluateReport:add")
@ApiOperation("新增") @ApiOperation("新增")
@PostMapping("add") @PostMapping("add")
public ApiResponseEntity<Void> add(@Validated @RequestBody SaasSleepEvaluateReportDTO dto) { public ApiResponseEntity<Void> add(@Validated @RequestBody SaasDiseaseEvaluateReportDTO dto) {
saasDiseaseEvaluateReportService.add(dto); saasDiseaseEvaluateReportService.add(dto);
return ApiResponseUtils.success(); return ApiResponseUtils.success();
} }
...@@ -55,7 +56,7 @@ public class SaasDiseaseEvaluateReportController { ...@@ -55,7 +56,7 @@ public class SaasDiseaseEvaluateReportController {
@Action(module = "报告管理-呼吸心率慢性病模型评估结果", name = "编辑", code = "saas:diseaseEvaluateReport:edit") @Action(module = "报告管理-呼吸心率慢性病模型评估结果", name = "编辑", code = "saas:diseaseEvaluateReport:edit")
@ApiOperation("编辑") @ApiOperation("编辑")
@PostMapping("edit") @PostMapping("edit")
public ApiResponseEntity<Void> edit(@Validated @RequestBody SaasSleepEvaluateReportDTO dto) { public ApiResponseEntity<Void> edit(@Validated @RequestBody SaasDiseaseEvaluateReportDTO dto) {
saasDiseaseEvaluateReportService.edit(dto); saasDiseaseEvaluateReportService.edit(dto);
return ApiResponseUtils.success(); return ApiResponseUtils.success();
} }
......
package com.makeit.dto.saas.analysis;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
* 呼吸心率慢性病模型评估结果
* </p>
*
* @author eugene young
* @since 2023-09-05
*/
@Data
@ApiModel(value = "SaasDiseaseEvaluateReport对象", description = "呼吸心率慢性病模型评估结果")
public class SaasDiseaseEvaluateReportDTO {
private String id;
@ApiModelProperty(value = "评估内容 json字符串 {\"number:\"1\",condition:\"{}\",\"score\":\"\",evaluate:\"\"\"}")
private String resultContent;
}
package com.makeit.service.saas; package com.makeit.service.saas;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.dto.saas.analysis.SaasSleepEvaluateReportDTO; import com.makeit.dto.saas.analysis.SaasDiseaseEvaluateReportDTO;
import com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport; import com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport;
/** /**
...@@ -16,7 +16,7 @@ public interface SaasDiseaseEvaluateReportService extends IService<SaasDiseaseEv ...@@ -16,7 +16,7 @@ public interface SaasDiseaseEvaluateReportService extends IService<SaasDiseaseEv
SaasDiseaseEvaluateReport view(String id); SaasDiseaseEvaluateReport view(String id);
void add(SaasSleepEvaluateReportDTO dto); void add(SaasDiseaseEvaluateReportDTO dto);
void edit(SaasSleepEvaluateReportDTO dto); void edit(SaasDiseaseEvaluateReportDTO dto);
} }
package com.makeit.service.saas.impl; package com.makeit.service.saas.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.dto.saas.analysis.SaasSleepEvaluateReportDTO; import com.makeit.dto.saas.analysis.SaasDiseaseEvaluateReportDTO;
import com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport; import com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport;
import com.makeit.mapper.saas.analysis.SaasDiseaseEvaluateReportMapper; import com.makeit.mapper.saas.analysis.SaasDiseaseEvaluateReportMapper;
import com.makeit.service.saas.SaasDiseaseEvaluateReportService; import com.makeit.service.saas.SaasDiseaseEvaluateReportService;
...@@ -26,14 +26,14 @@ public class SaasDiseaseEvaluateReportServiceImpl extends ServiceImpl<SaasDiseas ...@@ -26,14 +26,14 @@ public class SaasDiseaseEvaluateReportServiceImpl extends ServiceImpl<SaasDiseas
} }
@Override @Override
public void add(SaasSleepEvaluateReportDTO dto) { public void add(SaasDiseaseEvaluateReportDTO dto) {
SaasDiseaseEvaluateReport entity = new SaasDiseaseEvaluateReport(); SaasDiseaseEvaluateReport entity = new SaasDiseaseEvaluateReport();
BeanUtils.copyProperties(dto,entity); BeanUtils.copyProperties(dto,entity);
save(entity); save(entity);
} }
@Override @Override
public void edit(SaasSleepEvaluateReportDTO dto) { public void edit(SaasDiseaseEvaluateReportDTO dto) {
SaasDiseaseEvaluateReport entity = getById(dto.getId()); SaasDiseaseEvaluateReport entity = getById(dto.getId());
BeanUtils.copyProperties(dto,entity); BeanUtils.copyProperties(dto,entity);
saveOrUpdate(entity); 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