Browse Source

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

lvxianyun 3 years ago
parent
commit
85124efa43

+ 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());