Commit 4e3094d59c6beec627d4315ef35fbaa7dd94d1d8
1 parent
c92a4992
调度日报,新增少驶筛选,可只查询少驶班次。
Showing
4 changed files
with
44 additions
and
8 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -582,8 +582,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -582,8 +582,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 582 | } | 582 | } |
| 583 | 583 | ||
| 584 | @RequestMapping(value="/realScheduleList") | 584 | @RequestMapping(value="/realScheduleList") |
| 585 | - public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){ | ||
| 586 | - return scheduleRealInfoService.realScheduleList(line,date); | 585 | + public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date,@RequestParam String sfss){ |
| 586 | + return scheduleRealInfoService.realScheduleList(line,date,sfss); | ||
| 587 | } | 587 | } |
| 588 | 588 | ||
| 589 | @RequestMapping(value="/realScheduleList_zrw") | 589 | @RequestMapping(value="/realScheduleList_zrw") |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -139,7 +139,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -139,7 +139,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 139 | 139 | ||
| 140 | Long getMaxId(); | 140 | Long getMaxId(); |
| 141 | Map<String,Object> scheduleDaily(String line,String date); | 141 | Map<String,Object> scheduleDaily(String line,String date); |
| 142 | - List<ScheduleRealInfo> realScheduleList(String line,String date); | 142 | + List<ScheduleRealInfo> realScheduleList(String line,String date,String sfss); |
| 143 | List<ScheduleRealInfo> realScheduleList_zrw(String line,String date); | 143 | List<ScheduleRealInfo> realScheduleList_zrw(String line,String date); |
| 144 | List<ScheduleRealInfo> realScheduleListQp(String line,String date); | 144 | List<ScheduleRealInfo> realScheduleListQp(String line,String date); |
| 145 | 145 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -73,6 +73,7 @@ import com.bsth.service.impl.BaseServiceImpl; | @@ -73,6 +73,7 @@ import com.bsth.service.impl.BaseServiceImpl; | ||
| 73 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 73 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 74 | import com.bsth.service.report.CulateMileageService; | 74 | import com.bsth.service.report.CulateMileageService; |
| 75 | import com.bsth.service.report.ReportService; | 75 | import com.bsth.service.report.ReportService; |
| 76 | +import com.bsth.service.report.impl.CulateMileageServiceImpl; | ||
| 76 | import com.bsth.service.schedule.SchedulePlanInfoService; | 77 | import com.bsth.service.schedule.SchedulePlanInfoService; |
| 77 | import com.bsth.service.sys.DictionaryService; | 78 | import com.bsth.service.sys.DictionaryService; |
| 78 | import com.bsth.service.sys.DutyEmployeeService; | 79 | import com.bsth.service.sys.DutyEmployeeService; |
| @@ -4003,7 +4004,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4003,7 +4004,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4003 | } | 4004 | } |
| 4004 | 4005 | ||
| 4005 | @Override | 4006 | @Override |
| 4006 | - public List<ScheduleRealInfo> realScheduleList(String line, String date) { | 4007 | + public List<ScheduleRealInfo> realScheduleList(String line, String date,String sfss) { |
| 4007 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 4008 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 4008 | String lpName = "lpName"; | 4009 | String lpName = "lpName"; |
| 4009 | String zdsj = ""; | 4010 | String zdsj = ""; |
| @@ -4011,7 +4012,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4011,7 +4012,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4011 | String zdsj1 = ""; | 4012 | String zdsj1 = ""; |
| 4012 | String zdsjActual1 = ""; | 4013 | String zdsjActual1 = ""; |
| 4013 | List<ScheduleRealInfo> listInfo = scheduleRealInfoRepository.scheduleDdrb(line, date); | 4014 | List<ScheduleRealInfo> listInfo = scheduleRealInfoRepository.scheduleDdrb(line, date); |
| 4014 | - | 4015 | + |
| 4016 | + if("1".equals(sfss)){ | ||
| 4017 | + List<ScheduleRealInfo> lists2 = new ArrayList<ScheduleRealInfo>(); | ||
| 4018 | + for (int i = 0; i < listInfo.size(); i++) { | ||
| 4019 | + ScheduleRealInfo sch = listInfo.get(i); | ||
| 4020 | + if (sch.isSflj()){ | ||
| 4021 | + continue; | ||
| 4022 | + } | ||
| 4023 | + if(CulateMileageServiceImpl.isInOut(sch)){ | ||
| 4024 | + continue; | ||
| 4025 | + } | ||
| 4026 | + Set<ChildTaskPlan> cts = sch.getcTasks(); | ||
| 4027 | + if (cts != null && cts.size() > 0) {//有子任务且烂班 | ||
| 4028 | + boolean flag = false; | ||
| 4029 | + for(ChildTaskPlan c : cts){ | ||
| 4030 | + if(c.getMileageType().equals("service") && c.isDestroy()){ | ||
| 4031 | + flag=true; | ||
| 4032 | + } | ||
| 4033 | + } | ||
| 4034 | + if(flag){ | ||
| 4035 | + lists2.add(sch); | ||
| 4036 | + } | ||
| 4037 | + }else if(sch.getStatus() == -1 && !sch.isCcService()){//主任务烂班 | ||
| 4038 | + lists2.add(sch); | ||
| 4039 | + } | ||
| 4040 | + } | ||
| 4041 | + listInfo=lists2; | ||
| 4042 | + } | ||
| 4015 | /* | 4043 | /* |
| 4016 | * 对计划发车时间相同的班次进行排序 out最前 in最后 | 4044 | * 对计划发车时间相同的班次进行排序 out最前 in最后 |
| 4017 | */ | 4045 | */ |
| @@ -5790,7 +5818,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -5790,7 +5818,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 5790 | else if(genre.equals("zrw")) | 5818 | else if(genre.equals("zrw")) |
| 5791 | list3=this.realScheduleList_zrw(line, date); | 5819 | list3=this.realScheduleList_zrw(line, date); |
| 5792 | else | 5820 | else |
| 5793 | - list3=this.realScheduleList(line, date); | 5821 | + list3=this.realScheduleList(line, date, null); |
| 5794 | Map<String, Object> nMap = new HashMap<String, Object>(); | 5822 | Map<String, Object> nMap = new HashMap<String, Object>(); |
| 5795 | nMap.put("date", xlName + date); | 5823 | nMap.put("date", xlName + date); |
| 5796 | nMap.put("jls", list1.get(0).get("jls")); | 5824 | nMap.put("jls", list1.get(0).get("jls")); |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| @@ -42,6 +42,13 @@ | @@ -42,6 +42,13 @@ | ||
| 42 | <span class="item-label" style="width: 80px;">分公司: </span> | 42 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 43 | <select class="form-control" name="subCompany" id="fgsdmDdrb" style="width: 180px;"></select> | 43 | <select class="form-control" name="subCompany" id="fgsdmDdrb" style="width: 180px;"></select> |
| 44 | </div> | 44 | </div> |
| 45 | + <div style="display: inline-block; margin-left: 33px;"> | ||
| 46 | + <span class="item-label" style="width: 80px;">是否少驶: </span> | ||
| 47 | + <select class="form-control" name="sfss" id="sfss" style="width: 180px;"> | ||
| 48 | + <option value="0">全部</option> | ||
| 49 | + <option value="1">少驶</option> | ||
| 50 | + </select> | ||
| 51 | + </div> | ||
| 45 | <div style="margin-top: 2px"></div> | 52 | <div style="margin-top: 2px"></div> |
| 46 | <div style="display: inline-block;"> | 53 | <div style="display: inline-block;"> |
| 47 | <span class="item-label" style="width: 80px;margin-left: 33px;">线路: </span> | 54 | <span class="item-label" style="width: 80px;margin-left: 33px;">线路: </span> |
| @@ -393,7 +400,7 @@ | @@ -393,7 +400,7 @@ | ||
| 393 | var line = $("#line").val(); | 400 | var line = $("#line").val(); |
| 394 | var xlName = $("#select2-line-container").html(); | 401 | var xlName = $("#select2-line-container").html(); |
| 395 | var date = $("#date").val(); | 402 | var date = $("#date").val(); |
| 396 | - | 403 | + var sfss = $("#sfss").val(); |
| 397 | function getTime(list){ | 404 | function getTime(list){ |
| 398 | $.each(list, function(i, obj) { | 405 | $.each(list, function(i, obj) { |
| 399 | if(obj.zdsj != null && obj.zdsjActual != null ){ | 406 | if(obj.zdsj != null && obj.zdsjActual != null ){ |
| @@ -445,6 +452,7 @@ | @@ -445,6 +452,7 @@ | ||
| 445 | line = $("#line").val(); | 452 | line = $("#line").val(); |
| 446 | xlName = $("#select2-line-container").html(); | 453 | xlName = $("#select2-line-container").html(); |
| 447 | date = $("#date").val(); | 454 | date = $("#date").val(); |
| 455 | + sfss = $("#sfss").val(); | ||
| 448 | $("#rqxs").html(date); | 456 | $("#rqxs").html(date); |
| 449 | if(date == null || date.length == 0){ | 457 | if(date == null || date.length == 0){ |
| 450 | layer.msg("请选择时间"); | 458 | layer.msg("请选择时间"); |
| @@ -469,7 +477,7 @@ | @@ -469,7 +477,7 @@ | ||
| 469 | divFrom2 = window.document.getElementById('forms_1'); | 477 | divFrom2 = window.document.getElementById('forms_1'); |
| 470 | divFrom2.style.width=divFrom1.offsetWidth+"px"; | 478 | divFrom2.style.width=divFrom1.offsetWidth+"px"; |
| 471 | }); | 479 | }); |
| 472 | - $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){ | 480 | + $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query",sfss:sfss},function(result){ |
| 473 | getTime(result); | 481 | getTime(result); |
| 474 | var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); | 482 | var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); |
| 475 | $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3); | 483 | $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3); |