diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysPropertynumController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysPropertynumController.java index c4ba891..bad0b72 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysPropertynumController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysPropertynumController.java @@ -130,7 +130,7 @@ public class SysPropertynumController extends BaseController { return AjaxResult.success(obj); } - private List bf = Arrays.asList("未报废", "已报废"); + private List bf = Arrays.asList("信息设备未报废", "信息设备已报废","设备未报废", "设备已报废"); private List xh = Arrays.asList("未销毁", "已销毁"); @@ -146,10 +146,18 @@ public class SysPropertynumController extends BaseController { List datas = bf.stream() .map(name -> { AtomicReference value = new AtomicReference<>(0L); - if ("未报废".equals(name)) { + if ("信息设备未报废".equals(name)) { value.set(propertyStateCountDTO.getWbf()); - } else { + } else if("信息设备已报废".equals(name)) { value.set(propertyStateCountDTO.getYbf()); + } else if("设备未报废".equals(name)) { + value.set(tdPropertyEmentService.lambdaQuery() + .eq(TdPropertyEment::getDestoryType,0) + .count()); + }else{ + value.set(tdPropertyEmentService.lambdaQuery() + .eq(TdPropertyEment::getDestoryType,1) + .count()); } JSONObject jsonObject = new JSONObject(); jsonObject.put("value", value.get());