55 Commits
Author SHA1 Message Date
hejiayang 2214aee8b4 fix(watch):
- 定时任务数据库配置从 cqyt_watch_prod/cqyt_system_prod 更新为 XJ_WATCH/XJ_SYSTEM;
- 定时任务sql表名替换
- 修复了SQL 查询中的逻辑连接符问题
2026-03-19 14:22:03 +08:00
hejiayang b0016073e3 fix(watch):
表名调整
2026-03-19 11:06:06 +08:00
hejiayang d3f14ed824 fix(watch):
表名调整
2026-03-19 10:10:51 +08:00
hejiayang b7906db202 fix(emergency):
mapper.java注释中漏改表名
sql脚本备注
2026-03-19 09:53:57 +08:00
hejiayang 04b00de86e fix(watch):
部分sql别名双引号回退
2026-03-19 09:29:36 +08:00
hejiayang 25643710e3 fix(sql):health-emergency和health-watch模块
部分sql别名双引号回退
2026-03-18 18:11:46 +08:00
hejiayang bac673f2e8 Merge remote-tracking branch 'origin/xc' into xc 2026-03-18 16:42:45 +08:00
hejiayang 01982703f4 fix(sql):health-emergency和health-watch模块
处理sql别名
2026-03-18 16:42:29 +08:00
lianlonggang d1e2f707ae 应急遗漏表名修正 2026-03-18 16:08:55 +08:00
lianlonggang 156ccde751 返回值为MAP的,用双引号使用别名 2026-03-18 15:16:26 +08:00
wanghao f5d1090479 Merge branch 'xc' of https://gitea.rk-health.com/renkang/xj-platform into xc 2026-03-18 14:09:25 +08:00
wanghao 21f801019a fix(System服务): 修复安眼用户信息同步任务中生日字段类型转换异常
- 将身份证号提取的生日字符串转换为 Date 对象
- 解决达梦数据库中 Druid 类型转换异常问题
2026-03-18 14:07:49 +08:00
hejiayang 961dc7c104 fix(watch-job):
空值报错处理: 在SyncUserStatJob中添加空值检查
数据库规范: "limit 1"替换为"FETCH FIRST 1 ROWS ONLY"
2026-03-18 13:49:08 +08:00
lianlonggang 7d3ee66a4b 部分调整 2026-03-17 18:55:14 +08:00
lianlonggang 2c9d1d8781 屏蔽暂不需要的打包插件 2026-03-17 17:35:36 +08:00
wanghao bc941755b3 Merge branch 'xc' of https://gitea.rk-health.com/renkang/xj-platform into xc 2026-03-17 13:47:37 +08:00
wanghao 7f27749cdf sql(System服务): 新增权限规则表字段名和表名标准化更新脚本
- 更新手表设备权限规则中的字段名为大写(dept_id → DEPT_ID)
- 更新手表数据权限规则中的字段名为大写(orgcode → ORGCODE)
- 共涉及4条权限规则的更新
2026-03-17 13:47:09 +08:00
hejiayang 618020de3a fix(watch): 消息通知列表bug修改 2026-03-16 18:09:49 +08:00
hejiayang f4598505c2 fix(watch): 年查询bug修改 2026-03-16 15:57:49 +08:00
lianlonggang 858e23a311 咨询模块及IM模块调整 2026-03-13 17:32:47 +08:00
lianlonggang b5c87ed3ff 咨询模块调整 2026-03-13 17:17:35 +08:00
wanghao ff63db7081 sql(System服务): 新增System服务数据库信创整理脚本
整合20260306和20260311删表语句及20260310表名修改语句
执行顺序:先删除130张无用表(原表名),再修改76张表为QH前缀
2026-03-13 11:59:50 +08:00
hejiayang 04c2a2218a fix(emergency,watch): 更新数据库表名前缀为标准化命名
更新health-emergency和health-watch模块中的所有实体类和XML映射文件以及mapper文件注解sql,
将数据库表名从原有命名格式统一更改为带项目前缀的标准化格式,
如QH_EME开头用于应急健康模块,QH_WAT开头用于健康监测模块
2026-03-13 11:16:02 +08:00
hejiayang c488d5c7ab fix(db): 有歧义表名修改 2026-03-13 11:08:16 +08:00
hejiayang e3f9545462 feat(db): 新增应急模块和手表模块SQL脚本
1.新增emergency.sql文件,包含应急模块36张表的重命名操作,更新达梦数据库保留字段名BEGIN、END、MODEL为BEGIN_TIME、END_TIME、MODEL_NUMBER
2.新增watch.sql文件,包含手表模块47张表的重命名操作,统一前缀从XJ_WATCH调整为QH_WAT,便于后续批量管理
2026-03-13 10:52:12 +08:00
hejiayang 065dc6e7db Merge remote-tracking branch 'origin/xc' into xc 2026-03-12 17:54:18 +08:00
lianlonggang 073efdd34f 信创sql整理 2026-03-12 17:03:50 +08:00
wanghao bc40b561dc fix(权限管理): 移除租户包权限查询逻辑解决达梦数据库表不存在问题
由于 QH_SYS_TENANT_PACK_PERMS 等租户相关表已被删除,
从 queryByUser 查询中移除租户包权限判断逻辑,
仅保留角色权限和部门角色权限查询
2026-03-12 16:56:45 +08:00
hejiayang 886c9d1dbc fix(emergency):
更新实体类中的数据库表名@TableName
更新相关XML映射文件中的表名引用,确保查询语句与新的表名保持一致。
更新mapper文件注解中表名
2026-03-12 16:06:02 +08:00
wanghaoandClaude Sonnet 4.6 b9ea233a45 sql(system服务): 新增无用表删除脚本
新增 20260311-system无用表删除.sql,包含 18 张无业务遗留表的
删除语句,提供原表名和 QH_ 命名规范两份版本,按模块分组排列。
暂缓删除 QH_SYS_QUARTZ_JOB 和 QH_SYS_TENANT,待确认启动依赖。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 17:52:45 +08:00
hejiayang 670f36a57b Merge remote-tracking branch 'origin/xc' into xc 2026-03-11 09:42:13 +08:00
hejiayang 3733d442cc feat(watch): 支持Oracle数据库兼容性改进
- 将MyBatis查询中的"LIMIT 1"替换为"FETCH FIRST 1 ROWS ONLY"
- 在XML映射文件中将ROWNUM用于分页查询以提高Oracle兼容性
- 将MySQL特定函数转换为Oracle兼容语法:
  - YEAR()替换为EXTRACT(YEAR FROM)
  - TIMESTAMPDIFF()替换为EXTRACT(HOUR/MINUTE/SECOND FROM) - IFNULL()替换为NVL() - CURDATE()替换为SYSDATE
- 更新复杂查询语句使用ROW_NUMBER()窗口函数替代LEFT JOIN
- 修改表名引用从反引号到双引号以提高数据库兼容性
2026-03-11 09:41:56 +08:00
wanghaoandClaude Sonnet 4.6 061749cfb3 refactor(系统服务): 完成达梦数据库表名迁移至 QH_ 命名规范
- 更新 76 个实体类的 @TableName 注解,映射到新 QH_XXX_XXXXX 表名
- 批量替换 jeecg-system 和 jeecg-boot-base-core 中 175 个文件的
  硬编码旧表名,统一使用新 QH_ 前缀命名
- 新增 20260310-修改system数据库表名.sql,包含 76 条 ALTER TABLE
  RENAME TO 语句(分模块分组)
- 追加 5 条废弃表 DROP TABLE 语句至 20260306-信创system删表语句.sql
- 更新达梦数据库兼容性问题报告,第六节调整为 76 行,
  第八节新增 8.13 废弃表分组,合计 111 张表

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 16:40:09 +08:00
lianlonggang 0b403a559e refactor(consultation): 优化代码格式和空行规范
- 统一各实体类、Mapper 和 XML 文件的代码格式
- 规范化导入语句和类声明之间的空行
- 调整 ConSessionView、ConCostStatistics 等实体类格式
- 优化 Mapper 接口和 XML 映射文件的空行结构
- 提升代码可读性和一致性
- 去掉view及_qh表依赖
2026-03-09 10:55:55 +08:00
lianlonggang 8fd4cd9253 fix(consultation): 修复达梦数据库关键字冲突问题
- 将 SQL 中的 `type` 字段使用双引号转义为 `\"TYPE\"`
- 解决达梦数据库保留关键字导致的查询异常
- 影响模块:
  - ConDoctorSchedulingMapper.xml
  - ConDepartmentMapper.xml
2026-03-09 10:53:35 +08:00
hejiayang 10d5e6ca4a ```
feat: 添加MySQL驱动依赖支持Spring Batch功能

添加了MySQL连接器依赖以支持Spring Batch数据源兼容性,同时排除了Quartz自动配置避免定时任务冲突。```
2026-03-09 09:24:49 +08:00
hejiayang d98884ea4c fix(emergency): 修复mapper注解中SQL函数兼容性问题
- 将LEFT函数替换为SUBSTR函数以提高数据库兼容性
- 将now()函数替换为SYSDATE以确保达梦数据库兼容性
2026-03-06 16:26:59 +08:00
hejiayang bab238daae fix(health-emergency):修正数据库字段映射大小写问题
修改TblQimoNotice实体类中的@TableField注解,
将beginTime和endTime字段名统一改为大写BEGIN_TIME和END_TIME,以匹配数据库实际字段命名规范。
2026-03-06 16:11:02 +08:00
hejiayang 5233e6cb4b fix(mapper):修复SQL映射文件中的语法错误并优化查询性能
- 将反引号改为双引号以适配达梦数据库语法
- 替换MySQL特有函数为标准SQL函数(concat改为||操作符)
- 使用SYSDATE函数替代NOW函数
- 使用EXTRACT函数替代YEAR/MONTH函数提高兼容性
- 使用TRUNC函数替代DATE函数进行日期比较
- 将LIMIT语法改为FETCH FIRST语法(service):优化分页查询逻辑提高数据获取稳定性- 将LambdaQueryWrapper的last("limit1")改为标准分页查询
2026-03-06 16:03:14 +08:00
wanghaoandClaude Sonnet 4.6 224dae23ee fix(信创): 修复 Java Mapper @Select 注解中 MySQL 不兼容语法
将 5 个 Mapper 接口 @Select 注解内的 MySQL 特有语法替换为达梦兼容写法:
- LIMIT 1 → FETCH FIRST 1 ROWS ONLY(UserDataRecordBmiMapper × 2、
  UserDataRecordBWHMapper、UserDataRecordBloodAboMapper、
  UserDataRecordBloodPressureMapper)
- NOW() → SYSDATE(HealthHolidayMapper)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 13:34:58 +08:00
wanghao 5f790c0c7e fix(信创): 修复 Java 代码中 QueryWrapper.last() 拼接 LIMIT 语法与达梦不兼容问题
- LoginController: last("limit 1") → FETCH FIRST 1 ROWS ONLY
- WeighingDeviceServiceImpl: last("limit 1") → FETCH FIRST 1 ROWS ONLY
- SmsSendMsgHandle: last("limit "+n) → FETCH FIRST n ROWS ONLY
- HealthUserEmployeeExServiceImpl: 共 14 处 last("LIMIT 1") → FETCH FIRST 1 ROWS ONLY
- SysAnonServiceImpl: last("LIMIT 1 OFFSET 0") → FETCH FIRST 1 ROWS ONLY
2026-03-06 11:36:43 +08:00
wanghao 890cdfe40d fix(信创): 修复 Mapper XML 中 MySQL 特有语法与达梦数据库不兼容问题
- UserDataRecordBmiMapper.xml: DATE() → TRUNC(),LIMIT 1 → FETCH FIRST 1 ROWS ONLY
- SysVersionInfoMapper.xml: limit 1 → FETCH FIRST 1 ROWS ONLY
- SysUserMapper.xml: limit 1 → FETCH FIRST 1 ROWS ONLY,IFNULL() → NVL(),INSERT IGNORE → INSERT INTO
2026-03-06 11:36:19 +08:00
wanghao 909ccacaeb sql(信创): 新增达梦数据库无效表清理脚本,删除100张冗余表 2026-03-06 10:22:59 +08:00
wanghao 9b3021e847 Merge branch 'xc' of https://gitea.rk-health.com/renkang/xj-platform into xc 2026-03-06 09:54:28 +08:00
wanghao 264ca97055 refactor(缓存管理): 注释掉新疆项目中青海相关的用户和部门缓存逻辑 2026-03-06 09:51:38 +08:00
lianlonggang 9251e202f3 feat(db): 添加达梦数据库关键字转义拦截器
- 新增 DmKeywordInterceptor 拦截器,自动为达梦数据库关键字添加双引号转义
- 更新 AedEquipmentManger 实体类格式化和导入语句规范
- 支持自动识别和处理达梦数据库保留关键字,避免 SQL 语法错误
- 提升数据库兼容性,确保实体字段与达梦数据库关键字冲突时正常执行
2026-03-05 18:30:21 +08:00
wanghao 5885cd2ea0 xml修改 2026-03-05 14:47:55 +08:00
hejiayang d2a2f8291c 实体类数据库关键字注释 2026-03-05 11:15:20 +08:00
hejiayang a38f8adfc8 Merge remote-tracking branch 'origin/xc' into xc 2026-03-04 18:01:49 +08:00
hejiayang 4c98dd2d30 fix: 应急就医数据库迁移相关调整
1.启动类排除QuartzAutoConfiguration.class
2.数据库字段与达梦保留关键字段冲突调整
3.sql键名重复修改
2026-03-04 18:01:20 +08:00
wanghao b751f40bb4 systemxml改造 2026-03-04 14:59:45 +08:00
lianlonggang 61045e4389 chore(config): 更新 Nacos 配置连接信息
- 更新 Nacos 服务器地址从 localhost:8848 到 192.168.1.80:8848
- 更新认证信息(用户名: xjuser, 密码: Aa135790!123)
- 更新命名空间为 xjxc-space-common
- 新增服务发现命名空间配置 NACOS_NAMESPACE_DISCOVERY

