From 2ed0ca8b57481a2c647d163380a3ff4997fd2f35 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 17 十二月 2025 10:17:48 +0800
Subject: [PATCH] 【丽水】首页查询出、入院看病人次和人数,出院服务量分为首次服务、再次服务、专病服务
---
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 108 ++++++++++++++++++++++++++++++++++-
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedInhospController.java | 16 +----
smartor/src/main/java/com/smartor/domain/PatMedRes.java | 17 +++++
3 files changed, 124 insertions(+), 17 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedInhospController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedInhospController.java
index e6e0859..fad426e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedInhospController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedInhospController.java
@@ -10,7 +10,6 @@
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.system.service.ISysConfigService;
import com.smartor.domain.PatMedInhosp;
import com.smartor.domain.PatMedInhospVO;
import com.smartor.domain.PatMedReq;
@@ -42,11 +41,6 @@
@Autowired
private IPatMedOuthospService iPatMedOuthospService;
-
- //todo
- @Autowired
- private ISysConfigService configService;
-
/**
* 鏌ヨ鎮h�呬綇闄㈣褰曞垪琛�
@@ -107,6 +101,9 @@
return success(patMedInhospService.getDeptCodeByPatId(patMedInhosp));
}
+ /**
+ * 鏌ヨ鍑恒�佸叆闄㈢湅鐥呬汉娆″拰浜烘暟锛堜汉鏁板垎涓洪娆℃湇鍔°�佸啀娆℃湇鍔°�佷笓鐥呮湇鍔★級
+ */
@PostMapping("/selectPatMedInhospListCount")
@ApiOperation("鏌ヨ鍑恒�佸叆闄㈢湅鐥呬汉娆″拰浜烘暟")
public AjaxResult selectPatMedInhospListCount(@RequestBody PatMedReq patMedReq) {
@@ -212,11 +209,4 @@
// }
// }
- @ApiOperation("娴嬭瘯瀹氭椂浠诲姟dealOutHospInfo")
- @PostMapping("/dealOutHospInfo")
- public void dealOutHospInfo() {
- String config = configService.selectConfigByKey("visit.early.day");
- //鍑洪櫌琛�
- patMedInhospService.dealOutHospInfo(config);
- }
}
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedRes.java b/smartor/src/main/java/com/smartor/domain/PatMedRes.java
index 901e0c2..e4f337e 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedRes.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedRes.java
@@ -35,4 +35,21 @@
@ApiModelProperty(value = "浜烘暟")
private Integer rs;
+ /**
+ * 棣栨闅忚浜烘暟
+ */
+ @ApiModelProperty(value = "棣栨闅忚浜烘暟")
+ private Integer scsf;
+
+ /**
+ * 鍐嶆闅忚浜烘暟
+ */
+ @ApiModelProperty(value = "鍐嶆闅忚浜烘暟")
+ private Integer zcsf;
+
+ /**
+ * 涓撶梾闅忚浜烘暟
+ */
+ @ApiModelProperty(value = "涓撶梾闅忚浜烘暟")
+ private Integer zbsf;
}
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index f873005..540e215 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -920,11 +920,18 @@
<select id="selectPatMedInhospCount" parameterType="com.smartor.domain.PatMedReq"
resultType="com.smartor.domain.PatMedRes">
SELECT SUM( rs ) AS rs,
- SUM( rc ) AS rc
+ SUM( rc ) AS rc,
+ SUM( scsf ) AS scsf,
+ SUM( zcsf ) AS zcsf,
+ SUM( zbsf ) AS zbsf
FROM (
+ <!-- 鍑洪櫌浜烘-->
SELECT
COUNT(1) AS rc,
- 0 AS rs
+ 0 AS rs,
+ 0 AS scsf,
+ 0 AS zcsf,
+ 0 AS zbsf
FROM
pat_med_inhosp
<where>
@@ -954,12 +961,15 @@
</foreach>
</if>
</if>
-
</where>
+ <!-- 闅忚鏈嶅姟浜烘暟 -->
union all
select
0 AS rc,
- count(1) AS rs
+ count(1) AS rs,
+ 0 AS scsf,
+ 0 AS zcsf,
+ 0 AS zbsf
FROM
service_subtask
<where>
@@ -981,6 +991,96 @@
</foreach>
</if>
</where>
+ <!-- 棣栨闅忚浜烘暟 -->
+ union all
+ select
+ 0 AS rc,
+ 0 AS rs,
+ count(1) AS scsf,
+ 0 AS zcsf,
+ 0 AS zbsf
+ FROM
+ service_subtask
+ <where>
+ del_flag = 0
+ and service_type=2
+ and is_visit_again = 0
+ <if test="orgid != null">
+ AND orgid = #{orgid}
+ </if>
+ <if test="startDate != null">
+ AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' )
+ </if>
+ <if test="endDate != null">
+ AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d')
+ </if>
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
+ and deptcode in
+ <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
+ #{deptcode}
+ </foreach>
+ </if>
+ </where>
+ <!-- 鍐嶆闅忚浜烘暟 -->
+ union all
+ select
+ 0 AS rc,
+ 0 AS rs,
+ 0 AS scsf,
+ count(1) AS zcsf,
+ 0 AS zbsf
+ FROM
+ service_subtask
+ <where>
+ del_flag = 0
+ and service_type=2
+ and is_visit_again = 1
+ <if test="orgid != null">
+ AND orgid = #{orgid}
+ </if>
+ <if test="startDate != null">
+ AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' )
+ </if>
+ <if test="endDate != null">
+ AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d')
+ </if>
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
+ and deptcode in
+ <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
+ #{deptcode}
+ </foreach>
+ </if>
+ </where>
+ <!-- 涓撶梾闅忚浜烘暟 -->
+ union all
+ select
+ 0 AS rc,
+ 0 AS rs,
+ 0 AS scsf,
+ 0 AS zcsf,
+ count(1) AS zbsf
+ FROM
+ service_subtask
+ <where>
+ del_flag = 0
+ and service_type=13
+ <if test="orgid != null">
+ AND orgid = #{orgid}
+ </if>
+ <if test="startDate != null">
+ AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' )
+ </if>
+ <if test="endDate != null">
+ AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d')
+ </if>
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
+ and deptcode in
+ <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
+ #{deptcode}
+ </foreach>
+ </if>
+ </where>
) AS combined_data
</select>
+
</mapper>
--
Gitblit v1.9.3