diff --git a/pom.xml b/pom.xml index 7c578bb..db6776d 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,8 @@ yudao-module-system yudao-module-infra - + yudao-module-inspect + diff --git a/yudao-module-inspect/pom.xml b/yudao-module-inspect/pom.xml new file mode 100644 index 0000000..311eb69 --- /dev/null +++ b/yudao-module-inspect/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + cn.iocoder.boot + yudao + ${revision} + + + yudao-module-inspect + pom + + yudao-module-inspect-api + yudao-module-inspect-biz + + + 17 + 17 + UTF-8 + + ${project.artifactId} + + 体检功能相关模块 + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-api/pom.xml b/yudao-module-inspect/yudao-module-inspect-api/pom.xml new file mode 100644 index 0000000..984de57 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-api/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + cn.iocoder.boot + yudao-module-inspect + ${revision} + + jar + yudao-module-inspect-api + + + 17 + 17 + UTF-8 + + ${project.artifactId} + + 体检模块api + + + + + cn.iocoder.boot + yudao-common + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/pom.xml b/yudao-module-inspect/yudao-module-inspect-biz/pom.xml new file mode 100644 index 0000000..2272f00 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + cn.iocoder.boot + yudao-module-inspect + ${revision} + + + yudao-module-inspect-biz + jar + + + cn.iocoder.boot + yudao-module-inspect-api + ${revision} + + + + + cn.iocoder.boot + yudao-spring-boot-starter-web + + + + cn.iocoder.boot + yudao-spring-boot-starter-security + + + + + cn.iocoder.boot + yudao-spring-boot-starter-mybatis + + + com.alibaba + easyexcel-core + 4.0.3 + compile + + + cn.iocoder.boot + yudao-spring-boot-starter-excel + + + + + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/ExammoduleController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/ExammoduleController.java new file mode 100644 index 0000000..52ad148 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/ExammoduleController.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.exammodule; + +import org.springframework.web.bind.annotation.*; +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 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.inspect.controller.admin.exammodule.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.exammodule.ExammoduleDO; +import cn.iocoder.yudao.module.inspect.service.exammodule.ExammoduleService; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +@Tag(name = "管理后台 - 体检套餐") +@RestController +@RequestMapping("/inspect/exammodule") +@Validated +public class ExammoduleController { + + @Resource + private ExammoduleService exammoduleService; + + @PostMapping("/create") + @Operation(summary = "创建体检套餐") + public CommonResult createExammodule(@Valid @RequestBody ExammoduleSaveReqVO createReqVO) { + return success(exammoduleService.createExammodule(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新体检套餐") + public CommonResult updateExammodule(@Valid @RequestBody ExammoduleSaveReqVO updateReqVO) { + exammoduleService.updateExammodule(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除体检套餐") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteExammodule(@RequestParam("id") Integer id) { + exammoduleService.deleteExammodule(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得体检套餐") + //@Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getExammodule(@RequestParam("id") Integer id) { + ExammoduleDO exammodule = exammoduleService.getExammodule(id); + return success(BeanUtils.toBean(exammodule, ExammoduleRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得体检套餐分页") + public CommonResult> getExammodulePage(@Valid ExammodulePageReqVO pageReqVO) { + PageResult pageResult = exammoduleService.getExammodulePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ExammoduleRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出体检套餐 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportExammoduleExcel(@Valid ExammodulePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = exammoduleService.getExammodulePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "体检套餐.xls", "数据", ExammoduleRespVO.class, + BeanUtils.toBean(list, ExammoduleRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammodulePageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammodulePageReqVO.java new file mode 100644 index 0000000..ad05d56 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammodulePageReqVO.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.exammodule.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 ExammodulePageReqVO extends PageParam { + + @Schema(description = "套餐名称", example = "赵六") + private String examModuleName; + + @Schema(description = "套餐ID", example = "9149") + private Integer examModuleID; + + @Schema(description = "项目ID") + private String itemCode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammoduleRespVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammoduleRespVO.java new file mode 100644 index 0000000..940d950 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammoduleRespVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.exammodule.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 ExammoduleRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2085") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "套餐名称", example = "赵六") + @ExcelProperty("套餐名称") + private String examModuleName; + + @Schema(description = "套餐ID", example = "9149") + @ExcelProperty("套餐ID") + private Integer examModuleID; + + @Schema(description = "项目ID") + @ExcelProperty("项目ID") + private String itemCode; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammoduleSaveReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammoduleSaveReqVO.java new file mode 100644 index 0000000..9432bea --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/exammodule/vo/ExammoduleSaveReqVO.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.exammodule.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; + + +@Schema(description = "管理后台 - 体检套餐新增/修改 Request VO") +@Data +public class ExammoduleSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2085") + private Integer id; + + @Schema(description = "套餐名称", example = "赵六") + private String examModuleName; + + @Schema(description = "套餐ID", example = "9149") + private Integer examModuleID; + + @Schema(description = "项目ID") + private String itemCode; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/InspectDepartmentController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/InspectDepartmentController.java new file mode 100644 index 0000000..1521f3f --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/InspectDepartmentController.java @@ -0,0 +1,96 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectdepartment; + +import org.springframework.web.bind.annotation.*; + +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 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.inspect.controller.admin.inspectdepartment.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectdepartment.InspectDepartmentDO; +import cn.iocoder.yudao.module.inspect.service.inspectdepartment.InspectDepartmentService; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +@Tag(name = "管理后台 - 科室") +@RestController +@RequestMapping("/inspect/department") +@Validated +public class InspectDepartmentController { + + @Resource + private InspectDepartmentService departmentService; + + @PostMapping("/create") + @Operation(summary = "创建科室") + @PreAuthorize("@ss.hasPermission('inspect:department:create')") + public CommonResult createDepartment(@Valid @RequestBody InspectDepartmentSaveReqVO createReqVO) { + return success(departmentService.createDepartment(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新科室") + @PreAuthorize("@ss.hasPermission('inspect:department:update')") + public CommonResult updateDepartment(@Valid @RequestBody InspectDepartmentSaveReqVO updateReqVO) { + departmentService.updateDepartment(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除科室") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('inspect:department:delete')") + public CommonResult deleteDepartment(@RequestParam("id") String id) { + departmentService.deleteDepartment(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得科室") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('inspect:department:query')") + public CommonResult getDepartment(@RequestParam("id") String id) { + InspectDepartmentDO department = departmentService.getDepartment(id); + return success(BeanUtils.toBean(department, InspectDepartmentRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得科室分页") + @PreAuthorize("@ss.hasPermission('inspect:department:query')") + public CommonResult> getDepartmentPage(@Valid InspectDepartmentPageReqVO pageReqVO) { + PageResult pageResult = departmentService.getDepartmentPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, InspectDepartmentRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出科室 Excel") + @PreAuthorize("@ss.hasPermission('inspect:department:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportDepartmentExcel(@Valid InspectDepartmentPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = departmentService.getDepartmentPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "科室.xls", "数据", InspectDepartmentRespVO.class, + BeanUtils.toBean(list, InspectDepartmentRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentPageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentPageReqVO.java new file mode 100644 index 0000000..fd1072a --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentPageReqVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectdepartment.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 InspectDepartmentPageReqVO extends PageParam { + + @Schema(description = "科室名称", example = "王五") + private String departmentName; + + @Schema(description = "创建人") + private String createPerson; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createDate; + + @Schema(description = "科室备注", example = "你说的对") + private String departmentRemark; + + @Schema(description = "科室具体位置") + private String departmentAddress; + + + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentRespVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentRespVO.java new file mode 100644 index 0000000..11a1752 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentRespVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectdepartment.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 InspectDepartmentRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19890") + @ExcelProperty("主键") + private String id; + + @Schema(description = "科室名称", example = "王五") + @ExcelProperty("科室名称") + private String departmentName; + + @Schema(description = "科室代号:科室短号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("科室代号:科室短号") + private String departmentCode; + + @Schema(description = "创建人") + @ExcelProperty("创建人") + private String createPerson; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createDate; + + @Schema(description = "科室备注", example = "你说的对") + @ExcelProperty("科室备注") + private String departmentRemark; + + @Schema(description = "删除标记:1为删除", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("删除标记:1为删除") + private String isDelete; + + @Schema(description = "删除操作人") + @ExcelProperty("删除操作人") + private String deletePerson; + + @Schema(description = "删除时间") + @ExcelProperty("删除时间") + private LocalDateTime deleteDate; + + @Schema(description = "科室具体位置") + @ExcelProperty("科室具体位置") + private String departmentAddress; + + + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentSaveReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentSaveReqVO.java new file mode 100644 index 0000000..c825b3b --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectdepartment/vo/InspectDepartmentSaveReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectdepartment.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotEmpty; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 科室新增/修改 Request VO") +@Data +public class InspectDepartmentSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19890") + private String id; + + @Schema(description = "科室名称", example = "王五") + private String departmentName; + + @Schema(description = "科室代号:科室短号", requiredMode = Schema.RequiredMode.REQUIRED) + private String departmentCode; + + @Schema(description = "创建人") + private String createPerson; + + @Schema(description = "创建时间") + private LocalDateTime createDate; + + @Schema(description = "科室备注", example = "你说的对") + private String departmentRemark; + + @Schema(description = "删除标记:1为删除", requiredMode = Schema.RequiredMode.REQUIRED) + private String isDelete; + + @Schema(description = "删除操作人") + private String deletePerson; + + @Schema(description = "删除时间") + private LocalDateTime deleteDate; + + @Schema(description = "科室具体位置") + private String departmentAddress; + + + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/InspectitemsController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/InspectitemsController.java new file mode 100644 index 0000000..ee5003d --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/InspectitemsController.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectitems; + +import org.springframework.web.bind.annotation.*; + +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 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.inspect.controller.admin.inspectitems.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectitems.InspectitemsDO; +import cn.iocoder.yudao.module.inspect.service.inspectitems.InspectitemsService; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +@Tag(name = "管理后台 - 检查项目") +@RestController +@RequestMapping("/inspect/Inspectitems") +@Validated +public class InspectitemsController { + + @Resource + private InspectitemsService InspectitemsService; + + @PostMapping("/create") + @Operation(summary = "创建检查项目") + public CommonResult createINSPECTITEMSinspectitems(@Valid @RequestBody InspectitemsSaveReqVO createReqVO) { + return success(InspectitemsService.createINSPECTITEMSinspectitems(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新检查项目") + public CommonResult updateINSPECTITEMSinspectitems(@Valid @RequestBody InspectitemsSaveReqVO updateReqVO) { + InspectitemsService.updateINSPECTITEMSinspectitems(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除检查项目") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteINSPECTITEMSinspectitems(@RequestParam("id") Integer id) { + InspectitemsService.deleteINSPECTITEMSinspectitems(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得检查项目") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getINSPECTITEMSinspectitems(@RequestParam("id") Integer id) { + InspectitemsDO iNSPECTITEMSinspectitems = InspectitemsService.getINSPECTITEMSinspectitems(id); + return success(BeanUtils.toBean(iNSPECTITEMSinspectitems, InspectitemsRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得检查项目分页") + public CommonResult> getINSPECTITEMSinspectitemsPage(@Valid InspectitemsPageReqVO pageReqVO) { + PageResult pageResult = InspectitemsService.getINSPECTITEMSinspectitemsPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, InspectitemsRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出检查项目 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportINSPECTITEMSinspectitemsExcel(@Valid InspectitemsPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = InspectitemsService.getINSPECTITEMSinspectitemsPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "检查项目.xls", "数据", InspectitemsRespVO.class, + BeanUtils.toBean(list, InspectitemsRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsPageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsPageReqVO.java new file mode 100644 index 0000000..fe453fb --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsPageReqVO.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectitems.vo; + +import lombok.*; +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 InspectitemsPageReqVO extends PageParam { + + @Schema(description = "检查项目名称", example = "赵六") + private String itemName; + + @Schema(description = "项目代号") + private String itemCode; + + @Schema(description = "项目单价", example = "4170") + private BigDecimal price; + + @Schema(description = "折扣价", example = "16522") + private BigDecimal discountedPrice; + + @Schema(description = "折扣 百分比") + private BigDecimal discounted; + + @Schema(description = "科室") + private String section; + + @Schema(description = "检查所见", example = "你说的对") + private String examDescription; + + @Schema(description = "检查结论") + private String itemResult; + + @Schema(description = "项目单位") + private String unit; + + @Schema(description = "取值上限") + private Double highValue; + + @Schema(description = "取值下限") + private Double lowValue; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + + @Schema(description = "模块ID:体检单元ID 模块名称ID", example = "20997") + private Integer moduleID; + + @Schema(description = "模块名称:体检单元", example = "张三") + private String moduleName; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsRespVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsRespVO.java new file mode 100644 index 0000000..bd4b818 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsRespVO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectitems.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 检查项目 Response VO") +@Data +@ExcelIgnoreUnannotated +public class InspectitemsRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12093") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "检查项目名称", example = "赵六") + @ExcelProperty("检查项目名称") + private String itemName; + + @Schema(description = "项目代号") + @ExcelProperty("项目代号") + private String itemCode; + + @Schema(description = "项目单价", example = "4170") + @ExcelProperty("项目单价") + private BigDecimal price; + + @Schema(description = "折扣价", example = "16522") + @ExcelProperty("折扣价") + private BigDecimal discountedPrice; + + @Schema(description = "折扣 百分比") + @ExcelProperty("折扣 百分比") + private BigDecimal discounted; + + @Schema(description = "科室") + @ExcelProperty("科室") + private String section; + + @Schema(description = "检查所见", example = "你说的对") + @ExcelProperty("检查所见") + private String examDescription; + + @Schema(description = "检查结论") + @ExcelProperty("检查结论") + private String itemResult; + + @Schema(description = "项目单位") + @ExcelProperty("项目单位") + private String unit; + + @Schema(description = "取值上限") + @ExcelProperty("取值上限") + private Double highValue; + + @Schema(description = "取值下限") + @ExcelProperty("取值下限") + private Double lowValue; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "模块ID:体检单元ID 模块名称ID", example = "20997") + @ExcelProperty("模块ID:体检单元ID 模块名称ID") + private Integer moduleID; + + @Schema(description = "模块名称:体检单元", example = "张三") + @ExcelProperty("模块名称:体检单元") + private String moduleName; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsSaveReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsSaveReqVO.java new file mode 100644 index 0000000..a419967 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectitems/vo/InspectitemsSaveReqVO.java @@ -0,0 +1,58 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectitems.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 检查项目新增/修改 Request VO") +@Data +public class InspectitemsSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12093") + private Integer id; + + @Schema(description = "检查项目名称", example = "赵六") + private String itemName; + + @Schema(description = "项目代号") + private String itemCode; + + @Schema(description = "项目单价", example = "4170") + private BigDecimal price; + + @Schema(description = "折扣价", example = "16522") + private BigDecimal discountedPrice; + + @Schema(description = "折扣 百分比") + private BigDecimal discounted; + + @Schema(description = "科室") + private String section; + + @Schema(description = "检查所见", example = "你说的对") + private String examDescription; + + @Schema(description = "检查结论") + private String itemResult; + + @Schema(description = "项目单位") + private String unit; + + @Schema(description = "取值上限") + private Double highValue; + + @Schema(description = "取值下限") + private Double lowValue; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + + @Schema(description = "模块ID:体检单元ID 模块名称ID", example = "20997") + private Integer moduleID; + + @Schema(description = "模块名称:体检单元", example = "张三") + private String moduleName; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java new file mode 100644 index 0000000..767676f --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient; + +import org.springframework.web.bind.annotation.*; +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 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.inspect.controller.admin.inspectpatient.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatient.InspectPatientDO; +import cn.iocoder.yudao.module.inspect.service.inspectpatient.InspectPatientService; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +@Tag(name = "管理后台 - 患者信息") +@RestController +@RequestMapping("/inspect/patient") +@Validated +public class InspectPatientController { + + @Resource + private InspectPatientService patientService; + + @PostMapping("/create") + @Operation(summary = "创建患者信息") + public CommonResult createPatient(@Valid @RequestBody InspectPatientSaveReqVO createReqVO) { + return success(patientService.createPatient(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新患者信息") + public CommonResult updatePatient(@Valid @RequestBody InspectPatientSaveReqVO updateReqVO) { + patientService.updatePatient(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除患者信息") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deletePatient(@RequestParam("id") Integer id) { + patientService.deletePatient(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得患者信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getPatient(@RequestParam("id") Integer id) { + InspectPatientDO patient = patientService.getPatient(id); + return success(BeanUtils.toBean(patient, InspectPatientRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得患者信息分页") + public CommonResult> getPatientPage(@Valid InspectPatientPageReqVO pageReqVO) { + PageResult pageResult = patientService.getPatientPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, InspectPatientRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出患者信息 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportPatientExcel(@Valid InspectPatientPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = patientService.getPatientPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "患者信息.xls", "数据", InspectPatientRespVO.class, + BeanUtils.toBean(list, InspectPatientRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientPageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientPageReqVO.java new file mode 100644 index 0000000..6a55dce --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientPageReqVO.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo; + +import lombok.*; + +import java.time.LocalDate; +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 InspectPatientPageReqVO extends PageParam { + + @Schema(description = "体检编号") + private String medicalSn; + + @Schema(description = "患者姓名", example = "王五") + private String pName; + + @Schema(description = "性别") + private String gender; + + @Schema(description = "出生日期") + private LocalDate birthday; + + @Schema(description = "证件类型", example = "1") + private String cardType; + + @Schema(description = "证件ID", example = "32335") + private String cardId; + + @Schema(description = "国籍") + private String nationality; + + @Schema(description = "民族") + private String nation; + + @Schema(description = "人种") + private String race; + + @Schema(description = "电话") + private String phoneNum; + + @Schema(description = "0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取", example = "2") + private Integer status; + + @Schema(description = "0:电子报告 1:个人自取 2:公司自取 3:邮寄 ", example = "2") + private String reportType; + + @Schema(description = "信息创建日期") + private LocalDateTime createTime; + + @Schema(description = "体检登记日期 体检日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] medicalDateTime; + + @Schema(description = "收费方式:现金 微信 刷卡 支票 免费等,从字典表里取", example = "1") + private String chargeType; + + @Schema(description = "实际收款金额", example = "29387") + private Double totalPrice; + + @Schema(description = "头像图片路径", example = "https://www.iocoder.cn") + private String headPicUrl; + + @Schema(description = "汇总分析结果") + private String summaryResult; + + @Schema(description = "审核人") + private String auditor; + + @Schema(description = "审核时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] auditorTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientRespVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientRespVO.java new file mode 100644 index 0000000..d80100e --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientRespVO.java @@ -0,0 +1,101 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDate; +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 InspectPatientRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "13309") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "体检编号") + @ExcelProperty("体检编号") + private String medicalSn; + + @Schema(description = "患者姓名", example = "王五") + @ExcelProperty("患者姓名") + private String pName; + + @Schema(description = "性别") + @ExcelProperty("性别") + private String gender; + + @Schema(description = "出生日期") + @ExcelProperty("出生日期") + private LocalDate birthday; + + @Schema(description = "证件类型", example = "1") + @ExcelProperty("证件类型") + private String cardType; + + @Schema(description = "证件ID", example = "32335") + @ExcelProperty("证件ID") + private String cardId; + + @Schema(description = "国籍") + @ExcelProperty("国籍") + private String nationality; + + @Schema(description = "民族") + @ExcelProperty("民族") + private String nation; + + @Schema(description = "人种") + @ExcelProperty("人种") + private String race; + + @Schema(description = "电话") + @ExcelProperty("电话") + private String phoneNum; + + @Schema(description = "0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取", example = "2") + @ExcelProperty("0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取") + private Integer status; + + @Schema(description = "0:电子报告 1:个人自取 2:公司自取 3:邮寄 ", example = "2") + @ExcelProperty("0:电子报告 1:个人自取 2:公司自取 3:邮寄 ") + private String reportType; + + @Schema(description = "信息创建日期") + @ExcelProperty("信息创建日期") + private LocalDateTime createTime; + + @Schema(description = "体检登记日期 体检日期") + @ExcelProperty("体检登记日期 体检日期") + private LocalDateTime medicalDateTime; + + @Schema(description = "收费方式:现金 微信 刷卡 支票 免费等,从字典表里取", example = "1") + @ExcelProperty("收费方式:现金 微信 刷卡 支票 免费等,从字典表里取") + private String chargeType; + + @Schema(description = "实际收款金额", example = "29387") + @ExcelProperty("实际收款金额") + private Double totalPrice; + + @Schema(description = "头像图片路径", example = "https://www.iocoder.cn") + @ExcelProperty("头像图片路径") + private String headPicUrl; + + @Schema(description = "汇总分析结果") + @ExcelProperty("汇总分析结果") + private String summaryResult; + + @Schema(description = "审核人") + @ExcelProperty("审核人") + private String auditor; + + @Schema(description = "审核时间") + @ExcelProperty("审核时间") + private LocalDateTime auditorTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientSaveReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientSaveReqVO.java new file mode 100644 index 0000000..9f03ae5 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/InspectPatientSaveReqVO.java @@ -0,0 +1,78 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 患者信息新增/修改 Request VO") +@Data +public class InspectPatientSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "13309") + private Integer id; + + @Schema(description = "体检编号") + private String medicalSn; + + @Schema(description = "患者姓名", example = "王五") + private String pName; + + @Schema(description = "性别") + private String gender; + + @Schema(description = "出生日期") + private LocalDate birthday; + + @Schema(description = "证件类型", example = "1") + private String cardType; + + @Schema(description = "证件ID", example = "32335") + private String cardId; + + @Schema(description = "国籍") + private String nationality; + + @Schema(description = "民族") + private String nation; + + @Schema(description = "人种") + private String race; + + @Schema(description = "电话") + private String phoneNum; + + @Schema(description = "0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取", example = "2") + private Integer status; + + @Schema(description = "0:电子报告 1:个人自取 2:公司自取 3:邮寄 ", example = "2") + private String reportType; + + @Schema(description = "信息创建日期") + private LocalDateTime createTime; + + @Schema(description = "体检登记日期 体检日期") + private LocalDateTime medicalDateTime; + + @Schema(description = "收费方式:现金 微信 刷卡 支票 免费等,从字典表里取", example = "1") + private String chargeType; + + @Schema(description = "实际收款金额", example = "29387") + private Double totalPrice; + + @Schema(description = "头像图片路径", example = "https://www.iocoder.cn") + private String headPicUrl; + + @Schema(description = "汇总分析结果") + private String summaryResult; + + @Schema(description = "审核人") + private String auditor; + + @Schema(description = "审核时间") + private LocalDateTime auditorTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/InspectPatientitemsController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/InspectPatientitemsController.java new file mode 100644 index 0000000..b9b20fb --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/InspectPatientitemsController.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems; + +import org.springframework.web.bind.annotation.*; +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 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.inspect.controller.admin.inspectpatientitems.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatientitems.InspectPatientitemsDO; +import cn.iocoder.yudao.module.inspect.service.inspectpatientitems.InspectPatientitemsService; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +@Tag(name = "管理后台 - 患者体检项目") +@RestController +@RequestMapping("/Inspect/patientitems") +@Validated +public class InspectPatientitemsController { + + @Resource + private InspectPatientitemsService patientitemsService; + + @PostMapping("/create") + @Operation(summary = "创建患者体检项目") + public CommonResult createPatientitems(@Valid @RequestBody InspectPatientitemsSaveReqVO createReqVO) { + return success(patientitemsService.createPatientitems(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新患者体检项目") + public CommonResult updatePatientitems(@Valid @RequestBody InspectPatientitemsSaveReqVO updateReqVO) { + patientitemsService.updatePatientitems(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除患者体检项目") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deletePatientitems(@RequestParam("id") Integer id) { + patientitemsService.deletePatientitems(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得患者体检项目") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getPatientitems(@RequestParam("id") Integer id) { + InspectPatientitemsDO patientitems = patientitemsService.getPatientitems(id); + return success(BeanUtils.toBean(patientitems, InspectPatientitemsRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得患者体检项目分页") + public CommonResult> getPatientitemsPage(@Valid InspectPatientitemsPageReqVO pageReqVO) { + PageResult pageResult = patientitemsService.getPatientitemsPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, InspectPatientitemsRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出患者体检项目 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportPatientitemsExcel(@Valid InspectPatientitemsPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = patientitemsService.getPatientitemsPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "患者体检项目.xls", "数据", InspectPatientitemsRespVO.class, + BeanUtils.toBean(list, InspectPatientitemsRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsPageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsPageReqVO.java new file mode 100644 index 0000000..cac78cd --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsPageReqVO.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems.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 InspectPatientitemsPageReqVO extends PageParam { + + @Schema(description = "体检编号") + private String medicalSn; + + @Schema(description = "检查项目名称", example = "王五") + private String itemName; + + @Schema(description = "项目代号") + private String itemCode; + + @Schema(description = "项目单价", example = "15748") + private BigDecimal price; + + @Schema(description = "折扣价", example = "16421") + private BigDecimal discountedPrice; + + @Schema(description = "折扣 百分比") + private BigDecimal discounted; + + @Schema(description = "科室ID", example = "1618") + private String sectionID; + + @Schema(description = "检查所见", example = "随便") + private String examDescription; + + @Schema(description = "检查结论") + private String itemResult; + + @Schema(description = "项目单位") + private String unit; + + @Schema(description = "取值上限") + private Double highValue; + + @Schema(description = "取值下限") + private Double lowValue; + + @Schema(description = "0:未检 1:已检 2:放弃 3:挂起,择日检(待查) ", example = "1") + private String itemStatus; + + @Schema(description = "是否阳性 1:阳性") + private String positive; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsRespVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsRespVO.java new file mode 100644 index 0000000..988a010 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsRespVO.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 患者体检项目 Response VO") +@Data +@ExcelIgnoreUnannotated +public class InspectPatientitemsRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5264") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "体检编号") + @ExcelProperty("体检编号") + private String medicalSn; + + @Schema(description = "检查项目名称", example = "王五") + @ExcelProperty("检查项目名称") + private String itemName; + + @Schema(description = "项目代号") + @ExcelProperty("项目代号") + private String itemCode; + + @Schema(description = "项目单价", example = "15748") + @ExcelProperty("项目单价") + private BigDecimal price; + + @Schema(description = "折扣价", example = "16421") + @ExcelProperty("折扣价") + private BigDecimal discountedPrice; + + @Schema(description = "折扣 百分比") + @ExcelProperty("折扣 百分比") + private BigDecimal discounted; + + @Schema(description = "科室ID", example = "1618") + @ExcelProperty("科室ID") + private String sectionID; + + @Schema(description = "检查所见", example = "随便") + @ExcelProperty("检查所见") + private String examDescription; + + @Schema(description = "检查结论") + @ExcelProperty("检查结论") + private String itemResult; + + @Schema(description = "项目单位") + @ExcelProperty("项目单位") + private String unit; + + @Schema(description = "取值上限") + @ExcelProperty("取值上限") + private Double highValue; + + @Schema(description = "取值下限") + @ExcelProperty("取值下限") + private Double lowValue; + + @Schema(description = "0:未检 1:已检 2:放弃 3:挂起,择日检(待查) ", example = "1") + @ExcelProperty("0:未检 1:已检 2:放弃 3:挂起,择日检(待查) ") + private String itemStatus; + + @Schema(description = "是否阳性 1:阳性") + @ExcelProperty("是否阳性 1:阳性") + private String positive; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsSaveReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsSaveReqVO.java new file mode 100644 index 0000000..a9555d2 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatientitems/vo/InspectPatientitemsSaveReqVO.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems.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; + +@Schema(description = "管理后台 - 患者体检项目新增/修改 Request VO") +@Data +public class InspectPatientitemsSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5264") + private Integer id; + + @Schema(description = "体检编号") + private String medicalSn; + + @Schema(description = "检查项目名称", example = "王五") + private String itemName; + + @Schema(description = "项目代号") + private String itemCode; + + @Schema(description = "项目单价", example = "15748") + private BigDecimal price; + + @Schema(description = "折扣价", example = "16421") + private BigDecimal discountedPrice; + + @Schema(description = "折扣 百分比") + private BigDecimal discounted; + + @Schema(description = "科室ID", example = "1618") + private String sectionID; + + @Schema(description = "检查所见", example = "随便") + private String examDescription; + + @Schema(description = "检查结论") + private String itemResult; + + @Schema(description = "项目单位") + private String unit; + + @Schema(description = "取值上限") + private Double highValue; + + @Schema(description = "取值下限") + private Double lowValue; + + @Schema(description = "0:未检 1:已检 2:放弃 3:挂起,择日检(待查) ", example = "1") + private String itemStatus; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + + @Schema(description = "是否阳性 1:阳性") + private String positive; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/InspectsSectionresultController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/InspectsSectionresultController.java new file mode 100644 index 0000000..fa4eeba --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/InspectsSectionresultController.java @@ -0,0 +1,94 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectsectionresult; + +import org.springframework.web.bind.annotation.*; +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 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.inspect.controller.admin.inspectsectionresult.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectsectionresult.InspectsSectionresultDO; +import cn.iocoder.yudao.module.inspect.service.inspectsectionresult.InspectsSectionresultService; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +@Tag(name = "管理后台 - 科室小结") +@RestController +@RequestMapping("/Inspect/s-sectionresult") +@Validated +public class InspectsSectionresultController { + + @Resource + private InspectsSectionresultService sSectionresultService; + + @PostMapping("/create") + @Operation(summary = "创建科室小结") + @PreAuthorize("@ss.hasPermission('Inspect:s-sectionresult:create')") + public CommonResult createsSectionresult(@Valid @RequestBody InspectsSectionresultSaveReqVO createReqVO) { + return success(sSectionresultService.createsSectionresult(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新科室小结") + @PreAuthorize("@ss.hasPermission('Inspect:s-sectionresult:update')") + public CommonResult updatesSectionresult(@Valid @RequestBody InspectsSectionresultSaveReqVO updateReqVO) { + sSectionresultService.updatesSectionresult(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除科室小结") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('Inspect:s-sectionresult:delete')") + public CommonResult deletesSectionresult(@RequestParam("id") Integer id) { + sSectionresultService.deletesSectionresult(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得科室小结") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('Inspect:s-sectionresult:query')") + public CommonResult getsSectionresult(@RequestParam("id") Integer id) { + InspectsSectionresultDO sSectionresult = sSectionresultService.getsSectionresult(id); + return success(BeanUtils.toBean(sSectionresult, InspectsSectionresultRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得科室小结分页") + @PreAuthorize("@ss.hasPermission('Inspect:s-sectionresult:query')") + public CommonResult> getsSectionresultPage(@Valid InspectsSectionresultPageReqVO pageReqVO) { + PageResult pageResult = sSectionresultService.getsSectionresultPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, InspectsSectionresultRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出科室小结 Excel") + @PreAuthorize("@ss.hasPermission('Inspect:s-sectionresult:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportsSectionresultExcel(@Valid InspectsSectionresultPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = sSectionresultService.getsSectionresultPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "科室小结.xls", "数据", InspectsSectionresultRespVO.class, + BeanUtils.toBean(list, InspectsSectionresultRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultPageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultPageReqVO.java new file mode 100644 index 0000000..e036e43 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultPageReqVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectsectionresult.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 InspectsSectionresultPageReqVO extends PageParam { + + @Schema(description = "科室ID", example = "8458") + private String sectionID; + + @Schema(description = "体检编号") + private String medicalidSn; + + @Schema(description = "科室小结结论") + private String sectionResult; + + @Schema(description = "科室名称", example = "张三") + private String sectionName; + + @Schema(description = "科室医生姓名", example = "王五") + private String doctorName; + + @Schema(description = "创建日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultRespVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultRespVO.java new file mode 100644 index 0000000..7f3dd21 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultRespVO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectsectionresult.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 InspectsSectionresultRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "30043") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "科室ID", example = "8458") + @ExcelProperty("科室ID") + private String sectionID; + + @Schema(description = "体检编号") + @ExcelProperty("体检编号") + private String medicalidSn; + + @Schema(description = "科室小结结论") + @ExcelProperty("科室小结结论") + private String sectionResult; + + @Schema(description = "科室名称", example = "张三") + @ExcelProperty("科室名称") + private String sectionName; + + @Schema(description = "科室医生姓名", example = "王五") + @ExcelProperty("科室医生姓名") + private String doctorName; + + @Schema(description = "创建日期") + @ExcelProperty("创建日期") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultSaveReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultSaveReqVO.java new file mode 100644 index 0000000..4c41b96 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectsectionresult/vo/InspectsSectionresultSaveReqVO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectsectionresult.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 科室小结新增/修改 Request VO") +@Data +public class InspectsSectionresultSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "30043") + private Integer id; + + @Schema(description = "科室ID", example = "8458") + private String sectionID; + + @Schema(description = "体检编号") + private String medicalidSn; + + @Schema(description = "科室小结结论") + private String sectionResult; + + @Schema(description = "科室名称", example = "张三") + private String sectionName; + + @Schema(description = "科室医生姓名", example = "王五") + private String doctorName; + + @Schema(description = "创建日期") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/InspectStatusController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/InspectStatusController.java new file mode 100644 index 0000000..9a265cb --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/InspectStatusController.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectstatus; + +import org.springframework.web.bind.annotation.*; +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 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.inspect.controller.admin.inspectstatus.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectstatus.InspectStatusDO; +import cn.iocoder.yudao.module.inspect.service.inspectstatus.InspectStatusService; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; + +@Tag(name = "管理后台 - 体检状态时间") +@RestController +@RequestMapping("/inspect/status") +@Validated +public class InspectStatusController { + + @Resource + private InspectStatusService statusService; + + @PostMapping("/create") + @Operation(summary = "创建体检状态时间") + @PreAuthorize("@ss.hasPermission('inspect:status:create')") + public CommonResult createStatus(@Valid @RequestBody InspectStatusSaveReqVO createReqVO) { + return success(statusService.createStatus(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新体检状态时间") + @PreAuthorize("@ss.hasPermission('inspect:status:update')") + public CommonResult updateStatus(@Valid @RequestBody InspectStatusSaveReqVO updateReqVO) { + statusService.updateStatus(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除体检状态时间") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('inspect:status:delete')") + public CommonResult deleteStatus(@RequestParam("id") Integer id) { + statusService.deleteStatus(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得体检状态时间") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('inspect:status:query')") + public CommonResult getStatus(@RequestParam("id") Integer id) { + InspectStatusDO status = statusService.getStatus(id); + return success(BeanUtils.toBean(status, InspectStatusRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得体检状态时间分页") + @PreAuthorize("@ss.hasPermission('inspect:status:query')") + public CommonResult> getStatusPage(@Valid InspectStatusPageReqVO pageReqVO) { + PageResult pageResult = statusService.getStatusPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, InspectStatusRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出体检状态时间 Excel") + @PreAuthorize("@ss.hasPermission('inspect:status:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportStatusExcel(@Valid InspectStatusPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = statusService.getStatusPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "体检状态时间.xls", "数据", InspectStatusRespVO.class, + BeanUtils.toBean(list, InspectStatusRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusPageReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusPageReqVO.java new file mode 100644 index 0000000..3beaf46 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusPageReqVO.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectstatus.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 InspectStatusPageReqVO extends PageParam { + + @Schema(description = "体检编号") + private String medicalSn; + + @Schema(description = "0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取", example = "1") + private Integer status; + + @Schema(description = "状态时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusRespVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusRespVO.java new file mode 100644 index 0000000..e00b0c1 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusRespVO.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectstatus.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 InspectStatusRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17186") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "体检编号") + @ExcelProperty("体检编号") + private String medicalSn; + + @Schema(description = "0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取", example = "1") + @ExcelProperty("0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取") + private Integer status; + + @Schema(description = "状态时间") + @ExcelProperty("状态时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusSaveReqVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusSaveReqVO.java new file mode 100644 index 0000000..a7edea4 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectstatus/vo/InspectStatusSaveReqVO.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.inspect.controller.admin.inspectstatus.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 体检状态时间新增/修改 Request VO") +@Data +public class InspectStatusSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17186") + private Integer id; + + @Schema(description = "体检编号") + private String medicalSn; + + @Schema(description = "0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取", example = "1") + private Integer status; + + @Schema(description = "状态时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/exammodule/ExammoduleDO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/exammodule/ExammoduleDO.java new file mode 100644 index 0000000..5137aa5 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/exammodule/ExammoduleDO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.inspect.dal.dataobject.exammodule; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 体检套餐 DO + * + * @author 李晓东 + */ +@TableName("tb_exammodule") +@KeySequence("tb_exammodule_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data + +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ExammoduleDO { + + /** + * 主键 + */ + @TableId + @TableField("id") + private Integer id; + /** + * 套餐名称 + */ + @TableField("examModuleName") + private String examModuleName; + /** + * 套餐ID + */ + @TableField("examModuleID") + private Integer examModuleID; + /** + * 项目ID + */ + @TableField("itemCode") + private String itemCode; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectdepartment/InspectDepartmentDO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectdepartment/InspectDepartmentDO.java new file mode 100644 index 0000000..59daea0 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectdepartment/InspectDepartmentDO.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.inspect.dal.dataobject.inspectdepartment; + +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_department") +@KeySequence("tb_department_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class InspectDepartmentDO { + + /** + * 主键 + */ + @TableId(type = IdType.INPUT) + private String id; + /** + * 科室名称 + */ + @TableField("departmentName") + private String departmentName; + /** + * 科室代号:科室短号 + */ + @TableField("departmentCode") + private String departmentCode; + /** + * 创建人 + */ + @TableField("createPerson") + private String createPerson; + /** + * 创建时间 + */ + @TableField("createDate") + private LocalDateTime createDate; + /** + * 科室备注 + */ + @TableField("departmentRemark") + private String departmentRemark; + /** + * 删除标记:1为删除 + */ + @TableField("isDelete") + private String isDelete; + /** + * 删除操作人 + */ + @TableField("deletePerson") + private String deletePerson; + /** + * 删除时间 + */ + @TableField("deleteDate") + private LocalDateTime deleteDate; + /** + * 科室具体位置 + */ + @TableField("departmentAddress") + private String departmentAddress; + + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectitems/InspectitemsDO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectitems/InspectitemsDO.java new file mode 100644 index 0000000..536cb42 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectitems/InspectitemsDO.java @@ -0,0 +1,94 @@ +package cn.iocoder.yudao.module.inspect.dal.dataobject.inspectitems; + +import lombok.*; + +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; + +/** + * 检查项目 DO + * + * @author 李晓东 + */ +@TableName("tb_items") +@KeySequence("tb_items_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class InspectitemsDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 检查项目名称 + */ + @TableField("itemName") + private String itemName; + /** + * 项目代号 + */ + @TableField("itemCode") + private String itemCode; + /** + * 项目单价 + */ + @TableField("price") + private BigDecimal price; + /** + * 折扣价 + */ + @TableField("discountedPrice") + private BigDecimal discountedPrice; + /** + * 折扣 百分比 + */ + @TableField("discounted") + private BigDecimal discounted; + /** + * 科室 + */ + @TableField("section") + private String section; + /** + * 检查所见 + */ + @TableField("examDescription") + private String examDescription; + /** + * 检查结论 + */ + @TableField("itemResult") + private String itemResult; + /** + * 项目单位 + */ + @TableField("unit") + private String unit; + /** + * 取值上限 + */ + @TableField("highValue") + private Double highValue; + /** + * 取值下限 + */ + @TableField("lowValue") + private Double lowValue; + /** + * 模块ID:体检单元ID 模块名称ID + */ + @TableField("moduleID") + private Integer moduleID; + /** + * 模块名称:体检单元 + */ + @TableField("moduleName") + private String moduleName; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectpatient/InspectPatientDO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectpatient/InspectPatientDO.java new file mode 100644 index 0000000..2614f5d --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectpatient/InspectPatientDO.java @@ -0,0 +1,128 @@ +package cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatient; + +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +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_patient") +@KeySequence("tb_patient_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class InspectPatientDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 体检编号 + */ + @TableField("medicalSn") + private String medicalSn; + /** + * 患者姓名 + */ + @TableField("pName") + private String pName; + /** + * 性别 + */ + @TableField("gender") + private String gender; + /** + * 出生日期 + */ + @TableField("birthday") + private LocalDate birthday; + /** + * 证件类型 + */ + @TableField("cardType") + private String cardType; + /** + * 证件ID + */ + @TableField("cardId") + private String cardId; + /** + * 国籍 + */ + @TableField("nationality") + private String nationality; + /** + * 民族 + */ + @TableField("nation") + private String nation; + /** + * 人种 + */ + @TableField("race") + private String race; + /** + * 电话 + */ + @TableField("phoneNum") + private String phoneNum; + /** + * 0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取 + */ + @TableField("status") + private Integer status; + /** + * 0:电子报告 1:个人自取 2:公司自取 3:邮寄 + */ + @TableField("reportType") + private String reportType; + /** + * 体检登记日期 体检日期 + */ + @TableField("medicalDateTime") + private LocalDateTime medicalDateTime; + /** + * 收费方式:现金 微信 刷卡 支票 免费等,从字典表里取 + */ + @TableField("chargeType") + private String chargeType; + /** + * 实际收款金额 + */ + @TableField("totalPrice") + private Double totalPrice; + /** + * 头像图片路径 + */ + @TableField("headPicUrl") + private String headPicUrl; + /** + * 汇总分析结果 + */ + @TableField("summaryResult") + private String summaryResult; + /** + * 审核人 + */ + @TableField("auditor") + private String auditor; + /** + * 审核时间 + */ + @TableField("auditorTime") + private LocalDateTime auditorTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectpatientitems/InspectPatientitemsDO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectpatientitems/InspectPatientitemsDO.java new file mode 100644 index 0000000..bd40923 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectpatientitems/InspectPatientitemsDO.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatientitems; + +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 患者体检项目 DO + * + * @author 李晓东 + */ +@TableName("tb_patientitems") +@KeySequence("tb_patientitems_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class InspectPatientitemsDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 体检编号 + */ + @TableField("medicalSn") + private String medicalSn; + /** + * 检查项目名称 + */ + @TableField("itemName") + private String itemName; + /** + * 项目代号 + */ + @TableField("itemCode") + private String itemCode; + /** + * 项目单价 + */ + @TableField("price") + private BigDecimal price; + /** + * 折扣价 + */ + @TableField("discountedPrice") + private BigDecimal discountedPrice; + /** + * 折扣 百分比 + */ + @TableField("discounted") + private BigDecimal discounted; + /** + * 科室ID + */ + @TableField("sectionID") + private String sectionID; + /** + * 检查所见 + */ + @TableField("examDescription") + private String examDescription; + /** + * 检查结论 + */ + @TableField("itemResult") + private String itemResult; + /** + * 项目单位 + */ + @TableField("unit") + private String unit; + /** + * 取值上限 + */ + @TableField("highValue") + private Double highValue; + /** + * 取值下限 + */ + @TableField("lowValue") + private Double lowValue; + /** + * 0:未检 1:已检 2:放弃 3:挂起,择日检(待查) + */ + @TableField("itemStatus") + private String itemStatus; + /** + * 是否阳性 1:阳性 + */ + @TableField("positive") + private String positive; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectsectionresult/InspectsSectionresultDO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectsectionresult/InspectsSectionresultDO.java new file mode 100644 index 0000000..45566a7 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectsectionresult/InspectsSectionresultDO.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.inspect.dal.dataobject.inspectsectionresult; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 科室小结 DO + * + * @author 李晓东 + */ +@TableName("tb_sectionresult") +@KeySequence("tb_sectionresult_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class InspectsSectionresultDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 科室ID + */ + @TableField("sectionID") + private String sectionID; + /** + * 体检编号 + */ + @TableField("medicalidSn") + private String medicalidSn; + /** + * 科室小结结论 + */ + @TableField("sectionResult") + private String sectionResult; + /** + * 科室名称 + */ + @TableField("sectionName") + private String sectionName; + /** + * 科室医生姓名 + */ + @TableField("doctorName") + private String doctorName; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectstatus/InspectStatusDO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectstatus/InspectStatusDO.java new file mode 100644 index 0000000..064cd7b --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/dataobject/inspectstatus/InspectStatusDO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.inspect.dal.dataobject.inspectstatus; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 体检状态时间 DO + * + * @author 李晓东 + */ +@TableName("tb_status") +@KeySequence("tb_status_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class InspectStatusDO { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 体检编号 + */ + @TableField("medicalSn") + private String medicalSn; + /** + * 0:患者登记,1:已检查,2:放弃,3:挂起,择日检,4:已汇总,5:终检审核,6:报告已取 + */ + @TableField("status") + private Integer status; + /* + 状态时间 + * */ + @TableField("createTime") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/exammodule/ExammoduleMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/exammodule/ExammoduleMapper.java new file mode 100644 index 0000000..3b37fc3 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/exammodule/ExammoduleMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.inspect.dal.mysql.exammodule; + +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.inspect.dal.dataobject.exammodule.ExammoduleDO; +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.inspect.controller.admin.exammodule.vo.*; + +/** + * 体检套餐 Mapper + * + * @author 李晓东 + */ +@InterceptorIgnore(tenantLine = "true") +@Mapper +public interface ExammoduleMapper extends BaseMapperX { + + default PageResult selectPage(ExammodulePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ExammoduleDO::getExamModuleName, reqVO.getExamModuleName()) + .eqIfPresent(ExammoduleDO::getExamModuleID, reqVO.getExamModuleID()) + .eqIfPresent(ExammoduleDO::getItemCode, reqVO.getItemCode()) + .orderByDesc(ExammoduleDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectdepartment/InspectDepartmentMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectdepartment/InspectDepartmentMapper.java new file mode 100644 index 0000000..3222f75 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectdepartment/InspectDepartmentMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.inspect.dal.mysql.inspectdepartment; + +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.inspect.dal.dataobject.inspectdepartment.InspectDepartmentDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectdepartment.vo.*; + +/** + * 科室 Mapper + * + * @author 李晓东 + */ +@Mapper +public interface InspectDepartmentMapper extends BaseMapperX { + + default PageResult selectPage(InspectDepartmentPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(InspectDepartmentDO::getDepartmentName, reqVO.getDepartmentName()) + .eqIfPresent(InspectDepartmentDO::getCreatePerson, reqVO.getCreatePerson()) + .betweenIfPresent(InspectDepartmentDO::getCreateDate, reqVO.getCreateDate()) + .eqIfPresent(InspectDepartmentDO::getDepartmentRemark, reqVO.getDepartmentRemark()) + .eqIfPresent(InspectDepartmentDO::getDepartmentAddress, reqVO.getDepartmentAddress()) + .orderByDesc(InspectDepartmentDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectitems/InspectitemsMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectitems/InspectitemsMapper.java new file mode 100644 index 0000000..1703642 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectitems/InspectitemsMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.inspect.dal.mysql.inspectitems; + +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.inspect.controller.admin.inspectitems.vo.InspectitemsPageReqVO; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectitems.InspectitemsDO; +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import org.apache.ibatis.annotations.Mapper; + +/** + * 检查项目 Mapper + * + * @author 李晓东 + */ +@InterceptorIgnore(tenantLine = "true") +@Mapper +public interface InspectitemsMapper extends BaseMapperX { + + default PageResult selectPage(InspectitemsPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(InspectitemsDO::getItemName, reqVO.getItemName()) + .eqIfPresent(InspectitemsDO::getItemCode, reqVO.getItemCode()) + .eqIfPresent(InspectitemsDO::getPrice, reqVO.getPrice()) + .eqIfPresent(InspectitemsDO::getDiscountedPrice, reqVO.getDiscountedPrice()) + .eqIfPresent(InspectitemsDO::getDiscounted, reqVO.getDiscounted()) + .eqIfPresent(InspectitemsDO::getSection, reqVO.getSection()) + .eqIfPresent(InspectitemsDO::getExamDescription, reqVO.getExamDescription()) + .eqIfPresent(InspectitemsDO::getItemResult, reqVO.getItemResult()) + .eqIfPresent(InspectitemsDO::getUnit, reqVO.getUnit()) + .eqIfPresent(InspectitemsDO::getHighValue, reqVO.getHighValue()) + .eqIfPresent(InspectitemsDO::getLowValue, reqVO.getLowValue()) + .eqIfPresent(InspectitemsDO::getModuleID, reqVO.getModuleID()) + .likeIfPresent(InspectitemsDO::getModuleName, reqVO.getModuleName()) + .orderByDesc(InspectitemsDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatient/InspectPatientMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatient/InspectPatientMapper.java new file mode 100644 index 0000000..5aa60f4 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatient/InspectPatientMapper.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.inspect.dal.mysql.inspectpatient; + +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.inspect.dal.dataobject.inspectpatient.InspectPatientDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo.*; + +/** + * 患者信息 Mapper + * + * @author 李晓东 + */ +@Mapper +public interface InspectPatientMapper extends BaseMapperX { + + default PageResult selectPage(InspectPatientPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(InspectPatientDO::getMedicalSn, reqVO.getMedicalSn()) + .likeIfPresent(InspectPatientDO::getPName, reqVO.getPName()) + .eqIfPresent(InspectPatientDO::getGender, reqVO.getGender()) + .eqIfPresent(InspectPatientDO::getBirthday, reqVO.getBirthday()) + .eqIfPresent(InspectPatientDO::getCardType, reqVO.getCardType()) + .eqIfPresent(InspectPatientDO::getCardId, reqVO.getCardId()) + .eqIfPresent(InspectPatientDO::getNationality, reqVO.getNationality()) + .eqIfPresent(InspectPatientDO::getNation, reqVO.getNation()) + .eqIfPresent(InspectPatientDO::getRace, reqVO.getRace()) + .eqIfPresent(InspectPatientDO::getPhoneNum, reqVO.getPhoneNum()) + .eqIfPresent(InspectPatientDO::getStatus, reqVO.getStatus()) + .eqIfPresent(InspectPatientDO::getReportType, reqVO.getReportType()) + .betweenIfPresent(InspectPatientDO::getMedicalDateTime, reqVO.getMedicalDateTime()) + .eqIfPresent(InspectPatientDO::getChargeType, reqVO.getChargeType()) + .eqIfPresent(InspectPatientDO::getTotalPrice, reqVO.getTotalPrice()) + .eqIfPresent(InspectPatientDO::getHeadPicUrl, reqVO.getHeadPicUrl()) + .eqIfPresent(InspectPatientDO::getSummaryResult, reqVO.getSummaryResult()) + .eqIfPresent(InspectPatientDO::getAuditor, reqVO.getAuditor()) + .betweenIfPresent(InspectPatientDO::getAuditorTime, reqVO.getAuditorTime()) + .orderByDesc(InspectPatientDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatientitems/InspectPatientitemsMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatientitems/InspectPatientitemsMapper.java new file mode 100644 index 0000000..3c281ec --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectpatientitems/InspectPatientitemsMapper.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.inspect.dal.mysql.inspectpatientitems; + +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.inspect.dal.dataobject.inspectpatientitems.InspectPatientitemsDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems.vo.*; + +/** + * 患者体检项目 Mapper + * + * @author 李晓东 + */ +@Mapper +public interface InspectPatientitemsMapper extends BaseMapperX { + + default PageResult selectPage(InspectPatientitemsPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(InspectPatientitemsDO::getMedicalSn, reqVO.getMedicalSn()) + .likeIfPresent(InspectPatientitemsDO::getItemName, reqVO.getItemName()) + .eqIfPresent(InspectPatientitemsDO::getItemCode, reqVO.getItemCode()) + .eqIfPresent(InspectPatientitemsDO::getPrice, reqVO.getPrice()) + .eqIfPresent(InspectPatientitemsDO::getDiscountedPrice, reqVO.getDiscountedPrice()) + .eqIfPresent(InspectPatientitemsDO::getDiscounted, reqVO.getDiscounted()) + .eqIfPresent(InspectPatientitemsDO::getSectionID, reqVO.getSectionID()) + .eqIfPresent(InspectPatientitemsDO::getExamDescription, reqVO.getExamDescription()) + .eqIfPresent(InspectPatientitemsDO::getItemResult, reqVO.getItemResult()) + .eqIfPresent(InspectPatientitemsDO::getUnit, reqVO.getUnit()) + .eqIfPresent(InspectPatientitemsDO::getHighValue, reqVO.getHighValue()) + .eqIfPresent(InspectPatientitemsDO::getLowValue, reqVO.getLowValue()) + .eqIfPresent(InspectPatientitemsDO::getItemStatus, reqVO.getItemStatus()) + .eqIfPresent(InspectPatientitemsDO::getPositive, reqVO.getPositive()) + .orderByDesc(InspectPatientitemsDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectsectionresult/InspectsSectionresultMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectsectionresult/InspectsSectionresultMapper.java new file mode 100644 index 0000000..6efe29d --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectsectionresult/InspectsSectionresultMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.inspect.dal.mysql.inspectsectionresult; + +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.inspect.dal.dataobject.inspectsectionresult.InspectsSectionresultDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectsectionresult.vo.*; + +/** + * 科室小结 Mapper + * + * @author 李晓东 + */ +@Mapper +public interface InspectsSectionresultMapper extends BaseMapperX { + + default PageResult selectPage(InspectsSectionresultPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(InspectsSectionresultDO::getSectionID, reqVO.getSectionID()) + .eqIfPresent(InspectsSectionresultDO::getMedicalidSn, reqVO.getMedicalidSn()) + .eqIfPresent(InspectsSectionresultDO::getSectionResult, reqVO.getSectionResult()) + .likeIfPresent(InspectsSectionresultDO::getSectionName, reqVO.getSectionName()) + .likeIfPresent(InspectsSectionresultDO::getDoctorName, reqVO.getDoctorName()) + .orderByDesc(InspectsSectionresultDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectstatus/InspectStatusMapper.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectstatus/InspectStatusMapper.java new file mode 100644 index 0000000..9f18c9d --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/dal/mysql/inspectstatus/InspectStatusMapper.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.inspect.dal.mysql.inspectstatus; + +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.inspect.dal.dataobject.inspectstatus.InspectStatusDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectstatus.vo.*; + +/** + * 体检状态时间 Mapper + * + * @author 李晓东 + */ +@Mapper +public interface InspectStatusMapper extends BaseMapperX { + + default PageResult selectPage(InspectStatusPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(InspectStatusDO::getMedicalSn, reqVO.getMedicalSn()) + .eqIfPresent(InspectStatusDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(InspectStatusDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(InspectStatusDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/exammodule/ExammoduleService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/exammodule/ExammoduleService.java new file mode 100644 index 0000000..e2f2e41 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/exammodule/ExammoduleService.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.inspect.service.exammodule; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.exammodule.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.exammodule.ExammoduleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +import javax.validation.Valid; + +/** + * 体检套餐 Service 接口 + * + * @author 李晓东 + */ +public interface ExammoduleService { + + /** + * 创建体检套餐 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createExammodule(@Valid ExammoduleSaveReqVO createReqVO); + + /** + * 更新体检套餐 + * + * @param updateReqVO 更新信息 + */ + void updateExammodule(@Valid ExammoduleSaveReqVO updateReqVO); + + /** + * 删除体检套餐 + * + * @param id 编号 + */ + void deleteExammodule(Integer id); + + /** + * 获得体检套餐 + * + * @param id 编号 + * @return 体检套餐 + */ + ExammoduleDO getExammodule(Integer id); + + /** + * 获得体检套餐分页 + * + * @param pageReqVO 分页查询 + * @return 体检套餐分页 + */ + PageResult getExammodulePage(ExammodulePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/exammodule/ExammoduleServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/exammodule/ExammoduleServiceImpl.java new file mode 100644 index 0000000..d398191 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/exammodule/ExammoduleServiceImpl.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.inspect.service.exammodule; + +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.exammodule.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.exammodule.ExammoduleDO; +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.inspect.dal.mysql.exammodule.ExammoduleMapper; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + + +/** + * 体检套餐 Service 实现类 + * + * @author 李晓东 + */ +@Service +@Validated +public class ExammoduleServiceImpl implements ExammoduleService { + + @Resource + private ExammoduleMapper exammoduleMapper; + + @Override + public Integer createExammodule(ExammoduleSaveReqVO createReqVO) { + // 插入 + ExammoduleDO exammodule = BeanUtils.toBean(createReqVO, ExammoduleDO.class); + exammoduleMapper.insert(exammodule); + // 返回 + return exammodule.getId(); + } + + @Override + public void updateExammodule(ExammoduleSaveReqVO updateReqVO) { + // 校验存在 + validateExammoduleExists(updateReqVO.getId()); + // 更新 + ExammoduleDO updateObj = BeanUtils.toBean(updateReqVO, ExammoduleDO.class); + exammoduleMapper.updateById(updateObj); + } + + @Override + public void deleteExammodule(Integer id) { + // 校验存在 + validateExammoduleExists(id); + // 删除 + exammoduleMapper.deleteById(id); + } + + private void validateExammoduleExists(Integer id) { + if (exammoduleMapper.selectById(id) == null) { + + } + } + + @Override + public ExammoduleDO getExammodule(Integer id) { + return exammoduleMapper.selectById(id); + } + + @Override + public PageResult getExammodulePage(ExammodulePageReqVO pageReqVO) { + return exammoduleMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectdepartment/InspectDepartmentService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectdepartment/InspectDepartmentService.java new file mode 100644 index 0000000..bdf10d3 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectdepartment/InspectDepartmentService.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.inspect.service.inspectdepartment; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectdepartment.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectdepartment.InspectDepartmentDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +import javax.validation.Valid; + +/** + * 科室 Service 接口 + * + * @author 李晓东 + */ +public interface InspectDepartmentService { + + /** + * 创建科室 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createDepartment(@Valid InspectDepartmentSaveReqVO createReqVO); + + /** + * 更新科室 + * + * @param updateReqVO 更新信息 + */ + void updateDepartment(@Valid InspectDepartmentSaveReqVO updateReqVO); + + /** + * 删除科室 + * + * @param id 编号 + */ + void deleteDepartment(String id); + + /** + * 获得科室 + * + * @param id 编号 + * @return 科室 + */ + InspectDepartmentDO getDepartment(String id); + + /** + * 获得科室分页 + * + * @param pageReqVO 分页查询 + * @return 科室分页 + */ + PageResult getDepartmentPage(InspectDepartmentPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectdepartment/InspectDepartmentServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectdepartment/InspectDepartmentServiceImpl.java new file mode 100644 index 0000000..d162d2f --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectdepartment/InspectDepartmentServiceImpl.java @@ -0,0 +1,76 @@ +package cn.iocoder.yudao.module.inspect.service.inspectdepartment; + +import org.springframework.stereotype.Service; + +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectdepartment.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectdepartment.InspectDepartmentDO; +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.inspect.dal.mysql.inspectdepartment.InspectDepartmentMapper; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + + +/** + * 科室 Service 实现类 + * + * @author 李晓东 + */ +@Service +@Validated +public class InspectDepartmentServiceImpl implements InspectDepartmentService { + + @Resource + private InspectDepartmentMapper departmentMapper; + + @Override + public String createDepartment(InspectDepartmentSaveReqVO createReqVO) { + // 插入 + InspectDepartmentDO department = BeanUtils.toBean(createReqVO, InspectDepartmentDO.class); + departmentMapper.insert(department); + // 返回 + return department.getId(); + } + + @Override + public void updateDepartment(InspectDepartmentSaveReqVO updateReqVO) { + // 校验存在 + validateDepartmentExists(updateReqVO.getId()); + // 更新 + InspectDepartmentDO updateObj = BeanUtils.toBean(updateReqVO, InspectDepartmentDO.class); + departmentMapper.updateById(updateObj); + } + + @Override + public void deleteDepartment(String id) { + // 校验存在 + validateDepartmentExists(id); + // 删除 + departmentMapper.deleteById(id); + } + + private void validateDepartmentExists(String id) { + if (departmentMapper.selectById(id) == null) { + + } + } + + @Override + public InspectDepartmentDO getDepartment(String id) { + return departmentMapper.selectById(id); + } + + @Override + public PageResult getDepartmentPage(InspectDepartmentPageReqVO pageReqVO) { + return departmentMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectitems/InspectitemsService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectitems/InspectitemsService.java new file mode 100644 index 0000000..6d1af76 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectitems/InspectitemsService.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.inspect.service.inspectitems; + +import cn.iocoder.yudao.module.inspect.controller.admin.inspectitems.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectitems.InspectitemsDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import javax.validation.Valid; + +/** + * 检查项目 Service 接口 + * + * @author 李晓东 + */ +public interface InspectitemsService { + + /** + * 创建检查项目 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createINSPECTITEMSinspectitems(@Valid InspectitemsSaveReqVO createReqVO); + + /** + * 更新检查项目 + * + * @param updateReqVO 更新信息 + */ + void updateINSPECTITEMSinspectitems(@Valid InspectitemsSaveReqVO updateReqVO); + + /** + * 删除检查项目 + * + * @param id 编号 + */ + void deleteINSPECTITEMSinspectitems(Integer id); + + /** + * 获得检查项目 + * + * @param id 编号 + * @return 检查项目 + */ + InspectitemsDO getINSPECTITEMSinspectitems(Integer id); + + /** + * 获得检查项目分页 + * + * @param pageReqVO 分页查询 + * @return 检查项目分页 + */ + PageResult getINSPECTITEMSinspectitemsPage(InspectitemsPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectitems/InspectitemsServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectitems/InspectitemsServiceImpl.java new file mode 100644 index 0000000..12eb8d2 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectitems/InspectitemsServiceImpl.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.inspect.service.inspectitems; + +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import cn.iocoder.yudao.module.inspect.controller.admin.inspectitems.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectitems.InspectitemsDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import cn.iocoder.yudao.module.inspect.dal.mysql.inspectitems.InspectitemsMapper; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + + +/** + * 检查项目 Service 实现类 + * + * @author 李晓东 + */ +@Service +@Validated +public class InspectitemsServiceImpl implements InspectitemsService { + + @Resource + private InspectitemsMapper iNSPECTITEMSinspectitemsMapper; + + @Override + public Integer createINSPECTITEMSinspectitems(InspectitemsSaveReqVO createReqVO) { + // 插入 + InspectitemsDO iNSPECTITEMSinspectitems = BeanUtils.toBean(createReqVO, InspectitemsDO.class); + iNSPECTITEMSinspectitemsMapper.insert(iNSPECTITEMSinspectitems); + // 返回 + return iNSPECTITEMSinspectitems.getId(); + } + + @Override + public void updateINSPECTITEMSinspectitems(InspectitemsSaveReqVO updateReqVO) { + // 校验存在 + validateINSPECTITEMSinspectitemsExists(updateReqVO.getId()); + // 更新 + InspectitemsDO updateObj = BeanUtils.toBean(updateReqVO, InspectitemsDO.class); + iNSPECTITEMSinspectitemsMapper.updateById(updateObj); + } + + @Override + public void deleteINSPECTITEMSinspectitems(Integer id) { + // 校验存在 + validateINSPECTITEMSinspectitemsExists(id); + // 删除 + iNSPECTITEMSinspectitemsMapper.deleteById(id); + } + + private void validateINSPECTITEMSinspectitemsExists(Integer id) { + if (iNSPECTITEMSinspectitemsMapper.selectById(id) == null) { + + } + } + + @Override + public InspectitemsDO getINSPECTITEMSinspectitems(Integer id) { + return iNSPECTITEMSinspectitemsMapper.selectById(id); + } + + @Override + public PageResult getINSPECTITEMSinspectitemsPage(InspectitemsPageReqVO pageReqVO) { + return iNSPECTITEMSinspectitemsMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientService.java new file mode 100644 index 0000000..9c863e1 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientService.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.inspect.service.inspectpatient; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatient.InspectPatientDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +import javax.validation.Valid; + +/** + * 患者信息 Service 接口 + * + * @author 李晓东 + */ +public interface InspectPatientService { + + /** + * 创建患者信息 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createPatient(@Valid InspectPatientSaveReqVO createReqVO); + + /** + * 更新患者信息 + * + * @param updateReqVO 更新信息 + */ + void updatePatient(@Valid InspectPatientSaveReqVO updateReqVO); + + /** + * 删除患者信息 + * + * @param id 编号 + */ + void deletePatient(Integer id); + + /** + * 获得患者信息 + * + * @param id 编号 + * @return 患者信息 + */ + InspectPatientDO getPatient(Integer id); + + /** + * 获得患者信息分页 + * + * @param pageReqVO 分页查询 + * @return 患者信息分页 + */ + PageResult getPatientPage(InspectPatientPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java new file mode 100644 index 0000000..4e35fa8 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.inspect.service.inspectpatient; + +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatient.InspectPatientDO; +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.inspect.dal.mysql.inspectpatient.InspectPatientMapper; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 患者信息 Service 实现类 + * + * @author 李晓东 + */ +@Service +@Validated +public class InspectPatientServiceImpl implements InspectPatientService { + + @Resource + private InspectPatientMapper patientMapper; + + @Override + public Integer createPatient(InspectPatientSaveReqVO createReqVO) { + // 插入 + InspectPatientDO patient = BeanUtils.toBean(createReqVO, InspectPatientDO.class); + patientMapper.insert(patient); + // 返回 + return patient.getId(); + } + + @Override + public void updatePatient(InspectPatientSaveReqVO updateReqVO) { + // 校验存在 + validatePatientExists(updateReqVO.getId()); + // 更新 + InspectPatientDO updateObj = BeanUtils.toBean(updateReqVO, InspectPatientDO.class); + patientMapper.updateById(updateObj); + } + + @Override + public void deletePatient(Integer id) { + // 校验存在 + validatePatientExists(id); + // 删除 + patientMapper.deleteById(id); + } + + private void validatePatientExists(Integer id) { + if (patientMapper.selectById(id) == null) { + + } + } + + @Override + public InspectPatientDO getPatient(Integer id) { + return patientMapper.selectById(id); + } + + @Override + public PageResult getPatientPage(InspectPatientPageReqVO pageReqVO) { + return patientMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatientitems/InspectPatientitemsService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatientitems/InspectPatientitemsService.java new file mode 100644 index 0000000..23caaac --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatientitems/InspectPatientitemsService.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.inspect.service.inspectpatientitems; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatientitems.InspectPatientitemsDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +import javax.validation.Valid; + +/** + * 患者体检项目 Service 接口 + * + * @author 李晓东 + */ +public interface InspectPatientitemsService { + + /** + * 创建患者体检项目 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createPatientitems(@Valid InspectPatientitemsSaveReqVO createReqVO); + + /** + * 更新患者体检项目 + * + * @param updateReqVO 更新信息 + */ + void updatePatientitems(@Valid InspectPatientitemsSaveReqVO updateReqVO); + + /** + * 删除患者体检项目 + * + * @param id 编号 + */ + void deletePatientitems(Integer id); + + /** + * 获得患者体检项目 + * + * @param id 编号 + * @return 患者体检项目 + */ + InspectPatientitemsDO getPatientitems(Integer id); + + /** + * 获得患者体检项目分页 + * + * @param pageReqVO 分页查询 + * @return 患者体检项目分页 + */ + PageResult getPatientitemsPage(InspectPatientitemsPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatientitems/InspectPatientitemsServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatientitems/InspectPatientitemsServiceImpl.java new file mode 100644 index 0000000..7b06738 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatientitems/InspectPatientitemsServiceImpl.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.inspect.service.inspectpatientitems; + +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatientitems.InspectPatientitemsDO; +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.inspect.dal.mysql.inspectpatientitems.InspectPatientitemsMapper; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 患者体检项目 Service 实现类 + * + * @author 李晓东 + */ +@Service +@Validated +public class InspectPatientitemsServiceImpl implements InspectPatientitemsService { + + @Resource + private InspectPatientitemsMapper patientitemsMapper; + + @Override + public Integer createPatientitems(InspectPatientitemsSaveReqVO createReqVO) { + // 插入 + InspectPatientitemsDO patientitems = BeanUtils.toBean(createReqVO, InspectPatientitemsDO.class); + patientitemsMapper.insert(patientitems); + // 返回 + return patientitems.getId(); + } + + @Override + public void updatePatientitems(InspectPatientitemsSaveReqVO updateReqVO) { + // 校验存在 + validatePatientitemsExists(updateReqVO.getId()); + // 更新 + InspectPatientitemsDO updateObj = BeanUtils.toBean(updateReqVO, InspectPatientitemsDO.class); + patientitemsMapper.updateById(updateObj); + } + + @Override + public void deletePatientitems(Integer id) { + // 校验存在 + validatePatientitemsExists(id); + // 删除 + patientitemsMapper.deleteById(id); + } + + private void validatePatientitemsExists(Integer id) { + if (patientitemsMapper.selectById(id) == null) { + + } + } + + @Override + public InspectPatientitemsDO getPatientitems(Integer id) { + return patientitemsMapper.selectById(id); + } + + @Override + public PageResult getPatientitemsPage(InspectPatientitemsPageReqVO pageReqVO) { + return patientitemsMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectsectionresult/InspectsSectionresultService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectsectionresult/InspectsSectionresultService.java new file mode 100644 index 0000000..8b57c69 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectsectionresult/InspectsSectionresultService.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.inspect.service.inspectsectionresult; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectsectionresult.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectsectionresult.InspectsSectionresultDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +import javax.validation.Valid; + +/** + * 科室小结 Service 接口 + * + * @author 李晓东 + */ +public interface InspectsSectionresultService { + + /** + * 创建科室小结 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createsSectionresult(@Valid InspectsSectionresultSaveReqVO createReqVO); + + /** + * 更新科室小结 + * + * @param updateReqVO 更新信息 + */ + void updatesSectionresult(@Valid InspectsSectionresultSaveReqVO updateReqVO); + + /** + * 删除科室小结 + * + * @param id 编号 + */ + void deletesSectionresult(Integer id); + + /** + * 获得科室小结 + * + * @param id 编号 + * @return 科室小结 + */ + InspectsSectionresultDO getsSectionresult(Integer id); + + /** + * 获得科室小结分页 + * + * @param pageReqVO 分页查询 + * @return 科室小结分页 + */ + PageResult getsSectionresultPage(InspectsSectionresultPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectsectionresult/InspectsSectionresultServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectsectionresult/InspectsSectionresultServiceImpl.java new file mode 100644 index 0000000..ecd9764 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectsectionresult/InspectsSectionresultServiceImpl.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.inspect.service.inspectsectionresult; + +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectsectionresult.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectsectionresult.InspectsSectionresultDO; +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.inspect.dal.mysql.inspectsectionresult.InspectsSectionresultMapper; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 科室小结 Service 实现类 + * + * @author 李晓东 + */ +@Service +@Validated +public class InspectsSectionresultServiceImpl implements InspectsSectionresultService { + + @Resource + private InspectsSectionresultMapper sSectionresultMapper; + + @Override + public Integer createsSectionresult(InspectsSectionresultSaveReqVO createReqVO) { + // 插入 + InspectsSectionresultDO sSectionresult = BeanUtils.toBean(createReqVO, InspectsSectionresultDO.class); + sSectionresultMapper.insert(sSectionresult); + // 返回 + return sSectionresult.getId(); + } + + @Override + public void updatesSectionresult(InspectsSectionresultSaveReqVO updateReqVO) { + // 校验存在 + validatesSectionresultExists(updateReqVO.getId()); + // 更新 + InspectsSectionresultDO updateObj = BeanUtils.toBean(updateReqVO, InspectsSectionresultDO.class); + sSectionresultMapper.updateById(updateObj); + } + + @Override + public void deletesSectionresult(Integer id) { + // 校验存在 + validatesSectionresultExists(id); + // 删除 + sSectionresultMapper.deleteById(id); + } + + private void validatesSectionresultExists(Integer id) { + if (sSectionresultMapper.selectById(id) == null) { + + } + } + + @Override + public InspectsSectionresultDO getsSectionresult(Integer id) { + return sSectionresultMapper.selectById(id); + } + + @Override + public PageResult getsSectionresultPage(InspectsSectionresultPageReqVO pageReqVO) { + return sSectionresultMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectstatus/InspectStatusService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectstatus/InspectStatusService.java new file mode 100644 index 0000000..db9f865 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectstatus/InspectStatusService.java @@ -0,0 +1,56 @@ +package cn.iocoder.yudao.module.inspect.service.inspectstatus; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectstatus.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectstatus.InspectStatusDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; + +import javax.validation.Valid; + +/** + * 体检状态时间 Service 接口 + * + * @author 李晓东 + */ +public interface InspectStatusService { + + /** + * 创建体检状态时间 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createStatus(@Valid InspectStatusSaveReqVO createReqVO); + + /** + * 更新体检状态时间 + * + * @param updateReqVO 更新信息 + */ + void updateStatus(@Valid InspectStatusSaveReqVO updateReqVO); + + /** + * 删除体检状态时间 + * + * @param id 编号 + */ + void deleteStatus(Integer id); + + /** + * 获得体检状态时间 + * + * @param id 编号 + * @return 体检状态时间 + */ + InspectStatusDO getStatus(Integer id); + + /** + * 获得体检状态时间分页 + * + * @param pageReqVO 分页查询 + * @return 体检状态时间分页 + */ + PageResult getStatusPage(InspectStatusPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectstatus/InspectStatusServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectstatus/InspectStatusServiceImpl.java new file mode 100644 index 0000000..3ce31a5 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectstatus/InspectStatusServiceImpl.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.inspect.service.inspectstatus; + +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.iocoder.yudao.module.inspect.controller.admin.inspectstatus.vo.*; +import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectstatus.InspectStatusDO; +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.inspect.dal.mysql.inspectstatus.InspectStatusMapper; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 体检状态时间 Service 实现类 + * + * @author 李晓东 + */ +@Service +@Validated +public class InspectStatusServiceImpl implements InspectStatusService { + + @Resource + private InspectStatusMapper statusMapper; + + @Override + public Integer createStatus(InspectStatusSaveReqVO createReqVO) { + // 插入 + InspectStatusDO status = BeanUtils.toBean(createReqVO, InspectStatusDO.class); + statusMapper.insert(status); + // 返回 + return status.getId(); + } + + @Override + public void updateStatus(InspectStatusSaveReqVO updateReqVO) { + // 校验存在 + validateStatusExists(updateReqVO.getId()); + // 更新 + InspectStatusDO updateObj = BeanUtils.toBean(updateReqVO, InspectStatusDO.class); + statusMapper.updateById(updateObj); + } + + @Override + public void deleteStatus(Integer id) { + // 校验存在 + validateStatusExists(id); + // 删除 + statusMapper.deleteById(id); + } + + private void validateStatusExists(Integer id) { + if (statusMapper.selectById(id) == null) { + + } + } + + @Override + public InspectStatusDO getStatus(Integer id) { + return statusMapper.selectById(id); + } + + @Override + public PageResult getStatusPage(InspectStatusPageReqVO pageReqVO) { + return statusMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/exammodule/ExammoduleMapper.xml b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/exammodule/ExammoduleMapper.xml new file mode 100644 index 0000000..aff59f5 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/exammodule/ExammoduleMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectdepartment/InspectDepartmentMapper.xml b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectdepartment/InspectDepartmentMapper.xml new file mode 100644 index 0000000..efd7add --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectdepartment/InspectDepartmentMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectitems/inspectitemsMapper.xml b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectitems/inspectitemsMapper.xml new file mode 100644 index 0000000..6db171a --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectitems/inspectitemsMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectpatient/InspectPatientMapper.xml b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectpatient/InspectPatientMapper.xml new file mode 100644 index 0000000..5ec8360 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectpatient/InspectPatientMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectpatientitems/InspectPatientitemsMapper.xml b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectpatientitems/InspectPatientitemsMapper.xml new file mode 100644 index 0000000..ea9ab14 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectpatientitems/InspectPatientitemsMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectsectionresult/InspectsSectionresultMapper.xml b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectsectionresult/InspectsSectionresultMapper.xml new file mode 100644 index 0000000..9455ff6 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectsectionresult/InspectsSectionresultMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectstatus/InspectStatusMapper.xml b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectstatus/InspectStatusMapper.xml new file mode 100644 index 0000000..110c195 --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/resources/mapper/inspectstatus/InspectStatusMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index efd53c8..83d5080 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -31,6 +31,11 @@ yudao-module-infra-biz ${revision} + + cn.iocoder.boot + yudao-module-inspect-biz + ${revision} + diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java b/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java index 57db3f9..7be472b 100644 --- a/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java +++ b/yudao-server/src/main/java/cn/iocoder/yudao/server/YudaoServerApplication.java @@ -17,7 +17,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; public class YudaoServerApplication { public static void main(String[] args) { - // 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章 + // 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章cc // 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章 // 如果你碰到启动的问题,请认真阅读 https://doc.iocoder.cn/quick-start/ 文章 diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index e0e135c..e18e4fa 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -108,7 +108,7 @@ aj: cache-number: 1000 # local 缓存的阈值,达到这个值,清除缓存 timing-clear: 180 # local定时清除过期缓存(单位秒),设置为0代表不执行 type: blockPuzzle # 验证码类型 default两种都实例化。 blockPuzzle 滑块拼图 clickWord 文字点选 - water-mark: 芋道源码 # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode + water-mark: 体检系统 # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode interference-options: 0 # 滑动干扰项(0/1/2) req-frequency-limit-enable: false # 接口请求次数一分钟限制是否开启 true|false req-get-lock-limit: 5 # 验证失败 5 次,get接口锁定