|
|
@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
@ -101,4 +102,34 @@ public class SysNetworknumController extends BaseController {
|
|
|
|
return AjaxResult.success(obj);
|
|
|
|
return AjaxResult.success(obj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* 网络终端数统计
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/countInfo")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public AjaxResult countInfo() {
|
|
|
|
|
|
|
|
SysDictData sysDictData = new SysDictData();
|
|
|
|
|
|
|
|
sysDictData.setDictType("sys_file_miji");
|
|
|
|
|
|
|
|
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData);
|
|
|
|
|
|
|
|
List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<Long> yAxisData = new ArrayList<>();
|
|
|
|
|
|
|
|
smType.forEach(xAxis -> {
|
|
|
|
|
|
|
|
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
|
|
|
|
|
|
|
|
Integer count = tdPropertyNetService.selectCountMi(xAxis.getDictValue());
|
|
|
|
|
|
|
|
if(Objects.isNull(count)){
|
|
|
|
|
|
|
|
count = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
yAxis.set(Long.valueOf(count));
|
|
|
|
|
|
|
|
yAxisData.add(yAxis.get());
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
JSONObject obj = new JSONObject();
|
|
|
|
|
|
|
|
obj.put("xAxisData", list.toArray());
|
|
|
|
|
|
|
|
obj.put("yAxisData", yAxisData);
|
|
|
|
|
|
|
|
return AjaxResult.success(obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|