JAVA全系列 教程
3762个小节阅读:7095.2k
目录
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
序号 | 接口名称 | 接口地址 | 请求类型 |
---|---|---|---|
1 | 查询所有检查中和检查完成的项目 | /doctor/check/queryAllCheckResultForPage | post |
xxxxxxxxxx
{"checkItemIds":[],"regId":""}
返回JSON数据
名称 | 类型 | 其他信息 |
---|---|---|
msg | String | |
total | int | |
code | number | |
data | object [] | item 类型: object |
├─ itemId | String | |
├─ checkItemId | number | |
├─ checkItemName | String | |
├─ price | number | |
├─ resultMsg | String | |
├─ resultImg | String | |
├─ patientId | String | |
├─ patientName | String | |
├─ resultStatus | String | |
├─ regId | String | |
├─ createTime | String | |
├─ updateTime | String | |
├─ createBy | String | |
├─ updateBy | String |
创建CheckResultDto、CheckResult
xxxxxxxxxx
package com.bjsxt.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bjsxt.domain.CheckResult;
public interface CheckResultMapper extends BaseMapper<CheckResult> {
}
创建CheckResultMapper.xml
xxxxxxxxxx
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bjsxt.mapper.CheckResultMapper">
<resultMap id="BaseResultMap" type="com.bjsxt.domain.CheckResult">
<!--@mbg.generated-->
<!--@Table his_check_result-->
<id column="coc_id" jdbcType="VARCHAR" property="itemId" />
<result column="check_item_id" jdbcType="INTEGER" property="checkItemId" />
<result column="check_item_name" jdbcType="VARCHAR" property="checkItemName" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="result_msg" jdbcType="VARCHAR" property="resultMsg" />
<result column="result_img" jdbcType="VARCHAR" property="resultImg" />
<result column="patient_id" jdbcType="VARCHAR" property="patientId" />
<result column="patient_name" jdbcType="VARCHAR" property="patientName" />
<result column="result_status" jdbcType="CHAR" property="resultStatus" />
<result column="reg_id" jdbcType="VARCHAR" property="regId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
coc_id, check_item_id, check_item_name, price, result_msg, result_img, patient_id,
patient_name, result_status, reg_id, create_time, update_time, create_by, update_by
</sql>
</mapper>
在CheckResultService、CheckResultServiceImpl中增加以下方法
xxxxxxxxxx
/**
* 分页查询所有检查的项目
* @param checkResultDto
* @return
*/
DataGridView queryAllCheckResultForPage(CheckResultDto checkResultDto);
xxxxxxxxxx
@Override
public DataGridView queryAllCheckResultForPage(CheckResultDto checkResultDto) {
Page<CheckResult> page=new Page<>(checkResultDto.getPageNum(),checkResultDto.getPageSize());
QueryWrapper<CheckResult> qw=new QueryWrapper<>();
qw.in(checkResultDto.getCheckItemIds().size()>0,CheckResult.COL_CHECK_ITEM_ID,checkResultDto.getCheckItemIds());
qw.like(StringUtils.isNotBlank(checkResultDto.getRegId()),CheckResult.COL_REG_ID,checkResultDto.getRegId());
qw.like(StringUtils.isNotBlank(checkResultDto.getPatientName()),CheckResult.COL_PATIENT_NAME,checkResultDto.getPatientName());
qw.eq(StringUtils.isNotBlank(checkResultDto.getResultStatus()),CheckResult.COL_RESULT_STATUS,checkResultDto.getResultStatus());
this.checkResultMapper.selectPage(page,qw);
return new DataGridView(page.getTotal(),page.getRecords());
}
修改CheckResultController,增加查询所有检查中的和检查完成了的项目
xxxxxxxxxx
/**
* 查询参与检查的项目
*/
@PostMapping("queryAllCheckResultForPage")
@SentinelResource(blockHandlerClass = BaseController.class,
blockHandler = "handleException",fallbackClass = BaseController.class,fallback = "handleError")
public AjaxResult queryAllCheckResultForPage(@RequestBody CheckResultDto checkResultDto){
DataGridView dataGridView=this.checkResultService.queryAllCheckResultForPage(checkResultDto);
return AjaxResult.success("查询成功",dataGridView.getData(),dataGridView.getTotal());
}
查询所有检查中和检查完成的项目/doctor/check/queryAllCheckResultForPage