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);
|
}
|
}
|