From a9d3da5b62ed78a9e4d50e774672b3f0f658fd4a Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 05 六月 2026 00:49:11 +0800
Subject: [PATCH] 【丽水】getSpecialSfStatistics 获取专病随访统计比例
---
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java | 46 +++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
index 0a1c316..778fee9 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -319,7 +319,6 @@
//鑾峰彇鏈鐞嗗湪闄㈢殑鏁版嵁(濡傛灉鍒氬垰鍑洪櫌鐨勬偅鑰呮暟鎹殑鍑洪櫌鏃堕棿,鍦ㄤ笅闈㈡煡璇㈠嚭鐨勫叆闄㈡椂闂翠箣鍓�,閭d箣鍓嶇殑鍑洪櫌鎮h�呯殑鏁版嵁,涔熷緱鍋滄帀,鍥犱负鍙堝叆闄簡)
PatMedInhosp patMedInhosp = new PatMedInhosp();
- //鑾峰彇闇�瑕佸嚭闄㈤儴闂ㄩ殢璁匡紝鏈鐞嗙殑鏁版嵁
patMedInhosp.setDeptcheckFlag("0");
patMedInhosp.setInhospstate("0");
List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
@@ -703,6 +702,7 @@
//璇存槑璇ユ偅鑰呮槸琚繃婊ょ殑锛屼笉鐢ㄥ啀鎵ц浜�
serviceSubtask.setCreateBy(serviceTask.getCreateBy());
serviceSubtask.setCreateTime(new Date());
+ serviceSubtask.setSendstate(4L);
i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
} else {
if (StringUtils.isEmpty(serviceSubtask.getPhone())) {
@@ -849,6 +849,7 @@
//璇存槑璇ユ偅鑰呮槸琚繃婊ょ殑锛屼笉鐢ㄥ啀鎵ц浜�
serviceSubtask.setCreateBy(serviceTask.getCreateBy());
serviceSubtask.setCreateTime(new Date());
+ serviceSubtask.setSendstate(4L);
i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
} else {
if (StringUtils.isEmpty(serviceSubtask.getPhone())) {
@@ -1205,7 +1206,7 @@
e.printStackTrace();
log.error("浜哄憳鎵嬫湳澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
opItem.setOpercheckFlag("2");
- opItem.setLongTaskReason("浜哄憳鎵嬫湳澶勭悊寮傚父锛�" + e.getMessage());
+ opItem.setLongTaskReason("浜哄憳鎵嬫湳澶勭悊寮傚父");
patMedOperationItemMapper.updatePatMedOperationItem(opItem);
}
}
@@ -1296,7 +1297,7 @@
e.printStackTrace();
log.error("浜哄憳鐤剧梾澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
pmiJB.setDiagcheckFlag("2");
- pmiJB.setLongTaskReason("浜哄憳鐤剧梾澶勭悊寮傚父锛�" + e.getMessage());
+ pmiJB.setLongTaskReason("浜哄憳鐤剧梾澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(pmiJB);
}
}
@@ -1365,7 +1366,7 @@
e.printStackTrace();
log.error("浜哄憳鐥呭尯澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
pmiBQ1.setWardcheckFlag("2");
- pmiBQ1.setLongTaskReason("浜哄憳鐥呭尯澶勭悊寮傚父锛�" + e.getMessage());
+ pmiBQ1.setLongTaskReason("浜哄憳鐥呭尯澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(pmiBQ1);
}
}
@@ -1425,7 +1426,7 @@
e.printStackTrace();
log.error("浜哄憳绉戝澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
patMedInhosp1.setDeptcheckFlag("2");
- patMedInhosp1.setLongTaskReason("浜哄憳绉戝澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("浜哄憳绉戝澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
}
@@ -1543,58 +1544,59 @@
int primaryGeneratedCount = deptGenCount + wardGenCount + diagGenCount;
log.info("銆愬熀浜庤鍒欍�戦瑕佽鍒欐墽琛岀粨鏋�: deptGen={}, wardGen={}, diagGen={}, total={}", deptGenCount, wardGenCount, diagGenCount, primaryGeneratedCount);
+ String remark = patMedInhosp1.getRemark();
// 绗簩姝ワ細鍒ゆ柇棣栬瑙勫垯鏄惁鏈変换鎰忎竴涓敓鎴愭垚鍔�
if (primaryGeneratedCount > 0) {
// 鑷冲皯鏈変竴涓瑕佽鍒欑敓鎴愭垚鍔�
// 鈥斺�� 灏�=2鐨勬瑕佽鍒欏搴攆lag璁句负"2"锛堣烦杩囷級
log.info("銆愬熀浜庤鍒欍�戦瑕佽鍒欐湁鎴愬姛(count={})锛屽皢娆¤瑙勫垯瀵瑰簲flag璁句负2", primaryGeneratedCount);
if (deptIsSecondary) {
- updateCheckFlag(patMedInhosp1, 1, "2", "棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃");
+ updateCheckFlag(patMedInhosp1, 1, "2", StringUtils.isNotEmpty(remark)?remark+";棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃":"棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃");
}
if (!active.equals("xh")) {
if (wardIsSecondary) {
- updateCheckFlag(patMedInhosp1, 2, "2", "棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃");
+ updateCheckFlag(patMedInhosp1, 2, "2", StringUtils.isNotEmpty(remark)?remark+";棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃":"棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃");
}
if (diagIsSecondary) {
- updateCheckFlag(patMedInhosp1, 3, "2", "棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃");
+ updateCheckFlag(patMedInhosp1, 3, "2", StringUtils.isNotEmpty(remark)?remark+";棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃":"棣栬瑙勫垯宸茬敓鎴愶紝娆¤瑙勫垯璺宠繃");
}
}
// 鈥斺�� 瀵逛簬=1涓旂敓鎴愭垚鍔熺殑锛屽皢鍏跺搴攆lag璁句负"1"
if (deptIsPrimary && deptGenCount > 0) {
- updateCheckFlag(patMedInhosp1, 1, "1", "绉戝棣栬瑙勫垯鐢熸垚鎴愬姛");
+ updateCheckFlag(patMedInhosp1, 1, "1", StringUtils.isNotEmpty(remark)?remark+";绉戝棣栬瑙勫垯鐢熸垚鎴愬姛":"绉戝棣栬瑙勫垯鐢熸垚鎴愬姛");
}
if (!active.equals("xh")) {
if (wardIsPrimary && wardGenCount > 0) {
- updateCheckFlag(patMedInhosp1, 2, "1", "鐥呭尯棣栬瑙勫垯鐢熸垚鎴愬姛");
+ updateCheckFlag(patMedInhosp1, 2, "1", StringUtils.isNotEmpty(remark)?remark+";鐥呭尯棣栬瑙勫垯鐢熸垚鎴愬姛":"鐥呭尯棣栬瑙勫垯鐢熸垚鎴愬姛");
}
if (diagIsPrimary && diagGenCount > 0) {
- updateCheckFlag(patMedInhosp1, 3, "1", "鐤剧梾棣栬瑙勫垯鐢熸垚鎴愬姛");
+ updateCheckFlag(patMedInhosp1, 3, "1", StringUtils.isNotEmpty(remark)?remark+";鐤剧梾棣栬瑙勫垯鐢熸垚鎴愬姛":"鐤剧梾棣栬瑙勫垯鐢熸垚鎴愬姛");
}
}
// 鈥斺�� 瀵逛簬=1浣嗙敓鎴愬け璐ョ殑锛屽皢鍏跺搴攆lag璁句负"2"
if (deptIsPrimary && deptGenCount == 0) {
- updateCheckFlag(patMedInhosp1, 1, "2", "绉戝棣栬瑙勫垯鐢熸垚澶辫触");
+ updateCheckFlag(patMedInhosp1, 1, "2", StringUtils.isNotEmpty(remark)?remark+";绉戝棣栬瑙勫垯鐢熸垚澶辫触":"绉戝棣栬瑙勫垯鐢熸垚澶辫触");
}
if (!active.equals("xh")) {
if (wardIsPrimary && wardGenCount == 0) {
- updateCheckFlag(patMedInhosp1, 2, "2", "鐥呭尯棣栬瑙勫垯鐢熸垚澶辫触");
+ updateCheckFlag(patMedInhosp1, 2, "2", StringUtils.isNotEmpty(remark)?remark+";鐥呭尯棣栬瑙勫垯鐢熸垚澶辫触":"鐥呭尯棣栬瑙勫垯鐢熸垚澶辫触");
}
if (diagIsPrimary && diagGenCount == 0) {
- updateCheckFlag(patMedInhosp1, 3, "2", "鐤剧梾棣栬瑙勫垯鐢熸垚澶辫触");
+ updateCheckFlag(patMedInhosp1, 3, "2", StringUtils.isNotEmpty(remark)?remark+";鐤剧梾棣栬瑙勫垯鐢熸垚澶辫触":"鐤剧梾棣栬瑙勫垯鐢熸垚澶辫触");
}
}
} else {
// 鎵�鏈夐瑕佽鍒欏叏閮ㄥけ璐ワ紝灏�=1鐨刦lag璁句负"2"锛岀劧鍚庢墽琛�=2鐨勬柟娉�
log.info("銆愬熀浜庤鍒欍�戦瑕佽鍒欏叏閮ㄥけ璐ワ紝灏�=1鐨刦lag璁句负2锛屽紑濮嬫墽琛屾瑕佽鍒�");
if (deptIsPrimary) {
- updateCheckFlag(patMedInhosp1, 1, "2", "绉戝棣栬瑙勫垯鍏ㄩ儴澶辫触");
+ updateCheckFlag(patMedInhosp1, 1, "2", StringUtils.isNotEmpty(remark)?remark+";绉戝棣栬瑙勫垯鍏ㄩ儴澶辫触":"绉戝棣栬瑙勫垯鍏ㄩ儴澶辫触");
}
if (!active.equals("xh")) {
if (wardIsPrimary) {
- updateCheckFlag(patMedInhosp1, 2, "2", "鐥呭尯棣栬瑙勫垯鍏ㄩ儴澶辫触");
+ updateCheckFlag(patMedInhosp1, 2, "2", StringUtils.isNotEmpty(remark)?remark+";鐥呭尯棣栬瑙勫垯鍏ㄩ儴澶辫触":"鐥呭尯棣栬瑙勫垯鍏ㄩ儴澶辫触");
}
if (diagIsPrimary) {
- updateCheckFlag(patMedInhosp1, 3, "2", "鐤剧梾棣栬瑙勫垯鍏ㄩ儴澶辫触");
+ updateCheckFlag(patMedInhosp1, 3, "2", StringUtils.isNotEmpty(remark)?remark+";鐤剧梾棣栬瑙勫垯鍏ㄩ儴澶辫触":"鐤剧梾棣栬瑙勫垯鍏ㄩ儴澶辫触");
}
}
// 鎵ц娆¤瑙勫垯(=2)鐨勬柟娉�
@@ -1629,7 +1631,7 @@
e.printStackTrace();
log.error("銆愬熀浜庤鍒欍�戞偅鑰厈}澶勭悊寮傚父锛歿}", patMedInhosp1.getInhospid(), e.getMessage());
patMedInhosp1.setDeptcheckFlag("2");
- patMedInhosp1.setLongTaskReason("鍩轰簬瑙勫垯澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("鍩轰簬瑙勫垯澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
}
@@ -1655,6 +1657,8 @@
if (CollectionUtils.isEmpty(serviceTaskdepts)) {
PatMedInhosp patMedInhosp = patMedInhospMapper.selectPatMedInhospByInhospid(patMedInhosp1.getInhospid());
patMedInhosp1.setDeptcheckFlag("2");
+ patMedInhosp1.setWardcheckFlag(patMedInhosp.getWardcheckFlag());
+ patMedInhosp1.setDiagcheckFlag(patMedInhosp.getDiagcheckFlag());
patMedInhosp1.setLongTaskReason(patMedInhosp.getLongTaskReason() + "璇ユ偅鑰呮墍鍦ㄧ瀹ゆ湭閰嶇疆绂婚櫌闀挎湡浠诲姟;");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
} else {
@@ -1667,7 +1671,7 @@
e.printStackTrace();
log.error("銆愮瀹や换鍔°�戞偅鑰厈}澶勭悊寮傚父锛歿}", patMedInhosp1.getInhospid(), e.getMessage());
patMedInhosp1.setDeptcheckFlag("2");
- patMedInhosp1.setLongTaskReason("绉戝浠诲姟澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("绉戝浠诲姟澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
return generatedCount;
@@ -1715,7 +1719,7 @@
e.printStackTrace();
log.error("銆愮梾鍖轰换鍔°�戞偅鑰厈}澶勭悊寮傚父锛歿}", patMedInhosp1.getInhospid(), e.getMessage());
patMedInhosp1.setWardcheckFlag("2");
- patMedInhosp1.setLongTaskReason("鐥呭尯浠诲姟澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("鐥呭尯浠诲姟澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
return generatedCount;
@@ -1781,7 +1785,7 @@
e.printStackTrace();
log.error("銆愮柧鐥呬换鍔°�戞偅鑰厈}澶勭悊寮傚父锛歿}", patMedInhosp1.getInhospid(), e.getMessage());
patMedInhosp1.setDiagcheckFlag("2");
- patMedInhosp1.setLongTaskReason("鐤剧梾浠诲姟澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("鐤剧梾浠诲姟澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
return generatedCount;
--
Gitblit v1.9.3