From 43e7dc349b8bc1515911e64fb12ea820afd1b0d2 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 23 三月 2026 17:07:34 +0800
Subject: [PATCH] 门急诊分表代码(增、改、查)提交
---
smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java | 103 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 74 insertions(+), 29 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java b/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
index c5e0a27..bf12d7c 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
@@ -1,11 +1,11 @@
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;
/**
* 鎮h�呴棬璇婅褰昅apper鎺ュ彛
@@ -15,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�呴棬璇婅褰�
@@ -37,7 +22,44 @@
* @param patMedOuthosp 鎮h�呴棬璇婅褰�
* @return 缁撴灉
*/
- public int insertPatMedOuthosp(PatMedOuthosp patMedOuthosp);
+// public int insertPatMedOuthosp(PatMedOuthosp patMedOuthosp);
+
+ /**
+ * 鏂板鍒版寚瀹氬垎琛紙鐢ㄤ簬璺敱鍒版渶鏂板垎琛級
+ *
+ * @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�呴棬璇婅褰�
@@ -45,23 +67,46 @@
* @param patMedOuthosp 鎮h�呴棬璇婅褰�
* @return 缁撴灉
*/
- public int updatePatMedOuthosp(PatMedOuthosp patMedOuthosp);
+// public int updatePatMedOuthosp(PatMedOuthosp patMedOuthosp);
+
/**
- * 鍒犻櫎鎮h�呴棬璇婅褰�
+ * 鍒涘缓鏂拌〃
*
- * @param id 鎮h�呴棬璇婅褰曚富閿�
- * @return 缁撴灉
+ * @param templateName 妯℃澘琛ㄥ悕
+ * @param newName 鏂拌〃鍚�
*/
- public int deletePatMedOuthospById(Long id);
+ 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();
+
+ // 鏌ヨ鎸囧畾琛ㄧ殑瀛楁鍒楄〃锛堟寜 ordinal_position 鎺掑簭锛�
+ List<String> getTableColumns(@Param("tableName") String tableName);
/**
- * 鎵归噺鍒犻櫎鎮h�呴棬璇婅褰�
+ * 鏌ヨ鎸囧畾琛ㄧ殑瀛楁鍏冩暟鎹紙column_name, data_type, column_type锛�
*
- * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
- * @return 缁撴灉
+ * @param tableName 琛ㄥ悕
+ * @return 姣忚鍖呭惈 column_name / data_type / column_type
*/
- public int deletePatMedOuthospByIds(Long[] ids);
+ List<Map<String, String>> getTableColumnMeta(@Param("tableName") String tableName);
- PatMedRes selectPatMedOuthospCount(PatMedReq patMedReq);
+
+ /**
+ * 鍒涘缓鎴栨洿鏂板瓨鍌ㄨ繃绋嬶紙鏀寔 DROP / CREATE PROCEDURE 璇彞锛�
+ */
+ void createOrReplaceProcedure(@Param("procSql") String procSql);
+
+ /**
+ * 妫�鏌ヨ〃鏄惁宸插瓨鍦�
+ *
+ * @param tableName 琛ㄥ悕
+ * @return 瀛樺湪杩斿洖1锛屼笉瀛樺湪杩斿洖0
+ */
+ int tableExists(@Param("tableName") String tableName);
}
--
Gitblit v1.9.3