From fb9c56894fcee50e17f47253728a4ef0f16a1e0a Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 11 六月 2026 15:00:35 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java | 65 ++++++++++++++++++++------------
1 files changed, 41 insertions(+), 24 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 0ec57d6..27e21f1 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -702,6 +702,7 @@
//璇存槑璇ユ偅鑰呮槸琚繃婊ょ殑锛屼笉鐢ㄥ啀鎵ц浜�
serviceSubtask.setCreateBy(serviceTask.getCreateBy());
serviceSubtask.setCreateTime(new Date());
+ serviceSubtask.setSendstate(4L);
i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
} else {
if (StringUtils.isEmpty(serviceSubtask.getPhone())) {
@@ -787,9 +788,14 @@
if (Objects.isNull(patMedOperationItem.getOplevelcode())) {
return;
}
- PatMedOperation patMedOperation = patMedOperationMapper.selectPatMedOperationById(patMedOperationItem.getOpid());
- if (Objects.isNull(patMedOperation)) {
+ PatMedOperation patMedOperationVo = new PatMedOperation();
+ PatMedOperation patMedOperation = new PatMedOperation();
+ patMedOperationVo.setOpid(patMedOperationItem.getOpid());
+ List<PatMedOperation> patMedOperationList = patMedOperationMapper.selectPatMedOperationList(patMedOperationVo);
+ if (CollectionUtils.isEmpty(patMedOperationList)) {
return;
+ }else {
+ patMedOperation = patMedOperationList.get(0);
}
PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOperation.getPatid());
if (Objects.isNull(patArchive)) {
@@ -848,6 +854,7 @@
//璇存槑璇ユ偅鑰呮槸琚繃婊ょ殑锛屼笉鐢ㄥ啀鎵ц浜�
serviceSubtask.setCreateBy(serviceTask.getCreateBy());
serviceSubtask.setCreateTime(new Date());
+ serviceSubtask.setSendstate(4L);
i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
} else {
if (StringUtils.isEmpty(serviceSubtask.getPhone())) {
@@ -954,7 +961,8 @@
serviceSubtask.setLeavehospitaldistrictname(patMedInhosp1.getHospitaldistrictname());
}
serviceSubtask.setLeaveicd10code(patMedInhosp1.getLeaveicd10code());
- serviceSubtask.setLeavediagname(patMedInhosp1.getDiagname());
+ serviceSubtask.setLeavediagname(patMedInhosp1.getLeavediagname());
+ serviceSubtask.setDiagname(patMedInhosp1.getDiagname());
serviceSubtask.setTemplateid(serviceTask.getTemplateid());
serviceSubtask.setTemplatename(serviceTask.getTemplatename());
serviceSubtask.setPatid(patArchive.getId());
@@ -1019,6 +1027,13 @@
}
}
+ }
+ //濡傛灉鎮h�呯殑鍏ラ櫌鍜屽嚭闄㈡椂闂翠竴鑷达紝鍙互涓嶇敤闅忚锛堝崡鍗庨檮涓�鑲跨槫涓�鐥呭尯鎻愬嚭锛�
+ if (active.equals("nhfy") && patMedInhosp1.getStarttime() != null && patMedInhosp1.getEndtime() != null && DateUtils.differentDaysByMillisecond(patMedInhosp1.getStarttime(), patMedInhosp1.getEndtime()) == 0) {
+ serviceSubtask.setRemark("鎮h�呭綋澶╁嚭闄紝涓嶇敤闅忚");
+ serviceSubtask.setResult("error");
+ //涓嶆墽琛�
+ serviceSubtask.setSendstate(4L);
}
//鎮h�呭彂閫佹椂闂�
@@ -1165,7 +1180,8 @@
}
}
- private void addOperationSubTask(String config) {
+ @Override
+ public void addOperationSubTask(String config) {
// 鎵嬫湳闅忚
PatMedOperationItem pmoi = new PatMedOperationItem();
//鑾峰彇闇�瑕佸嚭闄㈢柧鐥呴殢璁匡紝鏈鐞嗙殑鏁版嵁
@@ -1204,7 +1220,7 @@
e.printStackTrace();
log.error("浜哄憳鎵嬫湳澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
opItem.setOpercheckFlag("2");
- opItem.setLongTaskReason("浜哄憳鎵嬫湳澶勭悊寮傚父锛�" + e.getMessage());
+ opItem.setLongTaskReason("浜哄憳鎵嬫湳澶勭悊寮傚父");
patMedOperationItemMapper.updatePatMedOperationItem(opItem);
}
}
@@ -1295,7 +1311,7 @@
e.printStackTrace();
log.error("浜哄憳鐤剧梾澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
pmiJB.setDiagcheckFlag("2");
- pmiJB.setLongTaskReason("浜哄憳鐤剧梾澶勭悊寮傚父锛�" + e.getMessage());
+ pmiJB.setLongTaskReason("浜哄憳鐤剧梾澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(pmiJB);
}
}
@@ -1364,7 +1380,7 @@
e.printStackTrace();
log.error("浜哄憳鐥呭尯澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
pmiBQ1.setWardcheckFlag("2");
- pmiBQ1.setLongTaskReason("浜哄憳鐥呭尯澶勭悊寮傚父锛�" + e.getMessage());
+ pmiBQ1.setLongTaskReason("浜哄憳鐥呭尯澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(pmiBQ1);
}
}
@@ -1424,7 +1440,7 @@
e.printStackTrace();
log.error("浜哄憳绉戝澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
patMedInhosp1.setDeptcheckFlag("2");
- patMedInhosp1.setLongTaskReason("浜哄憳绉戝澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("浜哄憳绉戝澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
}
@@ -1542,58 +1558,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)鐨勬柟娉�
@@ -1628,7 +1645,7 @@
e.printStackTrace();
log.error("銆愬熀浜庤鍒欍�戞偅鑰厈}澶勭悊寮傚父锛歿}", patMedInhosp1.getInhospid(), e.getMessage());
patMedInhosp1.setDeptcheckFlag("2");
- patMedInhosp1.setLongTaskReason("鍩轰簬瑙勫垯澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("鍩轰簬瑙勫垯澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
}
@@ -1668,7 +1685,7 @@
e.printStackTrace();
log.error("銆愮瀹や换鍔°�戞偅鑰厈}澶勭悊寮傚父锛歿}", patMedInhosp1.getInhospid(), e.getMessage());
patMedInhosp1.setDeptcheckFlag("2");
- patMedInhosp1.setLongTaskReason("绉戝浠诲姟澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("绉戝浠诲姟澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
return generatedCount;
@@ -1716,7 +1733,7 @@
e.printStackTrace();
log.error("銆愮梾鍖轰换鍔°�戞偅鑰厈}澶勭悊寮傚父锛歿}", patMedInhosp1.getInhospid(), e.getMessage());
patMedInhosp1.setWardcheckFlag("2");
- patMedInhosp1.setLongTaskReason("鐥呭尯浠诲姟澶勭悊寮傚父锛�" + e.getMessage());
+ patMedInhosp1.setLongTaskReason("鐥呭尯浠诲姟澶勭悊寮傚父");
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
}
return generatedCount;
@@ -1782,7 +1799,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