Commit a0ec3eb54999abd5e3f349636f26a241a7d943aa

Authored by 廖磊
2 parents 4eb56a84 465c8d8e

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
src/main/java/com/bsth/controller/schedule/TrafficManageController.java
@@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestMethod; @@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
8 import org.springframework.web.bind.annotation.RequestParam; 8 import org.springframework.web.bind.annotation.RequestParam;
9 import org.springframework.web.bind.annotation.RestController; 9 import org.springframework.web.bind.annotation.RestController;
10 10
  11 +import java.util.Map;
  12 +
11 /** 13 /**
12 * 14 *
13 * @author BSTH 15 * @author BSTH
@@ -22,9 +24,9 @@ public class TrafficManageController { @@ -22,9 +24,9 @@ public class TrafficManageController {
22 24
23 25
24 @RequestMapping(value = "/setXL", method = RequestMethod.GET) 26 @RequestMapping(value = "/setXL", method = RequestMethod.GET)
25 - public String setXL() throws Exception { 27 + public String setXL(@RequestParam Map<String, Object> param) throws Exception {
26 try { 28 try {
27 - return trManageService.setXL(); 29 + return trManageService.setXL(param);
28 } catch (Exception exp) { 30 } catch (Exception exp) {
29 throw new Exception(exp.getCause()); 31 throw new Exception(exp.getCause());
30 } 32 }
@@ -57,6 +59,15 @@ public class TrafficManageController { @@ -57,6 +59,15 @@ public class TrafficManageController {
57 } 59 }
58 } 60 }
59 61
  62 + @RequestMapping(value = "/setLDFile", method = RequestMethod.GET)
  63 + public String setLDFile() throws Exception {
  64 + try {
  65 + return trManageService.setLDFile();
  66 + } catch (Exception exp) {
  67 + throw new Exception(exp.getCause());
  68 + }
  69 + }
  70 +
60 @RequestMapping(value = "/setLCYH", method = RequestMethod.GET) 71 @RequestMapping(value = "/setLCYH", method = RequestMethod.GET)
61 public String setLCYH() throws Exception { 72 public String setLCYH() throws Exception {
62 try { 73 try {
src/main/java/com/bsth/service/TrafficManageService.java
1 package com.bsth.service; 1 package com.bsth.service;
2 2
  3 +import java.util.Map;
  4 +
3 /** 5 /**
4 * 6 *
5 * @Interface: LineService(线路service业务层实现接口) 7 * @Interface: LineService(线路service业务层实现接口)
@@ -22,7 +24,7 @@ public interface TrafficManageService { @@ -22,7 +24,7 @@ public interface TrafficManageService {
22 * 24 *
23 * @return 调用接口返回信息 25 * @return 调用接口返回信息
24 */ 26 */
25 - String setXL(); 27 + String setXL(Map<String, Object> param);
26 28
27 /** 29 /**
28 * 上传车辆信息 30 * 上传车辆信息
@@ -65,6 +67,8 @@ public interface TrafficManageService { @@ -65,6 +67,8 @@ public interface TrafficManageService {
65 67
66 String setLD(); 68 String setLD();
67 69
  70 + String setLDFile();
  71 +
68 String setLCYH(); 72 String setLCYH();
69 73
70 String setDDRB(); 74 String setDDRB();
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
@@ -173,16 +173,22 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -173,16 +173,22 @@ public class TrafficManageServiceImpl implements TrafficManageService{
173 upStationsList = stationRouteRepository.findByLine(line.getLineCode(), 0); 173 upStationsList = stationRouteRepository.findByLine(line.getLineCode(), 0);
174 int startId = 1; 174 int startId = 1;
175 startId = packagStationXml(upStationsList, sBuffer, startId); 175 startId = packagStationXml(upStationsList, sBuffer, startId);
176 - // 再查下行  
177 - downStationsList = stationRouteRepository.findByLine(line.getLineCode(), 1);  
178 - packagStationXml(downStationsList, sBuffer, startId); 176 + // 环线不查下行
  177 + if(line.getLinePlayType() != 1){
  178 + // 再查下行
  179 + downStationsList = stationRouteRepository.findByLine(line.getLineCode(), 1);
  180 + packagStationXml(downStationsList, sBuffer, startId);
  181 + }
179 sBuffer.append("</LineStationList>"); 182 sBuffer.append("</LineStationList>");
180 183
181 // 循环添加站点点位信息 184 // 循环添加站点点位信息
182 sBuffer.append("<LinePointList>"); 185 sBuffer.append("<LinePointList>");
183 startId = 1; 186 startId = 1;
184 startId = packagStationPointXml(upStationsList, sBuffer, startId); 187 startId = packagStationPointXml(upStationsList, sBuffer, startId);
185 - packagStationPointXml(downStationsList, sBuffer, startId); 188 + // 环线不查下行
  189 + if(line.getLinePlayType() != 1){
  190 + packagStationPointXml(downStationsList, sBuffer, startId);
  191 + }
186 sBuffer.append("</LinePointList>"); 192 sBuffer.append("</LinePointList>");
187 // } 193 // }
188 sBuffer.append("</DataList>"); 194 sBuffer.append("</DataList>");
src/main/resources/static/pages/forms/statement/waybill.html
@@ -303,9 +303,12 @@ @@ -303,9 +303,12 @@
303 $("#info tbody tr").each(function(index){ 303 $("#info tbody tr").each(function(index){
304 param[index] = new Array(); 304 param[index] = new Array();
305 $(this).children().each(function(i){ 305 $(this).children().each(function(i){
306 - param[index][i] = $(this).text().split("\\")[0];  
307 - if(i==0){  
308 - param[index][3] = $(this).text().split("\\")[1]; 306 + if(i<3){
  307 + param[index][i] = $(this).text().split("\\")[0];
  308 + if(i==0){
  309 + param[index][3] = $(this).text().split("\\")[1];
  310 +
  311 + }
309 } 312 }
310 }); 313 });
311 }); 314 });
src/main/resources/static/pages/trafficManage/js/timeTempletUpload.js
1 /** 1 /**
2 * 2 *
3 - * @JSName : common.js(运管功能公共js)  
4 - *  
5 - * @Author : bsth@lq  
6 - *  
7 - * @Description : TODO(运管功能公共js)  
8 - * 3 + * @JSName : timeTempletUpload.js(运管处js)
  4 + *
  5 + * @Author : bsth@zq
  6 + *
  7 + * @Description : TODO(运管功能公共js)
  8 + *
9 * @Data : 2016年6月29日 上午9:21:17 9 * @Data : 2016年6月29日 上午9:21:17
10 * 10 *
11 * @Version 公交调度系统BS版 0.1 11 * @Version 公交调度系统BS版 0.1
12 - * 12 + *
13 */ 13 */
14 14
15 (function(){ 15 (function(){
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 } 34 }
35 var lines = new Array(); 35 var lines = new Array();
36 var gsmap = getBusMap(); 36 var gsmap = getBusMap();
37 - 37 +
38 $('#line').select2({ 38 $('#line').select2({
39 ajax: { 39 ajax: {
40 url: '/realSchedule/findLine', 40 url: '/realSchedule/findLine',
@@ -73,7 +73,7 @@ @@ -73,7 +73,7 @@
73 } 73 }
74 } 74 }
75 }); 75 });
76 - 76 +
77 // 绑定查询事件 77 // 绑定查询事件
78 $("#search").click(searchM); 78 $("#search").click(searchM);
79 // 绑定上传事件 79 // 绑定上传事件
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 params[$(element).attr("name")] = $(element).val(); 98 params[$(element).attr("name")] = $(element).val();
99 }); 99 });
100 var i = layer.load(2); 100 var i = layer.load(2);
101 - $get('/tic', params, function(data) { 101 + $get('/tic_ec', params, function(data) {
102 _dateFormat(data.content); 102 _dateFormat(data.content);
103 var bodyHtm = template('timeTemplet_list_temp', { 103 var bodyHtm = template('timeTemplet_list_temp', {
104 list : data.content 104 list : data.content
@@ -112,7 +112,7 @@ @@ -112,7 +112,7 @@
112 112
113 // 上传方法 113 // 上传方法
114 function uploadM() { 114 function uploadM() {
115 - 115 +
116 // 取得输入框的值 116 // 取得输入框的值
117 var trs = $("#right_div tbody tr input"); 117 var trs = $("#right_div tbody tr input");
118 if (trs.length == 0) { 118 if (trs.length == 0) {
@@ -128,14 +128,14 @@ @@ -128,14 +128,14 @@
128 $.ajax({ 128 $.ajax({
129 type: 'get',url: '/trmg/setSKB', 129 type: 'get',url: '/trmg/setSKB',
130 data: params ,dataType:'text', 130 data: params ,dataType:'text',
131 - success:function(data) { 131 + success:function(data) {
132 if(data == 'success'){ 132 if(data == 'success'){
133 alert("上传成功"); 133 alert("上传成功");
134 }else{ 134 }else{
135 alert("上传失败"); 135 alert("上传失败");
136 } 136 }
137 -  
138 - }, error : function() { 137 +
  138 + }, error : function() {
139 alert("操作失败"); 139 alert("操作失败");
140 } 140 }
141 141
@@ -180,23 +180,30 @@ @@ -180,23 +180,30 @@
180 obj.qyrq = moment(obj.qyrq).format(fs); 180 obj.qyrq = moment(obj.qyrq).format(fs);
181 }); 181 });
182 } 182 }
183 - /* 183 +
184 // 绑定查询事件 184 // 绑定查询事件
185 $("#setXL").click(setXLF); 185 $("#setXL").click(setXLF);
186 - var params = {}; 186 +
187 function setXLF() { 187 function setXLF() {
  188 + var params = {};
  189 + // 取得输入框的值
  190 + var inputs = $(".param input,select");debugger;
  191 + // 遍历数组
  192 + $.each(inputs, function(i, element) {
  193 + params[$(element).attr("name")] = $(element).val();
  194 + });
188 $.ajax({ 195 $.ajax({
189 type: 'get',url: '/trmg/setXL', 196 type: 'get',url: '/trmg/setXL',
190 data: params ,dataType:'text', 197 data: params ,dataType:'text',
191 - success:function(data) { 198 + success:function(data) {
192 alert(data); 199 alert(data);
193 - }, error : function() { 200 + }, error : function() {
194 alert("操作失败"); 201 alert("操作失败");
195 } 202 }
196 203
197 }); 204 });
198 } 205 }
199 - 206 +
200 // 绑定查询事件 207 // 绑定查询事件
201 $("#setCL").click(setCLF); 208 $("#setCL").click(setCLF);
202 var params = {}; 209 var params = {};
@@ -204,15 +211,15 @@ @@ -204,15 +211,15 @@
204 $.ajax({ 211 $.ajax({
205 type: 'get',url: '/trmg/setCL', 212 type: 'get',url: '/trmg/setCL',
206 data: params ,dataType:'text', 213 data: params ,dataType:'text',
207 - success:function(data) { 214 + success:function(data) {
208 alert(data); 215 alert(data);
209 - }, error : function() { 216 + }, error : function() {
210 alert("操作失败"); 217 alert("操作失败");
211 } 218 }
212 219
213 }); 220 });
214 } 221 }
215 - 222 +
216 // 绑定查询事件 223 // 绑定查询事件
217 $("#setSJ").click(setSJF); 224 $("#setSJ").click(setSJF);
218 var params = {}; 225 var params = {};
@@ -220,47 +227,79 @@ @@ -220,47 +227,79 @@
220 $.ajax({ 227 $.ajax({
221 type: 'get',url: '/trmg/setSJ', 228 type: 'get',url: '/trmg/setSJ',
222 data: params ,dataType:'text', 229 data: params ,dataType:'text',
223 - success:function(data) { 230 + success:function(data) {
224 alert(data); 231 alert(data);
225 - }, error : function() { 232 + }, error : function() {
226 alert("操作失败"); 233 alert("操作失败");
227 } 234 }
228 235
229 }); 236 });
230 } 237 }
231 - 238 +
232 // 绑定查询事件 239 // 绑定查询事件
233 - $("#setCS").click(setCSF); 240 + $("#setLD").click(setLDF);
234 var params = {}; 241 var params = {};
235 - function setCSF() { 242 + function setLDF() {
236 $.ajax({ 243 $.ajax({
237 - type: 'get',url: '/trmg/setCS', 244 + type: 'get',url: '/trmg/setLD',
238 data: params ,dataType:'text', 245 data: params ,dataType:'text',
239 - success:function(data) { 246 + success:function(data) {
240 alert(data); 247 alert(data);
241 - }, error : function() { 248 + }, error : function() {
242 alert("操作失败"); 249 alert("操作失败");
243 } 250 }
244 251
245 }); 252 });
246 } 253 }
247 - 254 +
  255 + // 绑定查询事件
  256 + $("#setLDFile").click(setLDFileF);
  257 + var params = {};
  258 + function setLDFileF() {
  259 + $.ajax({
  260 + type: 'get',url: '/trmg/setLDFile',
  261 + data: params ,dataType:'text',
  262 + success:function(data) {
  263 + alert(data);
  264 + }, error : function() {
  265 + alert("操作失败");
  266 + }
  267 +
  268 + });
  269 + }
  270 +
248 // 绑定查询事件 271 // 绑定查询事件
249 - $("#setXLPC").click(setXLPCF); 272 + $("#setLCYH").click(setLCYHF);
250 var params = {}; 273 var params = {};
251 - function setXLPCF() { 274 + function setLCYHF() {
252 $.ajax({ 275 $.ajax({
253 - type: 'get',url: '/trmg/setXLPC', 276 + type: 'get',url: '/trmg/setLCYH',
254 data: params ,dataType:'text', 277 data: params ,dataType:'text',
255 - success:function(data) { 278 + success:function(data) {
256 alert(data); 279 alert(data);
257 - }, error : function() { 280 + }, error : function() {
258 alert("操作失败"); 281 alert("操作失败");
259 } 282 }
260 283
261 }); 284 });
262 } 285 }
263 - 286 +
  287 + // 绑定查询事件
  288 + $("#setDDRB").click(setDDRBF);
  289 + var params = {};
  290 + function setDDRBF() {
  291 + $.ajax({
  292 + type: 'get',url: '/trmg/setDDRB',
  293 + data: params ,dataType:'text',
  294 + success:function(data) {
  295 + alert(data);
  296 + }, error : function() {
  297 + alert("操作失败");
  298 + }
  299 +
  300 + });
  301 + }
  302 +
264 // 绑定查询事件 303 // 绑定查询事件
265 $("#setJHBC").click(setJHBCF); 304 $("#setJHBC").click(setJHBCF);
266 var params = {}; 305 var params = {};
@@ -268,13 +307,62 @@ @@ -268,13 +307,62 @@
268 $.ajax({ 307 $.ajax({
269 type: 'get',url: '/trmg/setJHBC', 308 type: 'get',url: '/trmg/setJHBC',
270 data: params ,dataType:'text', 309 data: params ,dataType:'text',
271 - success:function(data) { 310 + success:function(data) {
  311 + alert(data);
  312 + }, error : function() {
  313 + alert("操作失败");
  314 + }
  315 +
  316 + });
  317 + }
  318 +
  319 + // 绑定查询事件
  320 + $("#setXLPC").click(setXLPCF);
  321 + var params = {};
  322 + function setXLPCF() {
  323 + $.ajax({
  324 + type: 'get',url: '/trmg/setXLPC',
  325 + data: params ,dataType:'text',
  326 + success:function(data) {
272 alert(data); 327 alert(data);
273 - }, error : function() { 328 + }, error : function() {
274 alert("操作失败"); 329 alert("操作失败");
275 } 330 }
276 331
277 }); 332 });
278 - }*/ 333 + }
  334 +
  335 +
  336 + // 绑定查询事件
  337 + $("#setCS").click(setCSF);
  338 + var params = {};
  339 + function setCSF() {
  340 + $.ajax({
  341 + type: 'get',url: '/trmg/setCS',
  342 + data: params ,dataType:'text',
  343 + success:function(data) {
  344 + alert(data);
  345 + }, error : function() {
  346 + alert("操作失败");
  347 + }
  348 +
  349 + });
  350 + }
  351 +
  352 + // 绑定查询事件
  353 + $("#downloadAllDataFile").click(getDownLoadAllDataFileF);
  354 + var params = {};
  355 + function getDownLoadAllDataFileF() {
  356 + $.ajax({
  357 + type: 'get',url: '/trmg/getDownLoadAllDataFile',
  358 + data: params ,dataType:'text',
  359 + success:function(data) {
  360 + alert(data);
  361 + }, error : function() {
  362 + alert("操作失败");
  363 + }
  364 +
  365 + });
  366 + }
279 367
280 })(); 368 })();
281 \ No newline at end of file 369 \ No newline at end of file