| | |
| | | import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Value("${wechatEnterprise.cardActionUrl}") |
| | | private String cardActionUrl; |
| | | |
| | | /** |
| | | * 分页列表 |
| | |
| | | //更新设备维修状态 |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.REPAIR_ORDER_CODE_RULE); |
| | | eamRepairOrder.setRepairCode(codeSeq); |
| | | EamReportRepair eamReportRepair = eamReportRepairService.getById(eamReportRepairQuery.getId()); |
| | | eamRepairOrder.setReportId(eamReportRepairQuery.getId()); |
| | | eamRepairOrder.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | eamRepairOrder.setEquipmentId(eamReportRepair.getEquipmentId()); |
| | | eamRepairOrder.setRepairStatus(ReportRepairEnum.UNDER_REPAIR.name()); |
| | |
| | | //更新设备维修状态 |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | TemplateCardEntity.CardAction cardAction = new TemplateCardEntity.CardAction(); |
| | | cardAction.setType(1); |
| | | cardAction.setUrl("http://houjie.xalxzn.com:8866/h5"); |
| | | cardAction.setUrl(cardActionUrl); |
| | | templateCardEntity.setCard_action(cardAction); |
| | | |
| | | wechatEnterpriseService.sendTemplateCardMsg(templateCard, true); |
| | |
| | | values.put("dataId", eamRepairOrder.getId()); |
| | | values.put("organization", "维修工单进入等备件状态"); |
| | | values.put("comment", "维修工单进入等备件状态"); |
| | | values.put("NextAssignee", Arrays.asList(equipment.getEquipmentManager().split(","))); |
| | | values.put("NextAssignee", equipment.getEquipmentManager().split(",")); |
| | | values.put("status", 1); |
| | | request.setComment("维修工单进入等备件状态"); |
| | | eamRepairOrder.setRepairStatus(ReportRepairEnum.WAIT_SPARES.name()); |
| | |
| | | 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; |
| | | } |