فهرست منبع

开发监视接口

xieshengjie 2 سال پیش
والد
کامیت
11dc6ee334

+ 3 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/monitor/ComprehensiveController.java

@@ -52,9 +52,10 @@ public class ComprehensiveController {
     @GetMapping("/wttargets")
     @ResponseBody
     @ApiOperation(value = "数据指标-获取指标", notes = "数据指标-获取指标")
-    public R wttargets(@RequestParam(value = "type",required = true) String type)  {
+    public R wttargets(@RequestParam(value = "type",required = true) String type,
+                       @RequestParam(value = "part",required = true) String part)  {
 
-        List<ProEconTestingPoint> resultList = comprehensiveService.wttargets(type);
+        List<ProEconTestingPoint> resultList = comprehensiveService.wttargets(type,part);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{

+ 5 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/ComprehensiveService.java

@@ -10,6 +10,7 @@ import com.gyee.common.vo.monitor.CompreVo;
 import com.gyee.runeconomy.init.CacheContext;
 import com.gyee.runeconomy.model.auto.*;
 import com.gyee.runeconomy.service.auto.IProEconTestingPointService;
+import com.gyee.runeconomy.util.StringUtils;
 import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
 import org.springframework.stereotype.Service;
 
@@ -42,7 +43,7 @@ public class ComprehensiveService {
         return list;
     }
 
-    public List<ProEconTestingPoint> wttargets(String type) {
+    public List<ProEconTestingPoint> wttargets(String type,String part) {
         QueryWrapper<ProEconTestingPoint> qw = new QueryWrapper<>();
         qw.select(" DISTINCT uniform_code,name ").lambda().like(ProEconTestingPoint::getUniformCode,"AI");
         if (type.equals("-1")){
@@ -50,6 +51,9 @@ public class ComprehensiveService {
         }else if(type.equals("-2")){
             qw.lambda().eq(ProEconTestingPoint::getTypeId,"G");
         }
+        if (StringUtils.isNotEmpty(part)){
+            qw.lambda().eq(ProEconTestingPoint::getLogicalUnitId,part);
+        }
 
         List<ProEconTestingPoint> list = proEconTestingPointService.list(qw);