Browse Source

2023-11-20 项目初始

develop
zhousq 1 year ago
parent
commit
5e4d1521e4
  1. 42
      lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java

42
lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java

@ -151,33 +151,31 @@ public class DcBusiDataScreenMainController extends BaseController{
List<DcBusiDataScreenVo> real = dcBusiDataScreenMainService.selectSquareRealDetail(qdate); List<DcBusiDataScreenVo> real = dcBusiDataScreenMainService.selectSquareRealDetail(qdate);
List<DcBusiDataScreenVo> self = dcBusiDataScreenMainService.selectSquareSelfDetail(qdate); List<DcBusiDataScreenVo> self = dcBusiDataScreenMainService.selectSquareSelfDetail(qdate);
List<DcBusiDataScreenVo> group = dcBusiDataScreenMainService.selectSquareGroup(qdate); List<DcBusiDataScreenVo> group = dcBusiDataScreenMainService.selectSquareGroup(qdate);
JSONArray product=new JSONArray(); JSONObject all=new JSONObject();
JSONArray realcost=new JSONArray(); group.forEach(item->{
product.add("real_name"); all.put(item.getCoallost(),item.getMonthAll());
realcost.add("real_value"); all.put("unit",item.getTargetUnit());
AtomicReference<String> unit = new AtomicReference<>(); });
JSONArray out=new JSONArray();
real.forEach(item->{ real.forEach(item->{
product.add(item.getCompanyName()); JSONObject tmp=new JSONObject();
realcost.add(StringUtils.getfomatDouble(item.getMonthAll())); tmp.put("name",item.getCompanyName());
unit.set(item.getTargetUnit()); tmp.put("value",item.getMonthAll());
tmp.put("unit",item.getTargetUnit());
out.add(tmp);
}); });
JSONArray product_2=new JSONArray(); JSONArray in=new JSONArray();
JSONArray realcost_2=new JSONArray();
product_2.add("self_name");
realcost_2.add("self_value");
self.forEach(item->{ self.forEach(item->{
product_2.add(item.getCompanyName()); JSONObject tmp=new JSONObject();
realcost_2.add(StringUtils.getfomatDouble(item.getMonthAll())); tmp.put("name",item.getCompanyName());
//unit.set(item.getTargetUnit()); tmp.put("value",item.getMonthAll());
tmp.put("unit",item.getTargetUnit());
in.add(tmp);
}); });
JSONArray list=new JSONArray();
list.add(product);
list.add(realcost);
list.add(product_2);
list.add(realcost_2);
JSONObject ret=new JSONObject(); JSONObject ret=new JSONObject();
ret.put("source",list); ret.put("all",all);
ret.put("unit",unit.get()); ret.put("outCircle",out);
ret.put("inCircle",in);
return AjaxResult.success(ret); return AjaxResult.success(ret);
} }
/** /**

Loading…
Cancel
Save