소스 검색

debug:修复添加二级科室后查询患者不全

Ciallo 10 달 전
부모
커밋
5633dabb34

+ 0 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/dto/PatientCardDto.java

@@ -21,8 +21,6 @@ public class PatientCardDto extends BaseData {
     @ApiModelProperty(value = "主治医生姓名")
     private String physician;
 
-    @ApiModelProperty(value = "患者姓名")
-    private String name;
 
     @ApiModelProperty(value = "出院方式")
     private String dischargeMethod;

+ 6 - 2
ruoyi-admin/src/main/resources/mapper/work/VisitMapper.xml

@@ -32,7 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="deptId != null and deptId != 0">
+                 AND (v.dept_id = #{deptId} OR v.dept_id IN (SELECT s.dept_id FROM sys_dept s WHERE s.parent_id in (SELECT s.dept_id FROM sys_dept s WHERE find_in_set( 100, parent_id ))))
+            </if>
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
@@ -65,7 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="physician!='' and physician!= null">
                 AND v.physician like concat('%', #{physician}, '%')
             </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>
+            <if test="deptId !=null and deptId != 0">
+            AND (v.dept_id = #{deptId} OR v.dept_id IN (SELECT s.dept_id FROM sys_dept s WHERE s.parent_id in (SELECT s.dept_id FROM sys_dept s WHERE find_in_set( 100, parent_id ))))
+            </if>
             <if test="startTime!=null and endTime!=null ">
                 AND v.discharge_time BETWEEN #{startTime} AND DATE_ADD(#{endTime},INTERVAL 1 day)
             </if>