涉及模块:
- health-consultation-start
- health-emergency-start
- health-watch-start
- jeecg-system-start
2026-03-04 09:30:06 +08:00
lianlonggang a3cb8a45ad chore(config): 标准化所有微服务的 application.yml 格式
- 统一 health-consultation、health-emergency、health-watch、health-system 四个模块的配置文件格式
- 规范 YAML 缩进和空行,提升配置文件可读性
- 保持配置内容不变,仅调整格式排版
2026-03-04 09:27:40 +08:00
lianlonggang fb5f142127 chore(deps): 移除达梦数据库 JDBC 驱动依赖并优化配置
- 删除 DmJdbcDriver8.jar 驱动文件
- 排除 QuartzAutoConfiguration 自动配置
- 统一规范 POM 文件格式和依赖管理
- 优化项目构建配置
2026-03-03 17:57:32 +08:00
wanghao 2c0d684079 信创改造 2026-03-02 15:13:07 +08:00
555 changed files with 3710 additions and 2690 deletions
@@ -0,0 +1,111 @@
DROP TABLE "20250917_CARE";
DROP TABLE "ARC_ASSESS_VALUE";
DROP TABLE "ARC_FOOD_ATLAS";
DROP TABLE "ARC_QUESTIONNAIRE";
DROP TABLE "ARC_QUESTIONNAIRE_CHILD";
DROP TABLE "CESHI_NOTE";
DROP TABLE "COMMON_EXPORTS_INFO_QH";
DROP TABLE "COMMON_EXPORTS_ITEM_QH";
DROP TABLE "COMMON_IMPORTS_DETAIL_QH";
DROP TABLE "COMMON_IMPORTS_QH";
DROP TABLE "CON_COST_STATISTICS";
DROP TABLE "CON_DEPARTMENT";
DROP TABLE "CON_DOCTOR_FOLLOW";
DROP TABLE "CON_DOCTOR_SCHEDULING";
DROP TABLE "CON_DOCTOR_SCHEDULING_DATE";
DROP TABLE "CON_EVALUATE";
DROP TABLE "CON_FAMILY_MEMBERS";
DROP TABLE "CON_HEALTH_INFO";
DROP TABLE "CON_HEALTH_INFO_ANSWER";
DROP TABLE "CON_HOSPITAL_FOLLOW";
DROP TABLE "CON_KNOWLEDGE";
DROP TABLE "CON_KNOWLEDGE_CATEGORY";
DROP TABLE "CON_MEDICAL_RECORDS";
DROP TABLE "CON_SESSION_RESERVATION_DATE";
DROP TABLE "DEMO";
DROP TABLE "DEMO_FIELD_DEF_VAL_MAIN";
DROP TABLE "DEMO_FIELD_DEF_VAL_SUB";
DROP TABLE "EMERGENCY_SERIOUS_DISEASE";
DROP TABLE "HEALTH_CLASSIFICATION";
DROP TABLE "HEALTH_USER_EMPLOYEE_EX_QH";
DROP TABLE "JEECG_MONTHLY_GROWTH_ANALYSIS";
DROP TABLE "JEECG_ORDER_CUSTOMER";
DROP TABLE "JEECG_ORDER_MAIN";
DROP TABLE "JEECG_ORDER_TICKET";
DROP TABLE "JEECG_PROJECT_NATURE_INCOME";
DROP TABLE "JIMU_DICT";
DROP TABLE "JIMU_DICT_ITEM";
DROP TABLE "JIMU_REPORT";
DROP TABLE "JIMU_REPORT_DATA_SOURCE";
DROP TABLE "JIMU_REPORT_DB";
DROP TABLE "JIMU_REPORT_DB_FIELD";
DROP TABLE "JIMU_REPORT_DB_PARAM";
DROP TABLE "JIMU_REPORT_LINK";
DROP TABLE "JIMU_REPORT_MAP";
DROP TABLE "JIMU_REPORT_SHARE";
DROP TABLE "JOA_DEMO";
DROP TABLE "LORE_CHECK_SUBJECT";
DROP TABLE "ONL_AUTH_DATA";
DROP TABLE "ONL_AUTH_PAGE";
DROP TABLE "ONL_AUTH_RELATION";
DROP TABLE "ONL_CGFORM_BUTTON";
DROP TABLE "ONL_CGFORM_ENHANCE_JAVA";
DROP TABLE "ONL_CGFORM_ENHANCE_JS";
DROP TABLE "ONL_CGFORM_ENHANCE_SQL";
DROP TABLE "ONL_CGFORM_FIELD";
DROP TABLE "ONL_CGFORM_HEAD";
DROP TABLE "ONL_CGFORM_INDEX";
DROP TABLE "ONL_CGREPORT_HEAD";
DROP TABLE "ONL_CGREPORT_ITEM";
DROP TABLE "ONL_CGREPORT_PARAM";
DROP TABLE "OSS_FILE";
DROP TABLE "QRTZ_BLOB_TRIGGERS";
DROP TABLE "QRTZ_CALENDARS";
DROP TABLE "QRTZ_CRON_TRIGGERS";
DROP TABLE "QRTZ_FIRED_TRIGGERS";
DROP TABLE "QRTZ_JOB_DETAILS" CASCADE;
DROP TABLE "QRTZ_LOCKS";
DROP TABLE "QRTZ_PAUSED_TRIGGER_GRPS";
DROP TABLE "QRTZ_SCHEDULER_STATE";
DROP TABLE "QRTZ_SIMPLE_TRIGGERS";
DROP TABLE "QRTZ_SIMPROP_TRIGGERS";
DROP TABLE "QRTZ_TRIGGERS";
DROP TABLE "REP_DEMO_DXTJ";
DROP TABLE "REP_DEMO_EMPLOYEE";
DROP TABLE "REP_DEMO_GONGSI";
DROP TABLE "REP_DEMO_JIANPIAO";
DROP TABLE "SYS_APP_VERSION_QH";
DROP TABLE "SYS_DEPART_COPY1";
DROP TABLE "SYS_DEPART_GPS_QH";
DROP TABLE "SYS_DEPART_QH";
DROP TABLE "SYS_LOG_QH";
DROP TABLE "SYS_PERMISSION_20241224";
DROP TABLE "SYS_PERMISSION_DATA_RULE_QH";
DROP TABLE "SYS_PERMISSION_QH";
DROP TABLE "SYS_ROLE_INDEX_QH";
DROP TABLE "SYS_ROLE_PERMISSION_QH";
DROP TABLE "SYS_ROLE_QH";
DROP TABLE "SYS_USER_DEPART_CHANGE_APPLY_QH";
DROP TABLE "SYS_USER_DEPART_QH";
DROP TABLE "SYS_USER_QH";
DROP TABLE "SYS_USER_ROLE_QH";
DROP TABLE "TEST_DEMO";
DROP TABLE "TEST_ENHANCE_SELECT";
DROP TABLE "TEST_NOTE";
DROP TABLE "TEST_ORDER_CUSTOMER";
DROP TABLE "TEST_ORDER_MAIN";
DROP TABLE "TEST_ORDER_PRODUCT";
DROP TABLE "TEST_SHOPTYPE_TREE";
DROP TABLE "TEST_V3_HELLO";
DROP TABLE "TMP_REPORT_DATA_1";
DROP TABLE "TMP_REPORT_DATA_INCOME";
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_INBODY";
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_LEFU";
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_ONE";
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_TWO";
DROP TABLE "REMOTE_WEIGHT_NORMATIVE_DATA";
DROP TABLE "HEALTH_USER_DOCTOR_BASE_EX";
DROP TABLE "HOSPITAL_DEPARTMENT";
DROP TABLE "STATION_HOSPITAL";
DROP TABLE "SYS_APP_VERSION";
DROP TABLE "USER_INFORMATION";
@@ -0,0 +1,92 @@
-- ============================================================
-- System 服务数据库表名修改脚本达梦 DM8
-- 规则统一以 QH_ 开头第二级三字母业务模块前缀总长度 25
-- 生成日期2026-03-10
-- 涉及表数76
-- ============================================================
-- ===== COM 公共模块4 =====
ALTER TABLE "COMMON_EXPORTS_INFO" RENAME TO "QH_COM_EXPORTS_INFO";
ALTER TABLE "COMMON_EXPORTS_ITEM" RENAME TO "QH_COM_EXPORTS_ITEM";
ALTER TABLE "COMMON_IMPORTS" RENAME TO "QH_COM_IMPORTS";
ALTER TABLE "COMMON_IMPORTS_DETAIL" RENAME TO "QH_COM_IMPORTS_DETAIL";
-- ===== HLT 健康模块6 =====
ALTER TABLE "HEALTH_CONSULT_RESOURCE" RENAME TO "QH_HLT_CONSULT_RESOURCE";
ALTER TABLE "HEALTH_HOLIDAY" RENAME TO "QH_HLT_HOLIDAY";
ALTER TABLE "HEALTH_USER_DOCTOR_EX" RENAME TO "QH_HLT_DOCTOR_EX";
ALTER TABLE "HEALTH_USER_EMPLOYEE_EX" RENAME TO "QH_HLT_USER_EMPLOYEE_EX";
ALTER TABLE "HEALTH_USER_OPERATOR_EX" RENAME TO "QH_HLT_USER_OPERATOR_EX";
ALTER TABLE "HEALTH_USER_STATION_EX" RENAME TO "QH_HLT_USER_STATION_EX";
-- ===== SCL 体测模块2 =====
ALTER TABLE "SCALE_HEIGHT" RENAME TO "QH_SCL_HEIGHT";
ALTER TABLE "SCALE_PERSONAL" RENAME TO "QH_SCL_PERSONAL";
-- ===== SYS 系统模块52 =====
ALTER TABLE "SYS_ANNOUNCEMENT" RENAME TO "QH_SYS_ANNOUNCEMENT";
ALTER TABLE "SYS_ANNOUNCEMENT_SEND" RENAME TO "QH_SYS_ANNOUNCEMENT_SEND";
ALTER TABLE "SYS_BANNER" RENAME TO "QH_SYS_BANNER";
ALTER TABLE "SYS_CATEGORY" RENAME TO "QH_SYS_CATEGORY";
ALTER TABLE "SYS_CHECK_RULE" RENAME TO "QH_SYS_CHECK_RULE";
ALTER TABLE "SYS_COMMENT" RENAME TO "QH_SYS_COMMENT";
ALTER TABLE "SYS_CONFIG" RENAME TO "QH_SYS_CONFIG";
ALTER TABLE "SYS_DATA_LOG" RENAME TO "QH_SYS_DATA_LOG";
ALTER TABLE "SYS_DATA_SOURCE" RENAME TO "QH_SYS_DATA_SOURCE";
ALTER TABLE "SYS_DEPART" RENAME TO "QH_SYS_DEPART";
ALTER TABLE "SYS_DEPART_GPS" RENAME TO "QH_SYS_DEPART_GPS";
ALTER TABLE "SYS_DEPART_PERMISSION" RENAME TO "QH_SYS_DEPART_PERMISSION";
ALTER TABLE "SYS_DEPART_ROLE" RENAME TO "QH_SYS_DEPART_ROLE";
ALTER TABLE "SYS_DEPART_ROLE_PERMISSION" RENAME TO "QH_SYS_DEPT_ROLE_PERM";
ALTER TABLE "SYS_DEPART_ROLE_USER" RENAME TO "QH_SYS_DEPART_ROLE_USER";
ALTER TABLE "SYS_DICT" RENAME TO "QH_SYS_DICT";
ALTER TABLE "SYS_DICT_ITEM" RENAME TO "QH_SYS_DICT_ITEM";
ALTER TABLE "SYS_FILES" RENAME TO "QH_SYS_FILES";
ALTER TABLE "SYS_FILL_RULE" RENAME TO "QH_SYS_FILL_RULE";
ALTER TABLE "SYS_FORM_FILE" RENAME TO "QH_SYS_FORM_FILE";
ALTER TABLE "SYS_GATEWAY_ROUTE" RENAME TO "QH_SYS_GATEWAY_ROUTE";
ALTER TABLE "SYS_IOS_REDEEM" RENAME TO "QH_SYS_IOS_REDEEM";
ALTER TABLE "SYS_LOG" RENAME TO "QH_SYS_LOG";
ALTER TABLE "SYS_MESSAGE_NOTICE" RENAME TO "QH_SYS_MSG_NOTICE";
ALTER TABLE "SYS_MESSAGE_NOTICE_SCOPE" RENAME TO "QH_SYS_MSG_NOTICE_SCOPE";
ALTER TABLE "SYS_MESSAGE_REMIND" RENAME TO "QH_SYS_MSG_REMIND";
ALTER TABLE "SYS_NOTICE" RENAME TO "QH_SYS_NOTICE";
ALTER TABLE "SYS_NOTICE_READ_RECORD" RENAME TO "QH_SYS_NOTICE_READ_RECORD";
ALTER TABLE "SYS_PACK_PERMISSION" RENAME TO "QH_SYS_PACK_PERMISSION";
ALTER TABLE "SYS_PERMISSION" RENAME TO "QH_SYS_PERMISSION";
ALTER TABLE "SYS_PERMISSION_DATA_RULE" RENAME TO "QH_SYS_PERM_DATA_RULE";
ALTER TABLE "SYS_PERMISSION_V2" RENAME TO "QH_SYS_PERMISSION_V2";
ALTER TABLE "SYS_POSITION" RENAME TO "QH_SYS_POSITION";
ALTER TABLE "SYS_POSITION_CLASSIFY" RENAME TO "QH_SYS_POSITION_CLASSIFY";
ALTER TABLE "SYS_QUARTZ_JOB" RENAME TO "QH_SYS_QUARTZ_JOB";
ALTER TABLE "SYS_ROLE" RENAME TO "QH_SYS_ROLE";
ALTER TABLE "SYS_ROLE_INDEX" RENAME TO "QH_SYS_ROLE_INDEX";
ALTER TABLE "SYS_ROLE_PERMISSION" RENAME TO "QH_SYS_ROLE_PERMISSION";
ALTER TABLE "SYS_SMS" RENAME TO "QH_SYS_SMS";
ALTER TABLE "SYS_SMS_TEMPLATE" RENAME TO "QH_SYS_SMS_TEMPLATE";
ALTER TABLE "SYS_TENANT" RENAME TO "QH_SYS_TENANT";
ALTER TABLE "SYS_TENANT_PACK" RENAME TO "QH_SYS_TENANT_PACK";
ALTER TABLE "SYS_TENANT_PACK_PERMS" RENAME TO "QH_SYS_TENANT_PACK_PERMS";
ALTER TABLE "SYS_TENANT_PACK_USER" RENAME TO "QH_SYS_TENANT_PACK_USER";
ALTER TABLE "SYS_THIRD_ACCOUNT" RENAME TO "QH_SYS_THIRD_ACCOUNT";
ALTER TABLE "SYS_USER" RENAME TO "QH_SYS_USER";
ALTER TABLE "SYS_USER_AGENT" RENAME TO "QH_SYS_USER_AGENT";
ALTER TABLE "SYS_USER_DEPART" RENAME TO "QH_SYS_USER_DEPART";
ALTER TABLE "SYS_USER_DEPART_CHANGE_APPLY" RENAME TO "QH_SYS_DEPT_CHG_APPLY";
ALTER TABLE "SYS_USER_DEVICE" RENAME TO "QH_SYS_USER_DEVICE";
ALTER TABLE "SYS_USER_EMERGENCY_CONTACT" RENAME TO "QH_SYS_USR_EMERG_CONTACT";
ALTER TABLE "SYS_USER_FAMILY_MEMBERS" RENAME TO "QH_SYS_USR_FAMILY_MBR";
ALTER TABLE "SYS_USER_FAMILY_MEMBERS_REQUEST" RENAME TO "QH_SYS_USR_FAM_MBR_REQ";
ALTER TABLE "SYS_USER_POST" RENAME TO "QH_SYS_USER_POST";
ALTER TABLE "SYS_USER_ROLE" RENAME TO "QH_SYS_USER_ROLE";
ALTER TABLE "SYS_USER_TENANT" RENAME TO "QH_SYS_USER_TENANT";
ALTER TABLE "SYS_VERSION_APP" RENAME TO "QH_SYS_VERSION_APP";
ALTER TABLE "SYS_VERSION_INFO" RENAME TO "QH_SYS_VERSION_INFO";
-- ===== USR 用户模块12 =====
ALTER TABLE "TBL_USER_WX_RELATION" RENAME TO "QH_USR_WX_RELATION";
ALTER TABLE "USER_DATA_RECORD_BLOOD_ABO" RENAME TO "QH_USR_DATA_RCD_BLOOD_ABO";
ALTER TABLE "USER_DATA_RECORD_BLOOD_PRESSURE" RENAME TO "QH_USR_DATA_RCD_BLD_PRS";
ALTER TABLE "USER_DATA_RECORD_BMI" RENAME TO "QH_USR_DATA_RCD_BMI";
ALTER TABLE "USER_DATA_RECORD_BWH" RENAME TO "QH_USR_DATA_RCD_BWH";
ALTER TABLE "USER_WEIGHT_BIND" RENAME TO "QH_USR_WEIGHT_BIND";
@@ -0,0 +1,69 @@
-- ============================================================
-- System 服务无用表删除脚本
-- 说明以下表在当前业务中已无实际使用从原项目迁移而来
-- 注意QH_SYS_QUARTZ_JOB QH_SYS_TENANT 谨慎处理暂不删除
-- 生成日期2026-03-11
-- 涉及表数18
-- ============================================================
-- ============================================================
-- 第一份原表名迁移前
-- ============================================================
-- HLT 健康模块
DROP TABLE "HEALTH_USER_STATION_EX";
-- SCL 体测模块
DROP TABLE "SCALE_HEIGHT";
DROP TABLE "SCALE_PERSONAL";
-- SYS 系统模块
DROP TABLE "SYS_FORM_FILE";
DROP TABLE "SYS_IOS_REDEEM";
DROP TABLE "SYS_PACK_PERMISSION";
DROP TABLE "SYS_TENANT_PACK";
DROP TABLE "SYS_TENANT_PACK_PERMS";
DROP TABLE "SYS_TENANT_PACK_USER";
DROP TABLE "SYS_THIRD_ACCOUNT";
DROP TABLE "SYS_USER_FAMILY_MEMBERS";
DROP TABLE "SYS_USER_FAMILY_MEMBERS_REQUEST";
-- USR 用户模块
DROP TABLE "TBL_USER_WX_RELATION";
DROP TABLE "USER_DATA_RECORD_BLOOD_PRESSURE";
DROP TABLE "USER_DATA_RECORD_BLOOD_ABO";
DROP TABLE "USER_DATA_RECORD_BMI";
DROP TABLE "USER_DATA_RECORD_BWH";
DROP TABLE "USER_WEIGHT_BIND";
-- ============================================================
-- 第二份新表名迁移后QH_ 命名规范
-- ============================================================
-- HLT 健康模块
DROP TABLE "QH_HLT_USER_STATION_EX";
-- SCL 体测模块
DROP TABLE "QH_SCL_HEIGHT";
DROP TABLE "QH_SCL_PERSONAL";
-- SYS 系统模块
DROP TABLE "QH_SYS_FORM_FILE";
DROP TABLE "QH_SYS_IOS_REDEEM";
DROP TABLE "QH_SYS_PACK_PERMISSION";
DROP TABLE "QH_SYS_TENANT_PACK";
DROP TABLE "QH_SYS_TENANT_PACK_PERMS";
DROP TABLE "QH_SYS_TENANT_PACK_USER";
DROP TABLE "QH_SYS_THIRD_ACCOUNT";
DROP TABLE "QH_SYS_USR_FAMILY_MBR";
DROP TABLE "QH_SYS_USR_FAM_MBR_REQ";
-- USR 用户模块
DROP TABLE "QH_USR_WX_RELATION";
DROP TABLE "QH_USR_DATA_RCD_BLD_PRS";
DROP TABLE "QH_USR_DATA_RCD_BLOOD_ABO";
DROP TABLE "QH_USR_DATA_RCD_BMI";
DROP TABLE "QH_USR_DATA_RCD_BWH";
DROP TABLE "QH_USR_WEIGHT_BIND";
+66
View File
@@ -0,0 +1,66 @@
-- 删除青海相关库
DROP TABLE IF EXISTS CON_DOCTOR_FOLLOW_QH;
DROP TABLE IF EXISTS CON_DOCTOR_SATISFY_QH;
DROP TABLE IF EXISTS CON_EVALUATE_QH;
DROP TABLE IF EXISTS CON_FAMILY_MEMBERS_QH;
DROP TABLE IF EXISTS CON_HEALTH_INFO_ANSWER_QH;
DROP TABLE IF EXISTS CON_HEALTH_INFO_CHILD_QH;
DROP TABLE IF EXISTS CON_HEALTH_INFO_QH;
DROP TABLE IF EXISTS CON_HELPER_ONLINE_QH;
DROP TABLE IF EXISTS CON_HELPER_QH;
DROP TABLE IF EXISTS CON_HELPER_SCHEDULING_HISTORY_QH;
DROP TABLE IF EXISTS CON_HELPER_SCHEDULING_QH;
DROP TABLE IF EXISTS CON_HOSPITAL_FOLLOW_QH;
DROP TABLE IF EXISTS CON_MEDICAL_RECORDS_QH;
DROP TABLE IF EXISTS CON_SESSION_QH;
-- 修改表名
ALTER TABLE CON_COST_LOG RENAME TO QH_CON_COST_LOG;
ALTER TABLE CON_COST_STATISTICS RENAME TO QH_CON_COST_STAT;
ALTER TABLE CON_DEPARTMENT RENAME TO QH_CON_DEPT;
ALTER TABLE CON_DOCTOR RENAME TO QH_CON_DOCTOR;
ALTER TABLE CON_DOCTOR_CARD RENAME TO QH_CON_DOC_CARD;
ALTER TABLE CON_DOCTOR_CHANGE_LOG RENAME TO QH_CON_DOC_CHG_LOG;
ALTER TABLE CON_DOCTOR_FOLLOW RENAME TO QH_CON_DOC_FOLLOW;
ALTER TABLE CON_DOCTOR_SATISFY RENAME TO QH_CON_DOC_SATISFY;
ALTER TABLE CON_DOCTOR_SCHEDULING RENAME TO QH_CON_DOC_SCHD;
ALTER TABLE CON_DOCTOR_SCHEDULING_DATE RENAME TO QH_CON_DOC_SCHD_DT;
ALTER TABLE CON_EVALUATE RENAME TO QH_CON_EVALUATE;
ALTER TABLE CON_FAMILY_MEMBERS RENAME TO QH_CON_FAMMEM;
ALTER TABLE CON_HABIT_PARAM RENAME TO QH_CON_HABIT_PARM;
ALTER TABLE CON_HEALTH_INFO RENAME TO QH_CON_HEALTH;
ALTER TABLE CON_HEALTH_INFO_ANSWER RENAME TO QH_CON_HEALTH_ANS;
ALTER TABLE CON_HEALTH_INFO_CHILD RENAME TO QH_CON_HEALTH_CHD;
ALTER TABLE CON_HELPER RENAME TO QH_CON_HELPER;
ALTER TABLE CON_HELPER_ONLINE RENAME TO QH_CON_HELPER_ONLN;
ALTER TABLE CON_HELPER_REST RENAME TO QH_CON_HELPER_REST;
ALTER TABLE CON_HELPER_SCHEDULING RENAME TO QH_CON_HELPER_SCHD;
ALTER TABLE CON_HELPER_SCHEDULING_HISTORY RENAME TO QH_CON_HELPER_SCHD_HIS;
ALTER TABLE CON_HOSPITAL_FOLLOW RENAME TO QH_CON_HOSP_FOLLOW;
ALTER TABLE CON_KNOWLEDGE RENAME TO QH_CON_KNOW;
ALTER TABLE CON_KNOWLEDGE_CATEGORY RENAME TO QH_CON_KNOW_CATE;
ALTER TABLE CON_MEDICAL_RECORDS RENAME TO QH_CON_MEDREC;
ALTER TABLE CON_NOTICE RENAME TO QH_CON_NOTICE;
ALTER TABLE CON_PAUSE_SERVICE RENAME TO QH_CON_PAUSE_SRVC;
ALTER TABLE CON_PHRASES RENAME TO QH_CON_PHRASES;
ALTER TABLE CON_PROPOSE RENAME TO QH_CON_PROPOSE;
ALTER TABLE CON_RESOURCE RENAME TO QH_CON_RESOURCE;
ALTER TABLE CON_SCHEDULING RENAME TO QH_CON_SCHD;
ALTER TABLE CON_SERVICE RENAME TO QH_CON_SRVC;
ALTER TABLE CON_SESSION RENAME TO QH_CON_SESSION;
ALTER TABLE CON_SESSION_RESERVATION_DATE RENAME TO QH_CON_SESS_RESV_DT;
ALTER TABLE CON_SESSION_VIDEO_INFO RENAME TO QH_CON_SESS_VID;
ALTER TABLE CON_SETTLE_CONFIG_COST RENAME TO QH_CON_STL_CFG_COST;
ALTER TABLE CON_SETTLE_CONFIG_PERIOD RENAME TO QH_CON_STL_CFG_PRD;
ALTER TABLE CON_SETTLE_MAIN RENAME TO QH_CON_STL_MAIN;
ALTER TABLE CON_SETTLE_RESULT RENAME TO QH_CON_STL_RSLT;
ALTER TABLE CON_SETTLE_RESULT_ITEM RENAME TO QH_CON_STL_RSLT_ITM;
ALTER TABLE CON_SETTLE_RESULT_PERIOD RENAME TO QH_CON_STL_RSLT_PRD;
ALTER TABLE CON_SICKS RENAME TO QH_CON_SICKS;
ALTER TABLE HOSPITAL_DEPARTMENT RENAME TO QH_CON_HOSP_DEPT;
ALTER TABLE IM_GROUP_SYNC_RECORD RENAME TO QH_CON_IM_GRP_SYNC;
ALTER TABLE IM_MSG_READ_LOG RENAME TO QH_CON_IM_MSG_RDLOG;
ALTER TABLE IM_MSG_RECORD_ALL RENAME TO QH_CON_IM_MSG_ALL;
-- 修改表字段触发关键字了
ALTER TABLE QH_CON_EVALUATE RENAME COLUMN CONTEXT TO EVA_CONTEXT;
+49
View File
@@ -0,0 +1,49 @@
-- 应急模块sql整理
-- 以下所有sql均包含"XJ_EMERGENCY".前缀, 后续部署, 如果不需要, 可以批量删除前缀
-- 更新达梦数据库保留字段名
ALTER TABLE "XJ_EMERGENCY"."TBL_QIMO_NOTICE" ALTER COLUMN "BEGIN" RENAME TO "BEGIN_TIME";
ALTER TABLE "XJ_EMERGENCY"."TBL_QIMO_NOTICE" ALTER COLUMN "END" RENAME TO "END_TIME";
ALTER TABLE "XJ_EMERGENCY"."AED_EQUIPMENT_MANGER" ALTER COLUMN "MODEL" RENAME TO "MODEL_NUMBER";
-- 更新表名(36张)
ALTER TABLE "XJ_EMERGENCY"."AED" RENAME TO "QH_EME_AED";
ALTER TABLE "XJ_EMERGENCY"."AED_EQUIPMENT_MAINTAIN" RENAME TO "QH_EME_AED_EQUIP_MAINTAIN";
ALTER TABLE "XJ_EMERGENCY"."AED_EQUIPMENT_MANGER" RENAME TO "QH_EME_AED_EQUIP_MANGER";
ALTER TABLE "XJ_EMERGENCY"."AED_EQUIPMENT_RETRAIN" RENAME TO "QH_EME_AED_EQUIP_RETRAIN";
ALTER TABLE "XJ_EMERGENCY"."AED_EQUIPMENT_TRAIN" RENAME TO "QH_EME_AED_EQUIP_TRAIN";
ALTER TABLE "XJ_EMERGENCY"."AED_LATEST" RENAME TO "QH_EME_AED_LATEST";
ALTER TABLE "XJ_EMERGENCY"."AED_LOCATION_EQUIPMENT" RENAME TO "QH_EME_AED_LOC_EQUIP";
ALTER TABLE "XJ_EMERGENCY"."AED_USE_RECORD" RENAME TO "QH_EME_AED_USE_RECORD";
ALTER TABLE "XJ_EMERGENCY"."AED_WARN_INFO" RENAME TO "QH_EME_AED_WARN_INFO";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_CENTER" RENAME TO "QH_EME_CENTER";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_CENTER_ADMIN" RENAME TO "QH_EME_CENTER_ADMIN";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_CENTER_OPEN_TIME" RENAME TO "QH_EME_CENTER_OPEN_TIME";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_CENTER_RESOURCE" RENAME TO "QH_EME_CENTER_RESOUR";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_GROUPED" RENAME TO "QH_EME_GROUPED";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_HEALTH_ROOM" RENAME TO "QH_EME_HEALTH_ROOM";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_NEW_SCHEDULES" RENAME TO "QH_EME_NEW_SCHEDULES";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_SCHEDULES_NEW_ITEM" RENAME TO "QH_EME_SCHED_NEW_ITEM";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_ORDER" RENAME TO "QH_EME_ORDER";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_ORDER_DETAIL" RENAME TO "QH_EME_ORDER_DETAIL";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_ORDER_INTERVENE" RENAME TO "QH_EME_ORDER_INTERVENE";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_ORDER_OPERATOR" RENAME TO "QH_EME_ORDER_OPERATOR";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_ORDER_SEND_RECORD" RENAME TO "QH_EME_ORDER_SEND_REC";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_PROFESSION_USER" RENAME TO "QH_EME_PROFESS_USER";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_RESOURCE" RENAME TO "QH_EME_RESOURCE";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_SCHEDULE_CUSTOM" RENAME TO "QH_EME_SCHED_CUSTOM";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_SCHEDULE_DEFAULT" RENAME TO "QH_EME_SCHED_DEFAULT";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_SCHEDULE_RECORD" RENAME TO "QH_EME_SCHED_RECORD";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_SCREEN_ANIMATION" RENAME TO "QH_EME_SCRN_ANIMAT";
ALTER TABLE "XJ_EMERGENCY"."EMERGENCY_SERIOUS_DISEASE" RENAME TO "QH_EME_SERIOUS_DIS";
ALTER TABLE "XJ_EMERGENCY"."LARGE_SCREEN_DATA" RENAME TO "QH_EME_SCRN_DATA";
ALTER TABLE "XJ_EMERGENCY"."SYS_NOTIFY_SMS_PHONE" RENAME TO "QH_EME_NOTIF_SMS_PHONE";
ALTER TABLE "XJ_EMERGENCY"."TBL_QIMO_NOTICE" RENAME TO "QH_EME_QIMO_NOTICE";
ALTER TABLE "XJ_EMERGENCY"."TBL_USER_HELP" RENAME TO "QH_EME_USER_HELP";
-- QH_EME_VIDEO_MAC 此表数据库已被删除
ALTER TABLE "XJ_EMERGENCY"."TBL_VIDEO_MAC" RENAME TO "QH_EME_VIDEO_MAC";
ALTER TABLE "XJ_EMERGENCY"."XJ_AED" RENAME TO "QH_EME_XJ_AED";
ALTER TABLE "XJ_EMERGENCY"."ZY_AMBULANCE_DATA" RENAME TO "QH_EME_AMBUL_DATA";
+265
View File
@@ -0,0 +1,265 @@
-- ============================================================
-- System 服务数据库信创整理脚本达梦 DM8
-- 生成日期2026-03-13
-- 说明生产环境执行脚本表名为原表名
-- 执行顺序
-- 第一步删除所有不需要的表使用原表名
-- 第二步修改剩余表的表名原表名 QH_ 前缀新表名
-- ============================================================
-- ============================================================
-- 第一步删除不需要的表使用原表名
-- 说明整合 20260306 20260311 中要删除的表
-- 涉及表数130
-- ============================================================
-- ===== ARC 归档/历史数据 5 =====
DROP TABLE "20250917_CARE";
DROP TABLE "ARC_ASSESS_VALUE";
DROP TABLE "ARC_FOOD_ATLAS";
DROP TABLE "ARC_QUESTIONNAIRE";
DROP TABLE "ARC_QUESTIONNAIRE_CHILD";
-- ===== _QH 后缀类青海旧库历史备份 18 =====
DROP TABLE "COMMON_EXPORTS_INFO_QH";
DROP TABLE "COMMON_EXPORTS_ITEM_QH";
DROP TABLE "COMMON_IMPORTS_DETAIL_QH";
DROP TABLE "COMMON_IMPORTS_QH";
DROP TABLE "HEALTH_USER_EMPLOYEE_EX_QH";
DROP TABLE "SYS_APP_VERSION_QH";
DROP TABLE "SYS_DEPART_GPS_QH";
DROP TABLE "SYS_DEPART_QH";
DROP TABLE "SYS_LOG_QH";
DROP TABLE "SYS_PERMISSION_DATA_RULE_QH";
DROP TABLE "SYS_PERMISSION_QH";
DROP TABLE "SYS_ROLE_INDEX_QH";
DROP TABLE "SYS_ROLE_PERMISSION_QH";
DROP TABLE "SYS_ROLE_QH";
DROP TABLE "SYS_USER_DEPART_CHANGE_APPLY_QH";
DROP TABLE "SYS_USER_DEPART_QH";
DROP TABLE "SYS_USER_QH";
DROP TABLE "SYS_USER_ROLE_QH";
-- ===== CON 咨询模块已迁移 14 =====
DROP TABLE "CON_COST_STATISTICS";
DROP TABLE "CON_DEPARTMENT";
DROP TABLE "CON_DOCTOR_FOLLOW";
DROP TABLE "CON_DOCTOR_SCHEDULING";
DROP TABLE "CON_DOCTOR_SCHEDULING_DATE";
DROP TABLE "CON_EVALUATE";
DROP TABLE "CON_FAMILY_MEMBERS";
DROP TABLE "CON_HEALTH_INFO";
DROP TABLE "CON_HEALTH_INFO_ANSWER";
DROP TABLE "CON_HOSPITAL_FOLLOW";
DROP TABLE "CON_KNOWLEDGE";
DROP TABLE "CON_KNOWLEDGE_CATEGORY";
DROP TABLE "CON_MEDICAL_RECORDS";
DROP TABLE "CON_SESSION_RESERVATION_DATE";
-- ===== DEMO / TEST / TMP 演示/测试/临时 14 =====
DROP TABLE "DEMO";
DROP TABLE "DEMO_FIELD_DEF_VAL_MAIN";
DROP TABLE "DEMO_FIELD_DEF_VAL_SUB";
DROP TABLE "JOA_DEMO";
DROP TABLE "TEST_DEMO";
DROP TABLE "TEST_ENHANCE_SELECT";
DROP TABLE "TEST_NOTE";
DROP TABLE "TEST_ORDER_CUSTOMER";
DROP TABLE "TEST_ORDER_MAIN";
DROP TABLE "TEST_ORDER_PRODUCT";
DROP TABLE "TEST_SHOPTYPE_TREE";
DROP TABLE "TEST_V3_HELLO";
DROP TABLE "TMP_REPORT_DATA_1";
DROP TABLE "TMP_REPORT_DATA_INCOME";
-- ===== JEECG 框架示例表 5 =====
DROP TABLE "JEECG_MONTHLY_GROWTH_ANALYSIS";
DROP TABLE "JEECG_ORDER_CUSTOMER";
DROP TABLE "JEECG_ORDER_MAIN";
DROP TABLE "JEECG_ORDER_TICKET";
DROP TABLE "JEECG_PROJECT_NATURE_INCOME";
-- ===== JIMU 积木报表内部表 10 =====
DROP TABLE "JIMU_DICT";
DROP TABLE "JIMU_DICT_ITEM";
DROP TABLE "JIMU_REPORT";
DROP TABLE "JIMU_REPORT_DATA_SOURCE";
DROP TABLE "JIMU_REPORT_DB";
DROP TABLE "JIMU_REPORT_DB_FIELD";
DROP TABLE "JIMU_REPORT_DB_PARAM";
DROP TABLE "JIMU_REPORT_LINK";
DROP TABLE "JIMU_REPORT_MAP";
DROP TABLE "JIMU_REPORT_SHARE";
-- ===== ONL Online 代码生成器内部表 13 =====
DROP TABLE "ONL_AUTH_DATA";
DROP TABLE "ONL_AUTH_PAGE";
DROP TABLE "ONL_AUTH_RELATION";
DROP TABLE "ONL_CGFORM_BUTTON";
DROP TABLE "ONL_CGFORM_ENHANCE_JAVA";
DROP TABLE "ONL_CGFORM_ENHANCE_JS";
DROP TABLE "ONL_CGFORM_ENHANCE_SQL";
DROP TABLE "ONL_CGFORM_FIELD";
DROP TABLE "ONL_CGFORM_HEAD";
DROP TABLE "ONL_CGFORM_INDEX";
DROP TABLE "ONL_CGREPORT_HEAD";
DROP TABLE "ONL_CGREPORT_ITEM";
DROP TABLE "ONL_CGREPORT_PARAM";
-- ===== QRTZ Quartz 调度框架内部表 11 =====
DROP TABLE "QRTZ_BLOB_TRIGGERS";
DROP TABLE "QRTZ_CALENDARS";
DROP TABLE "QRTZ_CRON_TRIGGERS";
DROP TABLE "QRTZ_FIRED_TRIGGERS";
DROP TABLE "QRTZ_JOB_DETAILS" CASCADE;
DROP TABLE "QRTZ_LOCKS";
DROP TABLE "QRTZ_PAUSED_TRIGGER_GRPS";
DROP TABLE "QRTZ_SCHEDULER_STATE";
DROP TABLE "QRTZ_SIMPLE_TRIGGERS";
DROP TABLE "QRTZ_SIMPROP_TRIGGERS";
DROP TABLE "QRTZ_TRIGGERS";
-- ===== REP_DEMO 报表演示 4 =====
DROP TABLE "REP_DEMO_DXTJ";
DROP TABLE "REP_DEMO_EMPLOYEE";
DROP TABLE "REP_DEMO_GONGSI";
DROP TABLE "REP_DEMO_JIANPIAO";
-- ===== SYS 历史备份类 2 =====
DROP TABLE "SYS_DEPART_COPY1";
DROP TABLE "SYS_PERMISSION_20241224";
-- ===== 其他未知来源或项目未使用 6 =====
DROP TABLE "CESHI_NOTE";
DROP TABLE "EMERGENCY_SERIOUS_DISEASE";
DROP TABLE "HEALTH_CLASSIFICATION";
DROP TABLE "LORE_CHECK_SUBJECT";
DROP TABLE "OSS_FILE";
DROP TABLE "USER_INFORMATION";
-- ===== REMOTE_WEIGHT 远程体重设备已废弃 5 =====
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_INBODY";
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_LEFU";
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_ONE";
DROP TABLE "REMOTE_WEIGHT_MANUFACTURER_TWO";
DROP TABLE "REMOTE_WEIGHT_NORMATIVE_DATA";
-- ===== 历史遗留 / 已废弃功能表 5 =====
DROP TABLE "HEALTH_USER_DOCTOR_BASE_EX";
DROP TABLE "HOSPITAL_DEPARTMENT";
DROP TABLE "STATION_HOSPITAL";
DROP TABLE "SYS_APP_VERSION";
-- ===== System 服务无业务遗留表 18 =====
-- HLT 健康模块1
DROP TABLE "HEALTH_USER_STATION_EX";
-- SCL 体测模块2
DROP TABLE "SCALE_HEIGHT";
DROP TABLE "SCALE_PERSONAL";
-- SYS 系统模块10
DROP TABLE "SYS_FORM_FILE";
DROP TABLE "SYS_IOS_REDEEM";
DROP TABLE "SYS_PACK_PERMISSION";
DROP TABLE "SYS_TENANT_PACK";
DROP TABLE "SYS_TENANT_PACK_PERMS";
DROP TABLE "SYS_TENANT_PACK_USER";
DROP TABLE "SYS_THIRD_ACCOUNT";
DROP TABLE "SYS_USER_FAMILY_MEMBERS_REQUEST";
-- USR 用户模块6
DROP TABLE "TBL_USER_WX_RELATION";
DROP TABLE "USER_DATA_RECORD_BLOOD_PRESSURE";
DROP TABLE "USER_DATA_RECORD_BLOOD_ABO";
DROP TABLE "USER_DATA_RECORD_BMI";
DROP TABLE "USER_DATA_RECORD_BWH";
DROP TABLE "USER_WEIGHT_BIND";
-- ============================================================
-- 第二步修改剩余表的表名原表名 QH_ 前缀新表名
-- 规则统一以 QH_ 开头第二级三字母业务模块前缀总长度 25
-- 涉及表数76 删除后剩余的表
-- ============================================================
-- ===== COM 公共模块4 =====
ALTER TABLE "COMMON_EXPORTS_INFO" RENAME TO "QH_COM_EXPORTS_INFO";
ALTER TABLE "COMMON_EXPORTS_ITEM" RENAME TO "QH_COM_EXPORTS_ITEM";
ALTER TABLE "COMMON_IMPORTS" RENAME TO "QH_COM_IMPORTS";
ALTER TABLE "COMMON_IMPORTS_DETAIL" RENAME TO "QH_COM_IMPORTS_DETAIL";
-- ===== HLT 健康模块5 =====
ALTER TABLE "HEALTH_CONSULT_RESOURCE" RENAME TO "QH_HLT_CONSULT_RESOURCE";
ALTER TABLE "HEALTH_HOLIDAY" RENAME TO "QH_HLT_HOLIDAY";
ALTER TABLE "HEALTH_USER_DOCTOR_EX" RENAME TO "QH_HLT_DOCTOR_EX";
ALTER TABLE "HEALTH_USER_EMPLOYEE_EX" RENAME TO "QH_HLT_USER_EMPLOYEE_EX";
ALTER TABLE "HEALTH_USER_OPERATOR_EX" RENAME TO "QH_HLT_USER_OPERATOR_EX";
-- ===== SYS 系统模块52 =====
ALTER TABLE "SYS_ANNOUNCEMENT" RENAME TO "QH_SYS_ANNOUNCEMENT";
ALTER TABLE "SYS_ANNOUNCEMENT_SEND" RENAME TO "QH_SYS_ANNOUNCEMENT_SEND";
ALTER TABLE "SYS_BANNER" RENAME TO "QH_SYS_BANNER";
ALTER TABLE "SYS_CATEGORY" RENAME TO "QH_SYS_CATEGORY";
ALTER TABLE "SYS_CHECK_RULE" RENAME TO "QH_SYS_CHECK_RULE";
ALTER TABLE "SYS_COMMENT" RENAME TO "QH_SYS_COMMENT";
ALTER TABLE "SYS_CONFIG" RENAME TO "QH_SYS_CONFIG";
ALTER TABLE "SYS_DATA_LOG" RENAME TO "QH_SYS_DATA_LOG";
ALTER TABLE "SYS_DATA_SOURCE" RENAME TO "QH_SYS_DATA_SOURCE";
ALTER TABLE "SYS_DEPART" RENAME TO "QH_SYS_DEPART";
ALTER TABLE "SYS_DEPART_GPS" RENAME TO "QH_SYS_DEPART_GPS";
ALTER TABLE "SYS_DEPART_PERMISSION" RENAME TO "QH_SYS_DEPART_PERMISSION";
ALTER TABLE "SYS_DEPART_ROLE" RENAME TO "QH_SYS_DEPART_ROLE";
ALTER TABLE "SYS_DEPART_ROLE_PERMISSION" RENAME TO "QH_SYS_DEPT_ROLE_PERM";
ALTER TABLE "SYS_DEPART_ROLE_USER" RENAME TO "QH_SYS_DEPART_ROLE_USER";
ALTER TABLE "SYS_DICT" RENAME TO "QH_SYS_DICT";
ALTER TABLE "SYS_DICT_ITEM" RENAME TO "QH_SYS_DICT_ITEM";
ALTER TABLE "SYS_FILES" RENAME TO "QH_SYS_FILES";
ALTER TABLE "SYS_FILL_RULE" RENAME TO "QH_SYS_FILL_RULE";
ALTER TABLE "SYS_GATEWAY_ROUTE" RENAME TO "QH_SYS_GATEWAY_ROUTE";
ALTER TABLE "SYS_LOG" RENAME TO "QH_SYS_LOG";
ALTER TABLE "SYS_MESSAGE_NOTICE" RENAME TO "QH_SYS_MSG_NOTICE";
ALTER TABLE "SYS_MESSAGE_NOTICE_SCOPE" RENAME TO "QH_SYS_MSG_NOTICE_SCOPE";
ALTER TABLE "SYS_MESSAGE_REMIND" RENAME TO "QH_SYS_MSG_REMIND";
ALTER TABLE "SYS_NOTICE" RENAME TO "QH_SYS_NOTICE";
ALTER TABLE "SYS_NOTICE_READ_RECORD" RENAME TO "QH_SYS_NOTICE_READ_RECORD";
ALTER TABLE "SYS_PERMISSION" RENAME TO "QH_SYS_PERMISSION";
ALTER TABLE "SYS_PERMISSION_DATA_RULE" RENAME TO "QH_SYS_PERM_DATA_RULE";
ALTER TABLE "SYS_PERMISSION_V2" RENAME TO "QH_SYS_PERMISSION_V2";
ALTER TABLE "SYS_POSITION" RENAME TO "QH_SYS_POSITION";
ALTER TABLE "SYS_POSITION_CLASSIFY" RENAME TO "QH_SYS_POSITION_CLASSIFY";
ALTER TABLE "SYS_QUARTZ_JOB" RENAME TO "QH_SYS_QUARTZ_JOB";
ALTER TABLE "SYS_ROLE" RENAME TO "QH_SYS_ROLE";
ALTER TABLE "SYS_ROLE_INDEX" RENAME TO "QH_SYS_ROLE_INDEX";
ALTER TABLE "SYS_ROLE_PERMISSION" RENAME TO "QH_SYS_ROLE_PERMISSION";
ALTER TABLE "SYS_SMS" RENAME TO "QH_SYS_SMS";
ALTER TABLE "SYS_SMS_TEMPLATE" RENAME TO "QH_SYS_SMS_TEMPLATE";
ALTER TABLE "SYS_TENANT" RENAME TO "QH_SYS_TENANT";
ALTER TABLE "SYS_THIRD_ACCOUNT" RENAME TO "QH_SYS_THIRD_ACCOUNT";
ALTER TABLE "SYS_USER" RENAME TO "QH_SYS_USER";
ALTER TABLE "SYS_USER_AGENT" RENAME TO "QH_SYS_USER_AGENT";
ALTER TABLE "SYS_USER_DEPART" RENAME TO "QH_SYS_USER_DEPART";
ALTER TABLE "SYS_USER_DEPART_CHANGE_APPLY" RENAME TO "QH_SYS_DEPT_CHG_APPLY";
ALTER TABLE "SYS_USER_DEVICE" RENAME TO "QH_SYS_USER_DEVICE";
ALTER TABLE "SYS_USER_EMERGENCY_CONTACT" RENAME TO "QH_SYS_USR_EMERG_CONTACT";
ALTER TABLE "SYS_USER_FAMILY_MEMBERS" RENAME TO "QH_SYS_USR_FAMILY_MBR";
ALTER TABLE "SYS_USER_POST" RENAME TO "QH_SYS_USER_POST";
ALTER TABLE "SYS_USER_ROLE" RENAME TO "QH_SYS_USER_ROLE";
ALTER TABLE "SYS_USER_TENANT" RENAME TO "QH_SYS_USER_TENANT";
ALTER TABLE "SYS_VERSION_APP" RENAME TO "QH_SYS_VERSION_APP";
ALTER TABLE "SYS_VERSION_INFO" RENAME TO "QH_SYS_VERSION_INFO";
-- ===== USR 用户模块15 =====
ALTER TABLE "USER_DATA_RECORD_BLOOD_ABO" RENAME TO "QH_USR_DATA_RCD_BLOOD_ABO";
ALTER TABLE "USER_DATA_RECORD_BLOOD_PRESSURE" RENAME TO "QH_USR_DATA_RCD_BLD_PRS";
ALTER TABLE "USER_DATA_RECORD_BMI" RENAME TO "QH_USR_DATA_RCD_BMI";
ALTER TABLE "USER_DATA_RECORD_BWH" RENAME TO "QH_USR_DATA_RCD_BWH";
ALTER TABLE "USER_WEIGHT_BIND" RENAME TO "QH_USR_WEIGHT_BIND";
-- ============================================================
-- 脚本执行完成
-- 总计
-- 第一步删除 129 张不需要的表使用原表名
-- 第二步修改 77 张表的表名原表名 QH_ 前缀新表名
-- ============================================================
+34
View File
@@ -0,0 +1,34 @@
-- ============================================================
-- 权限规则表更新脚本仅更新有用的三条规则
-- 表名QH_SYS_PERM_DATA_RULE
-- 说明
-- 1. 更新手表设备表的权限规则wd.dept_id QH_WAT_DEVICE.DEPT_ID
-- 2. 更新手表数据表的权限规则orgcode QH_WAT_DATA.ORGCODE
-- ============================================================
-- 1. 更新手表设备权限规则 - 规则1
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = 'FIND_IN_SET(wd.DEPT_ID, ''#{sys_manager_depart_ids}'')'
WHERE "ID" = '2027688332771315713';
-- 2. 更新手表设备权限规则 - 规则2
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = 'FIND_IN_SET(wd.DEPT_ID, ''#{sys_manager_depart_ids}'')'
WHERE "ID" = '1737389275796287489';
-- 2.1 更新手表设备权限规则 - 规则3
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = 'FIND_IN_SET(wd.DEPT_ID, ''#{sys_manager_depart_ids}'')'
WHERE "ID" = '1737404792707821569';
-- 3. 更新手表数据权限规则 - 部门代码规则
UPDATE "QH_SYS_PERM_DATA_RULE"
SET "RULE_VALUE" = '( ORGCODE REGEXP CONCAT(''^\('',replace(''#{sys_manager_depart_codes}'','','',''|''),'')\')) =1'
WHERE "ID" = '2027689339962118146';
-- ============================================================
-- 验证更新结果
-- ============================================================
SELECT "ID", "RULE_NAME", "RULE_COLUMN", "RULE_CONDITIONS", "RULE_VALUE"
FROM "QH_SYS_PERM_DATA_RULE"
WHERE "ID" IN ('2027688332771315713', '1737389275796287489', '1737404792707821569', '2027689339962118146');
+52
View File
@@ -0,0 +1,52 @@
-- 手表模块sql整理
-- 以下所有sql均包含"XJ_WATCH".前缀, 后续部署, 如果不需要, 可以批量删除前缀
-- 更新表名(47张)
ALTER TABLE "XJ_WATCH"."ARCHIVES_BODY_TYPE" RENAME TO "QH_WAT_ARCHIVES_BODY_TYPE";
ALTER TABLE "XJ_WATCH"."DEPT_STATISTIC_DATA" RENAME TO "QH_WAT_DEPT_STAT_DATA";
ALTER TABLE "XJ_WATCH"."USER_RECORD_SPORTS_DAY" RENAME TO "QH_WAT_USER_REC_SPORT_DAY";
ALTER TABLE "XJ_WATCH"."USER_RECORD_SPORTS_INFO" RENAME TO "QH_WAT_USER_REC_SPORT_INF";
ALTER TABLE "XJ_WATCH"."USER_WE_CHAT_SPORTS_DAY" RENAME TO "QH_WAT_USER_WECH_SPO_DAY";
ALTER TABLE "XJ_WATCH"."WATCH_ABNORMAL_RECORD" RENAME TO "QH_WAT_ABNORMAL_RECORD";
ALTER TABLE "XJ_WATCH"."WATCH_BIND_HIS" RENAME TO "QH_WAT_BIND_HIS";
ALTER TABLE "XJ_WATCH"."WATCH_BIND_HIS_BAK" RENAME TO "QH_WAT_BIND_HIS_BAK";
ALTER TABLE "XJ_WATCH"."WATCH_BIND_HIS_COPY1" RENAME TO "QH_WAT_BIND_HIS_COPY1";
ALTER TABLE "XJ_WATCH"."WATCH_BIND_HIS_COPY2" RENAME TO "QH_WAT_BIND_HIS_COPY2";
ALTER TABLE "XJ_WATCH"."WATCH_DATA" RENAME TO "QH_WAT_DATA";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_CALORIE" RENAME TO "QH_WAT_DATA_CALORIE";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_DAY" RENAME TO "QH_WAT_DATA_DAY";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_DETAIL" RENAME TO "QH_WAT_DATA_DETAIL";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_DISTANCE" RENAME TO "QH_WAT_DATA_DISTANCE";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_ECG" RENAME TO "QH_WAT_DATA_ECG";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_EXERCISE" RENAME TO "QH_WAT_DATA_EXERCISE";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_GPS" RENAME TO "QH_WAT_DATA_GPS";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_HEART_RATE" RENAME TO "QH_WAT_DATA_HEART_RATE";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_SLEEP" RENAME TO "QH_WAT_DATA_SLEEP";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_SLEEP_NEW" RENAME TO "QH_WAT_DATA_SLEEP_NEW";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_SLEEP_NEW_DAY" RENAME TO "QH_WAT_DATA_SLEEP_NEW_DAY";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_SLEEP_NEW_ERR" RENAME TO "QH_WAT_DATA_SLEEP_NEW_ERR";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_SLEEP_NEW_MINUTE" RENAME TO "QH_WAT_DATA_SLEEP_NEW_MIN";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_SPO2" RENAME TO "QH_WAT_DATA_SPO2";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_STEPS" RENAME TO "QH_WAT_DATA_STEPS";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_STEPS_HF" RENAME TO "QH_WAT_DATA_STEPS_HF";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_STRESS" RENAME TO "QH_WAT_DATA_STRESS";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_TEMPERATURE" RENAME TO "QH_WAT_DATA_TEMP";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_WORKOUT" RENAME TO "QH_WAT_DATA_WORKOUT";
ALTER TABLE "XJ_WATCH"."WATCH_DATA_WORKOUT_TRACE" RENAME TO "QH_WAT_DATA_WORKOUT_TRACE";
ALTER TABLE "XJ_WATCH"."WATCH_DEPART_REPORT" RENAME TO "QH_WAT_DEPART_REPORT";
ALTER TABLE "XJ_WATCH"."WATCH_DEVICE" RENAME TO "QH_WAT_DEVICE";
ALTER TABLE "XJ_WATCH"."WATCH_DEVICE_SWITCH" RENAME TO "QH_WAT_DEVICE_SWITCH";
ALTER TABLE "XJ_WATCH"."WATCH_KEY_USER" RENAME TO "QH_WAT_KEY_USER";
ALTER TABLE "XJ_WATCH"."WATCH_MONITOR_DATA" RENAME TO "QH_WAT_MONITOR_DATA";
ALTER TABLE "XJ_WATCH"."WATCH_MONITOR_MOBILE" RENAME TO "QH_WAT_MONITOR_MOBILE";
ALTER TABLE "XJ_WATCH"."WATCH_MQTT_NOTICE" RENAME TO "QH_WAT_MQTT_NOTICE";
ALTER TABLE "XJ_WATCH"."WATCH_STAT_USER_INFO_DAY_HEART_RATE" RENAME TO "QH_WAT_STAT_USER_DAY_HR";
ALTER TABLE "XJ_WATCH"."WATCH_STAT_USER_INFO_DAY_SDC" RENAME TO "QH_WAT_STAT_USER_DAY_SDC";
ALTER TABLE "XJ_WATCH"."WATCH_STAT_USER_INFO_DAY_SLEEP" RENAME TO "QH_WAT_STAT_USER_DAY_SLE";
ALTER TABLE "XJ_WATCH"."WATCH_STAT_USER_INFO_DAY_SPO2" RENAME TO "QH_WAT_STAT_USER_DAY_SPO2";
ALTER TABLE "XJ_WATCH"."WATCH_STAT_USER_INFO_DAY_STRESS" RENAME TO "QH_WAT_STAT_USER_DAY_STRE";
ALTER TABLE "XJ_WATCH"."WATCH_STAT_USER_INFO_DAY_TEMP" RENAME TO "QH_WAT_STAT_USER_DAY_TEMP";
ALTER TABLE "XJ_WATCH"."WATCH_STAT_USER_INFO_DAY_WORKOUT" RENAME TO "QH_WAT_STAT_USER_DAY_WORK";
ALTER TABLE "XJ_WATCH"."WATCH_SYN_MAX_ID" RENAME TO "QH_WAT_SYN_MAX_ID";
ALTER TABLE "XJ_WATCH"."WATCH_USER_DATA" RENAME TO "QH_WAT_USER_DATA";
@@ -30,10 +30,6 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <artifactId>spring-boot-starter-validation</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId> <artifactId>spring-boot-configuration-processor</artifactId>
@@ -25,6 +25,7 @@ import org.springframework.core.task.TaskExecutor;
import org.springframework.jdbc.support.JdbcTransactionManager; import org.springframework.jdbc.support.JdbcTransactionManager;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.util.StringUtils;
import javax.sql.DataSource; import javax.sql.DataSource;
import java.util.List; import java.util.List;
@@ -125,8 +126,21 @@ public class BatchAutoConfiguration {
@BatchDataSource ObjectProvider<DataSource> batchDataSource, @BatchDataSource ObjectProvider<DataSource> batchDataSource,
BatchProperties properties BatchProperties properties
) { ) {
return new BatchDataSourceScriptDatabaseInitializer(batchDataSource.getIfAvailable(() -> dataSource), DataSource dataSourceToUse = batchDataSource.getIfAvailable(() -> dataSource);
properties.getJdbc()); BatchProperties.Jdbc jdbc = properties.getJdbc();
// 达梦数据库兼容处理:设置platform绕过构造器中的自动类型检测
if (!StringUtils.hasText(jdbc.getPlatform())) {
jdbc.setPlatform("dm");
}
// 重写afterPropertiesSet()跳过SQL脚本初始化:
// 父类会先断言SQL文件存在再检查initializeSchema mode,导致找不到schema-dm.sql时报错
// Batch元数据表已通过数据迁移创建,无需自动建表
return new BatchDataSourceScriptDatabaseInitializer(dataSourceToUse, jdbc) {
@Override
public void afterPropertiesSet() {
// 跳过Batch元数据表的自动建表,防止找不到schema-dm.sql文件报错
}
};
} }
} }
@@ -34,6 +34,12 @@ public class CustomBatchConfigurer extends BasicBatchConfigurer {
this.taskExecutor = taskExecutor; this.taskExecutor = taskExecutor;
} }
@Override
public void initialize() {
// 调用父类的 initialize() 方法来初始化 JobRepository 等
super.initialize();
}
@Override @Override
protected JobLauncher createJobLauncher() throws Exception { protected JobLauncher createJobLauncher() throws Exception {
SimpleJobLauncher jobLauncher = new SimpleJobLauncher(); SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
@@ -11,19 +11,18 @@
a.icon, a.icon,
a.points, a.points,
CASE CASE
WHEN a.frequency = 1 THEN -- 单次 WHEN a.frequency = 1 THEN
IF(COUNT(b.id) > 0, 1, 0) CASE WHEN COUNT(b.id) > 0 THEN 1 ELSE 0 END
WHEN a.frequency = 2 THEN -- 日/次 WHEN a.frequency = 2 THEN
IF(COUNT(CASE WHEN DATE(b.create_time) = CURDATE() THEN 1 END) > 0, 1, 0) CASE WHEN COUNT(CASE WHEN TRUNC(b.create_time) = TRUNC(SYSDATE) THEN 1 END) > 0 THEN 1 ELSE 0 END
WHEN a.frequency = 3 THEN -- 周/次 WHEN a.frequency = 3 THEN
IF(COUNT(CASE WHEN YEARWEEK(b.create_time, 1) = YEARWEEK(CURDATE(), 1) THEN 1 END) > 0, 1, 0) CASE WHEN COUNT(CASE WHEN TO_CHAR(b.create_time, 'IYYY-IW') = TO_CHAR(SYSDATE, 'IYYY-IW') THEN 1 END) > 0 THEN 1 ELSE 0 END
WHEN a.frequency = 4 THEN -- 月/次 WHEN a.frequency = 4 THEN
IF(COUNT(CASE WHEN DATE_FORMAT(b.create_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m') THEN 1 END) > 0, 1, 0) CASE WHEN COUNT(CASE WHEN TO_CHAR(b.create_time, 'YYYY-MM') = TO_CHAR(SYSDATE, 'YYYY-MM') THEN 1 END) > 0 THEN 1 ELSE 0 END
WHEN a.frequency = 5 THEN -- 季度/次 WHEN a.frequency = 5 THEN
IF(COUNT(CASE WHEN QUARTER(b.create_time) = QUARTER(CURDATE()) AND YEAR(b.create_time) = YEAR(CURDATE()) THEN 1 CASE WHEN COUNT(CASE WHEN TO_CHAR(b.create_time, 'Q') = TO_CHAR(SYSDATE, 'Q') AND EXTRACT(YEAR FROM b.create_time) = EXTRACT(YEAR FROM SYSDATE) THEN 1 END) > 0 THEN 1 ELSE 0 END
END) > 0, 1, 0) WHEN a.frequency = 6 THEN
WHEN a.frequency = 6 THEN -- 年/次 CASE WHEN COUNT(CASE WHEN EXTRACT(YEAR FROM b.create_time) = EXTRACT(YEAR FROM SYSDATE) THEN 1 END) > 0 THEN 1 ELSE 0 END
IF(COUNT(CASE WHEN YEAR(b.create_time) = YEAR(CURDATE()) THEN 1 END) > 0, 1, 0)
ELSE 0 ELSE 0
END AS clockInStatus END AS clockInStatus
FROM FROM
@@ -459,7 +459,7 @@ public class UserPointsServiceImpl extends ServiceImpl<UserPointsMapper, UserPoi
List<UserPointsDetails> details = userPointsDetailsMapper.selectList(new LambdaQueryWrapper<UserPointsDetails>() List<UserPointsDetails> details = userPointsDetailsMapper.selectList(new LambdaQueryWrapper<UserPointsDetails>()
.eq(UserPointsDetails::getUserId, userId) .eq(UserPointsDetails::getUserId, userId)
.eq(UserPointsDetails::getChangeType, HealthBankConstants.CHANGE_TYPE_ADD) .eq(UserPointsDetails::getChangeType, HealthBankConstants.CHANGE_TYPE_ADD)
.apply("DATE_FORMAT(create_time, '%Y-%m-%d') = {0}", DateUtil.today()) .apply("TO_CHAR(create_time, 'YYYY-MM-DD') = {0}", DateUtil.today())
); );
double sum = details.stream().map(UserPointsDetails::getPoints).mapToDouble(BigDecimal::doubleValue).sum(); double sum = details.stream().map(UserPointsDetails::getPoints).mapToDouble(BigDecimal::doubleValue).sum();
userPoints.setLatestAddDaySum(BigDecimal.valueOf(sum).add(pointsRule.getPoints())); userPoints.setLatestAddDaySum(BigDecimal.valueOf(sum).add(pointsRule.getPoints()));
@@ -15,7 +15,7 @@ import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("con_cost_log") @TableName("qh_con_cost_log")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_cost_log对象", description = "con_cost_log") @Schema(title = "con_cost_log对象", description = "con_cost_log")
@@ -21,7 +21,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_cost_statistics") @TableName("qh_con_cost_stat")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_cost_statistics对象", description = "con_cost_statistics") @Schema(title = "con_cost_statistics对象", description = "con_cost_statistics")
@@ -27,7 +27,7 @@ import java.util.List;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_department") @TableName("qh_con_dept")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_department对象", description = "con_department") @Schema(title = "con_department对象", description = "con_department")
@@ -28,7 +28,7 @@ import java.util.Map;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_doctor") @TableName("qh_con_doctor")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor对象", description = "con_doctor") @Schema(title = "con_doctor对象", description = "con_doctor")
@@ -18,7 +18,7 @@ import java.io.Serializable;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_doctor_card") @TableName("qh_con_doc_card")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_card对象", description = "con_doctor_card") @Schema(title = "con_doctor_card对象", description = "con_doctor_card")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_doctor_change_log") @TableName("qh_con_doc_chg_log")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title="con_doctor_change_log对象", description="专家信息修改日志") @Schema(title="con_doctor_change_log对象", description="专家信息修改日志")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_doctor_follow") @TableName("qh_con_doc_follow")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_follow对象", description = "医生关注") @Schema(title = "con_doctor_follow对象", description = "医生关注")
@@ -7,7 +7,7 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
@TableName("con_doctor_satisfy") @TableName("qh_con_doc_satisfy")
public class ConDoctorSatisfy implements Serializable { public class ConDoctorSatisfy implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_doctor_scheduling") @TableName("qh_con_doc_schd")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_scheduling对象", description = "专家排班") @Schema(title = "con_doctor_scheduling对象", description = "专家排班")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_doctor_scheduling_date") @TableName("qh_con_doc_schd_dt")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_doctor_scheduling_date对象", description = "排班时间") @Schema(title = "con_doctor_scheduling_date对象", description = "排班时间")
@@ -22,7 +22,7 @@ import java.util.List;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_evaluate") @TableName("qh_con_evaluate")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_evaluate对象", description = "医生评分") @Schema(title = "con_evaluate对象", description = "医生评分")
@@ -68,6 +68,7 @@ public class ConEvaluate implements Serializable {
*/ */
@Excel(name = "评价", width = 15) @Excel(name = "评价", width = 15)
@Schema(title = "评价") @Schema(title = "评价")
@TableField("EVA_CONTEXT")
private String context; private String context;
/** /**
* 会话id * 会话id
@@ -20,7 +20,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_family_members") @TableName("qh_con_fammem")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_family_members对象", description = "家庭成员") @Schema(title = "con_family_members对象", description = "家庭成员")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_health_info") @TableName("qh_con_health")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_health_info对象", description = "健康信息") @Schema(title = "con_health_info对象", description = "健康信息")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_health_info_answer") @TableName("qh_con_health_ans")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_health_info_answer对象", description = "健康信息答案") @Schema(title = "con_health_info_answer对象", description = "健康信息答案")
@@ -20,7 +20,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_helper") @TableName("qh_con_helper")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper对象", description = "con_helper") @Schema(title = "con_helper对象", description = "con_helper")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_helper_online") @TableName("qh_con_helper_onln")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper_online对象", description = "con_helper_online") @Schema(title = "con_helper_online对象", description = "con_helper_online")
@@ -23,7 +23,7 @@ import lombok.experimental.Accessors;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_helper_rest") @TableName("qh_con_helper_rest")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title="con_helper_rest对象", description="全科医生休息") @Schema(title="con_helper_rest对象", description="全科医生休息")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_helper_scheduling") @TableName("qh_con_helper_schd")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper_scheduling对象", description = "con_helper_scheduling") @Schema(title = "con_helper_scheduling对象", description = "con_helper_scheduling")
@@ -22,7 +22,7 @@ import java.io.Serializable;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_helper_scheduling_history") @TableName("qh_con_helper_schd_his")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper_scheduling_history对象", description = "con_helper_scheduling_history") @Schema(title = "con_helper_scheduling_history对象", description = "con_helper_scheduling_history")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_hospital_follow") @TableName("qh_con_hosp_follow")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_hospital_follow对象", description = "医院关注") @Schema(title = "con_hospital_follow对象", description = "医院关注")
@@ -21,7 +21,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_knowledge") @TableName("qh_con_know")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_knowledge对象", description = "知识库") @Schema(title = "con_knowledge对象", description = "知识库")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_knowledge_category") @TableName("qh_con_know_cate")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_knowledge_category对象", description = "知识库分类") @Schema(title = "con_knowledge_category对象", description = "知识库分类")
@@ -22,7 +22,7 @@ import java.util.Map;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_medical_records") @TableName("qh_con_medrec")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_medical_records对象", description = "疾病档案") @Schema(title = "con_medical_records对象", description = "疾病档案")
@@ -24,7 +24,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_notice") @TableName("qh_con_notice")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_notice对象", description = "咨询须知") @Schema(title = "con_notice对象", description = "咨询须知")
@@ -13,7 +13,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("con_phrases") @TableName("qh_con_phrases")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_phrases对象", description = "常用语") @Schema(title = "con_phrases对象", description = "常用语")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_propose") @TableName("qh_con_propose")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_propose对象", description = "con_propose") @Schema(title = "con_propose对象", description = "con_propose")
@@ -26,7 +26,7 @@ import java.util.List;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_resource") @TableName("qh_con_resource")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_resource对象", description = "con_resource") @Schema(title = "con_resource对象", description = "con_resource")
@@ -23,7 +23,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_service") @TableName("qh_con_srvc")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_service对象", description = "con_service") @Schema(title = "con_service对象", description = "con_service")
@@ -22,7 +22,7 @@ import java.util.List;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_session") @TableName("qh_con_session")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_session对象", description = "con_session") @Schema(title = "con_session对象", description = "con_session")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_session_reservation_date") @TableName("qh_con_sess_resv_dt")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_session_reservation_date对象", description = "咨询预约时间") @Schema(title = "con_session_reservation_date对象", description = "咨询预约时间")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_session_video_info") @TableName("qh_con_sess_vid")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_session_video_info对象", description = "con_session_video_info") @Schema(title = "con_session_video_info对象", description = "con_session_video_info")
@@ -20,7 +20,7 @@ import java.util.Date;
@Builder @Builder
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@TableName(value = "con_session_view") @TableName(value = "qh_con_session")
public class ConSessionView implements Serializable { public class ConSessionView implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableField(value = "id") @TableField(value = "id")
@@ -77,7 +77,7 @@ public class ConSessionView implements Serializable {
@TableField(value = "medical_records_id") @TableField(value = "medical_records_id")
@Schema(description = "") @Schema(description = "")
private String medicalRecordsId; private String medicalRecordsId;
@TableField(value = "`status`") @TableField(value = "status")
@Schema(description = "") @Schema(description = "")
private Integer status; private Integer status;
@TableField(value = "del_flag") @TableField(value = "del_flag")
@@ -25,7 +25,7 @@ import java.util.Date;
@Accessors(chain = true) @Accessors(chain = true)
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@TableName(value = "con_settle_config_cost") @TableName(value = "qh_con_stl_cfg_cost")
public class ConSettleConfigCost implements Serializable { public class ConSettleConfigCost implements Serializable {
public static final String COL_ID = "id"; public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id"; public static final String COL_SETTLE_ID = "settle_id";
@@ -24,7 +24,7 @@ import java.util.Date;
@Accessors(chain = true) @Accessors(chain = true)
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@TableName(value = "con_settle_config_period") @TableName(value = "qh_con_stl_cfg_prd")
public class ConSettleConfigPeriod implements Serializable { public class ConSettleConfigPeriod implements Serializable {
public static final String COL_ID = "id"; public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id"; public static final String COL_SETTLE_ID = "settle_id";
@@ -22,7 +22,7 @@ import java.util.Date;
@Accessors(chain = true) @Accessors(chain = true)
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@TableName(value = "con_settle_main") @TableName(value = "qh_con_stl_main")
public class ConSettleMain implements Serializable { public class ConSettleMain implements Serializable {
public static final String COL_ID = "id"; public static final String COL_ID = "id";
public static final String COL_SETTLE_NAME = "settle_name"; public static final String COL_SETTLE_NAME = "settle_name";
@@ -29,7 +29,7 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@ColumnWidth(25) @ColumnWidth(25)
@TableName(value = "con_settle_result") @TableName(value = "qh_con_stl_rslt")
public class ConSettleResult implements Serializable { public class ConSettleResult implements Serializable {
public static final String COL_ID = "id"; public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id"; public static final String COL_SETTLE_ID = "settle_id";
@@ -29,7 +29,7 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@ColumnWidth(25) @ColumnWidth(25)
@TableName(value = "con_settle_result_item") @TableName(value = "qh_con_stl_rslt_itm")
public class ConSettleResultItem implements Serializable { public class ConSettleResultItem implements Serializable {
public static final String COL_ID = "id"; public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id"; public static final String COL_SETTLE_ID = "settle_id";
@@ -29,7 +29,7 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@ColumnWidth(25) @ColumnWidth(25)
@TableName(value = "con_settle_result_period") @TableName(value = "qh_con_stl_rslt_prd")
public class ConSettleResultPeriod implements Serializable { public class ConSettleResultPeriod implements Serializable {
public static final String COL_ID = "id"; public static final String COL_ID = "id";
public static final String COL_SETTLE_ID = "settle_id"; public static final String COL_SETTLE_ID = "settle_id";
@@ -27,7 +27,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("con_sicks") @TableName("qh_con_sicks")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_sicks对象", description = "con_sicks") @Schema(title = "con_sicks对象", description = "con_sicks")
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("hospital_department") @TableName("qh_con_hosp_dept")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "hospital_department对象", description = "医院部门") @Schema(title = "hospital_department对象", description = "医院部门")
@@ -19,7 +19,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("im_msg_read_log") @TableName("qh_con_im_msg_rdlog")
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "Im消息已读日志", description = "Im消息已读日志") @Schema(title = "Im消息已读日志", description = "Im消息已读日志")
public class ImMsgReadLog implements Serializable { public class ImMsgReadLog implements Serializable {
@@ -22,7 +22,7 @@ import java.util.Date;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("im_msg_record_all") @TableName("qh_con_im_msg_all")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "im_msg_record_all对象", description = "im_msg_record_all") @Schema(title = "im_msg_record_all对象", description = "im_msg_record_all")
@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("im_msg_record_all") @TableName("qh_con_im_msg_all")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "im_msg_record_all对象", description = "im_msg_record_all") @Schema(title = "im_msg_record_all对象", description = "im_msg_record_all")
@@ -12,7 +12,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
@TableName("con_helper") @TableName("qh_con_helper")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "con_helper对象", description = "con_helper") @Schema(title = "con_helper对象", description = "con_helper")
@@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
@Data @Data
@TableName("con_resource") @TableName("qh_con_resource")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(title = "医院列表", description = "医院列表") @Schema(title = "医院列表", description = "医院列表")
@@ -171,7 +171,7 @@ public class ConCostStatisticsController extends JeecgController<ConCostStatisti
*/ */
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConCostStatistics conCostStatistics) { public ModelAndView exportXls(HttpServletRequest request, ConCostStatistics conCostStatistics) {
return super.exportXls(request, conCostStatistics, ConCostStatistics.class, "con_cost_statistics"); return super.exportXls(request, conCostStatistics, ConCostStatistics.class, "qh_con_cost_stat");
} }
/** /**
@@ -199,7 +199,7 @@ public class ConDepartmentController extends JeecgController<ConDepartment, ICon
@RequiresPermissions("consultation:con_department:exportXls") @RequiresPermissions("consultation:con_department:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConDepartment conDepartment) { public ModelAndView exportXls(HttpServletRequest request, ConDepartment conDepartment) {
return super.exportXls(request, conDepartment, ConDepartment.class, "con_department"); return super.exportXls(request, conDepartment, ConDepartment.class, "qh_con_dept");
} }
/** /**
@@ -175,7 +175,7 @@ public class ConDoctorCardController extends JeecgController<ConDoctorCard, ICon
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
@Operation(summary = "导出", description = "导出") @Operation(summary = "导出", description = "导出")
public ModelAndView exportXls(HttpServletRequest request, ConDoctorCard conDoctorCard) { public ModelAndView exportXls(HttpServletRequest request, ConDoctorCard conDoctorCard) {
return super.exportXls(request, conDoctorCard, ConDoctorCard.class, "con_doctor_card"); return super.exportXls(request, conDoctorCard, ConDoctorCard.class, "qh_con_doc_card");
} }
/** /**
@@ -163,7 +163,7 @@ public class ConHelperController extends JeecgController<ConHelper, IConHelperSe
@Operation(summary = "导出") @Operation(summary = "导出")
@AutoLog(value = "导出全科医生信息") @AutoLog(value = "导出全科医生信息")
public ModelAndView exportXls(HttpServletRequest request, ConHelper conHelper) { public ModelAndView exportXls(HttpServletRequest request, ConHelper conHelper) {
return super.exportXls(request, conHelper, ConHelper.class, "con_helper"); return super.exportXls(request, conHelper, ConHelper.class, "qh_con_helper");
} }
/** /**
@@ -143,7 +143,7 @@ public class ConHelperOnlineController extends JeecgController<ConHelperOnline,
@RequiresPermissions("com.renkang.consultation:con_helper_online:exportXls") @RequiresPermissions("com.renkang.consultation:con_helper_online:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConHelperOnline conHelperOnline) { public ModelAndView exportXls(HttpServletRequest request, ConHelperOnline conHelperOnline) {
return super.exportXls(request, conHelperOnline, ConHelperOnline.class, "con_helper_online"); return super.exportXls(request, conHelperOnline, ConHelperOnline.class, "qh_con_helper_onln");
} }
/** /**
@@ -149,7 +149,7 @@ public class ConHelperSchedulingController extends JeecgController<ConHelperSche
@RequiresPermissions("consultation:con_helper_scheduling:exportXls") @RequiresPermissions("consultation:con_helper_scheduling:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConHelperScheduling conHelperScheduling) { public ModelAndView exportXls(HttpServletRequest request, ConHelperScheduling conHelperScheduling) {
return super.exportXls(request, conHelperScheduling, ConHelperScheduling.class, "con_helper_scheduling"); return super.exportXls(request, conHelperScheduling, ConHelperScheduling.class, "qh_con_helper_schd");
} }
/** /**
@@ -133,7 +133,7 @@ public class ConHelperSchedulingHistoryController extends JeecgController<ConHel
@RequiresPermissions("consultation:con_helper_scheduling:exportXls") @RequiresPermissions("consultation:con_helper_scheduling:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConHelperSchedulingHistory conHelperSchedulingHistory) { public ModelAndView exportXls(HttpServletRequest request, ConHelperSchedulingHistory conHelperSchedulingHistory) {
return super.exportXls(request, conHelperSchedulingHistory, ConHelperSchedulingHistory.class, "con_helper_scheduling_history"); return super.exportXls(request, conHelperSchedulingHistory, ConHelperSchedulingHistory.class, "qh_con_helper_schd_his");
} }
/** /**
@@ -142,7 +142,7 @@ public class ConProposeController extends JeecgController<ConPropose, IConPropos
@RequiresPermissions("com.renkang.consultation:con_propose:exportXls") @RequiresPermissions("com.renkang.consultation:con_propose:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConPropose conPropose) { public ModelAndView exportXls(HttpServletRequest request, ConPropose conPropose) {
return super.exportXls(request, conPropose, ConPropose.class, "con_propose"); return super.exportXls(request, conPropose, ConPropose.class, "qh_con_propose");
} }
/** /**
@@ -164,7 +164,7 @@ public class ConResourceController extends JeecgController<ConResource, IConReso
@Operation(summary = "导出医院信息") @Operation(summary = "导出医院信息")
@AutoLog(value = "导出医院信息") @AutoLog(value = "导出医院信息")
public ModelAndView exportXls(HttpServletRequest request, ConResource conResource) { public ModelAndView exportXls(HttpServletRequest request, ConResource conResource) {
return super.exportXls(request, conResource, ConResource.class, "con_resource"); return super.exportXls(request, conResource, ConResource.class, "qh_con_resource");
} }
/* /*
@@ -238,7 +238,7 @@ public class ConServiceController extends JeecgController<ConService, IConServic
*/ */
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConService conService) { public ModelAndView exportXls(HttpServletRequest request, ConService conService) {
return super.exportXls(request, conService, ConService.class, "con_service"); return super.exportXls(request, conService, ConService.class, "qh_con_srvc");
} }
/** /**
@@ -143,7 +143,7 @@ public class ConSessionVideoInfoController extends JeecgController<ConSessionVid
@RequiresPermissions("com.renkang:con_session_video_info:exportXls") @RequiresPermissions("com.renkang:con_session_video_info:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ConSessionVideoInfo conSessionVideoInfo) { public ModelAndView exportXls(HttpServletRequest request, ConSessionVideoInfo conSessionVideoInfo) {
return super.exportXls(request, conSessionVideoInfo, ConSessionVideoInfo.class, "con_session_video_info"); return super.exportXls(request, conSessionVideoInfo, ConSessionVideoInfo.class, "qh_con_sess_vid");
} }
/** /**
@@ -160,7 +160,7 @@ public class ConSicksController extends JeecgController<ConSicks, IConSicksServi
@Operation(summary = "导出") @Operation(summary = "导出")
@AutoLog(value = "导出疾病信息") @AutoLog(value = "导出疾病信息")
public ModelAndView exportXls(HttpServletRequest request, ConSicks conSicks) { public ModelAndView exportXls(HttpServletRequest request, ConSicks conSicks) {
return super.exportXls(request, conSicks, ConSicks.class, "con_sicks"); return super.exportXls(request, conSicks, ConSicks.class, "qh_con_sicks");
} }
/** /**
@@ -37,7 +37,7 @@ public class ConsultationDataServiceImpl implements ConsultationDataService {
@Override @Override
public TableInfo tableStructure() { public TableInfo tableStructure() {
return new TableInfo(new TableCreateInfo(TableInfoEnum.DEFAULT), return new TableInfo(new TableCreateInfo(TableInfoEnum.DEFAULT),
analyzeTableManager.columnInfo(Arrays.asList("con_session","con_doctor"), ConsultationDataPageVO.class)); analyzeTableManager.columnInfo(Arrays.asList("qh_con_session","qh_con_doctor"), ConsultationDataPageVO.class));
} }
@Override @Override
@@ -87,7 +87,7 @@ public class SpecialistDataServiceImpl implements SpecialistDataService {
@Override @Override
public TableInfo tableStructure() { public TableInfo tableStructure() {
return new TableInfo(new TableCreateInfo(TableInfoEnum.DEFAULT), return new TableInfo(new TableCreateInfo(TableInfoEnum.DEFAULT),
analyzeTableManager.columnInfo(Collections.singletonList("con_doctor"), SpecialistDataPageVO.class)); analyzeTableManager.columnInfo(Collections.singletonList("qh_con_doctor"), SpecialistDataPageVO.class));
} }
@Override @Override
@@ -87,7 +87,7 @@ public class SpecialistHospitalServiceImpl implements SpecialistHospitalService
@Override @Override
public TableInfo tableStructure() { public TableInfo tableStructure() {
List<String> tableNames = Collections.singletonList("con_resource"); List<String> tableNames = Collections.singletonList("qh_con_resource");
Map<String, ColumnMetaData> columnInfo = analyzeTableManager.columnInfo(tableNames, HospitalData.class); Map<String, ColumnMetaData> columnInfo = analyzeTableManager.columnInfo(tableNames, HospitalData.class);
TableCreateInfo createInfo = getTableCreateInfo(); TableCreateInfo createInfo = getTableCreateInfo();
@@ -16,7 +16,7 @@ import org.jeecg.common.system.vo.SelectTreeModel;
import java.util.List; import java.util.List;
/** /**
* @Description: con_department * @Description: qh_con_dept
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-09 * @Date: 2023-05-09
* @Version: V1.0 * @Version: V1.0
@@ -24,34 +24,34 @@ import java.util.List;
@Mapper @Mapper
public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBaseMapper<ConDepartment> { public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBaseMapper<ConDepartment> {
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and id = #{departmentId} order by tf_top desc,sort") @Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and id = #{departmentId} order by tf_top desc,sort")
public ConDepartment selectDepartmentNameById(String departmentId); public ConDepartment selectDepartmentNameById(String departmentId);
@Select("SELECT GROUP_CONCAT(id) FROM con_department WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId}") @Select("SELECT LISTAGG(id, ',') WITHIN GROUP (ORDER BY id) FROM qh_con_dept WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId}")
public String selectDepartmentIdByLevelOneId(String departmentId); public String selectDepartmentIdByLevelOneId(String departmentId);
@Select("SELECT count(1) FROM con_department WHERE status = '1' and del_flag = '0' and office_level = 1") @Select("SELECT count(1) FROM qh_con_dept WHERE status = '1' and del_flag = '0' and office_level = 1")
public String selectDepartmentNum(); public String selectDepartmentNum();
public List<ConDepartmentDO> selectDepartmentNameByParentId(@Param("officeparid") String officeparid, @Param("name") String name); public List<ConDepartmentDO> selectDepartmentNameByParentId(@Param("officeparid") String officeparid, @Param("name") String name);
@Select("select * from con_department where status = 1 and del_flag = 0") @Select("select * from qh_con_dept where status = 1 and del_flag = 0")
List<ConDepartment> selectList(); List<ConDepartment> selectList();
List<ConDepartment> selectListAll(ConDepartment conDepartment); List<ConDepartment> selectListAll(ConDepartment conDepartment);
@Select("select * from con_department where status = 1 and del_flag = 0 and office_level = 1 limit 30") @Select("select * from qh_con_dept where status = 1 and del_flag = 0 and office_level = 1 limit 30")
List<ConDepartment> selectListLeval(); List<ConDepartment> selectListLeval();
@Select("select count(1) from con_department where status = 1 and del_flag = 0 and officeparid = #{id}") @Select("select count(1) from qh_con_dept where status = 1 and del_flag = 0 and officeparid = #{id}")
int selectSecondDepartMentNum(String id); int selectSecondDepartMentNum(String id);
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}") @Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}")
List<ConDepartment> selectListByName(String departmentName); List<ConDepartment> selectListByName(String departmentName);
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and office_level = 1 order by tf_top desc,sort") @Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and office_level = 1 order by tf_top desc,sort")
List<ConDepartment> selectDepartmentNameByParentIdisNull(); List<ConDepartment> selectDepartmentNameByParentIdisNull();
/** /**
@@ -79,7 +79,7 @@ public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBase
Boolean updateTop(@Param("id") String id, @Param("type") Boolean type); Boolean updateTop(@Param("id") String id, @Param("type") Boolean type);
@Select("select * from con_department where del_flag = 0 and status = 1 and office_level = 1 order by tf_top desc,sort") @Select("select * from qh_con_dept where del_flag = 0 and status = 1 and office_level = 1 order by tf_top desc,sort")
List<ConDepartmentVO> selectDepartmentListLevelOne(); List<ConDepartmentVO> selectDepartmentListLevelOne();
List<ConDoctor> getOneTwoDepartDoctorList(); List<ConDoctor> getOneTwoDepartDoctorList();
@@ -93,14 +93,14 @@ public interface ConDepartmentMapper extends BaseMapper<ConDepartment> , MPJBase
List<ConDepartmentDO> selectHospitalDepartmentId(String hospitalId); List<ConDepartmentDO> selectHospitalDepartmentId(String hospitalId);
@Select("SELECT id, department_name as departmentName FROM con_department WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId} order by tf_top desc,sort") @Select("SELECT id, department_name as departmentName FROM qh_con_dept WHERE status = '1' and del_flag = '0' and officeparid = #{departmentId} order by tf_top desc,sort")
public List<ConDepartmentDO> selectDepartmentIdByLevelOneIdList(String departmentId); public List<ConDepartmentDO> selectDepartmentIdByLevelOneIdList(String departmentId);
@Select("select * from con_department WHERE status = '1' and del_flag = '0' and office_level = 1") @Select("select * from qh_con_dept WHERE status = '1' and del_flag = '0' and office_level = 1")
List<ConDepartment> selectDepartmentListAll(); List<ConDepartment> selectDepartmentListAll();
@Select("SELECT * FROM con_department WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}") @Select("SELECT * FROM qh_con_dept WHERE status = '1' and del_flag = '0' and department_name = #{departmentName}")
public ConDepartment selectDepartmentNameByName(String departmentName); public ConDepartment selectDepartmentNameByName(String departmentName);
List<MedicalDepartmentVO> getMedicalDepartmentList(@Param("deptIds") List<String> deptIds); List<MedicalDepartmentVO> getMedicalDepartmentList(@Param("deptIds") List<String> deptIds);
@@ -17,11 +17,11 @@ import java.util.List;
public interface ConDoctorFollowMapper extends BaseMapper<ConDoctorFollow> { public interface ConDoctorFollowMapper extends BaseMapper<ConDoctorFollow> {
@Select("SELECT count(1) FROM con_doctor_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and doctor_id = #{doctorId}") @Select("SELECT count(1) FROM qh_con_doc_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and doctor_id = #{doctorId}")
public int selectFollowDoctorExist(String userId, String doctorId); public int selectFollowDoctorExist(String userId, String doctorId);
@Update("update con_doctor_follow set del_flag = '1' where user_id = #{userId} and doctor_id = #{doctorId}") @Update("update qh_con_doc_follow set del_flag = '1' where user_id = #{userId} and doctor_id = #{doctorId}")
public int cancelDoctorFollow(String userId, String doctorId); public int cancelDoctorFollow(String userId, String doctorId);
@@ -15,7 +15,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
* @Description: con_doctor * @Description: qh_con_doctor
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-09 * @Date: 2023-05-09
* @Version: V1.0 * @Version: V1.0
@@ -69,24 +69,24 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
*/ */
IPage<ConDoctor> queryPageList(IPage<ConDoctor> page, ConDoctor conDoctor); IPage<ConDoctor> queryPageList(IPage<ConDoctor> page, ConDoctor conDoctor);
@Select("SELECT * FROM con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}") @Select("SELECT * FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public ConDoctorDO selectDoctorInfoById(String doctorId); public ConDoctorDO selectDoctorInfoById(String doctorId);
public List<ConDoctorDO> selectDoctorInfoByIds(@Param("doctorIds") Set<String> doctorIds); public List<ConDoctorDO> selectDoctorInfoByIds(@Param("doctorIds") Set<String> doctorIds);
@Select("SELECT * FROM con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId} and is_accept = '1'") @Select("SELECT * FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId} and is_accept = '1'")
public ConDoctorDO selectDoctorInfoByIdNew(String doctorId); public ConDoctorDO selectDoctorInfoByIdNew(String doctorId);
@Select("SELECT * FROM con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}") @Select("SELECT * FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public ConDoctor selectDoctorDetailById(String doctorId); public ConDoctor selectDoctorDetailById(String doctorId);
@Update("update con_doctor set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}") @Update("update qh_con_doctor set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public int updateDoctorScoreAnfNum(String userScore, String doctorId); public int updateDoctorScoreAnfNum(String userScore, String doctorId);
@Update("update con_doctor set show_score = show_score + #{showScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}") @Update("update qh_con_doctor set show_score = show_score + #{showScore} WHERE status = '1' and del_flag = '0' and id = #{doctorId}")
public int updateDoctorShowScoreAnfNum(String showScore, String doctorId); public int updateDoctorShowScoreAnfNum(String showScore, String doctorId);
public List<ConDoctor> selectDoctorListByHospitalId(IPage<ConDoctor> page, @Param("hospitalId") String hospitalId); public List<ConDoctor> selectDoctorListByHospitalId(IPage<ConDoctor> page, @Param("hospitalId") String hospitalId);
@@ -94,7 +94,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
public List<String> selectRecommendDoctor(@Param("limit") int limit); public List<String> selectRecommendDoctor(@Param("limit") int limit);
@Select("select count(1) from con_doctor where status = 1 and del_flag = 0 and doctor_status != 3 and department_id = #{departmentId}") @Select("select count(1) from qh_con_doctor where status = 1 and del_flag = 0 and doctor_status != 3 and department_id = #{departmentId}")
public int selectDoctorByDepartmentId(String departmentId); public int selectDoctorByDepartmentId(String departmentId);
@@ -106,7 +106,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
String selectDictNuMBySickIds(@Param("goodAtSickness") List<String> goodAtSickness); String selectDictNuMBySickIds(@Param("goodAtSickness") List<String> goodAtSickness);
@Select("SELECT count(1) FROM con_doctor WHERE status = '1' and del_flag = '0' and resource_id = #{resourceId}") @Select("SELECT count(1) FROM qh_con_doctor WHERE status = '1' and del_flag = '0' and resource_id = #{resourceId}")
public int selectDoctorNum(String resourceId); public int selectDoctorNum(String resourceId);
/** /**
@@ -117,46 +117,46 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
*/ */
List<ConDoctor> getFreeDoctor(CondepartmentId departmentId); List<ConDoctor> getFreeDoctor(CondepartmentId departmentId);
@Select("select id,sicks_name as sicksName from con_sicks where status = 1 and del_flag = 0 and FIND_IN_SET(id,#{sickIds})") @Select("select id,sicks_name as sicksName from qh_con_sicks where status = 1 and del_flag = 0 and INSTR(',' || #{sickIds} || ',', ',' || id || ',') > 0")
List<Map<String, String>> selectSickName(String sickIds); List<Map<String, String>> selectSickName(String sickIds);
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0'") @Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0'")
List<ConDoctor> selectListAll(); List<ConDoctor> selectListAll();
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0' and doctor_status != 3") @Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' and doctor_status != 3")
List<ConDoctor> selectListNew(); List<ConDoctor> selectListNew();
@Update("update con_doctor set message_num = message_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}") @Update("update qh_con_doctor set message_num = message_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}")
int addDoctorMessageNum(String id); int addDoctorMessageNum(String id);
@Update("update con_doctor set reply_num = reply_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}") @Update("update qh_con_doctor set reply_num = reply_num + 1 WHERE status = '1' and del_flag = '0' and id = #{id}")
int addDoctorReplyNum(String id); int addDoctorReplyNum(String id);
@Update("update con_doctor set audio_status = #{audioStatus},tf_jump_holiday= #{tfJumpHoliday} WHERE status = '1' and del_flag = '0' and id = #{id}") @Update("update qh_con_doctor set audio_status = #{audioStatus},tf_jump_holiday= #{tfJumpHoliday} WHERE status = '1' and del_flag = '0' and id = #{id}")
int updateAudioStatus(String id, String audioStatus, String tfJumpHoliday); int updateAudioStatus(String id, String audioStatus, String tfJumpHoliday);
@Select("select count(1) from con_doctor where del_flag = '0' AND status = 1 and doctor_status != 3 AND FIND_IN_SET(#{sickId},good_at_sickness)") @Select("select count(1) from qh_con_doctor where del_flag = '0' AND status = 1 and doctor_status != 3 AND INSTR(',' || #{sickId} || ',', ',' || good_at_sickness || ',') > 0")
int selectDoctorNumBySickId(String sickId); int selectDoctorNumBySickId(String sickId);
@Select("select count(1) from con_doctor where del_flag = '0' AND status = 1 AND doctor_status != 3 AND FIND_IN_SET(department_id,#{departmentId})") @Select("select count(1) from qh_con_doctor where del_flag = '0' AND status = 1 AND doctor_status != 3 AND INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
int selectDoctorNumByDepartmentId(String departmentId); int selectDoctorNumByDepartmentId(String departmentId);
List<ConDoctor> selectListByQuery(@Param("conDoctor") ConDoctor conDoctor); List<ConDoctor> selectListByQuery(@Param("conDoctor") ConDoctor conDoctor);
@Select("SELECT id FROM con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{hospitalName}, '%')") @Select("SELECT id FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{hospitalName}, '%')")
List<ConDoctor> selectDoctorInfoByHospitalName(String hospitalName); List<ConDoctor> selectDoctorInfoByHospitalName(String hospitalName);
@Update("update con_doctor set doctor_status = 3 where id = #{id}") @Update("update qh_con_doctor set doctor_status = 3 where id = #{id}")
int changeDoctorStatus(String id); int changeDoctorStatus(String id);
List<ConDoctor> selectByHospitalIds(@Param("hospitalIds") List<String> hospitalIds); List<ConDoctor> selectByHospitalIds(@Param("hospitalIds") List<String> hospitalIds);
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{resourceName}, '%')") @Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{resourceName}, '%')")
List<ConDoctor> selectByResourceName(@Param("resourceName") String resourceName); List<ConDoctor> selectByResourceName(@Param("resourceName") String resourceName);
@Select("SELECT * FROM con_doctor WHERE status = '1' AND del_flag = '0' AND doctor_name LIKE CONCAT('%', #{doctorName}, '%')") @Select("SELECT * FROM qh_con_doctor WHERE status = '1' AND del_flag = '0' AND doctor_name LIKE CONCAT('%', #{doctorName}, '%')")
List<ConDoctor> selectByDoctorName(@Param("doctorName") String doctorName); List<ConDoctor> selectByDoctorName(@Param("doctorName") String doctorName);
List<ConDoctor> selectDoctorByIds(@Param("doctorIds") List<String> doctorIds); List<ConDoctor> selectDoctorByIds(@Param("doctorIds") List<String> doctorIds);
@@ -165,20 +165,20 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
List<ConDoctor> selectDoctorByResourceId(@Param("resourceId") String resourceId); List<ConDoctor> selectDoctorByResourceId(@Param("resourceId") String resourceId);
@Update("update con_doctor set is_accept = '1',doctor_status = '1',audio_status = 1,tf_jump_holiday = 0 where id = #{id}") @Update("update qh_con_doctor set is_accept = '1',doctor_status = '1',audio_status = 1,tf_jump_holiday = 0 where id = #{id}")
int updateDoctorStatusDouble(String id); int updateDoctorStatusDouble(String id);
@Select("select count(1) from con_doctor where del_flag = '0' AND status = 1 AND FIND_IN_SET(department_id,#{departmentId}) and resource_id = #{resourceId} and doctor_status != 3") @Select("select count(1) from qh_con_doctor where del_flag = '0' AND status = 1 AND INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0 and resource_id = #{resourceId} and doctor_status != 3")
int selectDoctorNumByDepartmentIdAndResourceId(String departmentId,String resourceId); int selectDoctorNumByDepartmentIdAndResourceId(String departmentId,String resourceId);
@Select("select count(1) from con_doctor where status = 1 and del_flag = 0 and department_id = #{departmentId} and resource_id = #{resourceId} and doctor_status != 3") @Select("select count(1) from qh_con_doctor where status = 1 and del_flag = 0 and department_id = #{departmentId} and resource_id = #{resourceId} and doctor_status != 3")
public int selectDoctorByDepartmentIdAndResourceId(String departmentId,String resourceId); public int selectDoctorByDepartmentIdAndResourceId(String departmentId,String resourceId);
@Select("select a.* from con_doctor a left join con_department b on a.department_id = b.id where b.office_level = 1") @Select("select a.* from qh_con_doctor a left join qh_con_dept b on a.department_id = b.id where b.office_level = 1")
List<ConDoctor> selectDoctorByResourceIdAll(); List<ConDoctor> selectDoctorByResourceIdAll();
@@ -195,21 +195,21 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
Boolean insertConDoctorSatisfyQhByDoctorNew(ConDoctorSatisfy conDoctorSatisfy); Boolean insertConDoctorSatisfyQhByDoctorNew(ConDoctorSatisfy conDoctorSatisfy);
@Update("update con_doctor_satisfy set reply_num = reply_num + 1 WHERE id = #{id}") @Update("update qh_con_doctor_satisfy set reply_num = reply_num + 1 WHERE id = #{id}")
int addDoctorReplyNumBackUp(String id); int addDoctorReplyNumBackUp(String id);
@Update("update ${tableName} set reply_num = reply_num + 1 WHERE id = #{id}") @Update("update ${tableName} set reply_num = reply_num + 1 WHERE id = #{id}")
int addDoctorReplyNumNotQh(String id,String tableName); int addDoctorReplyNumNotQh(String id,String tableName);
@Update("update con_doctor_satisfy set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE id = #{doctorId}") @Update("update qh_con_doctor_satisfy set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE id = #{doctorId}")
public int updateDoctorScoreAnfNumQh(String userScore, String doctorId); public int updateDoctorScoreAnfNumQh(String userScore, String doctorId);
@Update("update con_doctor_satisfy set show_score = show_score + #{showScore} WHERE id = #{doctorId}") @Update("update qh_con_doctor_satisfy set show_score = show_score + #{showScore} WHERE id = #{doctorId}")
public int updateDoctorShowScoreAnfNumQh(String showScore, String doctorId); public int updateDoctorShowScoreAnfNumQh(String showScore, String doctorId);
@Update("update con_doctor_satisfy set message_num = message_num + 1 WHERE id = #{id}") @Update("update qh_con_doctor_satisfy set message_num = message_num + 1 WHERE id = #{id}")
int addDoctorMessageNumQh(String id); int addDoctorMessageNumQh(String id);
List<ConDoctor> selectRecommendDoctorNewAnother(IPage<ConDoctor> page); List<ConDoctor> selectRecommendDoctorNewAnother(IPage<ConDoctor> page);
@@ -222,15 +222,15 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" conr.resource_name hospitalName,\n" + " conr.resource_name \"hospitalName\",\n" +
" count(doct.resource_id) docCount \n" + " count(doct.resource_id) \"docCount\" \n" +
" FROM\n" + " FROM\n" +
" con_resource conr\n" + " qh_con_resource conr\n" +
" LEFT JOIN con_doctor doct ON conr.id = doct.resource_id \n" + " LEFT JOIN qh_con_doctor doct ON conr.id = doct.resource_id \n" +
" WHERE conr.del_flag = 0 and doct.del_flag = 0 and doct.doctor_status = '1' \n" + " WHERE conr.del_flag = 0 and doct.del_flag = 0 and doct.doctor_status = '1' \n" +
" GROUP BY conr.id) a\n" + " GROUP BY conr.resource_name) a\n" +
"ORDER BY\n" + "ORDER BY\n" +
" docCount DESC") " \"docCount\" DESC")
List<Map<String, Object>> getDocCountStatList(); List<Map<String, Object>> getDocCountStatList();
@Select("SELECT\n" + @Select("SELECT\n" +
@@ -238,11 +238,11 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" LEFT(org_code, 6) orgCode,\n" + " LEFT(org_code, 6) \"orgCode\",\n" +
" SUM(CASE WHEN c.session_type = '2' THEN 1 ELSE 0 END) AS consultHelperCount,\n" + " SUM(CASE WHEN c.session_type = '2' THEN 1 ELSE 0 END) AS \"consultHelperCount\",\n" +
" SUM(CASE WHEN c.session_type = '1' THEN 1 ELSE 0 END) AS consultDocCount\n" + " SUM(CASE WHEN c.session_type = '1' THEN 1 ELSE 0 END) AS \"consultDocCount\"\n" +
" FROM\n" + " FROM\n" +
" con_session c \n" + " qh_con_session c \n" +
" WHERE\n" + " WHERE\n" +
" c.del_flag = 0 \n" + " c.del_flag = 0 \n" +
" AND c.STATUS = '1' \n" + " AND c.STATUS = '1' \n" +
@@ -252,7 +252,7 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
" GROUP BY\n" + " GROUP BY\n" +
" LEFT(org_code, 6)) a \n" + " LEFT(org_code, 6)) a \n" +
"ORDER BY\n" + "ORDER BY\n" +
" consultHelperCount DESC") " \"consultHelperCount\" DESC")
List<Map<String, Object>> getDeptCountStatList(); List<Map<String, Object>> getDeptCountStatList();
@Select("SELECT\n" + @Select("SELECT\n" +
@@ -260,13 +260,13 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" cre.department_name departmentName,\n" + " cre.department_name \"departmentName\",\n" +
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS consultImCount,\n" + " SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS \"consultImCount\",\n" +
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS consultVedioCount\n" + " SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS \"consultVedioCount\"\n" +
" FROM\n" + " FROM\n" +
" con_session c\n" + " qh_con_session c\n" +
" LEFT JOIN con_doctor d ON c.to_account = d.id\n" + " LEFT JOIN qh_con_doctor d ON c.to_account = d.id\n" +
" LEFT JOIN con_department cre ON d.department_id = cre.id \n" + " LEFT JOIN qh_con_dept cre ON d.department_id = cre.id \n" +
" WHERE\n" + " WHERE\n" +
" c.del_flag = 0 \n" + " c.del_flag = 0 \n" +
" AND c.STATUS = '1' \n" + " AND c.STATUS = '1' \n" +
@@ -274,9 +274,9 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
" AND c.session_type = '1' \n" + " AND c.session_type = '1' \n" +
" AND cre.id IS NOT NULL \n" + " AND cre.id IS NOT NULL \n" +
" GROUP BY\n" + " GROUP BY\n" +
" cre.id) a \n" + " cre.department_name) a \n" +
"ORDER BY\n" + "ORDER BY\n" +
" consultImCount DESC") " \"consultImCount\" DESC")
List<Map<String, Object>> getDepartmentCountStatList(); List<Map<String, Object>> getDepartmentCountStatList();
@Select("SELECT\n" + @Select("SELECT\n" +
@@ -284,13 +284,13 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" cre.resource_name hospitalName,\n" + " cre.resource_name \"hospitalName\",\n" +
" SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS consultImCount,\n" + " SUM(CASE WHEN c.content_type = '1' THEN 1 ELSE 0 END) AS \"consultImCount\",\n" +
" SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS consultVedioCount\n" + " SUM(CASE WHEN c.content_type = '2' THEN 1 ELSE 0 END) AS \"consultVedioCount\"\n" +
" FROM\n" + " FROM\n" +
" con_session c\n" + " qh_con_session c\n" +
" LEFT JOIN con_doctor d ON c.to_account = d.id\n" + " LEFT JOIN qh_con_doctor d ON c.to_account = d.id\n" +
" LEFT JOIN con_resource cre ON d.resource_id = cre.id \n" + " LEFT JOIN qh_con_resource cre ON d.resource_id = cre.id \n" +
" WHERE\n" + " WHERE\n" +
" c.del_flag = 0 \n" + " c.del_flag = 0 \n" +
" AND c.STATUS = '1' \n" + " AND c.STATUS = '1' \n" +
@@ -298,8 +298,8 @@ public interface ConDoctorMapper extends BaseMapper<ConDoctor> , MPJBaseMapper<C
" AND c.session_type = '1' \n" + " AND c.session_type = '1' \n" +
" AND cre.id IS NOT NULL \n" + " AND cre.id IS NOT NULL \n" +
" GROUP BY\n" + " GROUP BY\n" +
" cre.id) a \n" + " cre.resource_name) a \n" +
"ORDER BY\n" + "ORDER BY\n" +
" consultImCount DESC") " \"consultImCount\" DESC")
List<Map<String, Object>> getHospitalCountStatList(); List<Map<String, Object>> getHospitalCountStatList();
} }
@@ -20,42 +20,42 @@ public interface ConDoctorSchedulingDateMapper extends BaseMapper<ConDoctorSched
IPage<ConDoctorSchedulingDate> queryPageList(IPage<ConDoctorSchedulingDate> page, @Param("conDoctorSchedulingDate") ConDoctorSchedulingDate conDoctorSchedulingDate); IPage<ConDoctorSchedulingDate> queryPageList(IPage<ConDoctorSchedulingDate> page, @Param("conDoctorSchedulingDate") ConDoctorSchedulingDate conDoctorSchedulingDate);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= DATE_FORMAT(SYSDATE(),'%Y-%m-%d') order by scheduling_date") @Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= TO_CHAR(SYSDATE,'YYYY-MM-DD') order by scheduling_date")
public List<ConDoctorSchedulingDateListDO> selectDoctorById(String doctorId); public List<ConDoctorSchedulingDateListDO> selectDoctorById(String doctorId);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and id = #{id}") @Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and id = #{id}")
ConDoctorSchedulingDate selectDoctorScheduleById(String id); ConDoctorSchedulingDate selectDoctorScheduleById(String id);
@Update("update con_doctor_scheduling_date set ready_scheduling_num = ready_scheduling_num - 1 WHERE id = #{id}") @Update("update qh_con_doc_schd_dt set ready_scheduling_num = ready_scheduling_num - 1 WHERE id = #{id}")
public int updateScheduleAddNum(String id); public int updateScheduleAddNum(String id);
@Update("update con_doctor_scheduling_date set ready_scheduling_num = ready_scheduling_num + 1 WHERE id = #{id}") @Update("update qh_con_doc_schd_dt set ready_scheduling_num = ready_scheduling_num + 1 WHERE id = #{id}")
public int updateScheduleAddMinus(String id); public int updateScheduleAddMinus(String id);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= DATE_FORMAT(#{schedulingDate},'%Y-%m-%d')") @Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date >= TO_CHAR(#{schedulingDate},'YYYY-MM-DD')")
public List<ConDoctorSchedulingDateListDO> selectDoctorScheduleDateById(String doctorId, Date schedulingDate); public List<ConDoctorSchedulingDateListDO> selectDoctorScheduleDateById(String doctorId, Date schedulingDate);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= DATE(NOW()) and week = #{week}") @Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= TRUNC(SYSDATE) and week = #{week}")
public List<ConDoctorSchedulingDateListDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week); public List<ConDoctorSchedulingDateListDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week);
@Update("update con_doctor_scheduling_date set scheduling_num = #{schedulingNum} WHERE id = #{id}") @Update("update qh_con_doc_schd_dt set scheduling_num = #{schedulingNum} WHERE id = #{id}")
public int updateScheduleNum(String schedulingNum, String id); public int updateScheduleNum(String schedulingNum, String id);
@Select("SELECT * FROM con_doctor_scheduling_date WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date = DATE_FORMAT(#{schedulingDate},'%Y-%m-%d') and type = #{type}") @Select("SELECT * FROM qh_con_doc_schd_dt WHERE status = '1' and del_flag = '0' and user_id = #{doctorId} and scheduling_date = TO_CHAR(#{schedulingDate},'YYYY-MM-DD') and type = #{type}")
public List<ConDoctorSchedulingDateListDO> selectDoctorScheduleDate(String doctorId, Date schedulingDate, String type); public List<ConDoctorSchedulingDateListDO> selectDoctorScheduleDate(String doctorId, Date schedulingDate, String type);
Boolean insertBatchSomeColumn(@Param("list") List<ConDoctorSchedulingDate> list); Boolean insertBatchSomeColumn(@Param("list") List<ConDoctorSchedulingDate> list);
@Delete("delete from con_doctor_scheduling_date where user_id = #{userId} and scheduling_date > #{date}") @Delete("delete from qh_con_doc_schd_dt where user_id = #{userId} and scheduling_date > #{date}")
Boolean deleteDoctorSchedulingDateByUserId(String userId,String date); Boolean deleteDoctorSchedulingDateByUserId(String userId,String date);
@Delete("delete from con_doctor_scheduling_date") @Delete("delete from qh_con_doc_schd_dt")
Boolean deleteDoctorSchedulingDateAll(); Boolean deleteDoctorSchedulingDateAll();
Boolean batchInsert(@Param("list") List<ConDoctorSchedulingDate> list); Boolean batchInsert(@Param("list") List<ConDoctorSchedulingDate> list);
@@ -20,32 +20,32 @@ import java.util.List;
public interface ConDoctorSchedulingMapper extends BaseMapper<ConDoctorScheduling> { public interface ConDoctorSchedulingMapper extends BaseMapper<ConDoctorScheduling> {
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} order by week") @Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and user_id = #{userId} order by week")
public List<ConDoctorSchedulingDO> selectDoctorScheduling(String userId); public List<ConDoctorSchedulingDO> selectDoctorScheduling(String userId);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} and week = #{week}") @Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and user_id = #{userId} and week = #{week}")
public ConDoctorSchedulingDO selectDoctorSchedulingByWeek(String userId, String week); public ConDoctorSchedulingDO selectDoctorSchedulingByWeek(String userId, String week);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and week = #{week}") @Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and week = #{week}")
public List<ConDoctorScheduling> selectDoctorSchedulingByWeekList(int week); public List<ConDoctorScheduling> selectDoctorSchedulingByWeekList(int week);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and week = #{week} and user_id = #{userId}") @Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and week = #{week} and user_id = #{userId}")
public ConDoctorScheduling selectDoctorSchedulingByWeekListByDoctorId(int week, String userId); public ConDoctorScheduling selectDoctorSchedulingByWeekListByDoctorId(int week, String userId);
@Update("update con_doctor_scheduling set del_flag = 1 WHERE status = '1' and del_flag = '0' and user_id = #{userId}") @Update("update qh_con_doc_schd set del_flag = 1 WHERE status = '1' and del_flag = '0' and user_id = #{userId}")
public int deleteDoctorSchedule(String userId); public int deleteDoctorSchedule(String userId);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= DATE(NOW()) and week = #{week}") @Select("SELECT * FROM qh_con_doc_schd WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= TRUNC(SYSDATE) and week = #{week}")
public List<ConDoctorSchedulingDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week); public List<ConDoctorSchedulingDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week);
Boolean updateBatchById(@Param("list") List<ConDoctorScheduling> schedulingList); Boolean updateBatchById(@Param("list") List<ConDoctorScheduling> schedulingList);
@Select("select count(1) from con_doctor_scheduling where status = '1' and del_flag = '0' and user_id = #{userId}") @Select("select count(1) from qh_con_doc_schd where status = '1' and del_flag = '0' and user_id = #{userId}")
int selectExistSchedule(String userId); int selectExistSchedule(String userId);
@Select("delete from con_doctor_scheduling ") @Select("delete from qh_con_doc_schd ")
int deleteDoctorScheduleAll(); int deleteDoctorScheduleAll();
} }
@@ -23,26 +23,26 @@ public interface ConEvaluateMapper extends BaseMapper<ConEvaluate> {
IPage<ConEvaluate> queryPageList(Page<ConEvaluate> page, @Param("conEvaluate") ConEvaluate conEvaluate); IPage<ConEvaluate> queryPageList(Page<ConEvaluate> page, @Param("conEvaluate") ConEvaluate conEvaluate);
@Select("SELECT * FROM con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} order by create_time desc limit 5") @Select("SELECT * FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} order by create_time desc limit 5")
public List<ConEvaluateDO> selectDoctorJudgmentById(String expert); public List<ConEvaluateDO> selectDoctorJudgmentById(String expert);
public List<ConEvaluateDO> selectDoctorJudgmentList(IPage<ConEvaluateDO> page, @Param("expert") String expert, @Param("hospitalId") String hospitalId); public List<ConEvaluateDO> selectDoctorJudgmentList(IPage<ConEvaluateDO> page, @Param("expert") String expert, @Param("hospitalId") String hospitalId);
@Select("SELECT * FROM con_evaluate WHERE status = '1' and del_flag = '0' and session_id = #{sessionId}") @Select("SELECT * FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and session_id = #{sessionId}")
public ConEvaluateDO selectDoctorJudgmentBySessionId(String sessionId); public ConEvaluateDO selectDoctorJudgmentBySessionId(String sessionId);
@Select("SELECT COUNT(1) FROM con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} and score >= 3") @Select("SELECT COUNT(1) FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert} and score >= 3")
public String selectDoctorSumScore(String expert); public String selectDoctorSumScore(String expert);
@Select("SELECT COUNT(1) FROM con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert}") @Select("SELECT COUNT(1) FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and expert = #{expert}")
public String selectDoctorEvNum(String expert); public String selectDoctorEvNum(String expert);
@Select("SELECT COUNT(1) FROM con_evaluate WHERE status = '1' and del_flag = '0' and hospital_id = #{hospitalId}") @Select("SELECT COUNT(1) FROM qh_con_evaluate WHERE status = '1' and del_flag = '0' and hospital_id = #{hospitalId}")
public String selectHospitalEvNum(String hospitalId); public String selectHospitalEvNum(String hospitalId);
List<ConEvaluate> selectListByDoctorIds(@Param("doctorIds") List<String> doctorIds); List<ConEvaluate> selectListByDoctorIds(@Param("doctorIds") List<String> doctorIds);
@@ -25,14 +25,14 @@ public interface ConFamilyMembersMapper extends BaseMapper<ConFamilyMembers> {
public List<ConFamilyMembersAndMedicalRecordsDO> selectMenberList(IPage<ConFamilyMembersAndMedicalRecordsDO> page, @Param("userId") String userId); public List<ConFamilyMembersAndMedicalRecordsDO> selectMenberList(IPage<ConFamilyMembersAndMedicalRecordsDO> page, @Param("userId") String userId);
@Select("SELECT * FROM con_family_members WHERE status = '1' and del_flag = '0' and id = #{memberId}") @Select("SELECT * FROM qh_con_fammem WHERE status = '1' and del_flag = '0' and id = #{memberId}")
ConFamilyMembersDO selectConFamilyMembersDOById(String memberId); ConFamilyMembersDO selectConFamilyMembersDOById(String memberId);
@Select("SELECT * FROM con_family_members WHERE status = '1' and del_flag = '0' and id = #{memberId}") @Select("SELECT * FROM qh_con_fammem WHERE status = '1' and del_flag = '0' and id = #{memberId}")
ConFamilyMembers selectConFamilyMembersById(String memberId); ConFamilyMembers selectConFamilyMembersById(String memberId);
@Update("update con_family_members set del_flag = '1' where id = #{memberId}") @Update("update qh_con_fammem set del_flag = '1' where id = #{memberId}")
int removeMenberById(String memberId); int removeMenberById(String memberId);
List<ConFamilyNumVO> selectFamilyNum(@Param("familyIds") List<String> familyIds); List<ConFamilyNumVO> selectFamilyNum(@Param("familyIds") List<String> familyIds);
@@ -42,11 +42,11 @@ public interface ConFamilyMembersMapper extends BaseMapper<ConFamilyMembers> {
ConFamilyNumVO selectFamilyUserId(@Param("userId") String userId); ConFamilyNumVO selectFamilyUserId(@Param("userId") String userId);
@Select("SELECT * FROM con_family_members WHERE status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1 order by create_time desc limit 1") @Select("SELECT * FROM qh_con_fammem WHERE status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1 order by create_time desc limit 1")
ConFamilyMembers selectConFamilyMembersByUserId(String userId); ConFamilyMembers selectConFamilyMembersByUserId(String userId);
List<ConFamilyMembers> selectConFamilyMembersByUserIds(@Param("userIds") List<String> userIds); List<ConFamilyMembers> selectConFamilyMembersByUserIds(@Param("userIds") List<String> userIds);
@Select("select count(1) from con_family_members where status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1") @Select("select count(1) from qh_con_fammem where status = '1' and del_flag = '0' and group_id = #{userId} and family_relation = 1")
int selectOwnFanilyExist(String userId); int selectOwnFanilyExist(String userId);
} }
@@ -18,19 +18,19 @@ import java.util.List;
@Mapper @Mapper
public interface ConHealthInfoAnswerMapper extends BaseMapper<ConHealthInfoAnswer> { public interface ConHealthInfoAnswerMapper extends BaseMapper<ConHealthInfoAnswer> {
@Select("SELECT * FROM con_health_info_answer WHERE status = '1' and del_flag = '0' and base_health_id = #{baseHealthId} and member_id = #{memberId}") @Select("SELECT * FROM qh_con_health_ans WHERE status = '1' and del_flag = '0' and base_health_id = #{baseHealthId} and member_id = #{memberId}")
public ConHealthInfoAnswer selectHealthAnswerByUserIdAndQuestionId(@Param("baseHealthId") String baseHealthId, @Param("memberId") String memberId); public ConHealthInfoAnswer selectHealthAnswerByUserIdAndQuestionId(@Param("baseHealthId") String baseHealthId, @Param("memberId") String memberId);
@Update("update con_health_info_answer set del_flag = '1' where user_id = #{userId} and member_id = #{memberId}") @Update("update qh_con_health_ans set del_flag = '1' where user_id = #{userId} and member_id = #{memberId}")
public int deleteHealthAnswerByUserId(@Param("userId") String userId, @Param("memberId") String memberId); public int deleteHealthAnswerByUserId(@Param("userId") String userId, @Param("memberId") String memberId);
@Select("SELECT * FROM con_health_info_answer WHERE status = '1' and del_flag = '0' and user_id = #{userId} and member_id = #{memberId} order by create_time") @Select("SELECT * FROM qh_con_health_ans WHERE status = '1' and del_flag = '0' and user_id = #{userId} and member_id = #{memberId} order by create_time")
public List<ConHealthInfoAnswer> selectHealthAnswerByUserId(@Param("userId") String userId, @Param("memberId") String memberId); public List<ConHealthInfoAnswer> selectHealthAnswerByUserId(@Param("userId") String userId, @Param("memberId") String memberId);
@Select("SELECT * FROM con_health_info_answer WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time") @Select("SELECT * FROM qh_con_health_ans WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time")
public List<ConHealthInfoAnswer> selectHealthAnswerByMemberId(@Param("memberId") String memberId); public List<ConHealthInfoAnswer> selectHealthAnswerByMemberId(@Param("memberId") String memberId);
@@ -18,6 +18,6 @@ public interface ConHealthInfoMapper extends BaseMapper<ConHealthInfo> {
List<ConHealthInfo> getAllHealthInfo(); List<ConHealthInfo> getAllHealthInfo();
@Select("SELECT * FROM con_health_info WHERE status = '1' and del_flag = '0' and item_area = #{itemArea} order by sort asc") @Select("SELECT * FROM qh_con_health WHERE status = '1' and del_flag = '0' and item_area = #{itemArea} order by sort asc")
public List<ConHealthInfo> selectHealthInfoListByItemArea(String itemArea); public List<ConHealthInfo> selectHealthInfoListByItemArea(String itemArea);
} }
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
/** /**
* @Description: con_helper * @Description: qh_con_helper
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-24 * @Date: 2023-05-24
* @Version: V1.0 * @Version: V1.0
@@ -30,6 +30,6 @@ public interface ConHelperMapper extends BaseMapper<ConHelper> {
int updateHelperOrgCode(@Param("tableName")String tableName,@Param("orgCode")String orgCode, int updateHelperOrgCode(@Param("tableName")String tableName,@Param("orgCode")String orgCode,
@Param("userId")String userId); @Param("userId")String userId);
@Select("select * from con_helper where del_flag = 0 and id = #{id}") @Select("select * from qh_con_helper where del_flag = 0 and id = #{id}")
ConHelper selectConHelperbyId(String id); ConHelper selectConHelperbyId(String id);
} }
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.*;
import java.util.List; import java.util.List;
/** /**
* @Description: con_helper_scheduling * @Description: qh_con_helper_schd
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-23 * @Date: 2023-05-23
* @Version: V1.0 * @Version: V1.0
@@ -16,20 +16,18 @@ import java.util.List;
public interface ConHelperSchedulingMapper extends BaseMapper<ConHelperScheduling> { public interface ConHelperSchedulingMapper extends BaseMapper<ConHelperScheduling> {
@Select("SELECT user_id FROM con_helper_scheduling WHERE status = '1' and del_flag = '0' and week = #{week} and type = #{type}") @Select("SELECT user_id FROM qh_con_helper_schd WHERE status = '1' and del_flag = '0' and week = #{week} and type = #{type}")
public List<String> selectHelperInfo(int week, int type); public List<String> selectHelperInfo(int week, int type);
@Update("UPDATE con_helper_scheduling SET del_flag = '1' WHERE user_id = #{userId}") @Update("UPDATE qh_con_helper_schd SET del_flag = '1' WHERE user_id = #{userId}")
public Boolean deleteByUserId(String userId); public Boolean deleteByUserId(String userId);
@Delete("DELETE FROM con_helper_scheduling WHERE week = #{week} and type = #{type}") @Delete("DELETE FROM qh_con_helper_schd WHERE week = #{week} and type = #{type}")
public Boolean deleteByWeekAndType(String week, String type); public Boolean deleteByWeekAndType(String week, String type);
public Integer insertBatch(@Param("list") List<ConHelperScheduling> list); public Integer insertBatch(@Param("list") List<ConHelperScheduling> list);
@Select("SELECT * FROM con_helper_scheduling WHERE week = #{week} and del_flag = '0' and status = '1'") @Select("SELECT * FROM qh_con_helper_schd WHERE week = #{week} and del_flag = '0' and status = '1'")
public List<ConHelperScheduling> getYesterDayScheduling(Integer week); public List<ConHelperScheduling> getYesterDayScheduling(Integer week);
@Select("SELECT * FROM con_helper_scheduling_qh WHERE week = #{week} and del_flag = '0' and status = '1'")
public List<ConHelperScheduling> getYesterDaySchedulingQh(Integer week);
} }
@@ -14,11 +14,11 @@ import org.apache.ibatis.annotations.Update;
public interface ConHospitalFollowMapper extends BaseMapper<ConHospitalFollow> { public interface ConHospitalFollowMapper extends BaseMapper<ConHospitalFollow> {
@Select("SELECT count(1) FROM con_hospital_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and hospital_id = #{hospitalId}") @Select("SELECT count(1) FROM qh_con_hosp_follow WHERE status = '1' and del_flag = '0' and user_id = #{userId} and hospital_id = #{hospitalId}")
public int selectFollowHospitalExist(String userId, String hospitalId); public int selectFollowHospitalExist(String userId, String hospitalId);
@Update("update con_hospital_follow set del_flag = '1' where user_id = #{userId} and hospital_id = #{hospitalId}") @Update("update qh_con_hosp_follow set del_flag = '1' where user_id = #{userId} and hospital_id = #{hospitalId}")
public int cancelHospitalFollow(String userId, String hospitalId); public int cancelHospitalFollow(String userId, String hospitalId);
} }
@@ -25,6 +25,6 @@ public interface ConKnowledgeMapper extends BaseMapper<ConKnowledge> {
IPage<String> selectKnowledgeList(IPage<ConKnowledge> page, @Param("classId") String classId, @Param("tfRecommend") String tfRecommend, @Param("knowTitle") String knowTitle); IPage<String> selectKnowledgeList(IPage<ConKnowledge> page, @Param("classId") String classId, @Param("tfRecommend") String tfRecommend, @Param("knowTitle") String knowTitle);
@Select("select * from con_knowledge where status = 1 and del_flag = 0 and id = #{id}") @Select("select * from qh_con_know where status = 1 and del_flag = 0 and id = #{id}")
ConKnowledge selectConKnowledgeById(String id); ConKnowledge selectConKnowledgeById(String id);
} }
@@ -18,24 +18,24 @@ import java.util.List;
@Mapper @Mapper
public interface ConMedicalRecordsMapper extends BaseMapper<ConMedicalRecords> { public interface ConMedicalRecordsMapper extends BaseMapper<ConMedicalRecords> {
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc") @Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc")
public List<ConMedicalRecordsListDO> selectConMedicalRecordsListByMemberId(String memberId); public List<ConMedicalRecordsListDO> selectConMedicalRecordsListByMemberId(String memberId);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and id = #{id}") @Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and id = #{id}")
public ConMedicalRecordsListDO selectConMedicalRecordsListById(String id); public ConMedicalRecordsListDO selectConMedicalRecordsListById(String id);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and id = #{id}") @Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and id = #{id}")
public ConMedicalRecordsDO selectConMedicalRecordsInfoById(String id); public ConMedicalRecordsDO selectConMedicalRecordsInfoById(String id);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc") @Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and member_id = #{memberId} order by create_time desc")
List<ConMedicalRecordsListDO> selectConMedicalRecordsByMemberId(String memberId); List<ConMedicalRecordsListDO> selectConMedicalRecordsByMemberId(String memberId);
@Select("SELECT * FROM con_medical_records WHERE status = '1' and del_flag = '0' and member_id = #{memberId} and user_id = #{userId}") @Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and member_id = #{memberId} and user_id = #{userId}")
ConMedicalRecords selectByMemberIdAndUserId(String memberId, String userId); ConMedicalRecords selectByMemberIdAndUserId(String memberId, String userId);
@Select("SELECT * FROM con_medical_records_view WHERE status = '1' and del_flag = '0' and id = #{id}") @Select("SELECT * FROM qh_con_medrec WHERE status = '1' and del_flag = '0' and id = #{id}")
public ConMedicalRecordsDO selectConMedicalRecordsViewInfoById(String id); public ConMedicalRecordsDO selectConMedicalRecordsViewInfoById(String id);
} }
@@ -24,7 +24,7 @@ public interface ConNoticeMapper extends BaseMapper<ConNotice> {
*/ */
IPage<ConNotice> queryPageList(IPage<ConNotice> page, @Param("conNotice") ConNotice conNotice); IPage<ConNotice> queryPageList(IPage<ConNotice> page, @Param("conNotice") ConNotice conNotice);
@Select("SELECT * FROM con_notice WHERE status = '1' and del_flag = '0' and notice_type = #{type} order by create_time desc limit 1") @Select("SELECT * FROM qh_con_notice WHERE status = '1' and del_flag = '0' and notice_type = #{type} order by create_time desc limit 1")
public ConNotice selectNoticeByType(String type); public ConNotice selectNoticeByType(String type);
} }
@@ -14,7 +14,7 @@ import org.apache.ibatis.annotations.Update;
import java.util.List; import java.util.List;
/** /**
* @Description: con_resource * @Description: qh_con_resource
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-09 * @Date: 2023-05-09
* @Version: V1.0 * @Version: V1.0
@@ -30,18 +30,18 @@ public interface ConResourceMapper extends BaseMapper<ConResource> {
*/ */
IPage<ConResource> queryPageList(IPage<ConResource> page, ConResource conResource); IPage<ConResource> queryPageList(IPage<ConResource> page, ConResource conResource);
@Update("update con_resource set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{id}") @Update("update qh_con_resource set user_score_num = user_score_num +1 ,user_score = user_score + #{userScore} WHERE status = '1' and del_flag = '0' and id = #{id}")
public int updateHospitalScoreAnfNum(String userScore, String id); public int updateHospitalScoreAnfNum(String userScore, String id);
@Select("select id,resource_name as resourceName from con_resource WHERE status = '1' and del_flag = '0' order by tf_top desc,sort") @Select("select id,resource_name as resourceName from qh_con_resource WHERE status = '1' and del_flag = '0' order by tf_top desc,sort")
public List<ConResourceDO> selectHospitalList(); public List<ConResourceDO> selectHospitalList();
@Select("select * from con_resource WHERE status = '1' and del_flag = '0'") @Select("select * from qh_con_resource WHERE status = '1' and del_flag = '0'")
public List<ConResource> selectResourceList(); public List<ConResource> selectResourceList();
@Select("select * from con_resource where status = '1' and del_flag = '0' and id = #{id}") @Select("select * from qh_con_resource where status = '1' and del_flag = '0' and id = #{id}")
ConResource selectConResourceById(String id); ConResource selectConResourceById(String id);
List<ConResource> selectBatchIds(@Param("ids") List<String> ids); List<ConResource> selectBatchIds(@Param("ids") List<String> ids);
@@ -50,14 +50,14 @@ public interface ConResourceMapper extends BaseMapper<ConResource> {
Boolean updateTop(@Param("id") String id, @Param("type") Boolean type); Boolean updateTop(@Param("id") String id, @Param("type") Boolean type);
@Select("SELECT * FROM con_resource WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{name}, '%')") @Select("SELECT * FROM qh_con_resource WHERE status = '1' AND del_flag = '0' AND resource_name LIKE CONCAT('%', #{name}, '%')")
List<ConResource> selectByResourceName(@Param("name") String name); List<ConResource> selectByResourceName(@Param("name") String name);
List<HospitalDepartment> selectResourceInfoByDepartId(@Param("idList") List<String> idList); List<HospitalDepartment> selectResourceInfoByDepartId(@Param("idList") List<String> idList);
@Select("SELECT c.id,c.resource_name as resourceName FROM con_resource c WHERE EXISTS (SELECT 1 FROM con_doctor d WHERE c.id = d.resource_id and d.del_flag = 0 and d.`status` = 1)" + @Select("SELECT c.id,c.resource_name as resourceName FROM qh_con_resource c WHERE EXISTS (SELECT 1 FROM qh_con_doctor d WHERE c.id = d.resource_id and d.del_flag = 0 and d.status = 1)" +
"and c.del_flag = 0 and c.`status` = 1 ORDER BY c.tf_top DESC,c.sort") "and c.del_flag = 0 and c.status = 1 ORDER BY c.tf_top DESC,c.sort")
public List<ConResourceDO> selectHospitalListVersionTwo(); public List<ConResourceDO> selectHospitalListVersionTwo();
@@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Select;
import java.util.Date; import java.util.Date;
/** /**
* @Description: con_service * @Description: qh_con_srvc
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-31 * @Date: 2023-05-31
* @Version: V1.0 * @Version: V1.0
@@ -16,11 +16,11 @@ import java.util.Date;
@Mapper @Mapper
public interface ConServiceMapper extends BaseMapper<ConService> { public interface ConServiceMapper extends BaseMapper<ConService> {
@Select("select * from con_service where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 order by create_time desc limit 1") @Select("select * from qh_con_srvc where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 order by create_time desc limit 1")
ConService selectConServiceByDoctrId(String doctorId); ConService selectConServiceByDoctrId(String doctorId);
@Select("select count(1) from con_service where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 and DATE_FORMAT(#{scheduleDate}, '%Y-%m-%d') >= DATE_FORMAT(start_day, '%Y-%m-%d') and DATE_FORMAT(#{scheduleDate}, '%Y-%m-%d') <= DATE_FORMAT(end_day, '%Y-%m-%d')") @Select("select count(1) from qh_con_srvc where service_status = 0 and doctor_id = #{doctorId} and del_flag = 0 and status = 1 and TO_CHAR(#{scheduleDate}, 'YYYY-MM-DD') >= TO_CHAR(start_day, 'YYYY-MM-DD') and TO_CHAR(#{scheduleDate}, 'YYYY-MM-DD') <= TO_CHAR(end_day, 'YYYY-MM-DD')")
int selectConServiceByDoctrIdExist(String doctorId, Date scheduleDate); int selectConServiceByDoctrIdExist(String doctorId, Date scheduleDate);
} }
@@ -47,7 +47,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
*/ */
IPage<ConSession> listByHelper(com.baomidou.mybatisplus.core.metadata.IPage<ConSession> page, @Param("conSession") ConSession conSession); IPage<ConSession> listByHelper(com.baomidou.mybatisplus.core.metadata.IPage<ConSession> page, @Param("conSession") ConSession conSession);
@Update("update con_session set content_status = #{contentStatus},reject_reason = #{rejectReason} where id = #{id}") @Update("update qh_con_session set content_status = #{contentStatus},reject_reason = #{rejectReason} where id = #{id}")
public int updateContentStatus(String id, String contentStatus, String rejectReason); public int updateContentStatus(String id, String contentStatus, String rejectReason);
@@ -72,7 +72,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
String selectSessioningDoctorExist(@Param("fromAccount") String fromAccount, @Param("toAccount") String toAccount); String selectSessioningDoctorExist(@Param("fromAccount") String fromAccount, @Param("toAccount") String toAccount);
@Select("select count(1) from con_session where to_account = #{doctorId} and content_type = 2 and session_type = 1 and session_date >= #{startTime} and session_date <= #{endTime} and (content_status = 1 or content_status = 2 or content_status = 3)") @Select("select count(1) from qh_con_session where to_account = #{doctorId} and content_type = 2 and session_type = 1 and session_date >= #{startTime} and session_date <= #{endTime} and (content_status = 1 or content_status = 2 or content_status = 3)")
String selectSessionVideoUnByDoctorId(@Param("doctorId") String doctorId, @Param("startTime") Date startTime, @Param("endTime") Date endTime); String selectSessionVideoUnByDoctorId(@Param("doctorId") String doctorId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
/** /**
@@ -83,62 +83,62 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
*/ */
List<ImMsgRecordAll> selectMsg(@Param("id") String id); List<ImMsgRecordAll> selectMsg(@Param("id") String id);
@Select("select * from con_session where id = #{id} and del_flag = 0 and status = 1") @Select("select * from qh_con_session where id = #{id} and del_flag = 0 and status = 1")
ConSession selectConSessionById(String id); ConSession selectConSessionById(String id);
@Update("update con_session set content_status = #{contentStatus},im_id=#{imId} where id = #{id}") @Update("update qh_con_session set content_status = #{contentStatus},im_id=#{imId} where id = #{id}")
int updateSessionStatusById(String id, String contentStatus, String imId); int updateSessionStatusById(String id, String contentStatus, String imId);
@Select("select * from con_session where from_account = #{userId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1") @Select("select * from qh_con_session where from_account = #{userId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1")
ConSession selectSessioning(String userId, String toAccount); ConSession selectSessioning(String userId, String toAccount);
@Select("select * from con_session where member_id = #{memberId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1") @Select("select * from qh_con_session where member_id = #{memberId} and content_status = 3 and to_account = #{toAccount} order by create_time desc limit 1")
ConSession selectSessioningByMember(String memberId, String toAccount); ConSession selectSessioningByMember(String memberId, String toAccount);
@Select("select * from con_session where from_account = #{fromAccount} and content_status = 3 and to_account = #{toAccount} and content_type = #{contentType} order by create_time desc limit 1") @Select("select * from qh_con_session where from_account = #{fromAccount} and content_status = 3 and to_account = #{toAccount} and content_type = #{contentType} order by create_time desc limit 1")
ConSession selectSessioningByFromAccount(String fromAccount, String toAccount, String contentType); ConSession selectSessioningByFromAccount(String fromAccount, String toAccount, String contentType);
@Select("select count(1) from con_session where from_account = #{userId} and (content_status = 1 or content_status = 3 or content_status = 2) and session_type = 1") @Select("select count(1) from qh_con_session where from_account = #{userId} and (content_status = 1 or content_status = 3 or content_status = 2) and session_type = 1")
String selectSessioningNum(String userId); String selectSessioningNum(String userId);
@Update("update con_session set content_status = #{contentStatus},tf_reply = 1,im_id=#{imId} where id = #{id}") @Update("update qh_con_session set content_status = #{contentStatus},tf_reply = 1,im_id=#{imId} where id = #{id}")
int updateSessionStatusByIdOnly(String id, String contentStatus, String imId); int updateSessionStatusByIdOnly(String id, String contentStatus, String imId);
@Select("select * from con_session where im_id = #{imId} and to_account = #{toAccount} and del_flag = 0 and status = 1") @Select("select * from qh_con_session where im_id = #{imId} and to_account = #{toAccount} and del_flag = 0 and status = 1")
ConSession selectConSessionByImId(String imId, String toAccount); ConSession selectConSessionByImId(String imId, String toAccount);
@Update("update con_session set reply_time = NOW() where im_id = #{imId}") @Update("update qh_con_session set reply_time = SYSDATE where im_id = #{imId}")
int updateSessionReplyTime(String imId); int updateSessionReplyTime(String imId);
@Select("select * from con_session where im_id = #{imId} and del_flag = 0 and status = 1") @Select("select * from qh_con_session where im_id = #{imId} and del_flag = 0 and status = 1")
ConSession selectConSessionByImIdOnly(String imId); ConSession selectConSessionByImIdOnly(String imId);
@Update("update con_session set content_status = 4 where TIMESTAMPDIFF(HOUR,reply_time,now()) >= 4 and content_status = 3 and content_type = 1") @Update("update qh_con_session set content_status = 4 where (SYSDATE - CAST(reply_time AS DATE)) * 24 >= 4 and content_status = 3 and content_type = 1")
int sessionSendMessageExpire(); int sessionSendMessageExpire();
@Update("update con_session set content_status = 8 where TIMESTAMPDIFF(HOUR,create_time,now()) >= 24 and content_type = 1 and (content_status = 1 or content_status = 2)") @Update("update qh_con_session set content_status = 8 where (SYSDATE - CAST(create_time AS DATE)) * 24 >= 24 and content_type = 1 and (content_status = 1 or content_status = 2)")
int sessionSendMessageExpireAnother(); int sessionSendMessageExpireAnother();
@Update("update con_session set content_status = 8 where DATE(NOW()) > session_date and content_type = 2 and (content_status = 1 or content_status = 2)") @Update("update qh_con_session set content_status = 8 where TRUNC(SYSDATE) > session_date and content_type = 2 and (content_status = 1 or content_status = 2)")
int sessionSendMessageExpireVideo(); int sessionSendMessageExpireVideo();
@Update("update con_session set content_status = 4 where DATE(NOW()) > session_date and content_type = 2 and content_status = 3 ") @Update("update qh_con_session set content_status = 4 where TRUNC(SYSDATE) > session_date and content_type = 2 and content_status = 3 ")
int sessionSendMessageExpireVideoAnother(); int sessionSendMessageExpireVideoAnother();
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 limit 1") @Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 limit 1")
ConSession selectSessioningByProfessorId(String fromAccount, String sessionType); ConSession selectSessioningByProfessorId(String fromAccount, String sessionType);
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 order by create_time desc limit 1") @Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and session_type = #{sessionType} and content_status = 3 order by create_time desc limit 1")
ConSession selectSessioningByProfessorIdNew(String fromAccount, String sessionType); ConSession selectSessioningByProfessorIdNew(String fromAccount, String sessionType);
List<ConSession> companySessionList(@Param("imId") String imId); List<ConSession> companySessionList(@Param("imId") String imId);
@@ -158,7 +158,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
List<ConSessionDO> selectSessionListPictureByUserId(@Param("imIds") String imIds); List<ConSessionDO> selectSessionListPictureByUserId(@Param("imIds") String imIds);
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and session_type != 1 order by create_time limit 1") @Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and session_type != 1 order by create_time limit 1")
ConSession selectSessioningByFromAndTo(String fromAccount, String toAccount); ConSession selectSessioningByFromAndTo(String fromAccount, String toAccount);
List<ConSessionDO> selectSessionListByUserIdVersionTwo(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("userId") String userId); List<ConSessionDO> selectSessionListByUserIdVersionTwo(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("userId") String userId);
@@ -169,7 +169,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
@Param("contentStatus") String contentStatus); @Param("contentStatus") String contentStatus);
@Select("select * from con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and member_id = #{memberId} and session_type = 1 and content_type = 2 and (content_status = 1 or content_status = 2 or content_status = 3 ) order by create_time desc limit 1") @Select("select * from qh_con_session where del_flag = 0 and status = 1 and from_account = #{fromAccount} and to_account = #{toAccount} and member_id = #{memberId} and session_type = 1 and content_type = 2 and (content_status = 1 or content_status = 2 or content_status = 3 ) order by create_time desc limit 1")
ConSession selectSessioningVideoByFromAndTo(String fromAccount, String toAccount, String memberId); ConSession selectSessioningVideoByFromAndTo(String fromAccount, String toAccount, String memberId);
@@ -178,7 +178,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
* *
* @return * @return
*/ */
@Update("update con_session set content_status = 5 where session_type != 1 and content_status = 3 and timestampdiff(HOUR,reply_time,NOW()) >= #{expireHour} and tf_reply = 1") @Update("update qh_con_session set content_status = 5 where session_type != 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
int changeEndUserAndProfessiorHelper(String expireHour); int changeEndUserAndProfessiorHelper(String expireHour);
/** /**
@@ -186,7 +186,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
* *
* @return * @return
*/ */
@Update("update con_session set content_status = 4 where session_type = 1 and content_type = 1 and content_status = 3 and timestampdiff(HOUR,reply_time,NOW()) >= #{expireHour} and tf_reply = 1") @Update("update qh_con_session set content_status = 4 where session_type = 1 and content_type = 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
int endSession(String expireHour); int endSession(String expireHour);
/** /**
@@ -194,7 +194,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
* *
* @return * @return
*/ */
@Update("update con_session set content_status = 8 where content_type != 2 and timestampdiff(HOUR,create_time,NOW()) >= #{expireHour} and tf_reply = 0") @Update("update qh_con_session set content_status = 8 where content_type != 2 and (SYSDATE - CAST(create_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 0")
int expireMeaaage(String expireHour); int expireMeaaage(String expireHour);
@@ -208,7 +208,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
String selectSessionProfessorIngNew(@Param("toAccount") String toAccount, @Param("contentType") String contentType, String selectSessionProfessorIngNew(@Param("toAccount") String toAccount, @Param("contentType") String contentType,
@Param("contentStatus") String contentStatus,@Param("tfReply") String tfReply); @Param("contentStatus") String contentStatus,@Param("tfReply") String tfReply);
// @Update("update con_session set content_status = 5 where im_id = #{id}") // @Update("update qh_con_session set content_status = 5 where im_id = #{id}")
// String selectSessionVideoUnByDoctorId(); // String selectSessionVideoUnByDoctorId();
@@ -240,28 +240,20 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
@Param("fromAccount")String fromAccount); @Param("fromAccount")String fromAccount);
@Select("select * from con_session_view where im_id = #{imId} and del_flag = 0 and status = 1") @Select("select * from qh_con_session where im_id = #{imId} and del_flag = 0 and status = 1")
ConSession selectConSessionByImIdOnlyBackUp(String imId); ConSession selectConSessionByImIdOnlyBackUp(String imId);
@Select("select * from qh_con_session where id = #{id} and del_flag = 0 and status = 1")
@Update("update con_session_qh set reply_time = NOW() where im_id = #{imId}")
int updateSessionReplyTimeBackUp(String imId);
@Update("update con_session_qh set tf_reply = 1 where id = #{id}")
int updateConSessionTfReplyBackUp(String id);
@Select("select * from con_session_view where id = #{id} and del_flag = 0 and status = 1")
ConSession selectConSessionByIdView(String id); ConSession selectConSessionByIdView(String id);
@Select("select * from con_session_view where im_id = #{id} and del_flag = 0 and status = 1") @Select("select * from qh_con_session where im_id = #{id} and del_flag = 0 and status = 1")
ConSession selectConSessionByIdViewAndImId(String imId); ConSession selectConSessionByIdViewAndImId(String imId);
@Update("update con_session set user_tf_reply = 1 where id = #{id}") @Update("update qh_con_session set user_tf_reply = 1 where id = #{id}")
int updateSessionUserReplyState(String id); int updateSessionUserReplyState(String id);
@Update("update con_session set user_tf_reply = 1,user_first_reply_time = #{replyTime} where id = #{id}") @Update("update qh_con_session set user_tf_reply = 1,user_first_reply_time = #{replyTime} where id = #{id}")
int updateSessionUserReplyAndTimeState(String id,Date replyTime); int updateSessionUserReplyAndTimeState(String id,Date replyTime);
List<ConSessionDO> selectSessionListByDoctorIdNewAnother(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("doctorId") String doctorId, List<ConSessionDO> selectSessionListByDoctorIdNewAnother(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("doctorId") String doctorId,
@@ -282,7 +274,7 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
List<ConSessionDO> selectSessionListByUserIdHelperAnother(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("userId") String userId); List<ConSessionDO> selectSessionListByUserIdHelperAnother(IPage<ConSessionDO> page, @Param("contentType") String contentType, @Param("state") String state, @Param("userId") String userId);
@Select("select * from con_session where session_type = 1 and content_type = 1 and content_status = 3 and timestampdiff(HOUR,reply_time,NOW()) >= #{expireHour} and tf_reply = 1") @Select("select * from qh_con_session where session_type = 1 and content_type = 1 and content_status = 3 and (SYSDATE - CAST(reply_time AS DATE)) * 24 >= #{expireHour} and tf_reply = 1")
List<ConSession> selectEndSession(String expireHour); List<ConSession> selectEndSession(String expireHour);
@@ -16,7 +16,7 @@ import java.util.List;
public interface ConSessionReservationDateMapper extends BaseMapper<ConSessionReservationDate> { public interface ConSessionReservationDateMapper extends BaseMapper<ConSessionReservationDate> {
@Select("select * from con_session_reservation_date where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time") @Select("select * from qh_con_sess_resv_dt where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time")
List<ConSessionReservationDateDO> selectConSessionVideoBySessionId(String sessionId); List<ConSessionReservationDateDO> selectConSessionVideoBySessionId(String sessionId);
} }
@@ -8,21 +8,21 @@ import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
/** /**
* @Description: con_session_video_info * @Description: qh_con_sess_vid
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-15 * @Date: 2023-06-15
* @Version: V1.0 * @Version: V1.0
*/ */
public interface ConSessionVideoInfoMapper extends BaseMapper<ConSessionVideoInfo> { public interface ConSessionVideoInfoMapper extends BaseMapper<ConSessionVideoInfo> {
@Select("select * from con_session_video_info where session_id = #{sessionId} and del_flag = 0 and status = 1") @Select("select * from qh_con_sess_vid where session_id = #{sessionId} and del_flag = 0 and status = 1")
List<ConSessionVideoInfoDO> selectConSessionVideoById(String sessionId); List<ConSessionVideoInfoDO> selectConSessionVideoById(String sessionId);
@Select("select * from con_session_video_info where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time desc limit 1") @Select("select * from qh_con_sess_vid where session_id = #{sessionId} and del_flag = 0 and status = 1 order by create_time desc limit 1")
ConSessionVideoInfo selectConSessionVideoOnlyById(String sessionId); ConSessionVideoInfo selectConSessionVideoOnlyById(String sessionId);
@Select("select * from con_session_video_info where reservation_id = #{reservationId} and del_flag = 0 and status = 1") @Select("select * from qh_con_sess_vid where reservation_id = #{reservationId} and del_flag = 0 and status = 1")
List<ConSessionVideoInfoDO> selectConSessionVideoByReservationId(String reservationId); List<ConSessionVideoInfoDO> selectConSessionVideoByReservationId(String reservationId);
} }
@@ -12,7 +12,7 @@ import org.apache.ibatis.annotations.Update;
import java.util.List; import java.util.List;
/** /**
* @Description: con_sicks * @Description: qh_con_sicks
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-05-09 * @Date: 2023-05-09
* @Version: V1.0 * @Version: V1.0
@@ -44,22 +44,22 @@ public interface ConSicksMapper extends BaseMapper<ConSicks> {
*/ */
List<ConSicksDO> selectSickListByDepartmentId(@Param("departmentId") String departmentId); List<ConSicksDO> selectSickListByDepartmentId(@Param("departmentId") String departmentId);
@Select("select count(1) from con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1") @Select("select count(1) from qh_con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1")
int selectSickNumByDepartmentId(String departmentId); int selectSickNumByDepartmentId(String departmentId);
@Select("select id from con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1") @Select("select id from qh_con_sicks where department_id = #{departmentId} and del_flag = 0 and status = 1")
List<String> selectSickListStringByDepartmentId(String departmentId); List<String> selectSickListStringByDepartmentId(String departmentId);
Boolean updateTop(@Param("id") String id, @Param("type") Boolean type); Boolean updateTop(@Param("id") String id, @Param("type") Boolean type);
List<ConSicks> selectListByIdList(@Param("idList") List<String> idList); List<ConSicks> selectListByIdList(@Param("idList") List<String> idList);
@Select("select count(1) from con_sicks where del_flag = 0 and status = 1 and FIND_IN_SET(department_id,#{departmentId})") @Select("select count(1) from qh_con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
int selectSickNumByDepartment(String departmentId); int selectSickNumByDepartment(String departmentId);
@Select("select id from con_sicks where del_flag = 0 and status = 1 and FIND_IN_SET(department_id,#{departmentId})") @Select("select id from qh_con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0")
List<String> selectSickNumByDepartmentByDepartment(String departmentId); List<String> selectSickNumByDepartmentByDepartment(String departmentId);
@@ -71,13 +71,13 @@ public interface ConSicksMapper extends BaseMapper<ConSicks> {
List<ConSicks> selectSickByTopAndHaveDoctor(); List<ConSicks> selectSickByTopAndHaveDoctor();
@Select("select id,department_id as departmentId,sicks_name as sicksName,descript from con_sicks where del_flag = 0 and status = 1 and FIND_IN_SET(department_id,#{departmentId}) order by tf_top desc,sort") @Select("select id,department_id as departmentId,sicks_name as sicksName,descript from qh_con_sicks where del_flag = 0 and status = 1 and INSTR(',' || #{departmentId} || ',', ',' || department_id || ',') > 0 order by tf_top desc,sort")
List<ConSicksDO> selectSickListByDepartment(String departmentId); List<ConSicksDO> selectSickListByDepartment(String departmentId);
@Select("select GROUP_CONCAT(id) from con_sicks where department_id = #{departmentId}") @Select("select LISTAGG(id, ',') WITHIN GROUP (ORDER BY id) from qh_con_sicks where department_id = #{departmentId}")
String selectSickListByDepartmentIdAnother(String departmentId); String selectSickListByDepartmentIdAnother(String departmentId);
@Update("update con_sicks set department_id = #{departmentOne} where department_id = #{departmentTwo}") @Update("update qh_con_sicks set department_id = #{departmentOne} where department_id = #{departmentTwo}")
int updateSickDepartmentId(String departmentOne,String departmentTwo); int updateSickDepartmentId(String departmentOne,String departmentTwo);
} }
@@ -17,12 +17,12 @@ import java.util.List;
@Mapper @Mapper
public interface HospitalDepartmentMapper extends BaseMapper<HospitalDepartment> { public interface HospitalDepartmentMapper extends BaseMapper<HospitalDepartment> {
@Select("select count(1) from hospital_department where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}") @Select("select count(1) from qh_con_hosp_dept where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}")
public String selectHospitalDepartment(String hospitalId); public String selectHospitalDepartment(String hospitalId);
@Update("update hospital_department set del_flag = 1 where hospital_id = #{hospitalId}") @Update("update qh_con_hosp_dept set del_flag = 1 where hospital_id = #{hospitalId}")
public Boolean deleteByResourceId(String hospitalId); public Boolean deleteByResourceId(String hospitalId);
@Select("select * from hospital_department where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}") @Select("select * from qh_con_hosp_dept where status = 1 and del_flag = 0 and hospital_id = #{hospitalId}")
public List<HospitalDepartment> selectByHospitalId(String hospitalId); public List<HospitalDepartment> selectByHospitalId(String hospitalId);
} }
@@ -4,7 +4,7 @@
<select id="selectConCostLog" resultType="com.renkang.consultation.entity.ConCostLog"> <select id="selectConCostLog" resultType="com.renkang.consultation.entity.ConCostLog">
select * from con_cost_log select * from qh_con_cost_log
where title_id = #{doctorJob} where title_id = #{doctorJob}
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and user_id = #{userId} and user_id = #{userId}
@@ -64,7 +64,7 @@
<select id="findlistpage" resultMap="BaseResultMap"> <select id="findlistpage" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from con_cost_statistics cct from qh_con_cost_stat cct
<where> <where>
<if test='type == "1"'> <if test='type == "1"'>
and cct.operate_type &lt;&gt; '5' and cct.operate_type &lt;&gt; '5'
@@ -73,7 +73,7 @@
and cct.operate_type = '5' and cct.operate_type = '5'
</if> </if>
<if test='date != "1"'> <if test='date != "1"'>
and DATE_FORMAT(cct.income_time, '%Y-%m')=#{date} and TO_CHAR(cct.income_time, 'YYYY-MM')=#{date}
</if> </if>
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and cct.user_id = #{userId} and cct.user_id = #{userId}
@@ -83,32 +83,32 @@
</select> </select>
<select id="groupByMonthList" resultType="java.util.HashMap"> <select id="groupByMonthList" resultType="java.util.HashMap">
SELECT COUNT(cs.content_type) cou, cs.content_type SELECT COUNT(cs.content_type) "cou", cs.content_type "contentType"
FROM con_session cs FROM qh_con_session cs
where cs.content_type is not null where cs.content_type is not null
and cs.content_type &lt;&gt; '4' and cs.content_type &lt;&gt; '4'
and DATE_FORMAT(cs.create_time, '%Y-%m') = #{date} and TO_CHAR(cs.create_time, 'YYYY-MM') = #{date}
group by cs.content_type, DATE_FORMAT(cs.create_time, '%Y-%m') group by cs.content_type, TO_CHAR(cs.create_time, 'YYYY-MM')
</select> </select>
<select id="groupByTypehList" resultType="java.util.HashMap"> <select id="groupByTypehList" resultType="java.util.HashMap">
SELECT COUNT(cs.content_type) cou, cs.content_type, cs.session_status SELECT COUNT(cs.content_type) "cou", cs.content_type "contentType", cs.session_status "sessionStatus"
FROM con_session cs FROM qh_con_session cs
where cs.content_type is not null where cs.content_type is not null
and cs.content_type &lt;&gt; '4' and cs.content_type &lt;&gt; '4'
and cs.to_account = #{userId} and session_type = 1 and cs.to_account = #{userId} and session_type = 1
<if test="date != null and date != ''"> <if test="date != null and date != ''">
and DATE_FORMAT(cs.create_time, '%Y-%m') = #{date} and TO_CHAR(cs.create_time, 'YYYY-MM') = #{date}
</if> </if>
group by cs.content_type, session_status group by cs.content_type, session_status
</select> </select>
<select id="queryPageList" resultType="com.renkang.consultation.entity.ConCostStatistics"> <select id="queryPageList" resultType="com.renkang.consultation.entity.ConCostStatistics">
select ccs.* select ccs.*
from con_cost_statistics ccs from qh_con_cost_stat ccs
<where> <where>
<if test='conCostStatistics.startDate != null and conCostStatistics.endDate != null'> <if test='conCostStatistics.startDate != null and conCostStatistics.endDate != null'>
and ccs.income_time between DATE_FORMAT(#{conCostStatistics.startDate}, '%Y-%m-%d 00:00:00') and DATE_FORMAT(#{conCostStatistics.endDate}, '%Y-%m-%d 23:59:59') and ccs.income_time between TRUNC(#{conCostStatistics.startDate}) and TRUNC(#{conCostStatistics.endDate}) + 1 - 1/86400
</if> </if>
<if test='conCostStatistics.operateType != null and conCostStatistics.operateType != "" and conCostStatistics.operateType == "0"'> <if test='conCostStatistics.operateType != null and conCostStatistics.operateType != "" and conCostStatistics.operateType == "0"'>
and ccs.operate_type != '5' and ccs.operate_type != '5'
@@ -124,28 +124,28 @@
</select> </select>
<select id="getAccountMoney" resultType="java.math.BigDecimal"> <select id="getAccountMoney" resultType="java.math.BigDecimal">
SELECT account_money SELECT account_money
FROM con_cost_statistics where user_id=#{userId} FROM qh_con_cost_stat where user_id=#{userId}
ORDER BY create_time DESC ORDER BY create_time DESC
LIMIT 1; LIMIT 1;
</select> </select>
<select id="getAccumulatedIncome" resultType="java.math.BigDecimal"> <select id="getAccumulatedIncome" resultType="java.math.BigDecimal">
select sum(income) from con_cost_statistics where user_id=#{userId} and operate_type!='5' select sum(income) from qh_con_cost_stat where user_id=#{userId} and operate_type!='5'
</select> </select>
<select id="getWithdrawalAmount" resultType="java.math.BigDecimal"> <select id="getWithdrawalAmount" resultType="java.math.BigDecimal">
select sum(payment_money) from con_cost_statistics where user_id=#{userId} and operate_type='5' select sum(payment_money) from qh_con_cost_stat where user_id=#{userId} and operate_type='5'
</select> </select>
<select id="selectAccountMoneyNew" resultType="java.math.BigDecimal"> <select id="selectAccountMoneyNew" resultType="java.math.BigDecimal">
select account_money from con_cost_statistics where user_id=#{userId} and del_flag = 0 and status = 1 order by select account_money from qh_con_cost_stat where user_id=#{userId} and del_flag = 0 and status = 1 order by
create_time desc limit 1 create_time desc limit 1
</select> </select>
<select id="selectAccountMoneyNewList" resultType="com.renkang.consultation.entity.ConCostStatistics"> <select id="selectAccountMoneyNewList" resultType="com.renkang.consultation.entity.ConCostStatistics">
SELECT ccs.account_money, ccs.user_id SELECT ccs.account_money, ccs.user_id
FROM con_cost_statistics ccs FROM qh_con_cost_stat ccs
JOIN ( JOIN (
SELECT user_id, MAX(create_time) AS max_create_time SELECT user_id, MAX(create_time) AS max_create_time
FROM con_cost_statistics FROM qh_con_cost_stat
WHERE del_flag = 0 AND status = 1 AND user_id IN WHERE del_flag = 0 AND status = 1 AND user_id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
@@ -155,14 +155,14 @@
WHERE ccs.del_flag = 0 AND ccs.status = 1; WHERE ccs.del_flag = 0 AND ccs.status = 1;
</select> </select>
<select id="selectNew" resultType="com.renkang.consultation.entity.ConCostStatistics"> <select id="selectNew" resultType="com.renkang.consultation.entity.ConCostStatistics">
select * from con_cost_statistics where user_id=#{userId} and del_flag = 0 and status = 1 order by create_time select * from qh_con_cost_stat where user_id=#{userId} and del_flag = 0 and status = 1 order by create_time
desc limit 1 desc limit 1
</select> </select>
<select id="groupByTypehListNew" resultType="String"> <select id="groupByTypehListNew" resultType="String">
select select
count(1) count(1)
from con_session_view from qh_con_session
where where
session_type = 1 and to_account = #{userId} and content_type = #{type} session_type = 1 and to_account = #{userId} and content_type = #{type}
<if test="state != null and state != '' and state == '1'.toString()"> <if test="state != null and state != '' and state == '1'.toString()">
@@ -172,11 +172,11 @@
and content_status &gt; 3 and content_status &gt; 3
</if> </if>
<if test="date != null and date != ''"> <if test="date != null and date != ''">
and DATE_FORMAT(create_time, '%Y-%m') = #{date} and TO_CHAR(create_time, 'YYYY-MM') = #{date}
</if> </if>
</select> </select>
<select id="selectByDoctorIds" resultType="com.renkang.consultation.entity.ConCostStatistics"> <select id="selectByDoctorIds" resultType="com.renkang.consultation.entity.ConCostStatistics">
select * from con_cost_statistics where user_id in select * from qh_con_cost_stat where user_id in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.renkang.consultation.mapper.ConDepartmentMapper"> <mapper namespace="com.renkang.consultation.mapper.ConDepartmentMapper">
<update id="updateTop"> <update id="updateTop">
update con_department update qh_con_dept
set tf_top = #{type} set tf_top = #{type}
where id = #{id} where id = #{id}
</update> </update>
@@ -10,7 +10,7 @@
select select
id, id,
department_name as "departmentName" department_name as "departmentName"
from con_department from qh_con_dept
where status = 1 and del_flag = 0 where status = 1 and del_flag = 0
<if test="officeparid != '0'.toString() and officeparid != '1'.toString()"> <if test="officeparid != '0'.toString() and officeparid != '1'.toString()">
and officeparid = #{officeparid} and officeparid = #{officeparid}
@@ -28,13 +28,13 @@
</select> </select>
<select id="selectDepartmentList" resultType="com.renkang.consultation.vo.ConDepartDoctorVO"> <select id="selectDepartmentList" resultType="com.renkang.consultation.vo.ConDepartDoctorVO">
select id, department_name as "name" select id, department_name as "name"
from con_department from qh_con_dept
where status = 1 where status = 1
and del_flag = 0 and del_flag = 0
</select> </select>
<select id="queryList" resultType="com.renkang.consultation.entity.ConDepartment"> <select id="queryList" resultType="com.renkang.consultation.entity.ConDepartment">
select * select *
from con_department from qh_con_dept
<where> <where>
<if test="departmentName != null and departmentName != ''"> <if test="departmentName != null and departmentName != ''">
and department_name like CONCAT('%', #{departmentName}, '%') and department_name like CONCAT('%', #{departmentName}, '%')
@@ -50,7 +50,7 @@
<select id="selectDoctorByDepartId" parameterType="java.util.List" <select id="selectDoctorByDepartId" parameterType="java.util.List"
resultType="com.renkang.consultation.vo.ConDepartmentVO"> resultType="com.renkang.consultation.vo.ConDepartmentVO">
SELECT department_id as id, COUNT(id) AS doctorNum SELECT department_id as id, COUNT(id) AS doctorNum
FROM con_doctor FROM qh_con_doctor
WHERE del_flag = 0 and department_id IN WHERE del_flag = 0 and department_id IN
<foreach item="departId" collection="departIdList" open="(" separator="," close=")"> <foreach item="departId" collection="departIdList" open="(" separator="," close=")">
#{departId} #{departId}
@@ -61,7 +61,7 @@
<select id="selectDoctorInfoByDepartId" parameterType="java.util.List" <select id="selectDoctorInfoByDepartId" parameterType="java.util.List"
resultType="com.renkang.consultation.entity.ConDoctor"> resultType="com.renkang.consultation.entity.ConDoctor">
SELECT * SELECT *
FROM con_doctor FROM qh_con_doctor
WHERE del_flag = 0 and status = 1 and department_id IN WHERE del_flag = 0 and status = 1 and department_id IN
<foreach item="departId" collection="departIdList" open="(" separator="," close=")"> <foreach item="departId" collection="departIdList" open="(" separator="," close=")">
#{departId} #{departId}
@@ -70,25 +70,25 @@
<select id="selectListByOfficeparid" resultType="com.renkang.consultation.entity.ConDepartment"> <select id="selectListByOfficeparid" resultType="com.renkang.consultation.entity.ConDepartment">
select * select *
from con_department from qh_con_dept
where status = 1 where status = 1
and del_flag = 0 and del_flag = 0
<if test="officeparid == null"> <if test="officeparid == null">
and ifnull(officeparid,'') = '' and NVL(officeparid,'') = ''
</if> </if>
<if test="officeparid != null"> <if test="officeparid != null">
and officeparid = #{officeparid} and officeparid = #{officeparid}
</if> </if>
</select> </select>
<select id="selectListAll" resultType="com.renkang.consultation.entity.ConDepartment"> <select id="selectListAll" resultType="com.renkang.consultation.entity.ConDepartment">
select * from con_department select * from qh_con_dept
<where> <where>
<if test="resourceId == null"> <if test="resourceId == null">
and status = 1 and del_flag = 0 and status = 1 and del_flag = 0
</if> </if>
<if test="resourceId != null"> <if test="resourceId != null">
id in ( id in (
SELECT department_id FROM hospital_department WHERE hospital_id = #{resourceId} AND status = 1 AND SELECT department_id FROM qh_con_hosp_dept WHERE hospital_id = #{resourceId} AND status = 1 AND
del_flag = 0 del_flag = 0
) )
</if> </if>
@@ -97,25 +97,16 @@
order by tf_top desc, sort order by tf_top desc, sort
</select> </select>
<select id="selectChildAll" resultType="com.renkang.consultation.entity.ConDepartment"> <select id="selectChildAll" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT * SELECT * FROM qh_con_dept
FROM ( WHERE id != #{departmentId}
SELECT d1.*, START WITH id = #{departmentId}
@pv := CONCAT(@pv, ',', d1.id) AS path CONNECT BY PRIOR id = officeparid
FROM ORDER BY LEVEL, id
con_department AS d1
JOIN
(SELECT @pv := #{departmentId}) AS initial
WHERE
FIND_IN_SET(d1.officeparid
, @pv)
> 0
) AS subquery
ORDER BY LENGTH(path)
</select> </select>
<select id="getOneDepartList" resultType="com.renkang.consultation.entity.ConDepartment"> <select id="getOneDepartList" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT * SELECT *
FROM `con_department` FROM qh_con_dept
WHERE office_level = 1 WHERE office_level = 1
and del_flag = 0 and del_flag = 0
and status = 1 and status = 1
@@ -123,7 +114,7 @@
<select id="getTwoDepartList" resultType="com.renkang.consultation.entity.ConDepartment"> <select id="getTwoDepartList" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT * SELECT *
FROM `con_department` FROM qh_con_dept
WHERE office_level = 2 WHERE office_level = 2
and del_flag = 0 and del_flag = 0
and status = 1 and status = 1
@@ -131,31 +122,30 @@
<select id="getOneTwoDepartDoctorList" resultType="com.renkang.consultation.entity.ConDoctor"> <select id="getOneTwoDepartDoctorList" resultType="com.renkang.consultation.entity.ConDoctor">
SELECT * SELECT *
from con_doctor from qh_con_doctor
where department_id in where department_id in
(SELECT id FROM `con_department` WHERE office_level in (1, 2) and del_flag = 0 and status = 1) (SELECT id FROM qh_con_dept WHERE office_level in (1, 2) and del_flag = 0 and status = 1)
and del_flag = 0 and del_flag = 0
and status = 1 and status = 1
ORDER BY doctor_status DESC; ORDER BY doctor_status DESC
</select> </select>
<select id="selectChildById" resultType="com.renkang.consultation.entity.ConDepartment"> <select id="selectChildById" resultType="com.renkang.consultation.entity.ConDepartment">
SELECT * from con_department where officeparid = #{id} and del_flag = 0 and status = 1 SELECT * from qh_con_dept where officeparid = #{id} and del_flag = 0 and status = 1
</select> </select>
<select id="selectHospitalDepartmentId" resultType="com.renkang.consultation.entity.ConDepartmentDO"> <select id="selectHospitalDepartmentId" resultType="com.renkang.consultation.entity.ConDepartmentDO">
select select
distinct a.department_id as "id", a.department_id as "id",
b.department_name as "departmentName" b.department_name as "departmentName"
from hospital_department a left join con_department b on a.department_id = b.id from qh_con_hosp_dept a left join qh_con_dept b on a.department_id = b.id
where a.hospital_id = #{hospitalId} and b.office_level = 1 where a.hospital_id = #{hospitalId} and b.office_level = 1
GROUP BY a.department_id,b.department_name GROUP BY a.department_id,b.department_name
order by b.tf_top desc,b.sort
</select> </select>
<select id="getMedicalDepartmentList" resultType="com.renkang.consultation.vo.MedicalDepartmentVO"> <select id="getMedicalDepartmentList" resultType="com.renkang.consultation.vo.MedicalDepartmentVO">
select id, department_name as name from con_department select id, department_name as name from qh_con_dept
<where> <where>
<if test="deptIds !=null and deptIds.size()!=0"> <if test="deptIds !=null and deptIds.size()!=0">
id in id in
@@ -171,10 +161,10 @@
select select
id as "key", id as "key",
department_name as "title", department_name as "title",
(case when (select count(1) from con_department cd2 where cd2.officeparid = cdd.id)>0 then 0 else 1 end) as isLeaf, (case when (select count(1) from qh_con_dept cd2 where cd2.officeparid = cdd.id)>0 then 0 else 1 end) as isLeaf,
officeparid as parentId officeparid as parentId
from con_department cdd from qh_con_dept cdd
where if(officeparid is null or officeparid = '','0',officeparid) = #{pid} where CASE WHEN (officeparid IS NULL OR officeparid = '') THEN '0' ELSE officeparid END = #{pid}
</select> </select>
@@ -6,14 +6,14 @@
user_id, user_id,
account_money account_money
FROM FROM
con_cost_statistics qh_con_cost_stat
WHERE WHERE
(user_id, create_time) IN ( (user_id, create_time) IN (
SELECT SELECT
user_id, user_id,
MAX(create_time) MAX(create_time)
FROM FROM
con_cost_statistics qh_con_cost_stat
WHERE WHERE
user_id IN user_id IN
<foreach collection="userIds" item="userId" open="(" separator="," close=")"> <foreach collection="userIds" item="userId" open="(" separator="," close=")">
@@ -27,7 +27,7 @@
SELECT SELECT
* *
FROM FROM
con_doctor_card qh_con_doc_card
<where> <where>
del_flag = 0 and status = 1 del_flag = 0 and status = 1
<if test="conDoctorCard.doctorId != null and conDoctorCard.doctorId != ''"> <if test="conDoctorCard.doctorId != null and conDoctorCard.doctorId != ''">
@@ -10,10 +10,10 @@
doc.doctor_name, doc.doctor_name,
dept.department_name dept.department_name
FROM FROM
con_doctor_change_log clog qh_con_doc_chg_log clog
LEFT JOIN con_doctor doc ON clog.doctor_id = doc.id LEFT JOIN qh_con_doctor doc ON clog.doctor_id = doc.id
LEFT JOIN con_resource reso ON doc.resource_id = reso.id LEFT JOIN qh_con_resource reso ON doc.resource_id = reso.id
LEFT JOIN con_department dept ON doc.department_id = dept.id LEFT JOIN qh_con_dept dept ON doc.department_id = dept.id
<where> <where>
<if test="doctorVO.doctorId != null and doctorVO.doctorId != ''"> <if test="doctorVO.doctorId != null and doctorVO.doctorId != ''">
AND clog.doctor_id = #{doctorVO.doctorId} AND clog.doctor_id = #{doctorVO.doctorId}
@@ -46,7 +46,7 @@
<select id="selectChangeLogByTime" resultType="com.renkang.consultation.entity.ConDoctorChangeLog"> <select id="selectChangeLogByTime" resultType="com.renkang.consultation.entity.ConDoctorChangeLog">
select * from con_doctor_change_log select * from qh_con_doc_chg_log
where change_date &gt; DATE(#{changeDate}) where change_date &gt; DATE(#{changeDate})
and doctor_id = #{doctorId} and doctor_id = #{doctorId}
and change_type = #{changeType} and change_type = #{changeType}

Some files were not shown because too many files have changed in this diff Show More