浏览代码

/equip-query/equip-components 级联查询bug

lvxianyun 3 年之前
父节点
当前提交
85124efa43
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      src/main/java/com/persagy/proxy/adm/controller/AdmReportEquipController.java

+ 2 - 6
src/main/java/com/persagy/proxy/adm/controller/AdmReportEquipController.java

@@ -84,12 +84,8 @@ public class AdmReportEquipController {
         cascadeSys.setName("linkSystem");
         cascade.add(cascadeSys);
         request.setCascade(cascade);
-        QueryCriteria queryCriteria = AdmQueryCriteriaHelper.toDmpCriteria(request);
-        List<ObjectNode> equips = DigitalObjectFacade.query(AdmContextUtil.toDmpContext().getGroupCode(), AdmContextUtil.toDmpContext().getProjectId(), AdmContextUtil.toDmpContext().getAppId(), null, queryCriteria);
-        if (CollUtil.isEmpty(equips)) {
-            return AdmResponse.success();
-        }
-        List<AdmEquipment> equipmentList = JSONUtil.toList(equips.toString(), AdmEquipment.class);
+        AdmResponse admResponse = equipmentService.doQuery(AdmContextUtil.toDmpContext(), request, AdmEquipment.class);
+        List<AdmEquipment> equipmentList = (List<AdmEquipment>) admResponse.getContent();
         equipmentList.stream().forEach(equip -> {
             if (CollUtil.isNotEmpty(equip.getComponent())) {
                 equip.setCount(equip.getComponent().size());