SchedulePlanController.java
1.19 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.bsth.controller.plan;
import com.alibaba.fastjson.JSONArray;
import com.bsth.data.utils.HttpClientUtils;
import com.bsth.data.utils.RsRequestUtils;
import com.bsth.util.ConfigUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 计划排班
*/
@RestController
@RequestMapping("plan_sch")
public class SchedulePlanController {
static String dataUrl;
Logger logger = LoggerFactory.getLogger(this.getClass());
static {
dataUrl = ConfigUtil.get("data.base.url") + "/rest/schedule";
}
@RequestMapping("findInOutPlan")
public List<Object> findInOutPlan(@RequestParam String rq,@RequestParam String lineCode) {
List<Object> rs = null;
try {
StringBuilder sb = HttpClientUtils.get(dataUrl + "/plan_inout/" + rq + "/" + lineCode + RsRequestUtils.getParams());
rs = JSONArray.parseArray(sb.toString());
} catch (Exception e) {
logger.error("", e);
}
return rs;
}
}