数据库
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
78f01d39bb
commit
04c9d240b7
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.deviceuser;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.deviceuser.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.deviceuser.DeviceuserDO;
|
||||
import cn.iocoder.yudao.module.system.service.deviceuser.DeviceuserService;
|
||||
|
||||
@Tag(name = "管理后台 - 设备人员关联")
|
||||
@RestController
|
||||
@RequestMapping("/system/deviceuser")
|
||||
@Validated
|
||||
public class DeviceuserController {
|
||||
|
||||
@Resource
|
||||
private DeviceuserService deviceuserService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备人员关联")
|
||||
@PreAuthorize("@ss.hasPermission('system:deviceuser:create')")
|
||||
public CommonResult<Integer> createDeviceuser(@Valid @RequestBody DeviceuserSaveReqVO createReqVO) {
|
||||
return success(deviceuserService.createDeviceuser(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新设备人员关联")
|
||||
@PreAuthorize("@ss.hasPermission('system:deviceuser:update')")
|
||||
public CommonResult<Boolean> updateDeviceuser(@Valid @RequestBody DeviceuserSaveReqVO updateReqVO) {
|
||||
deviceuserService.updateDeviceuser(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除设备人员关联")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('system:deviceuser:delete')")
|
||||
public CommonResult<Boolean> deleteDeviceuser(@RequestParam("id") Integer id) {
|
||||
deviceuserService.deleteDeviceuser(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得设备人员关联")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:deviceuser:query')")
|
||||
public CommonResult<DeviceuserRespVO> getDeviceuser(@RequestParam("id") Integer id) {
|
||||
DeviceuserDO deviceuser = deviceuserService.getDeviceuser(id);
|
||||
return success(BeanUtils.toBean(deviceuser, DeviceuserRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得设备人员关联分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:deviceuser:query')")
|
||||
public CommonResult<PageResult<DeviceuserRespVO>> getDeviceuserPage(@Valid DeviceuserPageReqVO pageReqVO) {
|
||||
PageResult<DeviceuserDO> pageResult = deviceuserService.getDeviceuserPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DeviceuserRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出设备人员关联 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('system:deviceuser:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportDeviceuserExcel(@Valid DeviceuserPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DeviceuserDO> list = deviceuserService.getDeviceuserPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "设备人员关联.xls", "数据", DeviceuserRespVO.class,
|
||||
BeanUtils.toBean(list, DeviceuserRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.deviceuser.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 设备人员关联分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DeviceuserPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "设备ID", example = "16280")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "用户ID", example = "4420")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
@Schema(description = "用户姓名", example = "张三")
|
||||
private String username;
|
||||
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.deviceuser.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 设备人员关联 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class DeviceuserRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4384")
|
||||
@ExcelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16280")
|
||||
@ExcelProperty("设备ID")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4420")
|
||||
@ExcelProperty("用户ID")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
@ExcelProperty("更新人")
|
||||
private String updateby;
|
||||
|
||||
@Schema(description = "用户姓名", example = "张三")
|
||||
@ExcelProperty("用户姓名")
|
||||
private String username;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.deviceuser.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 设备人员关联新增/修改 Request VO")
|
||||
@Data
|
||||
public class DeviceuserSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4384")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16280")
|
||||
@NotNull(message = "设备ID不能为空")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4420")
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
@Schema(description = "用户姓名", example = "张三")
|
||||
private String username;
|
||||
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.doctornotice;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.doctornotice.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.doctornotice.DoctornoticeDO;
|
||||
import cn.iocoder.yudao.module.system.service.doctornotice.DoctornoticeService;
|
||||
|
||||
@Tag(name = "管理后台 - 医生通知")
|
||||
@RestController
|
||||
@RequestMapping("/system/doctornotice")
|
||||
@Validated
|
||||
public class DoctornoticeController {
|
||||
|
||||
@Resource
|
||||
private DoctornoticeService doctornoticeService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建医生通知")
|
||||
@PreAuthorize("@ss.hasPermission('system:doctornotice:create')")
|
||||
public CommonResult<Integer> createDoctornotice(@Valid @RequestBody DoctornoticeSaveReqVO createReqVO) {
|
||||
return success(doctornoticeService.createDoctornotice(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新医生通知")
|
||||
@PreAuthorize("@ss.hasPermission('system:doctornotice:update')")
|
||||
public CommonResult<Boolean> updateDoctornotice(@Valid @RequestBody DoctornoticeSaveReqVO updateReqVO) {
|
||||
doctornoticeService.updateDoctornotice(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除医生通知")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('system:doctornotice:delete')")
|
||||
public CommonResult<Boolean> deleteDoctornotice(@RequestParam("id") Integer id) {
|
||||
doctornoticeService.deleteDoctornotice(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得医生通知")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:doctornotice:query')")
|
||||
public CommonResult<DoctornoticeRespVO> getDoctornotice(@RequestParam("id") Integer id) {
|
||||
DoctornoticeDO doctornotice = doctornoticeService.getDoctornotice(id);
|
||||
return success(BeanUtils.toBean(doctornotice, DoctornoticeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得医生通知分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:doctornotice:query')")
|
||||
public CommonResult<PageResult<DoctornoticeRespVO>> getDoctornoticePage(@Valid DoctornoticePageReqVO pageReqVO) {
|
||||
PageResult<DoctornoticeDO> pageResult = doctornoticeService.getDoctornoticePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DoctornoticeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出医生通知 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('system:doctornotice:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportDoctornoticeExcel(@Valid DoctornoticePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DoctornoticeDO> list = doctornoticeService.getDoctornoticePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "医生通知.xls", "数据", DoctornoticeRespVO.class,
|
||||
BeanUtils.toBean(list, DoctornoticeRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.doctornotice.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 医生通知分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DoctornoticePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "设备ID", example = "29419")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "接收通知的用户ID", example = "2690")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "发送通知的医生ID", example = "31548")
|
||||
private Integer doctorid;
|
||||
|
||||
@Schema(description = "发送时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] datatime;
|
||||
|
||||
@Schema(description = "通知类型(1:异常提醒,2:建议提醒,3:复查提醒)", example = "2")
|
||||
private Integer noticetype;
|
||||
|
||||
@Schema(description = "通知标题")
|
||||
private String noticetitle;
|
||||
|
||||
@Schema(description = "通知内容")
|
||||
private String noticecontent;
|
||||
|
||||
@Schema(description = "通知级别(1:普通,2:重要,3:紧急)")
|
||||
private Integer noticelevel;
|
||||
|
||||
@Schema(description = "读取状态(0:未读,1:已读)", example = "1")
|
||||
private Integer readstatus;
|
||||
|
||||
@Schema(description = "读取时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] readtime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
@Schema(description = "是否删除(0:未删除,1:已删除)")
|
||||
private Integer isdeleted;
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.doctornotice.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 医生通知 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class DoctornoticeRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29463")
|
||||
@ExcelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29419")
|
||||
@ExcelProperty("设备ID")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "接收通知的用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2690")
|
||||
@ExcelProperty("接收通知的用户ID")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "发送通知的医生ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31548")
|
||||
@ExcelProperty("发送通知的医生ID")
|
||||
private Integer doctorid;
|
||||
|
||||
@Schema(description = "发送时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("发送时间")
|
||||
private LocalDateTime datatime;
|
||||
|
||||
@Schema(description = "通知类型(1:异常提醒,2:建议提醒,3:复查提醒)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("通知类型(1:异常提醒,2:建议提醒,3:复查提醒)")
|
||||
private Integer noticetype;
|
||||
|
||||
@Schema(description = "通知标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("通知标题")
|
||||
private String noticetitle;
|
||||
|
||||
@Schema(description = "通知内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("通知内容")
|
||||
private String noticecontent;
|
||||
|
||||
@Schema(description = "通知级别(1:普通,2:重要,3:紧急)")
|
||||
@ExcelProperty("通知级别(1:普通,2:重要,3:紧急)")
|
||||
private Integer noticelevel;
|
||||
|
||||
@Schema(description = "读取状态(0:未读,1:已读)", example = "1")
|
||||
@ExcelProperty("读取状态(0:未读,1:已读)")
|
||||
private Integer readstatus;
|
||||
|
||||
@Schema(description = "读取时间")
|
||||
@ExcelProperty("读取时间")
|
||||
private LocalDateTime readtime;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
@ExcelProperty("更新人")
|
||||
private String updateby;
|
||||
|
||||
@Schema(description = "是否删除(0:未删除,1:已删除)")
|
||||
@ExcelProperty("是否删除(0:未删除,1:已删除)")
|
||||
private Integer isdeleted;
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.doctornotice.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 医生通知新增/修改 Request VO")
|
||||
@Data
|
||||
public class DoctornoticeSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29463")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29419")
|
||||
@NotNull(message = "设备ID不能为空")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "接收通知的用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2690")
|
||||
@NotNull(message = "接收通知的用户ID不能为空")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "发送通知的医生ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31548")
|
||||
@NotNull(message = "发送通知的医生ID不能为空")
|
||||
private Integer doctorid;
|
||||
|
||||
@Schema(description = "发送时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "发送时间不能为空")
|
||||
private LocalDateTime datatime;
|
||||
|
||||
@Schema(description = "通知类型(1:异常提醒,2:建议提醒,3:复查提醒)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "通知类型(1:异常提醒,2:建议提醒,3:复查提醒)不能为空")
|
||||
private Integer noticetype;
|
||||
|
||||
@Schema(description = "通知标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "通知标题不能为空")
|
||||
private String noticetitle;
|
||||
|
||||
@Schema(description = "通知内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "通知内容不能为空")
|
||||
private String noticecontent;
|
||||
|
||||
@Schema(description = "通知级别(1:普通,2:重要,3:紧急)")
|
||||
private Integer noticelevel;
|
||||
|
||||
@Schema(description = "读取状态(0:未读,1:已读)", example = "1")
|
||||
private Integer readstatus;
|
||||
|
||||
@Schema(description = "读取时间")
|
||||
private LocalDateTime readtime;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "创建时间不能为空")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "更新时间不能为空")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
@Schema(description = "是否删除(0:未删除,1:已删除)")
|
||||
private Integer isdeleted;
|
||||
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.ecgdata;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.ecgdata.EcgdataDO;
|
||||
import cn.iocoder.yudao.module.system.service.ecgdata.EcgdataService;
|
||||
|
||||
@Tag(name = "管理后台 - 心电数据采集")
|
||||
@RestController
|
||||
@RequestMapping("/system/ecgdata")
|
||||
@Validated
|
||||
public class EcgdataController {
|
||||
|
||||
@Resource
|
||||
private EcgdataService ecgdataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心电数据采集")
|
||||
@PreAuthorize("@ss.hasPermission('system:ecgdata:create')")
|
||||
public CommonResult<Integer> createEcgdata(@Valid @RequestBody EcgdataSaveReqVO createReqVO) {
|
||||
return success(ecgdataService.createEcgdata(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心电数据采集")
|
||||
@PreAuthorize("@ss.hasPermission('system:ecgdata:update')")
|
||||
public CommonResult<Boolean> updateEcgdata(@Valid @RequestBody EcgdataSaveReqVO updateReqVO) {
|
||||
ecgdataService.updateEcgdata(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心电数据采集")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('system:ecgdata:delete')")
|
||||
public CommonResult<Boolean> deleteEcgdata(@RequestParam("id") Integer id) {
|
||||
ecgdataService.deleteEcgdata(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心电数据采集")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:ecgdata:query')")
|
||||
public CommonResult<EcgdataRespVO> getEcgdata(@RequestParam("id") Integer id) {
|
||||
EcgdataDO ecgdata = ecgdataService.getEcgdata(id);
|
||||
return success(BeanUtils.toBean(ecgdata, EcgdataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心电数据采集分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:ecgdata:query')")
|
||||
public CommonResult<PageResult<EcgdataRespVO>> getEcgdataPage(@Valid EcgdataPageReqVO pageReqVO) {
|
||||
PageResult<EcgdataDO> pageResult = ecgdataService.getEcgdataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EcgdataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心电数据采集 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('system:ecgdata:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportEcgdataExcel(@Valid EcgdataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<EcgdataDO> list = ecgdataService.getEcgdataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "心电数据采集.xls", "数据", EcgdataRespVO.class,
|
||||
BeanUtils.toBean(list, EcgdataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心电数据采集分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class EcgdataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "设备ID", example = "2207")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "设备名称", example = "芋艿")
|
||||
private String devicename;
|
||||
|
||||
@Schema(description = "人员ID", example = "16008")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "采集时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] collecttime;
|
||||
|
||||
@Schema(description = "设备类型", example = "2")
|
||||
private String devicetype;
|
||||
|
||||
@Schema(description = "心率(次/分)")
|
||||
private Integer heartrate;
|
||||
|
||||
@Schema(description = "心律类型(窦性心律,房颤等)")
|
||||
private String rhythm;
|
||||
|
||||
@Schema(description = "PR间期(ms)")
|
||||
private Integer printerval;
|
||||
|
||||
@Schema(description = "QRS时限(ms)")
|
||||
private Integer qrsduration;
|
||||
|
||||
@Schema(description = "QT间期(ms)")
|
||||
private Integer qtinterval;
|
||||
|
||||
@Schema(description = "QTc间期(ms)")
|
||||
private Integer qtcinterval;
|
||||
|
||||
@Schema(description = "P电轴(度)")
|
||||
private Integer paxis;
|
||||
|
||||
@Schema(description = "QRS电轴(度)")
|
||||
private Integer qrsaxis;
|
||||
|
||||
@Schema(description = "T电轴(度)")
|
||||
private Integer taxis;
|
||||
|
||||
@Schema(description = "RV5电压(mV)")
|
||||
private BigDecimal rv5;
|
||||
|
||||
@Schema(description = "SV1电压(mV)")
|
||||
private BigDecimal sv1;
|
||||
|
||||
@Schema(description = "RV5+SV1电压(mV)")
|
||||
private BigDecimal rv5sv1;
|
||||
|
||||
@Schema(description = "ST段改变")
|
||||
private String stsegment;
|
||||
|
||||
@Schema(description = "T波改变")
|
||||
private String twave;
|
||||
|
||||
@Schema(description = "心电图诊断")
|
||||
private String diagnosis;
|
||||
|
||||
@Schema(description = "心电图图片地址", example = "https://www.iocoder.cn")
|
||||
private String ecgimageurl;
|
||||
|
||||
@Schema(description = "心电图数据文件地址", example = "https://www.iocoder.cn")
|
||||
private String ecgdataurl;
|
||||
|
||||
@Schema(description = "机构ID", example = "16889")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", example = "赵六")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "数据状态(0:异常,1:正常)", example = "1")
|
||||
private Integer datastatus;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 心电数据采集 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EcgdataRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6839")
|
||||
@ExcelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2207")
|
||||
@ExcelProperty("设备ID")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("设备名称")
|
||||
private String devicename;
|
||||
|
||||
@Schema(description = "人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16008")
|
||||
@ExcelProperty("人员ID")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "采集时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("采集时间")
|
||||
private LocalDateTime collecttime;
|
||||
|
||||
@Schema(description = "设备类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("设备类型")
|
||||
private String devicetype;
|
||||
|
||||
@Schema(description = "心率(次/分)")
|
||||
@ExcelProperty("心率(次/分)")
|
||||
private Integer heartrate;
|
||||
|
||||
@Schema(description = "心律类型(窦性心律,房颤等)")
|
||||
@ExcelProperty("心律类型(窦性心律,房颤等)")
|
||||
private String rhythm;
|
||||
|
||||
@Schema(description = "PR间期(ms)")
|
||||
@ExcelProperty("PR间期(ms)")
|
||||
private Integer printerval;
|
||||
|
||||
@Schema(description = "QRS时限(ms)")
|
||||
@ExcelProperty("QRS时限(ms)")
|
||||
private Integer qrsduration;
|
||||
|
||||
@Schema(description = "QT间期(ms)")
|
||||
@ExcelProperty("QT间期(ms)")
|
||||
private Integer qtinterval;
|
||||
|
||||
@Schema(description = "QTc间期(ms)")
|
||||
@ExcelProperty("QTc间期(ms)")
|
||||
private Integer qtcinterval;
|
||||
|
||||
@Schema(description = "P电轴(度)")
|
||||
@ExcelProperty("P电轴(度)")
|
||||
private Integer paxis;
|
||||
|
||||
@Schema(description = "QRS电轴(度)")
|
||||
@ExcelProperty("QRS电轴(度)")
|
||||
private Integer qrsaxis;
|
||||
|
||||
@Schema(description = "T电轴(度)")
|
||||
@ExcelProperty("T电轴(度)")
|
||||
private Integer taxis;
|
||||
|
||||
@Schema(description = "RV5电压(mV)")
|
||||
@ExcelProperty("RV5电压(mV)")
|
||||
private BigDecimal rv5;
|
||||
|
||||
@Schema(description = "SV1电压(mV)")
|
||||
@ExcelProperty("SV1电压(mV)")
|
||||
private BigDecimal sv1;
|
||||
|
||||
@Schema(description = "RV5+SV1电压(mV)")
|
||||
@ExcelProperty("RV5+SV1电压(mV)")
|
||||
private BigDecimal rv5sv1;
|
||||
|
||||
@Schema(description = "ST段改变")
|
||||
@ExcelProperty("ST段改变")
|
||||
private String stsegment;
|
||||
|
||||
@Schema(description = "T波改变")
|
||||
@ExcelProperty("T波改变")
|
||||
private String twave;
|
||||
|
||||
@Schema(description = "心电图诊断")
|
||||
@ExcelProperty("心电图诊断")
|
||||
private String diagnosis;
|
||||
|
||||
@Schema(description = "心电图图片地址", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("心电图图片地址")
|
||||
private String ecgimageurl;
|
||||
|
||||
@Schema(description = "心电图数据文件地址", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("心电图数据文件地址")
|
||||
private String ecgdataurl;
|
||||
|
||||
@Schema(description = "机构ID", example = "16889")
|
||||
@ExcelProperty("机构ID")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", example = "赵六")
|
||||
@ExcelProperty("机构名称")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "数据状态(0:异常,1:正常)", example = "1")
|
||||
@ExcelProperty("数据状态(0:异常,1:正常)")
|
||||
private Integer datastatus;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 心电数据采集新增/修改 Request VO")
|
||||
@Data
|
||||
public class EcgdataSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6839")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2207")
|
||||
@NotNull(message = "设备ID不能为空")
|
||||
private Integer deviceid;
|
||||
|
||||
@Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "设备名称不能为空")
|
||||
private String devicename;
|
||||
|
||||
@Schema(description = "人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16008")
|
||||
@NotNull(message = "人员ID不能为空")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "采集时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "采集时间不能为空")
|
||||
private LocalDateTime collecttime;
|
||||
|
||||
@Schema(description = "设备类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "设备类型不能为空")
|
||||
private String devicetype;
|
||||
|
||||
@Schema(description = "心率(次/分)")
|
||||
private Integer heartrate;
|
||||
|
||||
@Schema(description = "心律类型(窦性心律,房颤等)")
|
||||
private String rhythm;
|
||||
|
||||
@Schema(description = "PR间期(ms)")
|
||||
private Integer printerval;
|
||||
|
||||
@Schema(description = "QRS时限(ms)")
|
||||
private Integer qrsduration;
|
||||
|
||||
@Schema(description = "QT间期(ms)")
|
||||
private Integer qtinterval;
|
||||
|
||||
@Schema(description = "QTc间期(ms)")
|
||||
private Integer qtcinterval;
|
||||
|
||||
@Schema(description = "P电轴(度)")
|
||||
private Integer paxis;
|
||||
|
||||
@Schema(description = "QRS电轴(度)")
|
||||
private Integer qrsaxis;
|
||||
|
||||
@Schema(description = "T电轴(度)")
|
||||
private Integer taxis;
|
||||
|
||||
@Schema(description = "RV5电压(mV)")
|
||||
private BigDecimal rv5;
|
||||
|
||||
@Schema(description = "SV1电压(mV)")
|
||||
private BigDecimal sv1;
|
||||
|
||||
@Schema(description = "RV5+SV1电压(mV)")
|
||||
private BigDecimal rv5sv1;
|
||||
|
||||
@Schema(description = "ST段改变")
|
||||
private String stsegment;
|
||||
|
||||
@Schema(description = "T波改变")
|
||||
private String twave;
|
||||
|
||||
@Schema(description = "心电图诊断")
|
||||
private String diagnosis;
|
||||
|
||||
@Schema(description = "心电图图片地址", example = "https://www.iocoder.cn")
|
||||
private String ecgimageurl;
|
||||
|
||||
@Schema(description = "心电图数据文件地址", example = "https://www.iocoder.cn")
|
||||
private String ecgdataurl;
|
||||
|
||||
@Schema(description = "机构ID", example = "16889")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", example = "赵六")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "数据状态(0:异常,1:正常)", example = "1")
|
||||
private Integer datastatus;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.deviceuser;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 设备人员关联 DO
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@TableName("tb_deviceuser")
|
||||
@KeySequence("tb_deviceuser_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DeviceuserDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Integer deviceid;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Integer userid;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createtime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updatetime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createby;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateby;
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.doctornotice;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 医生通知 DO
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@TableName("tb_doctornotice")
|
||||
@KeySequence("tb_doctornotice_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DoctornoticeDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Integer deviceid;
|
||||
/**
|
||||
* 接收通知的用户ID
|
||||
*/
|
||||
private Integer userid;
|
||||
/**
|
||||
* 发送通知的医生ID
|
||||
*/
|
||||
private Integer doctorid;
|
||||
/**
|
||||
* 发送时间
|
||||
*/
|
||||
private LocalDateTime datatime;
|
||||
/**
|
||||
* 通知类型(1:异常提醒,2:建议提醒,3:复查提醒)
|
||||
*/
|
||||
private Integer noticetype;
|
||||
/**
|
||||
* 通知标题
|
||||
*/
|
||||
private String noticetitle;
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
private String noticecontent;
|
||||
/**
|
||||
* 通知级别(1:普通,2:重要,3:紧急)
|
||||
*/
|
||||
private Integer noticelevel;
|
||||
/**
|
||||
* 读取状态(0:未读,1:已读)
|
||||
*/
|
||||
private Integer readstatus;
|
||||
/**
|
||||
* 读取时间
|
||||
*/
|
||||
private LocalDateTime readtime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createtime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updatetime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createby;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateby;
|
||||
/**
|
||||
* 是否删除(0:未删除,1:已删除)
|
||||
*/
|
||||
private Integer isdeleted;
|
||||
|
||||
}
|
||||
@ -0,0 +1,137 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.ecgdata;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 心电数据采集 DO
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@TableName("tb_ecgdata")
|
||||
@KeySequence("tb_ecgdata_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EcgdataDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Integer deviceid;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String devicename;
|
||||
/**
|
||||
* 人员ID
|
||||
*/
|
||||
private Integer userid;
|
||||
/**
|
||||
* 采集时间
|
||||
*/
|
||||
private LocalDateTime collecttime;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String devicetype;
|
||||
/**
|
||||
* 心率(次/分)
|
||||
*/
|
||||
private Integer heartrate;
|
||||
/**
|
||||
* 心律类型(窦性心律,房颤等)
|
||||
*/
|
||||
private String rhythm;
|
||||
/**
|
||||
* PR间期(ms)
|
||||
*/
|
||||
private Integer printerval;
|
||||
/**
|
||||
* QRS时限(ms)
|
||||
*/
|
||||
private Integer qrsduration;
|
||||
/**
|
||||
* QT间期(ms)
|
||||
*/
|
||||
private Integer qtinterval;
|
||||
/**
|
||||
* QTc间期(ms)
|
||||
*/
|
||||
private Integer qtcinterval;
|
||||
/**
|
||||
* P电轴(度)
|
||||
*/
|
||||
private Integer paxis;
|
||||
/**
|
||||
* QRS电轴(度)
|
||||
*/
|
||||
private Integer qrsaxis;
|
||||
/**
|
||||
* T电轴(度)
|
||||
*/
|
||||
private Integer taxis;
|
||||
/**
|
||||
* RV5电压(mV)
|
||||
*/
|
||||
private BigDecimal rv5;
|
||||
/**
|
||||
* SV1电压(mV)
|
||||
*/
|
||||
private BigDecimal sv1;
|
||||
/**
|
||||
* RV5+SV1电压(mV)
|
||||
*/
|
||||
private BigDecimal rv5sv1;
|
||||
/**
|
||||
* ST段改变
|
||||
*/
|
||||
private String stsegment;
|
||||
/**
|
||||
* T波改变
|
||||
*/
|
||||
private String twave;
|
||||
/**
|
||||
* 心电图诊断
|
||||
*/
|
||||
private String diagnosis;
|
||||
/**
|
||||
* 心电图图片地址
|
||||
*/
|
||||
private String ecgimageurl;
|
||||
/**
|
||||
* 心电图数据文件地址
|
||||
*/
|
||||
private String ecgdataurl;
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
private Integer orgid;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String orgname;
|
||||
/**
|
||||
* 数据状态(0:异常,1:正常)
|
||||
*/
|
||||
private Integer datastatus;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.deviceuser;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.deviceuser.DeviceuserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.deviceuser.vo.*;
|
||||
|
||||
/**
|
||||
* 设备人员关联 Mapper
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceuserMapper extends BaseMapperX<DeviceuserDO> {
|
||||
|
||||
default PageResult<DeviceuserDO> selectPage(DeviceuserPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<DeviceuserDO>()
|
||||
.eqIfPresent(DeviceuserDO::getDeviceid, reqVO.getDeviceid())
|
||||
.eqIfPresent(DeviceuserDO::getUserid, reqVO.getUserid())
|
||||
.betweenIfPresent(DeviceuserDO::getCreatetime, reqVO.getCreatetime())
|
||||
.betweenIfPresent(DeviceuserDO::getUpdatetime, reqVO.getUpdatetime())
|
||||
.eqIfPresent(DeviceuserDO::getCreateby, reqVO.getCreateby())
|
||||
.eqIfPresent(DeviceuserDO::getUpdateby, reqVO.getUpdateby())
|
||||
.likeIfPresent(DeviceuserDO::getUsername, reqVO.getUsername())
|
||||
.orderByDesc(DeviceuserDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.doctornotice;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.doctornotice.DoctornoticeDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.doctornotice.vo.*;
|
||||
|
||||
/**
|
||||
* 医生通知 Mapper
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Mapper
|
||||
public interface DoctornoticeMapper extends BaseMapperX<DoctornoticeDO> {
|
||||
|
||||
default PageResult<DoctornoticeDO> selectPage(DoctornoticePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<DoctornoticeDO>()
|
||||
.eqIfPresent(DoctornoticeDO::getDeviceid, reqVO.getDeviceid())
|
||||
.eqIfPresent(DoctornoticeDO::getUserid, reqVO.getUserid())
|
||||
.eqIfPresent(DoctornoticeDO::getDoctorid, reqVO.getDoctorid())
|
||||
.betweenIfPresent(DoctornoticeDO::getDatatime, reqVO.getDatatime())
|
||||
.eqIfPresent(DoctornoticeDO::getNoticetype, reqVO.getNoticetype())
|
||||
.eqIfPresent(DoctornoticeDO::getNoticetitle, reqVO.getNoticetitle())
|
||||
.eqIfPresent(DoctornoticeDO::getNoticecontent, reqVO.getNoticecontent())
|
||||
.eqIfPresent(DoctornoticeDO::getNoticelevel, reqVO.getNoticelevel())
|
||||
.eqIfPresent(DoctornoticeDO::getReadstatus, reqVO.getReadstatus())
|
||||
.betweenIfPresent(DoctornoticeDO::getReadtime, reqVO.getReadtime())
|
||||
.betweenIfPresent(DoctornoticeDO::getCreatetime, reqVO.getCreatetime())
|
||||
.betweenIfPresent(DoctornoticeDO::getUpdatetime, reqVO.getUpdatetime())
|
||||
.eqIfPresent(DoctornoticeDO::getCreateby, reqVO.getCreateby())
|
||||
.eqIfPresent(DoctornoticeDO::getUpdateby, reqVO.getUpdateby())
|
||||
.eqIfPresent(DoctornoticeDO::getIsdeleted, reqVO.getIsdeleted())
|
||||
.orderByDesc(DoctornoticeDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.ecgdata;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.ecgdata.EcgdataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo.*;
|
||||
|
||||
/**
|
||||
* 心电数据采集 Mapper
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Mapper
|
||||
public interface EcgdataMapper extends BaseMapperX<EcgdataDO> {
|
||||
|
||||
default PageResult<EcgdataDO> selectPage(EcgdataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<EcgdataDO>()
|
||||
.eqIfPresent(EcgdataDO::getDeviceid, reqVO.getDeviceid())
|
||||
.likeIfPresent(EcgdataDO::getDevicename, reqVO.getDevicename())
|
||||
.eqIfPresent(EcgdataDO::getUserid, reqVO.getUserid())
|
||||
.betweenIfPresent(EcgdataDO::getCollecttime, reqVO.getCollecttime())
|
||||
.eqIfPresent(EcgdataDO::getDevicetype, reqVO.getDevicetype())
|
||||
.eqIfPresent(EcgdataDO::getHeartrate, reqVO.getHeartrate())
|
||||
.eqIfPresent(EcgdataDO::getRhythm, reqVO.getRhythm())
|
||||
.eqIfPresent(EcgdataDO::getPrinterval, reqVO.getPrinterval())
|
||||
.eqIfPresent(EcgdataDO::getQrsduration, reqVO.getQrsduration())
|
||||
.eqIfPresent(EcgdataDO::getQtinterval, reqVO.getQtinterval())
|
||||
.eqIfPresent(EcgdataDO::getQtcinterval, reqVO.getQtcinterval())
|
||||
.eqIfPresent(EcgdataDO::getPaxis, reqVO.getPaxis())
|
||||
.eqIfPresent(EcgdataDO::getQrsaxis, reqVO.getQrsaxis())
|
||||
.eqIfPresent(EcgdataDO::getTaxis, reqVO.getTaxis())
|
||||
.eqIfPresent(EcgdataDO::getRv5, reqVO.getRv5())
|
||||
.eqIfPresent(EcgdataDO::getSv1, reqVO.getSv1())
|
||||
.eqIfPresent(EcgdataDO::getRv5sv1, reqVO.getRv5sv1())
|
||||
.eqIfPresent(EcgdataDO::getStsegment, reqVO.getStsegment())
|
||||
.eqIfPresent(EcgdataDO::getTwave, reqVO.getTwave())
|
||||
.eqIfPresent(EcgdataDO::getDiagnosis, reqVO.getDiagnosis())
|
||||
.eqIfPresent(EcgdataDO::getEcgimageurl, reqVO.getEcgimageurl())
|
||||
.eqIfPresent(EcgdataDO::getEcgdataurl, reqVO.getEcgdataurl())
|
||||
.eqIfPresent(EcgdataDO::getOrgid, reqVO.getOrgid())
|
||||
.likeIfPresent(EcgdataDO::getOrgname, reqVO.getOrgname())
|
||||
.eqIfPresent(EcgdataDO::getDatastatus, reqVO.getDatastatus())
|
||||
.eqIfPresent(EcgdataDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(EcgdataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.system.service.deviceuser;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.deviceuser.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.deviceuser.DeviceuserDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 设备人员关联 Service 接口
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
public interface DeviceuserService {
|
||||
|
||||
/**
|
||||
* 创建设备人员关联
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createDeviceuser(@Valid DeviceuserSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新设备人员关联
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateDeviceuser(@Valid DeviceuserSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除设备人员关联
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteDeviceuser(Integer id);
|
||||
|
||||
/**
|
||||
* 获得设备人员关联
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 设备人员关联
|
||||
*/
|
||||
DeviceuserDO getDeviceuser(Integer id);
|
||||
|
||||
/**
|
||||
* 获得设备人员关联分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 设备人员关联分页
|
||||
*/
|
||||
PageResult<DeviceuserDO> getDeviceuserPage(DeviceuserPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.system.service.deviceuser;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.deviceuser.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.deviceuser.DeviceuserDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.deviceuser.DeviceuserMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 设备人员关联 Service 实现类
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class DeviceuserServiceImpl implements DeviceuserService {
|
||||
|
||||
@Resource
|
||||
private DeviceuserMapper deviceuserMapper;
|
||||
|
||||
@Override
|
||||
public Integer createDeviceuser(DeviceuserSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
DeviceuserDO deviceuser = BeanUtils.toBean(createReqVO, DeviceuserDO.class);
|
||||
deviceuserMapper.insert(deviceuser);
|
||||
// 返回
|
||||
return deviceuser.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDeviceuser(DeviceuserSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateDeviceuserExists(updateReqVO.getId());
|
||||
// 更新
|
||||
DeviceuserDO updateObj = BeanUtils.toBean(updateReqVO, DeviceuserDO.class);
|
||||
deviceuserMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDeviceuser(Integer id) {
|
||||
// 校验存在
|
||||
validateDeviceuserExists(id);
|
||||
// 删除
|
||||
deviceuserMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateDeviceuserExists(Integer id) {
|
||||
if (deviceuserMapper.selectById(id) == null) {
|
||||
throw exception(DEVICEUSER_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceuserDO getDeviceuser(Integer id) {
|
||||
return deviceuserMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<DeviceuserDO> getDeviceuserPage(DeviceuserPageReqVO pageReqVO) {
|
||||
return deviceuserMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.system.service.doctornotice;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.doctornotice.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.doctornotice.DoctornoticeDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 医生通知 Service 接口
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
public interface DoctornoticeService {
|
||||
|
||||
/**
|
||||
* 创建医生通知
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createDoctornotice(@Valid DoctornoticeSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新医生通知
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateDoctornotice(@Valid DoctornoticeSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除医生通知
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteDoctornotice(Integer id);
|
||||
|
||||
/**
|
||||
* 获得医生通知
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 医生通知
|
||||
*/
|
||||
DoctornoticeDO getDoctornotice(Integer id);
|
||||
|
||||
/**
|
||||
* 获得医生通知分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 医生通知分页
|
||||
*/
|
||||
PageResult<DoctornoticeDO> getDoctornoticePage(DoctornoticePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.system.service.doctornotice;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.doctornotice.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.doctornotice.DoctornoticeDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.doctornotice.DoctornoticeMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 医生通知 Service 实现类
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class DoctornoticeServiceImpl implements DoctornoticeService {
|
||||
|
||||
@Resource
|
||||
private DoctornoticeMapper doctornoticeMapper;
|
||||
|
||||
@Override
|
||||
public Integer createDoctornotice(DoctornoticeSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
DoctornoticeDO doctornotice = BeanUtils.toBean(createReqVO, DoctornoticeDO.class);
|
||||
doctornoticeMapper.insert(doctornotice);
|
||||
// 返回
|
||||
return doctornotice.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDoctornotice(DoctornoticeSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateDoctornoticeExists(updateReqVO.getId());
|
||||
// 更新
|
||||
DoctornoticeDO updateObj = BeanUtils.toBean(updateReqVO, DoctornoticeDO.class);
|
||||
doctornoticeMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDoctornotice(Integer id) {
|
||||
// 校验存在
|
||||
validateDoctornoticeExists(id);
|
||||
// 删除
|
||||
doctornoticeMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateDoctornoticeExists(Integer id) {
|
||||
if (doctornoticeMapper.selectById(id) == null) {
|
||||
throw exception(DOCTORNOTICE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoctornoticeDO getDoctornotice(Integer id) {
|
||||
return doctornoticeMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<DoctornoticeDO> getDoctornoticePage(DoctornoticePageReqVO pageReqVO) {
|
||||
return doctornoticeMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.system.service.ecgdata;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.ecgdata.EcgdataDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 心电数据采集 Service 接口
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
public interface EcgdataService {
|
||||
|
||||
/**
|
||||
* 创建心电数据采集
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createEcgdata(@Valid EcgdataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新心电数据采集
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateEcgdata(@Valid EcgdataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除心电数据采集
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteEcgdata(Integer id);
|
||||
|
||||
/**
|
||||
* 获得心电数据采集
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 心电数据采集
|
||||
*/
|
||||
EcgdataDO getEcgdata(Integer id);
|
||||
|
||||
/**
|
||||
* 获得心电数据采集分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 心电数据采集分页
|
||||
*/
|
||||
PageResult<EcgdataDO> getEcgdataPage(EcgdataPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.system.service.ecgdata;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.ecgdata.EcgdataDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.ecgdata.EcgdataMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 心电数据采集 Service 实现类
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class EcgdataServiceImpl implements EcgdataService {
|
||||
|
||||
@Resource
|
||||
private EcgdataMapper ecgdataMapper;
|
||||
|
||||
@Override
|
||||
public Integer createEcgdata(EcgdataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
EcgdataDO ecgdata = BeanUtils.toBean(createReqVO, EcgdataDO.class);
|
||||
ecgdataMapper.insert(ecgdata);
|
||||
// 返回
|
||||
return ecgdata.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEcgdata(EcgdataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateEcgdataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
EcgdataDO updateObj = BeanUtils.toBean(updateReqVO, EcgdataDO.class);
|
||||
ecgdataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteEcgdata(Integer id) {
|
||||
// 校验存在
|
||||
validateEcgdataExists(id);
|
||||
// 删除
|
||||
ecgdataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateEcgdataExists(Integer id) {
|
||||
if (ecgdataMapper.selectById(id) == null) {
|
||||
throw exception(ECGDATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EcgdataDO getEcgdata(Integer id) {
|
||||
return ecgdataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<EcgdataDO> getEcgdataPage(EcgdataPageReqVO pageReqVO) {
|
||||
return ecgdataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.deviceuser.DeviceuserMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.doctornotice.DoctornoticeMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.ecgdata.EcgdataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user