1
0
Prechádzať zdrojové kódy

根据时间筛选就诊记录列表

adminAndroot 8 mesiacov pred
rodič
commit
09b585945d

+ 12 - 8
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/Visit.java

@@ -71,16 +71,20 @@ public class Visit extends BaseData {
     @ApiModelProperty(value = "病区名称")
     private String wardName;
 
+    @TableField(exist = false)
+    private String startTime;//开始时间
 
+    @TableField(exist = false)
+    private String endTime;//结束时间
 
-    //private String createBy;  //创建人
-    //@TableField(fill = FieldFill.INSERT)
-    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    //private Data createTime;  //创建时间
-    //private String updateBy;  //更新人
-    //@TableField(fill = FieldFill.UPDATE)
-    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    //private Data updateTime;  //更新时间
+    private String createBy;  //创建人
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Data createTime;  //创建时间
+    private String updateBy;  //更新人
+    @TableField(fill = FieldFill.UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Data updateTime;  //更新时间
 
     @TableField(exist = false)
     private List<Patient> patients;

+ 3 - 0
ruoyi-admin/src/main/resources/mapper/work/VisitMapper.xml

@@ -29,6 +29,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reasonArea != null  and reasonArea != ''"> and reasonArea = #{reasonArea}</if>
             <if test="wardCode != null  and wardCode != ''"> and ward_code = #{wardCode}</if>
             <if test="wardName != null  and wardName != ''"> and ward_name = #{wardName}</if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+                and admission_time BETWEEN #{startTime} AND #{endTime}
+            </if>
             <if test="deptId != null and deptId != 0">AND (v.dept_id = #{deptId} OR v.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, parent_id) ))</if>
         </where>
         <!-- 数据范围过滤 -->