|
@@ -110,8 +110,7 @@ public class DeviceController extends BaseController {
|
|
|
startPage();
|
|
|
List<EmsDevice> list = deviceService.selectByAreaTree(queryDevice);
|
|
|
tabInfo = getDataTable(list);
|
|
|
- }
|
|
|
- catch (BusinessException e) {
|
|
|
+ } catch (BusinessException e) {
|
|
|
tabInfo = new TableDataInfo();
|
|
|
tabInfo.setCode(e.getCode());
|
|
|
tabInfo.setMsg(e.getMessage());
|
|
@@ -129,7 +128,7 @@ public class DeviceController extends BaseController {
|
|
|
@RequiresPermissions("basecfg:device:list")
|
|
|
@GetMapping("/getTreeByFacs")
|
|
|
public AjaxResult getTreeByFacs(@RequestParam(value = "areaCode", required = false) String areaCode,
|
|
|
- @RequestParam(value = "deviceCategory", required = false) String deviceCategory) {
|
|
|
+ @RequestParam(value = "deviceCategory", required = false) String deviceCategory) {
|
|
|
QueryDevice queryDevice = new QueryDevice();
|
|
|
queryDevice.setAreaCode(areaCode);
|
|
|
queryDevice.setDeviceCategory(deviceCategory);
|
|
@@ -205,7 +204,12 @@ public class DeviceController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = "/type/online")
|
|
|
- public AjaxResult getDeviceOnlineSummary(@RequestParam("areaCode") String areaCode) {
|
|
|
+ public AjaxResult getDeviceOnlineSummary(@RequestParam(value = "areaCode", required = false) String areaCode) {
|
|
|
return success(deviceService.calcDeviceOnlineSummary(areaCode));
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping(value = "/total/status")
|
|
|
+ public AjaxResult cntTotalDevice(@RequestParam(value = "areaCode", required = false) String areaCode) {
|
|
|
+ return success(deviceService.cntTotalDevice(areaCode));
|
|
|
+ }
|
|
|
}
|