Browse Source

解决:系统台账—-空调末端系统台账的系统详情页面--系统内设备--添加设备页面,无翻页功能,只展现第一页的数据

yucheng 3 years ago
parent
commit
f0b99769ce

+ 6 - 11
src/main/java/com/persagy/proxy/object/controller/AdmSystemController.java

@@ -29,6 +29,7 @@ import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
 import com.persagy.proxy.adm.utils.ObjectNameUtil;
 import com.persagy.proxy.common.entity.RelationDTO;
 import com.persagy.proxy.object.model.*;
+import com.persagy.proxy.object.service.IAdmEquipmentService;
 import com.persagy.proxy.object.service.IAdmProjectService;
 import com.persagy.proxy.object.service.IAdmSystemService;
 import com.persagy.proxy.report.model.SystemPointExcel;
@@ -62,6 +63,8 @@ public class AdmSystemController {
     private IAdmRelationService relationService;
     @Autowired
     private IAdmProjectService projectService;
+    @Autowired
+    private IAdmEquipmentService equipmentService;
 
     /**
      * 统计
@@ -270,18 +273,10 @@ public class AdmSystemController {
      */
     @PostMapping("/un-sys-equip")
     public AdmResponse queryUnEquip( @NotNull @QueryParam("sysId") String sysId,
-                                     @RequestBody AdmQueryCriteria request) throws Exception {
-        //AdmResponse admResponse = queryObjectByType(sysId,request,"Sy2Eq","MechSubset", AdmEquipment.OBJ_TYPE);
-        ObjectNode relationTo = JsonNodeFactory.instance.objectNode();
-        relationTo.put("objFrom", sysId);
-        relationTo.put("relCode", "Sy2Eq");
-        relationTo.put("graphCode", "MechSubset");
-        relationTo.put("$bindFlag", false);
-        request.setRelationTo(relationTo);
+                                     @RequestBody AdmQueryCriteria request) {
         request.setName(AdmEquipment.OBJ_TYPE);
-        QueryCriteria queryCriteriaObj = AdmQueryCriteriaHelper.toDmpCriteria(request);
-        List<ObjectNode> obj = DigitalObjectFacade.query(AdmContextUtil.toDmpContext().getGroupCode(),AdmContextUtil.toDmpContext().getProjectId(), AdmContextUtil.toDmpContext().getAppId(), null, queryCriteriaObj);
-        return AdmResponse.success(obj,request);
+        request.resetRelationCond(false, "MechSubset", "Sy2Eq", sysId, false);
+        return equipmentService.doQuery(AdmContextUtil.toDmpContext(), request, AdmEquipment.class);
     }