| | |
| | | package com.sandu.ximon.admin.quartz; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.sandu.common.util.SpringContextHolder; |
| | | import com.sandu.common.util.ThrowableUtil; |
| | | import com.sandu.ximon.admin.service.*; |
| | | import com.sandu.ximon.dao.domain.LightTask; |
| | | import com.sandu.ximon.dao.domain.LightTaskQuartz; |
| | | import com.sandu.ximon.dao.domain.LightTaskQuartzLog; |
| | | import org.quartz.JobExecutionContext; |
| | |
| | | try { |
| | | // 任务绑定的灯杆 |
| | | List<Long> poleIdList = lightTaskPoleRelationService.listPoleIdByTaskId(taskId); |
| | | String lightAdress = lightTaskService.getOne(Wrappers.lambdaQuery(LightTask.class).eq(LightTask::getTaskId, taskId)).getLightAdress(); |
| | | // 灯杆的设备码 |
| | | List<String> deviceCodeList = poleService.listDeviceCodeByIds(poleIdList); |
| | | |
| | |
| | | if (lightTaskQuartz != null) { |
| | | for (String deviceCode : deviceCodeList) { |
| | | // 定时给每个设备吗发送灯控请求 |
| | | lightTaskService.sendTimeRRpc(lightTaskQuartz.getFramePayload(), deviceCode); |
| | | lightTaskService.sendTimeRRpc(lightTaskQuartz.getFramePayload(), deviceCode, lightAdress); |
| | | } |
| | | log.setFramePayload(lightTaskQuartz.getFramePayload()); |
| | | } |