From 699295ce3e0e1116d1fc20f0fae89b66613bbacf Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期四, 28 八月 2025 17:40:51 +0800
Subject: [PATCH] 企业微信消息推送增加try catch 只记录错误日志,不抛出异常

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamWeekMaintenanceOrderServiceImpl.java |   18 +++++++-
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java          |   18 +++++++-
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java         |   18 +++++++-
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java      |   18 +++++++-
 4 files changed, 60 insertions(+), 12 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java
index 93f2f09..53a7cf3 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java
@@ -235,7 +235,11 @@
             //鏇存柊璁惧淇濆吇鐘舵��
             eamEquipmentExtendService.updateEquipmentInspectionStatus(eamInspectionOrder.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_INSPECTION.name());
             //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-            sendQywxTemplateCardMessage(eamInspectionOrder, null);
+            try {
+                sendQywxTemplateCardMessage(eamInspectionOrder, null);
+            } catch (Exception e) {
+                log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+            }
         }
 
         return true;
@@ -432,7 +436,11 @@
             //鏇存柊璁惧淇濆吇鐘舵��
             eamEquipmentExtendService.updateEquipmentInspectionStatus(eamInspectionOrder.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_INSPECTION.name());
             //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-            sendQywxTemplateCardMessage(eamInspectionOrder, null);
+            try {
+                sendQywxTemplateCardMessage(eamInspectionOrder, null);
+            } catch (Exception e) {
+                log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+            }
             return true;
         }
     }
@@ -513,7 +521,11 @@
 
             //寰俊娑堟伅鎺ㄩ�侊紙宸ュ崟瀹屾垚涓嶆帹閫侊級
             if (!InspectionStatus.COMPLETE.name().equals(eamInspectionOrder.getInspectionStatus())) {
-                sendQywxTemplateCardMessage(eamInspectionOrder, eamInspectionOrderRequest);
+                try {
+                    sendQywxTemplateCardMessage(eamInspectionOrder, eamInspectionOrderRequest);
+                } catch (Exception e) {
+                    log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+                }
             }
 
             //鏌ヨ鏁版嵁,杩涜璁惧缁翠慨澶勭悊
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java
index ea48b01..81ed54b 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java
@@ -221,7 +221,11 @@
             //鏇存柊璁惧缁翠慨鐘舵��
             eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.UNDER_REPAIR.name());
             //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-            sendQywxTemplateCardMessage(eamRepairOrder, eamReportRepair, null);
+            try {
+                sendQywxTemplateCardMessage(eamRepairOrder, eamReportRepair, null);
+            } catch (Exception e) {
+                log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+            }
         }
     }
 
@@ -268,7 +272,11 @@
             //鏇存柊璁惧缁翠慨鐘舵��
             eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.UNDER_REPAIR.name());
             //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-            sendQywxTemplateCardMessage(eamRepairOrder, null, null);
+            try {
+                sendQywxTemplateCardMessage(eamRepairOrder, null, null);
+            } catch (Exception e) {
+                log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+            }
         }
     }
 
@@ -547,7 +555,11 @@
         eamReportRepairService.updateById(eamReportRepair);
         if (!ReportRepairEnum.COMPLETE.name().equals(eamRepairOrder.getRepairStatus())) {
             //鎺ㄩ�佷紒涓氬井淇℃秷鎭紙娴佺▼瀹岀粨涓嶅彂閫佹秷鎭級
-            sendQywxTemplateCardMessage(eamRepairOrder, eamReportRepair, request);
+            try {
+                sendQywxTemplateCardMessage(eamRepairOrder, eamReportRepair, request);
+            } catch (Exception e) {
+                log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+            }
         }
         return eamRepairOrder;
     }
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java
index ef674b6..66933db 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java
@@ -164,7 +164,11 @@
         //鏇存柊璁惧缁翠慨鐘舵��
         eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name());
         //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-        sendQywxTemplateCardMessage(entity);
+        try {
+            sendQywxTemplateCardMessage(entity);
+        } catch (Exception e) {
+            log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+        }
         return entity;
     }
 
@@ -196,7 +200,11 @@
         //鏇存柊璁惧缁翠慨鐘舵��
         eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name());
         //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-        sendQywxTemplateCardMessage(entity);
+        try {
+            sendQywxTemplateCardMessage(entity);
+        } catch (Exception e) {
+            log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+        }
         return entity;
     }
 
@@ -225,7 +233,11 @@
         //鏇存柊璁惧缁翠慨鐘舵��
         eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name());
         //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-        sendQywxTemplateCardMessage(eamReportRepair);
+        try {
+            sendQywxTemplateCardMessage(eamReportRepair);
+        } catch (Exception e) {
+            log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+        }
         return eamReportRepair;
     }
 
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamWeekMaintenanceOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamWeekMaintenanceOrderServiceImpl.java
index 4de4d66..4c885b6 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamWeekMaintenanceOrderServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamWeekMaintenanceOrderServiceImpl.java
@@ -153,7 +153,11 @@
                 //鏇存柊璁惧淇濆吇鐘舵��
                 eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_MAINTENANCE.name());
                 //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-                sendQywxTemplateCardMessage(order, null);
+                try {
+                    sendQywxTemplateCardMessage(order, null);
+                } catch (Exception e) {
+                    log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+                }
                 return result.isSuccess();
             }
         }
@@ -345,7 +349,11 @@
             //鏇存柊璁惧淇濆吇鐘舵��
             eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_MAINTENANCE.name());
             //鎺ㄩ�佷紒涓氬井淇℃秷鎭�
-            sendQywxTemplateCardMessage(entity, null);
+            try {
+                sendQywxTemplateCardMessage(entity, null);
+            } catch (Exception e) {
+                log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+            }
             return result.isSuccess();
         }
         return true;
@@ -658,7 +666,11 @@
         eamWeekMaintenanceOrderMapper.updateById(entity);
         //鎺ㄩ�佷紒涓氬井淇℃秷鎭紝宸ュ崟瀹岀粨涓嶅彂閫�
         if (!WeekMaintenanceStatusEnum.COMPLETE.name().equals(entity.getMaintenanceStatus())) {
-            sendQywxTemplateCardMessage(entity, request);
+            try {
+                sendQywxTemplateCardMessage(entity, request);
+            } catch (Exception e) {
+                log.error("鎺ㄩ�佷紒涓氬井淇℃秷鎭け璐ワ細" + e.getMessage(), e);
+            }
         }
         return entity;
     }

--
Gitblit v1.9.3