whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/webSocket/HrTmpFlowWebSocket.java
@@ -51,7 +51,8 @@
        UserInf user = (UserInf) this.httpSession.getAttribute("user");
        final int uId = user.getUId().intValue();
        final int uRole = user.getURole();
        //final int userId = 1087;
        /*final int uId = 1087;
        final int uRole = 10;*/
        thread = new Thread("Thread_hrTmpFlow") {
            @Override
            public void run() {
@@ -60,7 +61,18 @@
                    threadFlagMap.put(thread.getId(), true);
                    try {
                        if (session.isOpen()) {
                            Response response = service.searchTmp(uId, uRole, myFlowMain.getType(), myFlowMain.getStatus(), myFlowMain.getPageNum(), myFlowMain.getPageSize());
                            Response response = new Response();
                            try {
                                Map<String, Response> resMap = new HashMap<>();
                                Response resInfo = service.searchTmp(uId, uRole, myFlowMain.getType(), myFlowMain.getStatus(), myFlowMain.getPageNum(), myFlowMain.getPageSize());
                                resMap.put("info", resInfo);
                                Response<Map<Integer, Integer>> ownStatistics = service.getReceivedStatistics2(myFlowMain.getType(),user);
                                resMap.put("statistics", ownStatistics);
                                response.set(1,resMap);
                            }catch (Exception e){
                                response.set(0,"发生异常:"+e.toString());
                            }
                            //推送信息
                            synchronized (session) {
                                session.getBasicRemote().sendObject(response);