|  |  | 
 |  |  | import com.smartor.domain.PatMedReq; | 
 |  |  | import com.smartor.domain.PatMedRes; | 
 |  |  | import org.apache.ibatis.annotations.Mapper; | 
 |  |  | import org.apache.ibatis.annotations.Param; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * 患者门诊记录Mapper接口 | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     public int insertPatMedOuthosp(PatMedOuthosp patMedOuthosp); | 
 |  |  |  | 
 |  |  |     public int batchPatMedOuthosp(List<PatMedOuthosp> patMedOuthosps); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 修改患者门诊记录 | 
 |  |  |      * | 
 |  |  | 
 |  |  |     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 | 
 |  |  |      */ | 
 |  |  |     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(); | 
 |  |  |  | 
 |  |  |     // 查询指定表的最大id | 
 |  |  |     Long getMaxIdFromTable(@Param("tableName") String tableName); | 
 |  |  |  | 
 |  |  |     void createOrReplaceView(@Param("viewSql") String viewSql); | 
 |  |  | } | 
 |  |  |  | 
 |  |  |  |