#
Junjie
2026-01-14 4a1724d674177968dfb5e03c2f3a87ff12788894
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.zy.asrs.controller;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
 
import com.alibaba.fastjson.JSONObject;
import com.core.common.R;
import com.zy.asrs.service.PlannerService;
 
@RestController
public class PlannerController {
 
    @Autowired
    private PlannerService plannerService;
 
    @GetMapping("/planner/calc")
    public R plannerCalc() {
        JSONObject result = plannerService.calculateAndSaveSchedule();
        if (result == null) {
            return R.error("求解失败");
        }
        return R.ok(result);
    }
}