Browse Source

原末端数量

caiaf 4 years ago
parent
commit
5c26e1ce09

+ 2 - 2
datacenter/src/main/kotlin/com/persagy/server/controllers/relation_calc/MepSystemCalcController.kt

@@ -87,9 +87,9 @@ class MepSystemCalcController {
         val projectId = SPageContext.getHeader("projectId").toString()
         val mems = mepSystemCalc.mepSourceTypeService.select(SFilter.eq("projectId", projectId), SFilter.eq("calcName", calcName!!)).order("calcName").exec()
         for (mem in mems) {
-            val eCounts = EquipmentService.select(SFilter.eq("projectId", projectId),SFilter.eq("classCode", mem.sourceType!!)).count
+            val eCounts = EquipmentService.select(SFilter.eq("projectId", projectId),SFilter.eq("classCode", mem.sourceType!!)).execCount()
             if(eCounts != null){
-                mem.sourceCount = eCounts
+                mem.sourceCount = eCounts.toInt()
             }else {
                 mem.sourceCount = 0
             }

+ 2 - 2
datacenter/src/main/resources/application-test.yml

@@ -25,8 +25,8 @@ server:
 
 spring:
   datasource:
-#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
-    url:                                jdbc:postgresql://datacenter:5432/datacenterlabsl
+    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+    #url:                                jdbc:postgresql://datacenter:5432/datacenterlabsl
 #    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
 #    url:                                jdbc:postgresql://datacenter:5432/datacenter
     username:                           postgres