lxw
2023-05-25 f3c27fb78447449a950ba73c5e72ceda64ad8a12
src/main/java/com/whyc/webSocket/taskMLeaderWebSocket.java
@@ -2,6 +2,7 @@
import com.whyc.config.WebSocketConfig;
import com.whyc.dto.Response;
import com.whyc.pojo.UserInf;
import com.whyc.service.BattdischargePlanService;
import com.whyc.service.FaultUploadService;
import com.whyc.service.KPIService;
@@ -60,9 +61,9 @@
    @OnMessage
    public void onMessage(Session session, String message) {
        /*UserInf user = (UserInf) this.httpSession.getAttribute("user");
        final int userId = user.getUId().intValue();*/
        final int userId = 1041;
        UserInf user = (UserInf) this.httpSession.getAttribute("user");
        final int userId = user.getUId().intValue();
        //final int userId = 1041;
        Integer limitN = Integer.valueOf(message);
        thread = new Thread("Thread_RealTime") {
            @Override
@@ -139,6 +140,10 @@
        Response statisticRes = kpiService.getAnnualStatisticByGroupName(limitN, userId);
        res.put("statisticRes", statisticRes);
        //年度统计-班组和用户
        Response allStaicRes = kpiService.getAnnualStatisticByGroupNameAndUser(userId);
        res.put("allStaicRes", allStaicRes);
        //年度工作考核明细
        Response detailRes = kpiService.getAnnualDetail(limitN, userId);
        res.put("detailRes", detailRes);