Commit e7d09ea7a4eb806b1ca9866f3617fa9d7810faa3
1 parent
95539872
修改bug
Showing
7 changed files
with
91 additions
and
12 deletions
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_list2.jsp
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 | <td class='center'>${var.CLASS_CODE}</td> |
85 | 85 | <td class='center'>${myelfun:findBasestationName(var.BASESTATION_ID)}</td> |
86 | 86 | |
87 | - <td><a onclick="edit('${var.ID}');" style="margin-right:10px;"><img src="static/images/eidtor.png" /></a><a href="#" onclick="del('${var.ID}');"><img src="static/images/remove.png" /></a></td> | |
87 | + <td><a onclick="edit('${var.ID}');" style="margin-right:10px;"><img src="static/images/eidtor.png" /></a><a onclick="del('${var.ID}');"><img src="static/images/remove.png" /></a></td> | |
88 | 88 | </tr> |
89 | 89 | </c:forEach> |
90 | 90 | </c:when> |
... | ... | @@ -164,7 +164,17 @@ |
164 | 164 | } |
165 | 165 | } |
166 | 166 | if(str==''){ |
167 | - | |
167 | + $.ajax({ | |
168 | + type: "POST", | |
169 | + url: '<%=basePath%>sclass/deleteAll.do?tm='+new Date().getTime(), | |
170 | + data: {DATA_IDS:Id}, | |
171 | + dataType:'json', | |
172 | + //beforeSend: validateData, | |
173 | + cache: false, | |
174 | + success: function(data){ | |
175 | + tosearch(); | |
176 | + } | |
177 | + }); | |
168 | 178 | }else{ |
169 | 179 | $.ajax({ |
170 | 180 | type: "POST", | ... | ... |
resources/mybatis1/api/V1Mapper.xml
src/com/fh/bean/ResultHomework.java
... | ... | @@ -103,6 +103,7 @@ public class ResultHomework { |
103 | 103 | private String GET_SCORE; |
104 | 104 | private String RANK; |
105 | 105 | private String ANSWER; |
106 | + private String COMPLETE_COUNT; | |
106 | 107 | |
107 | 108 | public void setSTUDENT_NO(String STUDENT_NO) { |
108 | 109 | this.STUDENT_NO = STUDENT_NO; |
... | ... | @@ -159,5 +160,13 @@ public class ResultHomework { |
159 | 160 | public String getANSWER() { |
160 | 161 | return ANSWER; |
161 | 162 | } |
163 | + | |
164 | + public String getCOMPLETE_COUNT() { | |
165 | + return COMPLETE_COUNT; | |
166 | + } | |
167 | + | |
168 | + public void setCOMPLETE_COUNT(String cOMPLETE_COUNT) { | |
169 | + COMPLETE_COUNT = cOMPLETE_COUNT; | |
170 | + } | |
162 | 171 | } |
163 | 172 | } | ... | ... |
src/com/fh/controller/api/V1.java
... | ... | @@ -2912,6 +2912,7 @@ public class V1 extends BaseController { |
2912 | 2912 | ptd.put("RIGHT_PERSENT", "0%"); |
2913 | 2913 | ptd.put("GET_SCORE", "0"); |
2914 | 2914 | ptd.put("ANSWER", ""); |
2915 | + ptd.put("COMPLETE_COUNT", "0"); | |
2915 | 2916 | ptd.put("WHETHER", "0"); |
2916 | 2917 | ptd.put("HOMEWORK_ID", resultHomework.getHOMEWORK_ID()); |
2917 | 2918 | } |
... | ... | @@ -2932,8 +2933,8 @@ public class V1 extends BaseController { |
2932 | 2933 | tpd.put("RIGHT_PERSENT", student.getRIGHT_PERSENT()); |
2933 | 2934 | tpd.put("GET_SCORE", student.getGET_SCORE()); |
2934 | 2935 | tpd.put("ANSWER", student.getANSWER()); |
2936 | + tpd.put("COMPLETE_COUNT", student.getCOMPLETE_COUNT()); | |
2935 | 2937 | tpd.put("HOMEWORK_ID", resultHomework.getHOMEWORK_ID()); |
2936 | - tpd.put("WHETHER", "1"); | |
2937 | 2938 | homeworkReporkService.update(tpd); |
2938 | 2939 | } |
2939 | 2940 | res.setData(resultHomework.getHOMEWORK_ID()); | ... | ... |
src/com/fh/controller/sunvote/sclass/SClassController.java
... | ... | @@ -295,7 +295,6 @@ public class SClassController extends BaseController { |
295 | 295 | @ResponseBody |
296 | 296 | public Object deleteAll() throws Exception{ |
297 | 297 | logBefore(logger, Jurisdiction.getUsername()+"批量删除SClass"); |
298 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
299 | 298 | PageData pd = new PageData(); |
300 | 299 | Map<String,Object> map = new HashMap<String,Object>(); |
301 | 300 | pd = this.getPageData(); | ... | ... |
src/com/fh/controller/system/login/LoginController.java
... | ... | @@ -264,8 +264,10 @@ public class LoginController extends BaseController { |
264 | 264 | } |
265 | 265 | mv.addObject("user", user); |
266 | 266 | pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称 |
267 | + mv.addObject("templateInfos", pagetemplateService.listAll(teacherInfo)); | |
267 | 268 | if(pd.get("DEFAULTURL") == null){ |
268 | - pd.put("DEFAULTURL", "../homework/list.do"); | |
269 | +// pd.put("DEFAULTURL", "../homework/list.do"); | |
270 | + pd.put("DEFAULTURL", "../paper/list2.do"); | |
269 | 271 | } |
270 | 272 | mv.addObject("pd", pd); |
271 | 273 | return mv; | ... | ... |
src/com/fh/plugin/websocketInstantMsg/ChatServer.java
1 | 1 | package com.fh.plugin.websocketInstantMsg; |
2 | 2 | |
3 | -import java.io.IOException; | |
3 | +import java.io.UnsupportedEncodingException; | |
4 | 4 | import java.net.InetSocketAddress; |
5 | +import java.net.URI; | |
5 | 6 | import java.net.UnknownHostException; |
7 | +import java.nio.ByteBuffer; | |
6 | 8 | import java.util.ArrayList; |
7 | 9 | import java.util.Date; |
8 | 10 | import java.util.List; |
11 | +import java.util.Scanner; | |
9 | 12 | |
10 | 13 | import net.sf.json.JSONObject; |
11 | 14 | |
12 | 15 | import org.java_websocket.WebSocket; |
13 | -import org.java_websocket.WebSocketImpl; | |
16 | +import org.java_websocket.client.WebSocketClient; | |
17 | +import org.java_websocket.drafts.Draft_17; | |
14 | 18 | import org.java_websocket.framing.Framedata; |
15 | 19 | import org.java_websocket.handshake.ClientHandshake; |
20 | +import org.java_websocket.handshake.ServerHandshake; | |
16 | 21 | import org.java_websocket.server.WebSocketServer; |
17 | 22 | |
18 | 23 | |
... | ... | @@ -107,13 +112,65 @@ public class ChatServer extends WebSocketServer{ |
107 | 112 | // ChatServerPool.sendMessage(joinMsg); //向在线用户发送当前用户退出的消息 |
108 | 113 | // } |
109 | 114 | } |
110 | - public static void main( String[] args ) throws InterruptedException , IOException { | |
111 | - WebSocketImpl.DEBUG = false; | |
112 | - int port = 8887; //端口 | |
113 | - ChatServer s = new ChatServer(port); | |
114 | - s.start(); | |
115 | + public static void main( String[] args ) throws Exception { | |
116 | +// WebSocketImpl.DEBUG = false; | |
117 | +// int port = 8887; //端口 | |
118 | +// ChatServer s = new ChatServer(port); | |
119 | +// s.start(); | |
115 | 120 | //System.out.println( "服务器的端口" + s.getPort() ); |
121 | + testClient(); | |
122 | + Scanner scanner = new Scanner(System.in); | |
123 | + while(true){ | |
124 | + String text = scanner.next(); | |
125 | + if(!"exit".equals(text.toLowerCase())){ | |
126 | + client.send(text); | |
127 | + } | |
128 | + } | |
116 | 129 | } |
130 | + | |
131 | + public static WebSocketClient client; | |
132 | + | |
133 | + public static void testClient() throws Exception{ | |
134 | + client = new WebSocketClient(new URI("ws://127.0.0.1:8080/echo"),new Draft_17()) { | |
135 | + @Override | |
136 | + public void onOpen(ServerHandshake arg0) { | |
137 | + System.out.println("打开链接"); | |
138 | + client.send("hello world"); | |
139 | + } | |
140 | + | |
141 | + @Override | |
142 | + public void onMessage(String arg0) { | |
143 | + System.out.println(arg0); | |
144 | + } | |
145 | + | |
146 | + @Override | |
147 | + public void onError(Exception arg0) { | |
148 | + arg0.printStackTrace(); | |
149 | + System.out.println("发生错误已关闭"); | |
150 | + } | |
151 | + | |
152 | + @Override | |
153 | + public void onClose(int arg0, String arg1, boolean arg2) { | |
154 | + System.out.println("链接已关闭"); | |
155 | + } | |
156 | + | |
157 | + @Override | |
158 | + public void onMessage(ByteBuffer bytes) { | |
159 | + try { | |
160 | + System.out.println(new String(bytes.array(),"utf-8")); | |
161 | + } catch (UnsupportedEncodingException e) { | |
162 | + e.printStackTrace(); | |
163 | + } | |
164 | + } | |
165 | + }; | |
166 | + | |
167 | + client.connect(); | |
168 | + | |
169 | + } | |
170 | + | |
171 | + public static void send(byte[] bytes){ | |
172 | + client.send(bytes); | |
173 | + } | |
117 | 174 | |
118 | 175 | } |
119 | 176 | ... | ... |