zhoufan před 1 rokem
rodič
revize
4be55003b1

+ 5 - 0
midware-api/src/main/java/midware/controller/HomeController.java

72
         return EslCommon.agents.stream().anyMatch(p -> p.getAgentState() == 2) ? "1" : "0";
72
         return EslCommon.agents.stream().anyMatch(p -> p.getAgentState() == 2) ? "1" : "0";
73
     }
73
     }
74
 
74
 
75
+    @GetMapping("/agentfreecount")
76
+    public AjaxResult AgentFreeCount() {
77
+        return Success("", EslCommon.agents.stream().filter(p -> p.getAgentState() == 2).count());
78
+    }
79
+
75
     @GetMapping("/esl")
80
     @GetMapping("/esl")
76
     public AjaxResult Esl() {
81
     public AjaxResult Esl() {
77
         Map<String, Object> map = new HashMap<>();
82
         Map<String, Object> map = new HashMap<>();