添加调度按钮,修改顶部国际化
This commit is contained in:
@@ -63,4 +63,13 @@ public class ThreadOperationController {
|
||||
scheduleThread.stopAllThread2();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取调度状态
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getScheduleStatus")
|
||||
public AjaxResult getScheduleStatus() {
|
||||
return AjaxResult.success(scheduleThread.getScheduleStatus());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,14 +12,17 @@ import com.ruoyi.schedule.scheduleTask.ssj.js.JsInSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.js.JsOutSsjThread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.js.JsPickSsjTread;
|
||||
import com.ruoyi.schedule.scheduleTask.ssj.monitor.SsjMonitorThread;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ScheduleThread {
|
||||
|
||||
public CustomThread<PlcRead> customThread;
|
||||
@@ -34,16 +37,21 @@ public class ScheduleThread {
|
||||
public CustomThread<JsPickSsjTread> jsPickSsjThread;
|
||||
public CustomThread<SsjMonitorThread> ssjMonitorThread;
|
||||
|
||||
|
||||
private boolean isRun = false;
|
||||
private boolean isRun2 = false;
|
||||
|
||||
/**
|
||||
* 项目初始化启动
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
log.info("初始化调度服务");
|
||||
//读取信息初始化
|
||||
plcReadInit();
|
||||
|
||||
//调度初始化
|
||||
scheduleInit();
|
||||
log.info("调度服务执行成功");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,6 +100,7 @@ public class ScheduleThread {
|
||||
*/
|
||||
public void startAllThread() {
|
||||
customThread.getThread().start();
|
||||
isRun = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,6 +122,8 @@ public class ScheduleThread {
|
||||
//jsPickSsjThread.getThread().start();
|
||||
//监控输送机
|
||||
//ssjMonitorThread.getThread().start();
|
||||
|
||||
isRun2 = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,6 +132,7 @@ public class ScheduleThread {
|
||||
public void stopAllThread() {
|
||||
customThread.runnable.isRun = false;
|
||||
plcReadInit();
|
||||
isRun = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,7 +146,16 @@ public class ScheduleThread {
|
||||
bsPickSsjThread.runnable.isRun = false;
|
||||
jsPickSsjThread.runnable.isRun = false;
|
||||
scheduleInit();
|
||||
isRun2 = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取调度状态
|
||||
*/
|
||||
public HashMap<String,Boolean> getScheduleStatus() {
|
||||
HashMap<String,Boolean> map = new HashMap<>();
|
||||
map.put("isRun",isRun);
|
||||
map.put("isRun2",isRun2);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ public class PlcRead implements Runnable {
|
||||
|
||||
void closeServer() {
|
||||
if (readWriteNet != null) {
|
||||
siemensS7Net.ConnectClose();
|
||||
readWriteNet.ConnectClose();
|
||||
}
|
||||
setIsConnect(false);
|
||||
}
|
||||
|
||||
@@ -108,6 +108,8 @@ public class BsOutSsjThread implements Runnable {
|
||||
if (CollUtil.isNotEmpty(agvQueueList)){
|
||||
for (AgvQueue queue : agvQueueList) {
|
||||
apiService.requestAgvQueue(queue);
|
||||
agvQueue.setStatus("1");
|
||||
agvQueueService.updateAgvQueue(queue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ server:
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.ruoyi: error
|
||||
com.ruoyi: debug
|
||||
org.springframework: warn
|
||||
|
||||
# 用户配置
|
||||
|
||||
Reference in New Issue
Block a user