From 21ce122193e2fb57d206dbfca59e8d2ab2114fd0 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 23 三月 2026 17:12:56 +0800
Subject: [PATCH] 新增病区与科室组合
---
smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java | 127 ++++++++++++++++++++++--------------------
1 files changed, 66 insertions(+), 61 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java b/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
index 8a00b1b..bf12d7c 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
@@ -1,10 +1,9 @@
package com.smartor.mapper;
import java.util.List;
+import java.util.Map;
-import com.smartor.domain.PatMedOuthosp;
-import com.smartor.domain.PatMedReq;
-import com.smartor.domain.PatMedRes;
+import com.smartor.domain.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -16,21 +15,6 @@
*/
@Mapper
public interface PatMedOuthospMapper {
- /**
- * 鏌ヨ鎮h�呴棬璇婅褰�
- *
- * @param id 鎮h�呴棬璇婅褰曚富閿�
- * @return 鎮h�呴棬璇婅褰�
- */
- public PatMedOuthosp selectPatMedOuthospById(Long id);
-
- /**
- * 鏌ヨ鎮h�呴棬璇婅褰曞垪琛�
- *
- * @param patMedOuthosp 鎮h�呴棬璇婅褰�
- * @return 鎮h�呴棬璇婅褰曢泦鍚�
- */
- public List<PatMedOuthosp> selectPatMedOuthospList(PatMedOuthosp patMedOuthosp);
/**
* 鏂板鎮h�呴棬璇婅褰�
@@ -38,9 +22,44 @@
* @param patMedOuthosp 鎮h�呴棬璇婅褰�
* @return 缁撴灉
*/
- public int insertPatMedOuthosp(PatMedOuthosp patMedOuthosp);
+// public int insertPatMedOuthosp(PatMedOuthosp patMedOuthosp);
- public int batchPatMedOuthosp(List<PatMedOuthosp> patMedOuthosps);
+ /**
+ * 鏂板鍒版寚瀹氬垎琛紙鐢ㄤ簬璺敱鍒版渶鏂板垎琛級
+ *
+ * @param tableName 鐩爣琛ㄥ悕
+ * @param record 闂ㄨ瘖璁板綍
+ * @return 鎻掑叆鏉℃暟
+ */
+ int insertIntoTable(@Param("tableName") String tableName, @Param("record") PatMedOuthosp record);
+
+
+ /**
+ * 鍒ゆ柇鎸囧畾鍒嗚〃涓槸鍚﹀瓨鍦ㄨ id
+ */
+ int existsInTable(@Param("tableName") String tableName, @Param("id") Long id);
+
+ /**
+ * 鏇存柊鍒版寚瀹氬垎琛紙鐢ㄤ簬璺敱鍒版纭垎琛級
+ */
+ int updateInTable(@Param("tableName") String tableName, @Param("record") PatMedOuthosp record);
+
+ /**
+ * 璋冪敤瀛樺偍杩囩▼ sp_query_outhosp 鏌ヨ闂ㄨ瘖璁板綍
+ *
+ * @param req 鍏ュ弬瀵硅薄
+ * @return 闂ㄨ瘖璁板綍鍒楄〃
+ */
+ List<PatMedOuthosp> callSpQueryOuthosp(PatMedOuthospQueryReq req);
+
+ /**
+ * 璋冪敤瀛樺偍杩囩▼ sp_query_outhosp 鏌ヨ闂ㄨ瘖璁板綍鏁伴噺
+ *
+ * @param req 鍏ュ弬瀵硅薄
+ * @return 闂ㄨ瘖璁板綍鍒楄〃
+ */
+ Long callSpQueryOuthospCount(PatMedOuthospQueryReq req);
+
/**
* 淇敼鎮h�呴棬璇婅褰�
@@ -48,60 +67,46 @@
* @param patMedOuthosp 鎮h�呴棬璇婅褰�
* @return 缁撴灉
*/
- public int updatePatMedOuthosp(PatMedOuthosp patMedOuthosp);
+// public int updatePatMedOuthosp(PatMedOuthosp patMedOuthosp);
- /**
- * 鍒犻櫎鎮h�呴棬璇婅褰�
- *
- * @param id 鎮h�呴棬璇婅褰曚富閿�
- * @return 缁撴灉
- */
- public int deletePatMedOuthospById(Long id);
-
- /**
- * 鎵归噺鍒犻櫎鎮h�呴棬璇婅褰�
- *
- * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
- * @return 缁撴灉
- */
- public int deletePatMedOuthospByIds(Long[] ids);
-
- PatMedRes selectPatMedOuthospCount(PatMedReq patMedReq);
-
- public List<PatMedRes> getDeptRanking(PatMedReq patMedReq);
-
- /**
- * 鑾峰彇琛ㄧ殑鏁伴噺
- *
- * @return
- */
- int countPatMedOuthosp();
-
- /**
- * 淇敼琛ㄥ悕
- *
- * @return
- */
- void renameTable(@Param("oldName") String oldName, @Param("newName") String newName);
/**
* 鍒涘缓鏂拌〃
*
- * @param templateName
- * @param newName
+ * @param templateName 妯℃澘琛ㄥ悕
+ * @param newName 鏂拌〃鍚�
*/
void createPatMedOuthosp(@Param("templateName") String templateName, @Param("newName") String newName);
+ void createPatMedOuthospAutoAdd(@Param("newName") String newName);
void setAutoIncrement(@Param("tableName") String tableName, @Param("autoInc") long autoInc);
// 鏌ヨ鎵�鏈� pat_med_outhosp 寮�澶寸殑琛ㄥ悕
List<String> getAllOuthospTableNames();
- // 鏌ヨ鎸囧畾琛ㄧ殑鏈�澶d
- Long getMaxIdFromTable(@Param("tableName") String tableName);
+ // 鏌ヨ鎸囧畾琛ㄧ殑瀛楁鍒楄〃锛堟寜 ordinal_position 鎺掑簭锛�
+ List<String> getTableColumns(@Param("tableName") String tableName);
- void createOrReplaceView(@Param("viewSql") String viewSql);
+ /**
+ * 鏌ヨ鎸囧畾琛ㄧ殑瀛楁鍏冩暟鎹紙column_name, data_type, column_type锛�
+ *
+ * @param tableName 琛ㄥ悕
+ * @return 姣忚鍖呭惈 column_name / data_type / column_type
+ */
+ List<Map<String, String>> getTableColumnMeta(@Param("tableName") String tableName);
+
+
+ /**
+ * 鍒涘缓鎴栨洿鏂板瓨鍌ㄨ繃绋嬶紙鏀寔 DROP / CREATE PROCEDURE 璇彞锛�
+ */
+ void createOrReplaceProcedure(@Param("procSql") String procSql);
+
+ /**
+ * 妫�鏌ヨ〃鏄惁宸插瓨鍦�
+ *
+ * @param tableName 琛ㄥ悕
+ * @return 瀛樺湪杩斿洖1锛屼笉瀛樺湪杩斿洖0
+ */
+ int tableExists(@Param("tableName") String tableName);
}
-
-
--
Gitblit v1.9.3