新增根据体检编号获取患者信息和检查信息接口
This commit is contained in:
parent
6427c74cce
commit
246cd830ef
@ -81,6 +81,12 @@ public class InspectPatientController {
|
||||
InspectPatientDO patient = patientService.getPatient(id);
|
||||
return success(BeanUtils.toBean(patient, InspectPatientRespVO.class));
|
||||
}
|
||||
@GetMapping("/getpatientjson")
|
||||
@Operation(summary = "根据体检获得患者信息")
|
||||
public CommonResult<InspectPatientDO> getPatientInfo(String medicalSn)
|
||||
{
|
||||
return success(patientService.getPatientInfo(medicalSn));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得患者信息分页")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems;
|
||||
|
||||
import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatient.InspectPatientDO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -76,6 +77,14 @@ public class InspectPatientitemsController {
|
||||
patientitemsService.deletePatientitemcode(medicalSn);
|
||||
return success(true);
|
||||
}
|
||||
@GetMapping("/getPatientItemJson")
|
||||
@Operation(summary = "根据体检编号获取患者体检项目")
|
||||
public CommonResult<List<InspectPatientDO>> GetPatientItemList(@RequestParam("medicalSn") String medicalSn)
|
||||
{
|
||||
List<InspectPatientDO> patientitems = patientitemsService.GetPatientItemList(medicalSn);
|
||||
return success(patientitems);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得患者体检项目")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatient;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@ -49,7 +50,8 @@ public class InspectPatientDO {
|
||||
* 出生日期
|
||||
*/
|
||||
@TableField("birthday")
|
||||
private LocalDate birthday;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime birthday;
|
||||
/**
|
||||
* 证件类型
|
||||
*/
|
||||
@ -94,7 +96,8 @@ public class InspectPatientDO {
|
||||
* 体检登记日期 体检日期
|
||||
*/
|
||||
@TableField("medicalDateTime")
|
||||
private LocalDateTime medicalDateTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime medicalDateTime;
|
||||
/**
|
||||
* 收费方式:现金 微信 刷卡 支票 免费等,从字典表里取
|
||||
*/
|
||||
@ -124,7 +127,8 @@ public class InspectPatientDO {
|
||||
* 审核时间
|
||||
*/
|
||||
@TableField("auditorTime")
|
||||
private LocalDateTime auditorTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime auditorTime;
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ -140,5 +144,6 @@ public class InspectPatientDO {
|
||||
* 收费时间
|
||||
*/
|
||||
@TableField("chargetime")
|
||||
private LocalDateTime chargetime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime chargetime;
|
||||
}
|
@ -44,6 +44,10 @@ public interface InspectPatientService {
|
||||
* @return 患者信息
|
||||
*/
|
||||
InspectPatientDO getPatient(Integer id);
|
||||
/*
|
||||
* 根据体检编号获取患者信息的json
|
||||
* */
|
||||
InspectPatientDO getPatientInfo(String medicalSn);
|
||||
|
||||
/**
|
||||
* 获得患者信息分页
|
||||
|
@ -1,15 +1,15 @@
|
||||
package cn.iocoder.yudao.module.inspect.service.inspectpatient;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
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;
|
||||
|
||||
@ -65,6 +65,15 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
public InspectPatientDO getPatient(Integer id) {
|
||||
return patientMapper.selectById(id);
|
||||
}
|
||||
@Override
|
||||
public InspectPatientDO getPatientInfo(String medicalSn)
|
||||
{
|
||||
QueryWrapper<InspectPatientDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("medicalSn", medicalSn);
|
||||
InspectPatientDO patientDO= patientMapper.selectOne(queryWrapper);
|
||||
|
||||
return patientDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InspectPatientDO> getPatientPage(InspectPatientPageReqVO pageReqVO) {
|
||||
|
@ -2,6 +2,7 @@ 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.inspectpatient.InspectPatientDO;
|
||||
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;
|
||||
@ -48,6 +49,10 @@ public interface InspectPatientitemsService {
|
||||
* 根据条件编号删除对应的数据
|
||||
* */
|
||||
void deletePatientitemcode(String medicalSn);
|
||||
/*
|
||||
* 根据体检编号查询患者检查项目JSON
|
||||
* */
|
||||
List<InspectPatientDO> GetPatientItemList(String medicalSn);
|
||||
|
||||
/**
|
||||
* 获得患者体检项目
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@ -81,8 +82,15 @@ public class InspectPatientitemsServiceImpl implements InspectPatientitemsServic
|
||||
queryWrapper.eq("medicalSn", medicalSn);
|
||||
patientitemsMapper.delete(queryWrapper);
|
||||
}
|
||||
@Override
|
||||
public List<InspectPatientDO> GetPatientItemList(String medicalSn)
|
||||
{
|
||||
QueryWrapper<InspectPatientDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("medicalSn", medicalSn);
|
||||
List<InspectPatientDO> patientDO= patientMapper.selectList(queryWrapper);
|
||||
|
||||
|
||||
return patientDO;
|
||||
}
|
||||
|
||||
private void validatePatientitemsExists(Integer id) {
|
||||
if (patientitemsMapper.selectById(id) == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user