| | |
| | | |
| | | 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; |
| | |
| | | |
| | | @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 |
| | |
| | | res.put("typeYearRes", typeYearRes); |
| | | |
| | | //年度放电任务统计 |
| | | Response disPlanRes = battdischargePlanService.getPlanCountWithTotal(); |
| | | Response disPlanRes = battdischargePlanService.getPlanCountWithTotal(userId); |
| | | res.put("disPlanRes", disPlanRes); |
| | | |
| | | //年度统计-班组 排名 |
| | | Response statisticRes = kpiService.getAnnualStatisticByGroupName(limitN); |
| | | Response statisticRes = kpiService.getAnnualStatisticByGroupName(limitN, userId); |
| | | res.put("statisticRes", statisticRes); |
| | | |
| | | //年度工作考核明细 |
| | | Response detailRes = kpiService.getAnnualDetail(limitN); |
| | | Response detailRes = kpiService.getAnnualDetail(limitN, userId); |
| | | res.put("detailRes", detailRes); |
| | | |
| | | return res; |