| | |
| | | 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() { |
| | |
| | | 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); |