Commit e3fe9a01338e0dffd8d2640285abc47505e38a67
1 parent
43664fe8
青浦更新
Showing
5 changed files
with
52 additions
and
11 deletions
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -28,7 +28,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -28,7 +28,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 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)") | 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 | List<ScheduleRealInfo> queryUserInfo(String line,String date); | 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 | List<ScheduleRealInfo> queryUserInfo2(String line,String date); | 32 | List<ScheduleRealInfo> queryUserInfo2(String line,String date); |
| 33 | 33 | ||
| 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 ") | 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,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 8 | spring.jpa.database= MYSQL | 8 | spring.jpa.database= MYSQL |
| 9 | spring.jpa.show-sql= false | 9 | spring.jpa.show-sql= false |
| 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 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 | spring.datasource.username= root | 12 | spring.datasource.username= root |
| 13 | -spring.datasource.password= 123456 | 13 | +spring.datasource.password= root |
| 14 | #DATASOURCE | 14 | #DATASOURCE |
| 15 | spring.datasource.max-active=100 | 15 | spring.datasource.max-active=100 |
| 16 | spring.datasource.max-idle=8 | 16 | spring.datasource.max-idle=8 |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | </div> | 44 | </div> |
| 45 | <div class="portlet-body"> | 45 | <div class="portlet-body"> |
| 46 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;height: 400px"> | 46 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;height: 400px"> |
| 47 | - <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | 47 | + <label>日期:<span id="rqxs"></span> 早高峰:6:31~8:30 晚高峰:16:01~18:00</label> |
| 48 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 48 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 49 | <thead> | 49 | <thead> |
| 50 | <tr> | 50 | <tr> |
| @@ -281,11 +281,37 @@ | @@ -281,11 +281,37 @@ | ||
| 281 | var xlName = $("#select2-line-container").html(); | 281 | var xlName = $("#select2-line-container").html(); |
| 282 | var date = $("#date").val(); | 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 | $("#query").on('click',function(){ | 310 | $("#query").on('click',function(){ |
| 286 | line = $("#line").val(); | 311 | line = $("#line").val(); |
| 287 | xlName = $("#select2-line-container").html(); | 312 | xlName = $("#select2-line-container").html(); |
| 288 | date = $("#date").val(); | 313 | date = $("#date").val(); |
| 314 | + $("#rqxs").html(date); | ||
| 289 | if(date == null || date.length == 0){ | 315 | if(date == null || date.length == 0){ |
| 290 | layer.msg("请选择时间"); | 316 | layer.msg("请选择时间"); |
| 291 | return; | 317 | return; |
| @@ -297,10 +323,12 @@ | @@ -297,10 +323,12 @@ | ||
| 297 | $('#forms .scheduleDaily_1').html(scheduleDaily_1); | 323 | $('#forms .scheduleDaily_1').html(scheduleDaily_1); |
| 298 | }); | 324 | }); |
| 299 | $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){ | 325 | $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){ |
| 326 | + console.log(result); | ||
| 300 | var scheduleDaily_2 = template('scheduleDaily_2',{list:result}); | 327 | var scheduleDaily_2 = template('scheduleDaily_2',{list:result}); |
| 301 | $('#forms .scheduleDaily_2').html(scheduleDaily_2); | 328 | $('#forms .scheduleDaily_2').html(scheduleDaily_2); |
| 302 | }); | 329 | }); |
| 303 | $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){ | 330 | $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){ |
| 331 | + getTime(result); | ||
| 304 | var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); | 332 | var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); |
| 305 | $('#forms .scheduleDaily_3').html(scheduleDaily_3); | 333 | $('#forms .scheduleDaily_3').html(scheduleDaily_3); |
| 306 | }); | 334 | }); |
| @@ -405,7 +433,12 @@ | @@ -405,7 +433,12 @@ | ||
| 405 | <td colspan="2">{{obj[3]}}</td> | 433 | <td colspan="2">{{obj[3]}}</td> |
| 406 | <td colspan="2">{{obj[2]}}</td> | 434 | <td colspan="2">{{obj[2]}}</td> |
| 407 | <td>{{obj[1]}}/{{obj[4]}}</td> | 435 | <td>{{obj[1]}}/{{obj[4]}}</td> |
| 408 | - <td> </td> | 436 | + <td>{{if obj[5] !=null}} |
| 437 | + {{obj[5]}}/ | ||
| 438 | + {{obj[6]}} | ||
| 439 | + | ||
| 440 | + {{/if}} | ||
| 441 | + </td> | ||
| 409 | <td> </td> | 442 | <td> </td> |
| 410 | <td> </td> | 443 | <td> </td> |
| 411 | {{if (i+1)%5 == 0}} | 444 | {{if (i+1)%5 == 0}} |
| @@ -427,12 +460,12 @@ | @@ -427,12 +460,12 @@ | ||
| 427 | <td colspan="2">{{obj.qdzName}}</td> | 460 | <td colspan="2">{{obj.qdzName}}</td> |
| 428 | <td>{{obj.zdsj}}</td> | 461 | <td>{{obj.zdsj}}</td> |
| 429 | <td>{{obj.zdsjActual}}</td> | 462 | <td>{{obj.zdsjActual}}</td> |
| 430 | - <td> </td> | ||
| 431 | - <td> </td> | 463 | + <td>{{obj.fast}}</td> |
| 464 | + <td>{{obj.slow}}</td> | ||
| 432 | <td>{{obj.fcsj}}</td> | 465 | <td>{{obj.fcsj}}</td> |
| 433 | <td>{{obj.fcsjActual}}</td> | 466 | <td>{{obj.fcsjActual}}</td> |
| 434 | - <td> </td> | ||
| 435 | - <td> </td> | 467 | + <td>{{obj.fast0}}</td> |
| 468 | + <td>{{obj.slow0}}</td> | ||
| 436 | <td colspan="2">{{obj.remarks}}</td> | 469 | <td colspan="2">{{obj.remarks}}</td> |
| 437 | {{if (i+1)%3 == 0}} | 470 | {{if (i+1)%3 == 0}} |
| 438 | <td> </td> | 471 | <td> </td> |
src/main/resources/static/pages/forms/statement/waybill.html
| @@ -313,7 +313,10 @@ | @@ -313,7 +313,10 @@ | ||
| 313 | <tr> | 313 | <tr> |
| 314 | <td>{{obj.adjustExps}}</td> | 314 | <td>{{obj.adjustExps}}</td> |
| 315 | <td>{{obj.jGh}}{{obj.jName}}</td> | 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 | <td> </td> | 320 | <td> </td> |
| 318 | <td>{{obj.qdzName}}</td> | 321 | <td>{{obj.qdzName}}</td> |
| 319 | <td>{{obj.zdzName}}</td> | 322 | <td>{{obj.zdzName}}</td> |
src/main/resources/static/pages/forms/statement/waybillQp.html
| @@ -308,7 +308,12 @@ | @@ -308,7 +308,12 @@ | ||
| 308 | <td>{{i+1}}</td> | 308 | <td>{{i+1}}</td> |
| 309 | <td>{{obj.lpName}}</td> | 309 | <td>{{obj.lpName}}</td> |
| 310 | <td>{{obj.jGh}}{{obj.jName}}</td> | 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 | <td> </td> | 317 | <td> </td> |
| 313 | <td>{{obj.qdzName}}</td> | 318 | <td>{{obj.qdzName}}</td> |
| 314 | <td>{{obj.zdzName}}</td> | 319 | <td>{{obj.zdzName}}</td> |