企业微信消息推送增加try catch 只记录错误日志,不抛出异常
| | |
| | | //更新设备保养状态 |
| | | 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; |
| | |
| | | //更新设备保养状态 |
| | | 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; |
| | | } |
| | | } |
| | |
| | | |
| | | //微信消息推送(工单完成不推送) |
| | | if (!InspectionStatus.COMPLETE.name().equals(eamInspectionOrder.getInspectionStatus())) { |
| | | sendQywxTemplateCardMessage(eamInspectionOrder, eamInspectionOrderRequest); |
| | | try { |
| | | sendQywxTemplateCardMessage(eamInspectionOrder, eamInspectionOrderRequest); |
| | | } catch (Exception e) { |
| | | log.error("推送企业微信消息失败:" + e.getMessage(), e); |
| | | } |
| | | } |
| | | |
| | | //查询数据,进行设备维修处理 |
| | |
| | | //更新设备维修状态 |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | //更新设备维修状态 |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | //更新设备维修状态 |
| | | eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); |
| | | //推送企业微信消息 |
| | | sendQywxTemplateCardMessage(entity); |
| | | try { |
| | | sendQywxTemplateCardMessage(entity); |
| | | } catch (Exception e) { |
| | | log.error("推送企业微信消息失败:" + e.getMessage(), e); |
| | | } |
| | | return entity; |
| | | } |
| | | |
| | |
| | | //更新设备维修状态 |
| | | eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); |
| | | //推送企业微信消息 |
| | | sendQywxTemplateCardMessage(entity); |
| | | try { |
| | | sendQywxTemplateCardMessage(entity); |
| | | } catch (Exception e) { |
| | | log.error("推送企业微信消息失败:" + e.getMessage(), e); |
| | | } |
| | | return entity; |
| | | } |
| | | |
| | |
| | | //更新设备维修状态 |
| | | eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); |
| | | //推送企业微信消息 |
| | | sendQywxTemplateCardMessage(eamReportRepair); |
| | | try { |
| | | sendQywxTemplateCardMessage(eamReportRepair); |
| | | } catch (Exception e) { |
| | | log.error("推送企业微信消息失败:" + e.getMessage(), e); |
| | | } |
| | | return eamReportRepair; |
| | | } |
| | | |
| | |
| | | //更新设备保养状态 |
| | | 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(); |
| | | } |
| | | } |
| | |
| | | //更新设备保养状态 |
| | | 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; |
| | |
| | | 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; |
| | | } |