1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package com.warewms.job.task;
- import com.warewms.service.HeXunDataService;
- import com.warewms.service.MachAlarmRecordsService;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Component;
- /**
- * WMS定时任务
- *
- * testTask为spring bean的名称
- *
- * @author Mark sunlightcs@gmail.com
- * @since 1.2.0 2016-11-28
- */
- @Slf4j
- @Component("wareWmsTask")
- public class WareWmsTask {
- @Autowired
- private HeXunDataService heXunDataService;
- @Autowired
- private MachAlarmRecordsService machAlarmRecordsService;
- /**
- * 定时回传报警信息
- */
- public void exec(){
- machAlarmRecordsService.saveUnrecordedAlarm4MachineOne();
- machAlarmRecordsService.saveUnrecordedAlarm4MachineTwo();
- heXunDataService.uploadAlarmData();
- }
- /**
- * 定时回传检测点信息
- */
- public void uploadPointData() {
- log.info("------------------回传检测点信息------------------");
- heXunDataService.uploadPointOneData();
- heXunDataService.uploadPointTwoData();
- }
- /**
- * 定时回传机器人信息
- */
- public void uploadRobotData() {
- log.info("------------------回传机器人信息------------------");
- heXunDataService.uploadRobotOneData();
- heXunDataService.uploadRobotTwoData();
- }
- }
|