Commit e3fe9a01338e0dffd8d2640285abc47505e38a67

Authored by 廖磊
1 parent 43664fe8

青浦更新

src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -28,7 +28,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI
28 28 @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.id,s.jGh,s.clZbh,s.lpName order by (lpName+1)")
29 29 List<ScheduleRealInfo> queryUserInfo(String line,String date);
30 30  
31   - @Query(value="select min(s.id), s.jGh,s.clZbh,s.lpName,s.jName from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.jGh,s.clZbh,s.lpName ,s.jName order by (lpName+1)")
  31 + @Query(value="select min(s.id), s.jGh,s.clZbh,s.lpName,s.jName,s.sGh,s.sName from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.jGh,s.clZbh,s.lpName ,s.jName,s.sGh,s.sName order by (lpName+1)")
32 32 List<ScheduleRealInfo> queryUserInfo2(String line,String date);
33 33  
34 34 @Query(value="select min(s.id), s.clZbh from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.clZbh ")
... ...
src/main/resources/application-dev.properties
... ... @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
8 8 spring.jpa.database= MYSQL
9 9 spring.jpa.show-sql= false
10 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11   -spring.datasource.url= jdbc:mysql://192.168.168.201/:3306/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  11 +spring.datasource.url= jdbc:mysql://localhost:3306/qp_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 12 spring.datasource.username= root
13   -spring.datasource.password= 123456
  13 +spring.datasource.password= root
14 14 #DATASOURCE
15 15 spring.datasource.max-active=100
16 16 spring.datasource.max-idle=8
... ...
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -44,7 +44,7 @@
44 44 </div>
45 45 <div class="portlet-body">
46 46 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;height: 400px">
47   - <label>早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
  47 + <label>日期:<span id="rqxs"></span>&nbsp;&nbsp;&nbsp;&nbsp;早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
48 48 <table class="table table-bordered table-hover table-checkable" id="forms">
49 49 <thead>
50 50 <tr>
... ... @@ -281,11 +281,37 @@
281 281 var xlName = $("#select2-line-container").html();
282 282 var date = $("#date").val();
283 283  
  284 + function getTime(list){
  285 + $.each(list, function(i, obj) {
  286 + if(obj.zdsj != null && obj.zdsjActual != null ){
  287 + var zdsjActual = (obj.zdsjActual).split(":");
  288 + var zdsj = (obj.zdsj).split(":");
  289 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  290 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  291 + }
  292 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  293 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  294 + }
  295 + }
  296 +
  297 + if(obj.fcsj != null && obj.fcsjActual != null ){
  298 + var fcsjActual = (obj.fcsjActual).split(":");
  299 + var fcsj = (obj.fcsj).split(":");
  300 + if(fcsjActual[0]*60+Number(fcsjActual[1]) > fcsj[0]*60+Number(fcsj[1])){
  301 + obj["slow0"] = (fcsjActual[0]*60+Number(fcsjActual[1])) - (fcsj[0]*60+Number(fcsj[1]));
  302 + }
  303 + else if(fcsjActual[0]*60+Number(fcsjActual[1]) < fcsj[0]*60+Number(fcsj[1])){
  304 + obj["fast0"] = (fcsj[0]*60+Number(fcsj[1])) - (fcsjActual[0]*60+Number(fcsjActual[1]));
  305 + }
  306 + }
  307 + });
  308 + }
284 309 //查询
285 310 $("#query").on('click',function(){
286 311 line = $("#line").val();
287 312 xlName = $("#select2-line-container").html();
288 313 date = $("#date").val();
  314 + $("#rqxs").html(date);
289 315 if(date == null || date.length == 0){
290 316 layer.msg("请选择时间");
291 317 return;
... ... @@ -297,10 +323,12 @@
297 323 $('#forms .scheduleDaily_1').html(scheduleDaily_1);
298 324 });
299 325 $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){
  326 + console.log(result);
300 327 var scheduleDaily_2 = template('scheduleDaily_2',{list:result});
301 328 $('#forms .scheduleDaily_2').html(scheduleDaily_2);
302 329 });
303 330 $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){
  331 + getTime(result);
304 332 var scheduleDaily_3 = template('scheduleDaily_3',{list:result});
305 333 $('#forms .scheduleDaily_3').html(scheduleDaily_3);
306 334 });
... ... @@ -405,7 +433,12 @@
405 433 <td colspan="2">{{obj[3]}}</td>
406 434 <td colspan="2">{{obj[2]}}</td>
407 435 <td>{{obj[1]}}/{{obj[4]}}</td>
408   - <td>&nbsp;</td>
  436 + <td>{{if obj[5] !=null}}
  437 + {{obj[5]}}/
  438 + {{obj[6]}}
  439 +
  440 + {{/if}}
  441 + </td>
409 442 <td>&nbsp;</td>
410 443 <td>&nbsp;</td>
411 444 {{if (i+1)%5 == 0}}
... ... @@ -427,12 +460,12 @@
427 460 <td colspan="2">{{obj.qdzName}}</td>
428 461 <td>{{obj.zdsj}}</td>
429 462 <td>{{obj.zdsjActual}}</td>
430   - <td>&nbsp;</td>
431   - <td>&nbsp;</td>
  463 + <td>{{obj.fast}}</td>
  464 + <td>{{obj.slow}}</td>
432 465 <td>{{obj.fcsj}}</td>
433 466 <td>{{obj.fcsjActual}}</td>
434   - <td>&nbsp;</td>
435   - <td>&nbsp;</td>
  467 + <td>{{obj.fast0}}</td>
  468 + <td>{{obj.slow0}}</td>
436 469 <td colspan="2">{{obj.remarks}}</td>
437 470 {{if (i+1)%3 == 0}}
438 471 <td>&nbsp;</td>
... ...
src/main/resources/static/pages/forms/statement/waybill.html
... ... @@ -313,7 +313,10 @@
313 313 <tr>
314 314 <td>{{obj.adjustExps}}</td>
315 315 <td>{{obj.jGh}}{{obj.jName}}</td>
316   - <td>{{obj.sGh}}{{obj.sName}}</td>
  316 + <td>{{if obj.sGh !=null}}
  317 + {{obj.sGh}}{{obj.sName}}
  318 + {{/if}}
  319 + </td>
317 320 <td>&nbsp;</td>
318 321 <td>{{obj.qdzName}}</td>
319 322 <td>{{obj.zdzName}}</td>
... ...
src/main/resources/static/pages/forms/statement/waybillQp.html
... ... @@ -308,7 +308,12 @@
308 308 <td>{{i+1}}</td>
309 309 <td>{{obj.lpName}}</td>
310 310 <td>{{obj.jGh}}{{obj.jName}}</td>
311   - <td>{{obj.sGh}}{{obj.sName}}</td>
  311 + <td>
  312 + {{if obj.sGh !=null}}
  313 + {{obj.sGh}}
  314 + {{obj.sName}}
  315 + {{/if}}
  316 + </td>
312 317 <td>&nbsp;</td>
313 318 <td>{{obj.qdzName}}</td>
314 319 <td>{{obj.zdzName}}</td>
... ...