|
|
|
|
@ -6,16 +6,14 @@ import com.alibaba.fastjson.JSONPObject;
|
|
|
|
|
import com.ruoyi.common.core.text.Convert;
|
|
|
|
|
import com.ruoyi.system.domain.BoxOutputByType;
|
|
|
|
|
import com.ruoyi.system.domain.BoxPlanCompletion;
|
|
|
|
|
import com.ruoyi.system.domain.BoxStock;
|
|
|
|
|
import com.ruoyi.system.domain.EchartsDTO;
|
|
|
|
|
import com.ruoyi.system.service.IBroadDataService;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@ -46,16 +44,26 @@ public class BoxBroadController {
|
|
|
|
|
return JSONObject.toJSONString(completion);
|
|
|
|
|
}
|
|
|
|
|
// 库存
|
|
|
|
|
@PostMapping("/selectStock")
|
|
|
|
|
public String selectStock(){
|
|
|
|
|
return JSONObject.toJSONString(service.selectStock());
|
|
|
|
|
@PostMapping("/selectStock/{id}")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String selectStock(@PathVariable("id")String id){
|
|
|
|
|
|
|
|
|
|
List<Long> seriesInfo = new ArrayList<Long>();
|
|
|
|
|
List<String> xAxisInfo = new ArrayList<String>();
|
|
|
|
|
List<BoxStock> list=service.selectStock(id);
|
|
|
|
|
list.stream().forEach(t->{
|
|
|
|
|
seriesInfo.add(Long.valueOf(t.getStock()));
|
|
|
|
|
xAxisInfo.add(t.getOrder_type());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return JSONObject.toJSONString(new EchartsDTO(xAxisInfo,seriesInfo));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 按类型查询产量
|
|
|
|
|
@PostMapping("/selectOutputByType")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String selectOutputByType(){
|
|
|
|
|
// List<BoxOutputByType> boxOutputByType=service.selectOutputByType();
|
|
|
|
|
// return JSONArray.toJSONString(boxOutputByType);
|
|
|
|
|
|
|
|
|
|
EchartsDTO echarts = new EchartsDTO();
|
|
|
|
|
List<Long> seriesInfo = new ArrayList<Long>();
|
|
|
|
|
List<String> xAxisInfo = new ArrayList<String>();
|
|
|
|
|
|