zhoutg пре 5 година
родитељ
комит
55950e1a8d

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -59,6 +59,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/bas/dept/getListUser").permitAll()
                 .antMatchers("/qc/behospitalInfo/page_dept").permitAll()
                 .antMatchers("/qc/behospitalInfo/page_person").permitAll()
+                .antMatchers("/qc/behospitalInfo/page_group").permitAll()
                 .antMatchers("/qc/casesEntryHospital/findQcCasesEntry").permitAll()
                 .antMatchers("/qc/behospitalInfo/exportExcel").permitAll()
                 .antMatchers("/qc/behospitalInfo/exportQcresult").permitAll()

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -102,6 +102,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/bas/dept/getListUser", request)
                 || matchers("/qc/behospitalInfo/page_dept", request)
                 || matchers("/qc/behospitalInfo/page_person", request)
+                || matchers("/qc/behospitalInfo/page_group", request)
                 || matchers("/qc/casesEntryHospital/findQcCasesEntry", request)
                 || matchers("/qc/behospitalInfo/exportExcel", request)
                 || matchers("/qc/behospitalInfo/exportQcresult", request)

+ 11 - 0
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -822,6 +822,17 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         return res;
     }
 
+    /**
+     * @param behospitalPageVO
+     * @return
+     */
+    public IPage<BehospitalInfoDTO> pageGroup(BehospitalPageVO behospitalPageVO) {
+        behospitalPageSet(behospitalPageVO);
+        behospitalPageVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
+        IPage<BehospitalInfoDTO> res = getPageByGroup(behospitalPageVO);
+        return res;
+    }
+
     public IPage<BehospitalInfoDTO> pageDept(BehospitalPageVO behospitalPageVO) {
         behospitalPageSet(behospitalPageVO);
         behospitalPageVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));

+ 2 - 0
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -64,6 +64,8 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
 
     IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
 
+    IPage<BehospitalInfoDTO> getPageByGroup(BehospitalPageVO behospitalPageVO);
+
     /**
      * 出院总人数统计-全院-首页
      *

+ 2 - 0
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -65,6 +65,8 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
 
     IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
 
+    IPage<BehospitalInfoDTO> getPageByGroup(BehospitalPageVO behospitalPageVO);
+
     /**
      * 出院总人数统计-全院-首页
      *

+ 5 - 0
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -92,6 +92,11 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.getPageByPerson(behospitalPageVO);
     }
 
+    @Override
+    public IPage<BehospitalInfoDTO> getPageByGroup(BehospitalPageVO behospitalPageVO) {
+        return baseMapper.getPageByGroup(behospitalPageVO);
+    }
+
     /**
      * 出院总人数统计-全院-首页
      *

+ 3 - 1
src/main/java/com/diagbot/vo/BehospitalPageVO.java

@@ -79,6 +79,9 @@ public class BehospitalPageVO extends Page implements Serializable {
     @ApiModelProperty(hidden = true)
     private Long userId;
 
+    /**
+     * 医生工号
+     */
     private Long doctorCode;
 
     /**
@@ -86,7 +89,6 @@ public class BehospitalPageVO extends Page implements Serializable {
      */
     private Integer statisticsType;
 
-
     /**
      * 是否归档(0:未归档,1:已归档)
      */

+ 26 - 2
src/main/java/com/diagbot/web/BehospitalInfoController.java

@@ -49,13 +49,18 @@ public class BehospitalInfoController {
     private QcresultInfoFacade qcresultInfoFacade;
 
     @ApiOperation(value = "病历分页列表[by:zhoutg]",
-            notes = "name:姓名<br>" +
+            notes = "behospitalCode:病人住院序号<br>" +
+                    "name:病人姓名<br>" +
                     "fileCode:档案号<br>" +
                     "statisticsType: 统计维度 1-本月,2-本年<br>" +
                     "behosDateStart:入院时间开始时间<br>" +
                     "behosDateEnd:入院时间结束时间<br>" +
                     "leaveHosDateStart:出院时间开始时间<br>" +
-                    "leaveHosDateEnd:出院时间结束时间<br>")
+                    "leaveHosDateEnd:出院时间结束时间<br>" +
+                    "doctorName:医生姓名<br>" +
+                    "doctorCode:医生工号<br>" +
+                    "level:等级<br>" +
+                    "deptId:科室id<br>")
     @PostMapping("/page")
     @SysLogger("page")
     public RespDTO<IPage<BehospitalInfoDTO>> page(@RequestBody BehospitalPageVO behospitalPageVO) {
@@ -193,6 +198,25 @@ public class BehospitalInfoController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "病历分页列表(个人)[by:zhoutg]",
+            notes = "behospitalCode:病人住院序号<br>" +
+                    "name:病人姓名<br>" +
+                    "fileCode:档案号<br>" +
+                    "statisticsType: 统计维度 1-本月,2-本年<br>" +
+                    "behosDateStart:入院时间开始时间<br>" +
+                    "behosDateEnd:入院时间结束时间<br>" +
+                    "leaveHosDateStart:出院时间开始时间<br>" +
+                    "leaveHosDateEnd:出院时间结束时间<br>" +
+                    "doctorName:医生姓名<br>" +
+                    "doctorCode:医生工号<br>" +
+                    "level:等级<br>" +
+                    "deptId:科室id<br>")
+    @PostMapping("/page_group")
+    @SysLogger("page_group")
+    public RespDTO<IPage<BehospitalInfoDTO>> pageGroup(@RequestBody BehospitalPageVO behospitalPageVO) {
+        IPage<BehospitalInfoDTO> data = behospitalInfoFacade.pageGroup(behospitalPageVO);
+        return RespDTO.onSuc(data);
+    }
 
     @ApiOperation(value = "导出病历[by:gaodm]",
             notes = "")

