#
Junjie
2026-01-15 6200ba627af8af4045155c1bd7e65220ce59d6ba
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -40,6 +40,10 @@
    @Value("${mainProcessPlugin}")
    private String mainProcessPlugin;
    @Value("${app.version:1.0.0}")
    private String appVersion;
    @Value("${app.version-type:stable}")
    private String appVersionType;
    @Autowired
    private CommonService commonService;
    @Autowired
@@ -51,7 +55,7 @@
    @Autowired
    private DeviceConfigService deviceConfigService;
    //移库任务
    // 移库任务
    @PostMapping("/createLocMoveTask")
    @OpenApiLog(memo = "移库任务")
    public R createLocMoveTask(@RequestBody CreateLocMoveTaskParam param) {
@@ -65,7 +69,7 @@
        return R.error("生成移库任务失败");
    }
    //入库任务
    // 入库任务
    @PostMapping("/createInTask")
    @OpenApiLog(memo = "入库任务")
    public R createInTask(@RequestBody CreateInTaskParam param) {
@@ -79,7 +83,7 @@
        return R.error("生成入库任务失败");
    }
    //出库任务
    // 出库任务
    @PostMapping("/createOutTask")
    @OpenApiLog(memo = "出库任务")
    public R createOutTask(@RequestBody CreateOutTaskParam param) {
@@ -93,7 +97,7 @@
        return R.error("生成出库任务失败");
    }
    //批量出库任务
    // 批量出库任务
    @PostMapping("/createOutTaskBatch")
    @OpenApiLog(memo = "批量出库任务")
    @Transactional
@@ -143,10 +147,10 @@
    }
    @RequestMapping("/deviceStatus")
//    @OpenApiLog(memo = "获取设备状态")
    // @OpenApiLog(memo = "获取设备状态")
    public R getDeviceStatus() {
        HashMap<String, Object> map = new HashMap<>();
        //获取堆垛机数据
        // 获取堆垛机数据
        ArrayList<CrnProtocol> crnProtocols = new ArrayList<>();
        List<DeviceConfig> crnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
                .eq("device_type", String.valueOf(SlaveType.Crn)));
@@ -163,7 +167,7 @@
            crnProtocols.add(crnProtocol);
        }
        //获取RGV数据
        // 获取RGV数据
        ArrayList<RgvProtocol> rgvProtocols = new ArrayList<>();
        List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
                .eq("device_type", String.valueOf(SlaveType.Rgv)));
@@ -240,13 +244,13 @@
    @OpenApiLog(memo = "查询任务")
    public R queryTask(@RequestBody QueryTaskParam param) {
        EntityWrapper<WrkMast> wrapper = new EntityWrapper<>();
        if(param.getTaskNo() != null) {
        if (param.getTaskNo() != null) {
            wrapper.eq("wms_wrk_no", param.getTaskNo());
        }
        if(param.getTaskType() != null) {
        if (param.getTaskType() != null) {
            WrkIoType ioType = WrkIoType.get(param.getTaskType());
            if(ioType == null) {
            if (ioType == null) {
                return R.error("任务类型不存在");
            }
            wrapper.eq("io_type", ioType.id);
@@ -260,15 +264,23 @@
        return R.ok();
    }
    @GetMapping("/getSystemVersion")
    public R getSystemVersion() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("version", appVersion);
        map.put("versionType", appVersionType);
        return R.ok().add(map);
    }
    @GetMapping("/getFakeSystemRunStatus")
    public R getFakeSystemRunStatus() {
        HashMap<String, Object> map = new HashMap<>();
        if(mainProcessPlugin.contains("Fake")) {
        if (mainProcessPlugin.contains("Fake")) {
            map.put("running", false);
            map.put("isFake", true);
            Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake"));
            if(config != null) {
                if(config.getValue().equals("Y")) {
            if (config != null) {
                if (config.getValue().equals("Y")) {
                    map.put("running", true);
                }
            }
@@ -282,7 +294,7 @@
    @OpenApiLog(memo = "启动仿真模拟")
    public R startFakeSystem() {
        Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake"));
        if(config != null) {
        if (config != null) {
            config.setValue("Y");
            configService.updateById(config);
        }
@@ -293,7 +305,7 @@
    @OpenApiLog(memo = "停止仿真模拟")
    public R stopFakeSystem() {
        Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake"));
        if(config != null) {
        if (config != null) {
            config.setValue("N");
            configService.updateById(config);
        }