Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/BDTP/adm-middleware into develop

lvxianyun 3 years ago
parent
commit
49c44f1fcd

+ 1 - 1
docker/k8sfiles/adm-middleware.yml

@@ -63,6 +63,6 @@ spec:
         - name: persagy.common.auth.channel
           value: "1"
         - name: saas.ems.web.service
-          value: "http://ems-saas-web:8080"
+          value: "http://revit-algorithm:8080"
         - name: persagy.common.sql.limit
           value: "100000"

+ 8 - 1
src/main/java/com/persagy/proxy/report/controller/AdmReportEquipController.java

@@ -87,6 +87,7 @@ public class AdmReportEquipController {
         cascade.add(cascadeSys);
         request.setCascade(cascade);
         AdmResponse admResponse = equipmentService.query(request);
+        Boolean showComponentFlag = false;
         List<AdmEquipment> equipmentList = (List<AdmEquipment>) admResponse.getContent();
         if(CollUtil.isNotEmpty(equipmentList)){
             equipmentList.stream().forEach(equip -> {
@@ -111,11 +112,14 @@ public class AdmReportEquipController {
             AdmEquipment admEquipment = equipmentList.get(0);
             QueryCriteria defineCriteria = new QueryCriteria();
             ObjectNode criteria = JsonNodeFactory.instance.objectNode();
-            criteria.put("code", admEquipment.getClassCode());
+            criteria.put("equipmentCode", admEquipment.getClassCode());
             defineCriteria.setCriteria(criteria);
             AdmResponse defRes = dictService.doQueryObjectType(AdmContextUtil.toDmpContext(), defineCriteria, AdmObjectType.class);
             if (CollUtil.isNotEmpty(defRes.getContent())) {
                 List<AdmObjectType> componentCategory = (List<AdmObjectType>) defRes.getContent();
+                if(CollUtil.isNotEmpty(componentCategory)){
+                    showComponentFlag = true;
+                }
                 admEquipment.setComponentCategory(componentCategory);
                 equipmentList.set(0, admEquipment);
             }
@@ -124,6 +128,9 @@ public class AdmReportEquipController {
         }
         AdmResponse response = AdmResponse.success(equipmentList, request);
         response.setTotal(admResponse.getTotal());
+        if(showComponentFlag){
+            response.setMessage("1");
+        }
         return response;
     }