返修审核
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run

This commit is contained in:
旺仔 2024-12-23 11:37:19 +08:00
parent fadf46da04
commit c17781eed0
6 changed files with 320 additions and 0 deletions

View File

@ -0,0 +1,44 @@
package cn.iocoder.yudao.module.system.controller.admin.process;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.*;
import cn.iocoder.yudao.module.system.controller.admin.process.vo.*;
import cn.iocoder.yudao.framework.common.pojo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.process.ProcessDO;
import cn.iocoder.yudao.module.system.service.process.ProcessService;
import java.util.*;
import java.io.IOException;
import javax.annotation.*;
import javax.validation.*;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 危急值记录")
@RestController
@RequestMapping("/system/process")
@Validated
public class ProcessController {
@Resource
private ProcessService processService;
@GetMapping("/get")
@Operation(summary = "获得危急值记录")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<ProcessDO> getProcess(@RequestParam("id") String id) {
ProcessDO process = processService.getProcess(id);
return success(process);
}
@GetMapping("/page")
@Operation(summary = "获得危急值记录分页")
public CommonResult<PageResult<ProcessDO>> getProcessPage(@Valid ProcessPageReqVO pageReqVO) {
PageResult<ProcessDO> pageResult = processService.getProcessPage(pageReqVO);
return success(pageResult);
}
}

View File

@ -0,0 +1,50 @@
package cn.iocoder.yudao.module.system.controller.admin.process.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.format.annotation.DateTimeFormat;
import cn.iocoder.yudao.framework.common.pojo.*;
import java.util.*;
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 ProcessPageReqVO extends PageParam {
@Schema(description = "审核开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime processDate_ge;
@Schema(description = "审核结束时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime processDate_le;
@Schema(description = "申请开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime applyDateTime_ge;
@Schema(description = "申请结束时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime applyDateTime_le;
@Schema(description = "审核状态 0申请 1 审核2 拒绝")
private Integer processstats;
@Schema(description = "登记ID :patientid ", example = "23025")
private String regId;
@Schema(description = "姓名", example = "芋艿")
private String pname;
@Schema(description = "机构ID", example = "5547")
private String orgId;
@Schema(description = "检查ID,一人多个检查的检查id", example = "17411")
private String examId;
}

View File

@ -0,0 +1,101 @@
package cn.iocoder.yudao.module.system.dal.dataobject.process;
import lombok.*;
import java.util.*;
import java.time.*;
import com.baomidou.mybatisplus.annotation.*;
/**
* 危急值记录 DO
*
* @author 李传洋
*/
@TableName("tb_process")
@KeySequence("tb_process_seq")
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProcessDO {
/**
* 主键
*/
@TableId(value = "ID", type = IdType.INPUT)
private String id;
/**
* 机构ID
*/
@TableField("orgId")
private String orgId;
/**
* 检查ID,一人多个检查的检查id
*/
@TableField("examId")
private String examId;
/**
* 登记ID :patientid
*/
@TableField("regId")
private String regId;
/**
* 审核机构id
*/
@TableField("processOrgId")
private String processOrgId;
/**
* 审核机构名称
*/
@TableField("processorgName")
private String processorgName;
/**
* 审核医生
*/
@TableField("processDoctor")
private String processDoctor;
/**
* 审核时间
*/
@TableField("processDate")
private LocalDateTime processDate;
/**
* 申请原因
*/
@TableField("processContent")
private String processContent;
/**
* 申请医生
*/
@TableField("applyDoctor")
private String applyDoctor;
/**
* 申请时间
*/
@TableField("applyDateTime")
private LocalDateTime applyDateTime;
/**
* 备注
*/
@TableField("remark")
private String remark;
/**
* 审核状态 0申请 1 审核2 拒绝
*/
@TableField("processstats")
private Integer processstats;
/**
* 拒绝原因
*/
@TableField("refuseremark")
private String refuseremark;
/**
* 姓名
*/
@TableField("pname")
private String pname;
}

View File

@ -0,0 +1,33 @@
package cn.iocoder.yudao.module.system.dal.mysql.process;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.controller.admin.process.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.process.ProcessDO;
import com.baomidou.mybatisplus.annotation.*;
import org.apache.ibatis.annotations.*;
/**
* 危急值记录 Mapper
*
* @author 李传洋
*/
@InterceptorIgnore(tenantLine = "true")
@Mapper
public interface ProcessMapper extends BaseMapperX<ProcessDO> {
//分页查询
default PageResult<ProcessDO> selectPage(ProcessPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ProcessDO>()
.geIfPresent(ProcessDO::getProcessDate, reqVO.getProcessDate_ge())
.leIfPresent(ProcessDO::getProcessDate, reqVO.getProcessDate_le())
.geIfPresent(ProcessDO::getApplyDateTime, reqVO.getApplyDateTime_ge())
.leIfPresent(ProcessDO::getApplyDateTime, reqVO.getApplyDateTime_le())
.eqIfPresent(ProcessDO::getProcessstats, reqVO.getProcessstats())
.likeIfPresent(ProcessDO::getRegId, reqVO.getRegId())
.likeIfPresent(ProcessDO::getPname, reqVO.getPname())
.orderByDesc(ProcessDO::getApplyDateTime));
}
}

View File

@ -0,0 +1,33 @@
package cn.iocoder.yudao.module.system.service.process;
import java.util.*;
import javax.validation.*;
import cn.iocoder.yudao.module.system.controller.admin.process.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.process.ProcessDO;
import cn.iocoder.yudao.framework.common.pojo.*;
/**
* 危急值记录 Service 接口
*
* @author 李传洋
*/
public interface ProcessService {
/**
* 获得危急值记录
*
* @param id 编号
* @return 危急值记录
*/
ProcessDO getProcess(String id);
/**
* 获得危急值记录分页
*
* @param pageReqVO 分页查询
* @return 危急值记录分页
*/
PageResult<ProcessDO> getProcessPage(ProcessPageReqVO pageReqVO);
}

View File

@ -0,0 +1,59 @@
package cn.iocoder.yudao.module.system.service.process;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
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.system.controller.admin.process.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.process.ProcessDO;
import cn.iocoder.yudao.framework.common.pojo.*;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.system.dal.mysql.process.ProcessMapper;
import javax.annotation.*;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 危急值记录 Service 实现类
*
* @author 李传洋
*/
@Service
@Validated
public class ProcessServiceImpl implements ProcessService {
@Resource
private ProcessMapper processMapper;
@Resource
private AdminUserService userService;
private void validateProcessExists(String id) {
if (processMapper.selectById(id) == null) {
throw exception(new ErrorCode(1, "ID为空"));
}
}
@Override
public ProcessDO getProcess(String id) {
return processMapper.selectById(id);
}
@Override
public PageResult<ProcessDO> getProcessPage(ProcessPageReqVO pageReqVO) {
if (pageReqVO != null) {
if (pageReqVO.getProcessDate_le() != null)
pageReqVO.setProcessDate_le(pageReqVO.getProcessDate_le().plusDays(1));
if (pageReqVO.getApplyDateTime_le() != null)
pageReqVO.setApplyDateTime_le(pageReqVO.getApplyDateTime_le().plusDays(1));
}
return processMapper.selectPage(pageReqVO);
}
}