Merge remote-tracking branch 'origin/main'

# Conflicts:
#	ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
#	ruoyi-admin/src/main/java/com/ruoyi/api/service/IApiService.java
#	ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ApiServiceImpl.java
#	ruoyi-admin/src/main/java/com/ruoyi/job/mapper/MydoJobMapper.java
#	ruoyi-admin/src/main/java/com/ruoyi/job/service/IMydoJobService.java
#	ruoyi-admin/src/main/java/com/ruoyi/job/service/impl/MydoJobServiceImpl.java
#	ruoyi-admin/src/main/java/com/ruoyi/queue/srgv/mapper/WcsSrgvQueueMapper.java
#	ruoyi-admin/src/main/java/com/ruoyi/queue/srgv/service/impl/WcsSrgvQueueServiceImpl.java
#	ruoyi-admin/src/main/java/com/ruoyi/schedule/plcRead/ssj/PlcSsjRead.java
#	ruoyi-admin/src/main/java/com/ruoyi/schedule/scheduleTask/cdz/CdzThread.java
#	ruoyi-admin/src/main/java/com/ruoyi/schedule/scheduleTask/srgv/BaseSRgvThread.java
#	ruoyi-admin/src/main/java/com/ruoyi/schedule/scheduleTask/ssj/SsjThread.java
#	ruoyi-admin/src/main/resources/mapper/device/DeviceSrgvMapper.xml
#	ruoyi-admin/src/main/resources/mapper/job/MydoJobMapper.xml
#	ruoyi-admin/src/main/resources/mapper/queue/WcsSrgvQueueMapper.xml
This commit is contained in:
1009473166@qq.com
2026-07-31 10:36:12 +08:00
10 changed files with 163 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
package com.ruoyi;
import com.ruoyi.schedule.ScheduleThread;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
@Component
public class MyStartupRunner implements CommandLineRunner {
@Autowired
private ScheduleThread scheduleThread;
@Override
public void run(String... args) throws Exception {
// 这里编写项目启动后要执行的方法逻辑
//System.out.println("项目启动成功后自动执行此方法");
// scheduleThread.startAllThread();
// scheduleThread.startAllThread2();
}
}

View File

@@ -0,0 +1,30 @@
package com.ruoyi.algorithm.controller;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.algorithm.service.ITidyService;
import com.ruoyi.common.core.domain.AjaxResult;
@RestController
@RequestMapping("/algorithm/tidy")
public class TidyController {
@Autowired
private ITidyService tidyService;
@PreAuthorize("@ss.hasPermi('algorithm:tidy:query')")
@GetMapping("/status")
public AjaxResult status() { return AjaxResult.success(tidyService.getStatus()); }
@PreAuthorize("@ss.hasPermi('algorithm:tidy:edit')")
@PutMapping("/mode")
public AjaxResult mode(@RequestBody Map<String, String> body) {
try { return AjaxResult.success(tidyService.updateMode(body == null ? null : body.get("mode"))); }
catch (IllegalArgumentException ex) { return AjaxResult.error(ex.getMessage()); }
}
}

View File

@@ -0,0 +1,8 @@
package com.ruoyi.algorithm.service;
import java.util.Map;
public interface ITidyService {
Map<String, Object> getStatus();
Map<String, Object> updateMode(String mode);
}

View File

@@ -0,0 +1,29 @@
package com.ruoyi.algorithm.service.impl;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import org.springframework.stereotype.Service;
import com.ruoyi.algorithm.service.ITidyService;
@Service
public class TidyServiceImpl implements ITidyService {
private final AtomicReference<String> mode = new AtomicReference<>("AUTO");
@Override
public Map<String, Object> getStatus() {
Map<String, Object> result = new LinkedHashMap<>();
result.put("mode", mode.get());
result.put("enabled", true);
return result;
}
@Override
public Map<String, Object> updateMode(String requestedMode) {
if (requestedMode == null || !("AUTO".equalsIgnoreCase(requestedMode) || "MANUAL".equalsIgnoreCase(requestedMode))) {
throw new IllegalArgumentException("mode must be AUTO or MANUAL");
}
mode.set(requestedMode.toUpperCase());
return getStatus();
}
}

View File

@@ -53,6 +53,13 @@ public class Wcs2WmsController {
return apiService.cancelMydoJob(jobParam);
}
/** Return a read-only snapshot of all S-RGV vehicles. */
@PostMapping("/tidyVehicleSnapshot")
public AjaxResult tidyVehicleSnapshot() {
return apiService.tidyVehicleSnapshot();
}

View File

@@ -0,0 +1,23 @@
package com.ruoyi.api.domain.wcs2wms;
import lombok.Data;
/** Read-only vehicle status snapshot exposed to WMS. */
@Data
public class SrgvVehicleSnapshot {
private String guid;
private Integer deviceId;
private String deviceName;
private String agvStatus;
private Boolean online;
private Boolean healthy;
private Boolean idle;
private Integer taskNo;
private Integer alarm;
private Integer errMsg;
private Integer chargeFlag;
private Integer locked;
private Integer battery;
private String currSite;
private Integer currFloor;
}

View File

@@ -6,9 +6,9 @@ spring:
druid:
#主数据信息
master:
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT546-WCS;
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT546-wcs;
username: sa
password: 123456
password: Flrd0914.
# 从库数据源
slave:
# 从数据源开关/默认关闭