+ 69 - 0
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -391,6 +391,75 @@
         and t.is_placefile = 1
     </select>
 
+    <!--质控评分(医疗组)分页-->
+    <select id="getPageByGroup" resultType="com.diagbot.dto.BehospitalInfoDTO">
+        select * from (
+        select a.*, ifnull(b.level,'未评分') as `level`, b.grade_type, b.score_res, b.gmt_create as
+        grade_time, c.age from med_behospital_info a
+        LEFT JOIN med_qcresult_info b
+        on a.behospital_code = b.behospital_code and b.is_deleted = 'N'
+        left join med_home_page c
+        on a.behospital_code = c.behospital_code and c.is_deleted = 'N'
+        ) t
+        where t.is_deleted = 'N' and
+            t.doctor_id in (
+                SELECT doctor_id FROM `bas_doctor_info`
+                where is_deleted = 'N' and hospital_id = #{hospitalId} and group_id in (
+                    select c3.group_id from sys_user c1, sys_user_hospital c2, bas_doctor_info c3
+                    where c1.is_deleted = 'N' and c2.is_deleted = 'N' and c3.is_deleted = 'N'
+                    and c1.id = c2.user_id and c2.hospital_id = c3.hospital_id
+                    and c1.username = c3.doctor_id
+                    and c2.hospital_id = #{hospitalId}
+                    and c1.id = #{userId}
+                )
+            )
+        <if test="deptId != null and deptId != ''">
+            and t.beh_dept_id = #{deptId}
+        </if>
+        <if test="doctorName != null and doctorName != ''">
+            and (t.doctor_name like CONCAT('%',#{doctorName},'%')
+            or t.beh_doctor_name like CONCAT('%',#{doctorName},'%')
+            or t.director_doctor_name like CONCAT('%',#{doctorName},'%'))
+        </if>
+        <if test="name != null and name != ''">
+            and t.name like CONCAT('%',#{name},'%')
+        </if>
+        <if test="doctorCode != null and doctorCode != ''">
+            and (t.doctor_id = #{doctorCode}
+            or t.beh_doctor_id = #{doctorCode}
+            or t.director_doctor_id = #{doctorCode})
+        </if>
+        <if test="fileCode != null and fileCode != ''">
+            and t.file_code like CONCAT('%',#{fileCode},'%')
+        </if>
+        <if test="hospitalId != null">
+            and t.hospital_id = #{hospitalId}
+        </if>
+        <if test="behospitalCode != null and behospitalCode != ''">
+            and t.behospital_code like CONCAT('%',#{behospitalCode},'%')
+        </if>
+        <if test="behosDateStart != null">
+            <![CDATA[ and t.behospital_date >= #{behosDateStart}]]>
+        </if>
+        <if test="behosDateEnd != null">
+            <![CDATA[ and t.behospital_date < #{behosDateEnd}]]>
+        </if>
+        <if test="leaveHosDateStart != null">
+            <![CDATA[ and t.leave_hospital_date >= #{leaveHosDateStart}]]>
+        </if>
+        <if test="leaveHosDateEnd != null">
+            <![CDATA[ and t.leave_hospital_date < #{leaveHosDateEnd}]]>
+        </if>
+        <if test="level != null and level != ''">
+            and t.level = #{level}
+        </if>
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and t.is_placefile = #{isPlacefile}
+        </if>
+        and t.qc_type_id != 0
+        and t.is_placefile = 1
+    </select>
+
     <!-- 出院总人数统计-全院-首页 -->
     <select id="leaveHosCount" parameterType="com.diagbot.vo.FilterVO" resultType="int">
         SELECT