From 380a4a3bd115119737d76bb3d14d131e46f361b3 Mon Sep 17 00:00:00 2001 From: HuangHuiKang Date: Fri, 8 May 2026 10:50:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9prod=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MoldTicketResultsMapper.xml | 6 +++--- .../resources/mapper/device/DeviceMapper.xml | 8 ++++---- .../DeviceOperationRecordMapper.xml | 12 ++++++------ .../DeviceWarinningRecordMapper.xml | 2 +- .../moldrepairtems/MoldRepairTemsMapper.xml | 12 ++++++------ .../main/resources/mapper/plan/PlanMapper.xml | 2 +- .../mapper/repairtems/RepairTemsMapper.xml | 16 ++++++++-------- .../mapper/ticketresults/TicketResultsMapper.xml | 6 +++--- .../src/main/resources/application-prod.yaml | 10 +++++----- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/yudao-module-common/yudao-module-common-biz/src/main/resources/mapper/moldticketresults/MoldTicketResultsMapper.xml b/yudao-module-common/yudao-module-common-biz/src/main/resources/mapper/moldticketresults/MoldTicketResultsMapper.xml index a08adfc79..6fc7f7e4f 100644 --- a/yudao-module-common/yudao-module-common-biz/src/main/resources/mapper/moldticketresults/MoldTicketResultsMapper.xml +++ b/yudao-module-common/yudao-module-common-biz/src/main/resources/mapper/moldticketresults/MoldTicketResultsMapper.xml @@ -16,9 +16,9 @@ mtm.task_time, CONCAT( '(', su.username, ')', su.nickname) as operator from - besure.mes_mold_ticket_results mtr - left join besure.mes_mold_ticket_management mtm on mtm.id = mtr.management_id - left join besure.system_users su on mtm.operator = su.id + mes_mold_ticket_results mtr + left join mes_mold_ticket_management mtm on mtm.id = mtr.management_id + left join system_users su on mtm.operator = su.id WHERE 1=1 diff --git a/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/device/DeviceMapper.xml b/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/device/DeviceMapper.xml index a99775ea3..66435e082 100644 --- a/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/device/DeviceMapper.xml +++ b/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/device/DeviceMapper.xml @@ -87,14 +87,14 @@ SUM(CASE WHEN latest_status.rule = '3' THEN 1 ELSE 0 END) AS faultCount, SUM(CASE WHEN latest_status.rule = '4' THEN 1 ELSE 0 END) AS warningCount - FROM besure.iot_device ide + FROM iot_device ide LEFT JOIN ( -- 获取每个设备的最新状态 SELECT device_id, rule, ROW_NUMBER() OVER (PARTITION BY device_id ORDER BY create_time DESC) AS rn - FROM besure.iot_device_operation_record + FROM iot_device_operation_record WHERE rule IN ('1', '2', '3', '4') AND deleted = 0 ) latest_status ON ide.id = latest_status.device_id AND latest_status.rn = 1 @@ -194,13 +194,13 @@ diff --git a/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/deviceoperationrecord/DeviceOperationRecordMapper.xml b/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/deviceoperationrecord/DeviceOperationRecordMapper.xml index ebd400132..4cdf6207d 100644 --- a/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/deviceoperationrecord/DeviceOperationRecordMapper.xml +++ b/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/deviceoperationrecord/DeviceOperationRecordMapper.xml @@ -24,8 +24,8 @@ -- 每条 rule=3 的记录计数 * 60 秒 SUM(CASE WHEN idor.rule = '3' THEN 1 ELSE 0 END) * 60 AS totalFaultTime - FROM besure.iot_device ide - LEFT JOIN besure.iot_device_operation_record idor + FROM iot_device ide + LEFT JOIN iot_device_operation_record idor ON idor.device_id = ide.id AND idor.deleted = 0 @@ -129,8 +129,8 @@ -- 每条 rule=3 的记录计数 * 60 秒 SUM(CASE WHEN idor.rule = '3' THEN 1 ELSE 0 END) * 60 AS totalFaultTime - FROM besure.iot_device ide - LEFT JOIN besure.iot_device_operation_record idor + FROM iot_device ide + LEFT JOIN iot_device_operation_record idor ON idor.device_id = ide.id AND idor.deleted = 0 @@ -165,7 +165,7 @@ ide.id, ide.device_code AS deviceCode, ide.device_name AS deviceName - FROM besure.iot_device ide + FROM iot_device ide WHERE ide.deleted = 0 @@ -216,7 +216,7 @@ ide.id, ide.device_code AS deviceCode, ide.device_name AS deviceName - FROM besure.iot_device ide + FROM iot_device ide WHERE ide.deleted = 0 diff --git a/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/devicewarinningrecord/DeviceWarinningRecordMapper.xml b/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/devicewarinningrecord/DeviceWarinningRecordMapper.xml index 3e9e34e4e..96b34df6c 100644 --- a/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/devicewarinningrecord/DeviceWarinningRecordMapper.xml +++ b/yudao-module-iot/yudao-module-iot-biz/src/main/resources/mapper/devicewarinningrecord/DeviceWarinningRecordMapper.xml @@ -13,7 +13,7 @@ SELECT DATE_FORMAT(create_time, '%Y-%m-%d %H:00') as hour, COUNT(*) as count - FROM besure.iot_device_warinning_record + FROM iot_device_warinning_record WHERE create_time >= DATE_SUB(NOW(), INTERVAL 7 HOUR) GROUP BY DATE_FORMAT(create_time, '%Y-%m-%d %H:00') ORDER BY hour diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/moldrepairtems/MoldRepairTemsMapper.xml b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/moldrepairtems/MoldRepairTemsMapper.xml index 311966381..e301e3afa 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/moldrepairtems/MoldRepairTemsMapper.xml +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/moldrepairtems/MoldRepairTemsMapper.xml @@ -26,9 +26,9 @@ mrt.project_content, mml.name as moldName, CONCAT('(', su.username, ')', su.nickname) as creatorName - FROM besure.mes_mold_repair_tems mrt - left join besure.erp_mold mml on mml.id = mrt.mold_id - left join besure.system_users su on su.id = mrt.creator + FROM mes_mold_repair_tems mrt + left join erp_mold mml on mml.id = mrt.mold_id + left join system_users su on su.id = mrt.creator WHERE 1=1 AND mrt.deleted = 0 @@ -77,9 +77,9 @@ mrt.tenant_id, mml.name as moldName, CONCAT('(', su.username, ')', su.nickname) as creatorName - FROM besure.mes_mold_repair_tems mrt - left join besure.erp_mold mml on mml.id = mrt.mold_id - left join besure.system_users su on su.id = mrt.creator + FROM mes_mold_repair_tems mrt + left join erp_mold mml on mml.id = mrt.mold_id + left join system_users su on su.id = mrt.creator WHERE mrt.deleted = 0 AND mrt.subject_code = #{pageReqVO.subjectCode} diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/plan/PlanMapper.xml b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/plan/PlanMapper.xml index b00d77d14..12749ef1e 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/plan/PlanMapper.xml +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/plan/PlanMapper.xml @@ -13,7 +13,7 @@ SELECT DATE(end_time) as date, IFNULL(SUM(wangong_number), 0) as totalWangong - FROM besure.mes_plan + FROM mes_plan WHERE end_time >= CURDATE() - INTERVAL 6 DAY GROUP BY DATE(end_time) diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/repairtems/RepairTemsMapper.xml b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/repairtems/RepairTemsMapper.xml index 9f6f24a1c..5e10312bd 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/repairtems/RepairTemsMapper.xml +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/repairtems/RepairTemsMapper.xml @@ -39,10 +39,10 @@ GROUP_CONCAT(DISTINCT mdl.device_name ORDER BY mdl.id) AS deviceName, mcc.name as componentName, CONCAT('(', su.username, ')', su.nickname) as creatorName - FROM besure.mes_repair_tems mrt - left join besure.mes_device_ledger mdl on FIND_IN_SET(mdl.id, mrt.device_id) > 0 - left join besure.mes_critical_component mcc on mcc.id = mrt.component_id - left join besure.system_users su on su.id = mrt.creator + FROM mes_repair_tems mrt + left join mes_device_ledger mdl on FIND_IN_SET(mdl.id, mrt.device_id) > 0 + left join mes_critical_component mcc on mcc.id = mrt.component_id + left join system_users su on su.id = mrt.creator WHERE 1=1 AND mrt.deleted = 0 @@ -108,10 +108,10 @@ GROUP_CONCAT(DISTINCT mdl.device_name ORDER BY mdl.id) AS deviceName, mcc.name as componentName, CONCAT('(', su.username, ')', su.nickname) as creatorName - FROM besure.mes_repair_tems mrt - left join besure.mes_device_ledger mdl on FIND_IN_SET(mdl.id, mrt.device_id) > 0 - left join besure.mes_critical_component mcc on mcc.id = mrt.component_id - left join besure.system_users su on su.id = mrt.creator + FROM mes_repair_tems mrt + left join mes_device_ledger mdl on FIND_IN_SET(mdl.id, mrt.device_id) > 0 + left join mes_critical_component mcc on mcc.id = mrt.component_id + left join system_users su on su.id = mrt.creator WHERE mrt.deleted = 0 AND mrt.subject_code = #{pageReqVO.subjectCode} diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/ticketresults/TicketResultsMapper.xml b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/ticketresults/TicketResultsMapper.xml index 6533c4719..6cfb4d998 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/ticketresults/TicketResultsMapper.xml +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/resources/mapper/ticketresults/TicketResultsMapper.xml @@ -16,9 +16,9 @@ mtm.task_time, CONCAT( '(', su.username, ')', su.nickname) as operator from - besure.mes_ticket_results mtr - left join besure.mes_ticket_management mtm on mtm.id = mtr.management_id - left join besure.system_users su on mtm.operator = su.id + mes_ticket_results mtr + left join mes_ticket_management mtm on mtm.id = mtr.management_id + left join system_users su on mtm.operator = su.id WHERE 1=1 diff --git a/yudao-server/src/main/resources/application-prod.yaml b/yudao-server/src/main/resources/application-prod.yaml index 144211000..f2928e433 100644 --- a/yudao-server/src/main/resources/application-prod.yaml +++ b/yudao-server/src/main/resources/application-prod.yaml @@ -48,17 +48,17 @@ spring: strict: false # 设置为false,当切换数据源失败时使用默认数据源 datasource: master: - name: besure - url: jdbc:mysql://192.168.21.2:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + name: besure_mcs_prod + url: jdbc:mysql://47.106.185.127:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root - password: bst123@QWE + password: T4ke2vckDABYrDR4PFft driver-class-name: com.mysql.cj.jdbc.Driver tdengine: name: tdengine - url: jdbc:TAOS-RS://192.168.21.2:6041/besure_server?charset=UTF-8&locale=en_US.UTF-8 + url: jdbc:TAOS-RS://47.106.185.127:6042/besure_server?charset=UTF-8&locale=en_US.UTF-8 username: root - password: taosdata + password: bs@ngsktdxb1021 driver-class-name: com.taosdata.jdbc.rs.RestfulDriver druid: # TDengine专用配置 initial-size: 1