From 3c46b264b86bb38984370f685c6866c5f7784808 Mon Sep 17 00:00:00 2001 From: zhs <zhs18203887318@163.com> Date: 星期三, 16 四月 2025 21:42:39 +0800 Subject: [PATCH] 04-16改_手术病人分页and患者信息子页面时间查询 --- smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java | 4 ++-- smartor/src/main/java/com/smartor/domain/PatMedOperation.java | 13 +++++++++++++ smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 14 +++++++++++++- smartor/src/main/java/com/smartor/domain/PatMedInhosp.java | 8 ++++++++ smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml | 8 +++++++- ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java | 5 ++++- 6 files changed, 47 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java index e513751..bea5353 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOperationController.java @@ -1,6 +1,8 @@ package com.ruoyi.web.controller.smartor; import java.util.List; + +import com.ruoyi.common.utils.PageUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import javax.servlet.http.HttpServletResponse; @@ -45,7 +47,8 @@ @PostMapping("/list") public TableDataInfo list(@RequestBody PatMedOperation patMedOperation) { - startPage(); + //startPage(); + PageUtils.startPageByPost(patMedOperation.getPageNum(), patMedOperation.getPageSize()); List<PatMedOperation> list = patMedOperationService.selectPatMedOperationList(patMedOperation); return getDataTable(list); } diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java index a71fba0..e50b10a 100644 --- a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java +++ b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java @@ -351,24 +351,32 @@ /** * 寮�濮嬪嚭闄㈡棩鏈� */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(value = "寮�濮嬪嚭闄㈡棩鏈�") private Date startOutHospTime; /** * 缁撴潫鍑洪櫌鏃ユ湡 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(value = "缁撴潫鍑洪櫌鏃ユ湡") private Date endOutHospTime; /** * 寮�濮嬪叆闄㈡棩鏈� */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(value = "寮�濮嬪叆闄㈡棩鏈�") private Date startInHospTime; /** * 缁撴潫鍏ラ櫌鏃ユ湡 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(value = "缁撴潫鍏ラ櫌鏃ユ湡") private Date endInHospTime; diff --git a/smartor/src/main/java/com/smartor/domain/PatMedOperation.java b/smartor/src/main/java/com/smartor/domain/PatMedOperation.java index e4c6111..ba4c151 100644 --- a/smartor/src/main/java/com/smartor/domain/PatMedOperation.java +++ b/smartor/src/main/java/com/smartor/domain/PatMedOperation.java @@ -498,5 +498,18 @@ @ApiModelProperty(value = "缁撴潫鎵嬫湳鏃堕棿") private Date endTime; + /** + * pageNum + */ + @ApiModelProperty("pageNum") + private Integer pageNum; + + /** + * pageSize + */ + @ApiModelProperty("pageSize") + private Integer pageSize; + + } diff --git a/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java b/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java index 3779efc..b859f64 100644 --- a/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java +++ b/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java @@ -199,12 +199,12 @@ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(value = "寮�濮嬪氨璇婃椂闂�") private Date beginTime; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(value = "缁撴潫灏辫瘖鏃堕棿") private Date endTime; diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml index fe8050e..e17bbef 100644 --- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml @@ -202,7 +202,7 @@ a.del_flag = 0 AND b.del_flag = 0 AND a.idcardno IS NOT NULL - <if test="startOutHospTime != null"> + <!--<if test="startOutHospTime != null"> AND STR_TO_DATE(b.endtime,'%Y-%m-%d') >= STR_TO_DATE(#{startOutHospTime},'%Y-%m-%d') </if> <if test="endOutHospTime != null"> @@ -215,6 +215,18 @@ </if> <if test="endInHospTime != null"> AND STR_TO_DATE(b.starttime, '%Y-%m-%d') <= STR_TO_DATE(#{startInHospTime}, '%Y-%m-%d') + </if>--> + <if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >= + date_format(#{startOutHospTime},'%y%m%d') + </if> + <if test="endOutHospTime != null ">and date_format(b.endtime,'%y%m%d') <= + date_format(#{endOutHospTime},'%y%m%d') + </if> + <if test="startInHospTime != null ">and date_format(b.starttime,'%y%m%d') >= + date_format(#{startInHospTime},'%y%m%d') + </if> + <if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <= + date_format(#{endInHospTime},'%y%m%d') </if> <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, '%') diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml index 136a36e..f103c31 100644 --- a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml @@ -115,11 +115,17 @@ <if test="drname != null and drname != ''">and pmo.drname like concat('%', #{drname}, '%')</if> <if test="patname != null and patname != ''">and pmo.patname like concat('%', #{patname}, '%')</if> - <if test="beginTime != null ">and date_format(pmo.admitdate,'%Y%m%d%H%i%s') >= + <!--<if test="beginTime != null ">and date_format(pmo.admitdate,'%Y%m%d%H%i%s') >= date_format(#{beginTime},'%Y%m%d%H%i%s') </if> <if test="endTime != null ">and date_format(pmo.admitdate,'%Y%m%d%H%i%s') <= date_format(#{endTime},'%Y%m%d%H%i%s') + </if>--> + <if test="beginTime != null ">and date_format(pmo.admitdate,'%y%m%d') >= + date_format(#{beginTime},'%y%m%d') + </if> + <if test="endTime != null ">and date_format(pmo.admitdate,'%y%m%d') <= + date_format(#{endTime},'%y%m%d') </if> <if test="patid != null ">and pmo.patid = #{patid}</if> <if test="patno != null ">and pmo.patno = #{patno}</if> -- Gitblit v1.9.3