Commit 4e3094d59c6beec627d4315ef35fbaa7dd94d1d8

Authored by yiming
1 parent c92a4992

调度日报,新增少驶筛选,可只查询少驶班次。

src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -582,8 +582,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
582 582 }
583 583  
584 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 589 @RequestMapping(value="/realScheduleList_zrw")
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -139,7 +139,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
139 139  
140 140 Long getMaxId();
141 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 143 List<ScheduleRealInfo> realScheduleList_zrw(String line,String date);
144 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 73 import com.bsth.service.realcontrol.ScheduleRealInfoService;
74 74 import com.bsth.service.report.CulateMileageService;
75 75 import com.bsth.service.report.ReportService;
  76 +import com.bsth.service.report.impl.CulateMileageServiceImpl;
76 77 import com.bsth.service.schedule.SchedulePlanInfoService;
77 78 import com.bsth.service.sys.DictionaryService;
78 79 import com.bsth.service.sys.DutyEmployeeService;
... ... @@ -4003,7 +4004,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4003 4004 }
4004 4005  
4005 4006 @Override
4006   - public List<ScheduleRealInfo> realScheduleList(String line, String date) {
  4007 + public List<ScheduleRealInfo> realScheduleList(String line, String date,String sfss) {
4007 4008 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
4008 4009 String lpName = "lpName";
4009 4010 String zdsj = "";
... ... @@ -4011,7 +4012,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4011 4012 String zdsj1 = "";
4012 4013 String zdsjActual1 = "";
4013 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 4044 * 对计划发车时间相同的班次进行排序 out最前 in最后
4017 4045 */
... ... @@ -5790,7 +5818,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
5790 5818 else if(genre.equals("zrw"))
5791 5819 list3=this.realScheduleList_zrw(line, date);
5792 5820 else
5793   - list3=this.realScheduleList(line, date);
  5821 + list3=this.realScheduleList(line, date, null);
5794 5822 Map<String, Object> nMap = new HashMap<String, Object>();
5795 5823 nMap.put("date", xlName + date);
5796 5824 nMap.put("jls", list1.get(0).get("jls"));
... ...
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -42,6 +42,13 @@
42 42 <span class="item-label" style="width: 80px;">分公司: </span>
43 43 <select class="form-control" name="subCompany" id="fgsdmDdrb" style="width: 180px;"></select>
44 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 52 <div style="margin-top: 2px"></div>
46 53 <div style="display: inline-block;">
47 54 <span class="item-label" style="width: 80px;margin-left: 33px;">线路: </span>
... ... @@ -393,7 +400,7 @@
393 400 var line = $("#line").val();
394 401 var xlName = $("#select2-line-container").html();
395 402 var date = $("#date").val();
396   -
  403 + var sfss = $("#sfss").val();
397 404 function getTime(list){
398 405 $.each(list, function(i, obj) {
399 406 if(obj.zdsj != null && obj.zdsjActual != null ){
... ... @@ -445,6 +452,7 @@
445 452 line = $("#line").val();
446 453 xlName = $("#select2-line-container").html();
447 454 date = $("#date").val();
  455 + sfss = $("#sfss").val();
448 456 $("#rqxs").html(date);
449 457 if(date == null || date.length == 0){
450 458 layer.msg("请选择时间");
... ... @@ -469,7 +477,7 @@
469 477 divFrom2 = window.document.getElementById('forms_1');
470 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 481 getTime(result);
474 482 var scheduleDaily_3 = template('scheduleDaily_3',{list:result});
475 483 $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3);
... ...