From 5dcd6447f315e821727508cd26bf05f8220b39c8 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 09 四月 2026 13:54:47 +0800
Subject: [PATCH] Merge branch 'master' into master-手术随访
---
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
index a0f265d..f5bd02f 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -172,16 +172,24 @@
log.error("闂ㄦ�ュ氨璇婃椂闂翠笉鑳戒负绌�");
return 0;
}
+ // 闇�瑕佹彃鍏ュ埌鍝釜琛紝鏍规嵁灏辫瘖鏃堕棿鐨勬棩鏈熸潵瀹氾紝濡傛灉鏍规嵁灏辫瘖鏃堕棿鏉ョ‘瀹氱殑琛ㄤ笉瀛樺湪锛屽垯瀛樺湪pat_med_outhosp琛ㄤ腑
+ String targetTable = resolveTargetTable(patMedOuthosp.getAdmitdate());
+ if (targetTable == null) {
+ return 0;
+ }
+ // 鎻掑叆鍓嶆寜 serialnum 鏌ラ噸锛岄槻姝㈤噸澶嶉噰闆嗗鑷撮噸澶嶅叆搴�
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(patMedOuthosp.getSerialnum())) {
+ int exists = patMedOuthospMapper.countBySerialnum(targetTable, patMedOuthosp.getSerialnum());
+ if (exists > 0) {
+ log.debug("[insert] serialnum={} 宸插瓨鍦ㄤ簬琛� {}锛岃烦杩囨彃鍏�", patMedOuthosp.getSerialnum(), targetTable);
+ return 0;
+ }
+ }
patMedOuthosp.setCreateTime(DateUtils.getNowDate());
patMedOuthosp.setUpdateTime(DateUtils.getNowDate());
patMedOuthosp.setGuid(UUID.randomUUID().toString());
- //闇�瑕佹彃鍏ュ埌鍝釜琛紝鏍规嵁灏辫瘖鏃堕棿鐨勬棩鏈熸潵瀹氾紝濡傛灉鏍规嵁灏辫瘖鏃堕棿鏉ョ‘瀹氱殑琛ㄤ笉瀛樺湪锛屽垯瀛樺湪pat_med_outhosp琛ㄤ腑
- String targetTable = resolveTargetTable(patMedOuthosp.getAdmitdate());
- if (targetTable != null) {
- log.info("[insert] 璺敱鍒板垎琛�: {}", targetTable);
- return patMedOuthospMapper.insertIntoTable(targetTable, patMedOuthosp);
- }
- return 0;
+ log.info("[insert] 璺敱鍒板垎琛�: {}", targetTable);
+ return patMedOuthospMapper.insertIntoTable(targetTable, patMedOuthosp);
}
/**
--
Gitblit v1.9.3