diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java index 4f7c71ecd..1b4c3e70f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java @@ -71,5 +71,7 @@ public class UserProfileRespVO { private String openid; } + private String orgId; + private String isexamine; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java index b58712b13..54920f89e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java @@ -37,4 +37,6 @@ public class UserPageReqVO extends PageParam { private Long deptId; private String orgId; + + private String isexamine; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java index 0fc53c410..4dc690427 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java @@ -72,4 +72,6 @@ public class UserRespVO{ @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式") private LocalDateTime createTime; private String orgId; + + private String isexamine; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java index 491f42987..9a582335b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java @@ -70,6 +70,8 @@ public class UserSaveReqVO { */ @NotBlank(message = "机构不能为空") private String orgId; + + private String isexamine; // ========== 仅【创建】时,需要传递的字段 ========== @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java index 888d0e142..d36bf9dd0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java @@ -22,4 +22,6 @@ public class UserSimpleRespVO { @Schema(description = "部门名称", example = "IT 部") private String deptName; private String orgId; + + private String isexamine; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/user/AdminUserDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/user/AdminUserDO.java index eee3a1207..0c90c103f 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/user/AdminUserDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/user/AdminUserDO.java @@ -97,4 +97,10 @@ public class AdminUserDO extends TenantBaseDO { */ @TableField("orgId") private String orgId; + /** + * 是否有审核权限 + */ + @TableField("isexamine") + private String isexamine; + } diff --git a/yudao-module-tblist/yudao-module-tblist-biz/pom.xml b/yudao-module-tblist/yudao-module-tblist-biz/pom.xml index 0c95f4b70..049b483b3 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/pom.xml +++ b/yudao-module-tblist/yudao-module-tblist-biz/pom.xml @@ -120,6 +120,12 @@ com.xingyuv spring-boot-starter-captcha-plus + + cn.iocoder.boot + yudao-module-system-biz + 2.1.0-jdk8-snapshot + compile + diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java index 749d31380..340cc8557 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; +import cn.iocoder.yudao.module.system.service.user.AdminUserService; import cn.iocoder.yudao.module.tblist.service.patientexamlist.org.OrgService; import com.mzt.logapi.starter.annotation.LogRecord; import org.slf4j.Logger; @@ -18,6 +20,7 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; import java.io.IOException; +import java.util.stream.Collectors; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -29,6 +32,7 @@ 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 static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo.*; import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.PatientexamlistDO; @@ -48,7 +52,8 @@ public class PatientexamlistController { @Resource private PatientexamlistService patientexamlistService; - + @Resource + private AdminUserService userService; @Resource private OrgService OrgService; @@ -91,6 +96,25 @@ public class PatientexamlistController { @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')") public CommonResult> getPatientexamlistPage(@Valid PatientexamlistPageReqVO pageReqVO) { PageResult pageResult = patientexamlistService.getPatientexamlistPage(pageReqVO); + List doList=new ArrayList<>(); + String devicetype=pageReqVO.getDeviceType(); + if(devicetype.equals("US"))//表示只查询超声的数据 + { + // 筛选条件: + doList = pageResult.getList().stream() + .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().equals(devicetype))) + .collect(Collectors.toList()); + } + else//表示只查询影像的数据 + { + // 筛选条件: + doList = pageResult.getList().stream() + .filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().equals("US"))) + .collect(Collectors.toList()); + } + + pageResult.setList(doList); + return success(BeanUtils.toBean(pageResult, PatientexamlistRespVO.class)); } @@ -133,15 +157,35 @@ public class PatientexamlistController { } @PutMapping("/examineupdate") - @Operation(summary = "超声审核更新数据") + @Operation(summary = "超声保存更新数据") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')") - @LogRecord(type = "超声审核", subType = "审核", bizNo ="{{#updateReqVO.getId}}" , success = "审核ID为{{#updateReqVO.getId}}的患者") + @LogRecord(type = "超声保存", subType = "保存", bizNo ="{{#updateReqVO.getId}}" , success = "保存ID为{{#updateReqVO.getId}}的患者") public CommonResult updateexaminelist(@Valid @RequestBody PatientexamlistSaveReqVO updateReqVO) { LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); updateReqVO.setDiagDate(dateTime); - updateReqVO.setReviewDate(dateTime); + patientexamlistService.updatePatientexamlist(updateReqVO); + return success(true); + } + + @GetMapping("/examine") + @Operation(summary = "超声保存更新数据") + @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')") + @LogRecord(type = "超声审核", subType = "审核", bizNo ="{{#updateReqVO.getId}}" , success = "审核ID为{{#id}}的患者") + public CommonResult examine(@RequestParam("id") String id) { + + LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), + DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + //获取当前登陆用户 + AdminUserDO user = userService.getUser(getLoginUserId()); + PatientexamlistSaveReqVO updateReqVO=new PatientexamlistSaveReqVO(); + updateReqVO.setId(id); + updateReqVO.setReviewDoctorId(String.valueOf(user.getId())); + updateReqVO.setReviewDoctor(user.getUsername()); + updateReqVO.setReviewDate(dateTime); + updateReqVO.setReviewStatus("1"); + updateReqVO.setReportstatus("已审核"); patientexamlistService.updatePatientexamlist(updateReqVO); return success(true); } diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistSaveReqVO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistSaveReqVO.java index e27aa72ae..c3955b59a 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistSaveReqVO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistSaveReqVO.java @@ -70,6 +70,9 @@ public class PatientexamlistSaveReqVO { @Schema(description = "诊断医生") private String diagDoctor; + @Schema(description = "审核医生ID") + private String reviewDoctorId; + @Schema(description = "审核医生") private String reviewDoctor; @@ -93,5 +96,7 @@ public class PatientexamlistSaveReqVO { @Schema(description = "开单科室") private String billDoctorDepartment; + @Schema(description = "审核状态") + private String reviewStatus; } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java index b4999ad97..0f562f855 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java @@ -131,6 +131,11 @@ public class PatientexamlistDO extends BaseDO { */ @TableField(value = "diagDoctor") private String diagDoctor; + /** + * 审核医生ID + */ + @TableField(value = "reviewDoctorId") + private String reviewDoctorId; /** * 审核医生 */ @@ -165,4 +170,7 @@ public class PatientexamlistDO extends BaseDO { @TableField(value = "billDoctorDepartment") private String billDoctorDepartment; + @TableField(value = "reviewStatus") + private String reviewStatus; + } \ No newline at end of file