Commit 28bb26a0168bb46836ec333e3d7b70a682785b89
1 parent
3a398294
update...
Showing
7 changed files
with
30 additions
and
8 deletions
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -145,10 +145,10 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -145,10 +145,10 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 145 | public void run(String... arg0) throws Exception { | 145 | public void run(String... arg0) throws Exception { |
| 146 | basicDataLoader.loadAllData(); | 146 | basicDataLoader.loadAllData(); |
| 147 | //从数据库恢复排班 | 147 | //从数据库恢复排班 |
| 148 | - //dataRecovery(); | 148 | + dataRecovery(); |
| 149 | 149 | ||
| 150 | //翻班线程 | 150 | //翻班线程 |
| 151 | - Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); | 151 | +// Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); |
| 152 | //入库 | 152 | //入库 |
| 153 | // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS); | 153 | // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS); |
| 154 | //班次误点扫描 | 154 | //班次误点扫描 |
| @@ -690,6 +690,7 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -690,6 +690,7 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 690 | 690 | ||
| 691 | nbbmScheduleMap.remove(sch.getClZbh(), sch); | 691 | nbbmScheduleMap.remove(sch.getClZbh(), sch); |
| 692 | id2SchedulMap.remove(sch.getId()); | 692 | id2SchedulMap.remove(sch.getId()); |
| 693 | + lpScheduleMap.remove(sch.getXlBm() + "_" + sch.getLpName(), sch); | ||
| 693 | //return sch; | 694 | //return sch; |
| 694 | } | 695 | } |
| 695 | 696 | ||
| @@ -705,6 +706,10 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -705,6 +706,10 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 705 | return schAttrCalculator.updateQdzTimePlan(list); | 706 | return schAttrCalculator.updateQdzTimePlan(list); |
| 706 | } | 707 | } |
| 707 | 708 | ||
| 709 | + public List<ScheduleRealInfo> updateQdzTimePlan(ScheduleRealInfo sch) { | ||
| 710 | + return updateQdzTimePlan(sch.getXlBm() + "_" + sch.getLpName()); | ||
| 711 | + } | ||
| 712 | + | ||
| 708 | /** | 713 | /** |
| 709 | * @Title: doneSum | 714 | * @Title: doneSum |
| 710 | * @Description: TODO(已完成班次总数) | 715 | * @Description: TODO(已完成班次总数) |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -364,7 +364,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -364,7 +364,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 364 | t.setQdzName(BasicData.getStationNameByCode(t.getQdzCode(), prefix)); | 364 | t.setQdzName(BasicData.getStationNameByCode(t.getQdzCode(), prefix)); |
| 365 | t.setZdzName(BasicData.getStationNameByCode(t.getZdzCode(), prefix)); | 365 | t.setZdzName(BasicData.getStationNameByCode(t.getZdzCode(), prefix)); |
| 366 | 366 | ||
| 367 | - //计算班次实际时间 | 367 | + //计算班次实际执行时间 |
| 368 | schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t); | 368 | schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t); |
| 369 | if (t.getZdsjT() < t.getFcsjT()) { | 369 | if (t.getZdsjT() < t.getFcsjT()) { |
| 370 | rs.put("status", ResponseCode.ERROR); | 370 | rs.put("status", ResponseCode.ERROR); |
| @@ -379,7 +379,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -379,7 +379,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 379 | dayOfSchedule.put(t); | 379 | dayOfSchedule.put(t); |
| 380 | 380 | ||
| 381 | //更新起点应到时间 | 381 | //更新起点应到时间 |
| 382 | - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(t.getClZbh()); | 382 | + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(t); |
| 383 | 383 | ||
| 384 | //重新计算车辆当前执行班次 | 384 | //重新计算车辆当前执行班次 |
| 385 | dayOfSchedule.reCalcExecPlan(t.getClZbh()); | 385 | dayOfSchedule.reCalcExecPlan(t.getClZbh()); |
| @@ -419,7 +419,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -419,7 +419,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 419 | if(rs.get("status").equals(ResponseCode.SUCCESS)){ | 419 | if(rs.get("status").equals(ResponseCode.SUCCESS)){ |
| 420 | dayOfSchedule.delete(sch); | 420 | dayOfSchedule.delete(sch); |
| 421 | //更新起点应到时间 | 421 | //更新起点应到时间 |
| 422 | - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh()); | 422 | + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch); |
| 423 | rs.put("ts", ts); | 423 | rs.put("ts", ts); |
| 424 | rs.put("delete", sch); | 424 | rs.put("delete", sch); |
| 425 | } | 425 | } |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_oil.html
| @@ -464,6 +464,11 @@ | @@ -464,6 +464,11 @@ | ||
| 464 | $('.uk-panel-box', f).removeClass('uk-panel-box-primary'); | 464 | $('.uk-panel-box', f).removeClass('uk-panel-box-primary'); |
| 465 | f.prepend('<input type="hidden" name="destroy" value="true">'); | 465 | f.prepend('<input type="hidden" name="destroy" value="true">'); |
| 466 | $('[name=mileage]', f).val(sch.jhlcOrig); | 466 | $('[name=mileage]', f).val(sch.jhlcOrig); |
| 467 | + | ||
| 468 | + //进场起点 | ||
| 469 | + $('[name=startStation]', jcForm).val(sch.qdzCode); | ||
| 470 | + //出场终点 | ||
| 471 | + $('[name=endStation]', ccForm).val(sch.qdzCode); | ||
| 467 | } | 472 | } |
| 468 | } | 473 | } |
| 469 | })(); | 474 | })(); |
src/main/resources/static/real_control_v2/js/line_schedule/badge_tooltip.js
| @@ -20,7 +20,13 @@ var gb_schedule_badge_tootip = (function () { | @@ -20,7 +20,13 @@ var gb_schedule_badge_tootip = (function () { | ||
| 20 | var id = $(this).parents('dl').data('id'), | 20 | var id = $(this).parents('dl').data('id'), |
| 21 | lineCode = $(this).parents('li.line_schedule').data('id'), | 21 | lineCode = $(this).parents('li.line_schedule').data('id'), |
| 22 | sch = gb_schedule_table.findScheduleByLine(lineCode)[id]; | 22 | sch = gb_schedule_table.findScheduleByLine(lineCode)[id]; |
| 23 | - return temps['sch-table-task-tootip-temp']({tasks: sch.cTasks}); | 23 | + //排序 |
| 24 | + var array = sch.cTasks.sort(function (a, b) { | ||
| 25 | + var an = (a.mileageType=='service'?1:0)+''+(a.destroy?0:1); | ||
| 26 | + var bn = (b.mileageType=='service'?1:0)+''+(b.destroy?0:1); | ||
| 27 | + return parseInt(bn) - parseInt(an); | ||
| 28 | + }); | ||
| 29 | + return temps['sch-table-task-tootip-temp']({tasks: array}); | ||
| 24 | } | 30 | } |
| 25 | }, | 31 | }, |
| 26 | position: { | 32 | position: { |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| @@ -194,6 +194,9 @@ var gb_schedule_table = (function () { | @@ -194,6 +194,9 @@ var gb_schedule_table = (function () { | ||
| 194 | gb_schedule_table_dbclick.sfsjCellClick($('dd.fcsjActualCell', tabCont)); | 194 | gb_schedule_table_dbclick.sfsjCellClick($('dd.fcsjActualCell', tabCont)); |
| 195 | //滚动条 | 195 | //滚动条 |
| 196 | $('.schedule-wrap .ct_table_wrap', tabCont).perfectScrollbar({suppressScrollX: true}); | 196 | $('.schedule-wrap .ct_table_wrap', tabCont).perfectScrollbar({suppressScrollX: true}); |
| 197 | + | ||
| 198 | + //搜索模板初始化 | ||
| 199 | + gb_sch_search.init(); | ||
| 197 | } | 200 | } |
| 198 | }; | 201 | }; |
| 199 | 202 |
src/main/resources/static/real_control_v2/js/line_schedule/search.js
| @@ -40,6 +40,9 @@ var gb_sch_search = (function() { | @@ -40,6 +40,9 @@ var gb_sch_search = (function() { | ||
| 40 | var elements = '.search_sch_panel .sch-search-autocom'; | 40 | var elements = '.search_sch_panel .sch-search-autocom'; |
| 41 | var init = function() { | 41 | var init = function() { |
| 42 | $(elements).each(function() { | 42 | $(elements).each(function() { |
| 43 | + if($('script[type="text/autocomplete"]', this).length > 0) | ||
| 44 | + return true; | ||
| 45 | + | ||
| 43 | $(this).append(result_template); | 46 | $(this).append(result_template); |
| 44 | constructor(this); | 47 | constructor(this); |
| 45 | }); | 48 | }); |
src/main/resources/static/real_control_v2/js/main.js
| @@ -171,8 +171,8 @@ var disabled_submit_btn = function (form) { | @@ -171,8 +171,8 @@ var disabled_submit_btn = function (form) { | ||
| 171 | function showUpdateDescription() { | 171 | function showUpdateDescription() { |
| 172 | //更新说明 | 172 | //更新说明 |
| 173 | var updateDescription = { | 173 | var updateDescription = { |
| 174 | - date: '2017-04-20', | ||
| 175 | - text: '<h5>现在可以在轨迹回放里看到停车场位置和多边形电子围栏</h5><h5>区间调头子任务,可以勾选“调头后空驶回起点”</h5>' | 174 | + date: '2017-04-24', |
| 175 | + text: '<h5>应到实到时间按路牌连接显示</h5><h5>批量子任务时,如果主任务烂班,则自动复一个全程烂班子任务</h5><h5>鼠标悬停在子任务数字徽章上可查看详细</h5>' | ||
| 176 | }; | 176 | }; |
| 177 | 177 | ||
| 178 | var storage = window.localStorage | 178 | var storage = window.localStorage |