Commit 10d26d62edc9073778d7f319a17197fa3bcca7c0

Authored by 娄高锋
1 parent ce469abd

2603十三张报表改为多选分公司查询。

Showing 64 changed files with 975 additions and 412 deletions
src/main/java/com/bsth/controller/BusIntervalController.java
@@ -34,8 +34,8 @@ public class BusIntervalController { @@ -34,8 +34,8 @@ public class BusIntervalController {
34 } 34 }
35 35
36 @RequestMapping(value = "/timeAndSpeed", method = RequestMethod.GET) 36 @RequestMapping(value = "/timeAndSpeed", method = RequestMethod.GET)
37 - public Map<String,Object> timeAndSpeed(@RequestParam Map<String, Object> map){  
38 - return busIntervalService.timeAndSpeed(map); 37 + public Map<String,Object> timeAndSpeed(@RequestParam Map<String, Object> map, String[] subCompany){
  38 + return busIntervalService.timeAndSpeed(map, subCompany);
39 } 39 }
40 40
41 @RequestMapping(value = "/lineTimeAnaliy", method = RequestMethod.GET) 41 @RequestMapping(value = "/lineTimeAnaliy", method = RequestMethod.GET)
@@ -44,13 +44,13 @@ public class BusIntervalController { @@ -44,13 +44,13 @@ public class BusIntervalController {
44 } 44 }
45 45
46 @RequestMapping(value = "/lbStatuAnaly", method = RequestMethod.GET) 46 @RequestMapping(value = "/lbStatuAnaly", method = RequestMethod.GET)
47 - public List<Map<String,Object>> lbStatuAnaly(@RequestParam Map<String, Object> map){  
48 - return busIntervalService.lbStatuAnaly(map); 47 + public List<Map<String,Object>> lbStatuAnaly(@RequestParam Map<String, Object> map, String[] subCompany){
  48 + return busIntervalService.lbStatuAnaly(map, subCompany);
49 } 49 }
50 50
51 @RequestMapping(value = "/correctStatis", method = RequestMethod.GET) 51 @RequestMapping(value = "/correctStatis", method = RequestMethod.GET)
52 - public List<Map<String,Object>> correctStatis(@RequestParam Map<String, Object> map){  
53 - return busIntervalService.correctStatis(map); 52 + public List<Map<String,Object>> correctStatis(@RequestParam Map<String, Object> map, String[] subCompany){
  53 + return busIntervalService.correctStatis(map, subCompany);
54 } 54 }
55 55
56 @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET) 56 @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET)
src/main/java/com/bsth/controller/calc/CalcWaybillController.java
@@ -173,15 +173,15 @@ public class CalcWaybillController extends BaseController&lt;CalcWaybill, Integer&gt; @@ -173,15 +173,15 @@ public class CalcWaybillController extends BaseController&lt;CalcWaybill, Integer&gt;
173 } 173 }
174 174
175 @RequestMapping(value="/calcStatisticsDaily") 175 @RequestMapping(value="/calcStatisticsDaily")
176 - public List<CalcStatistics> calcStatisticsDaily(@RequestParam Map<String, Object> map){ 176 + public List<CalcStatistics> calcStatisticsDaily(@RequestParam Map<String, Object> map, String[] fgsdm){
177 String gsdm=""; 177 String gsdm="";
178 if(map.get("gsdm")!=null){ 178 if(map.get("gsdm")!=null){
179 gsdm=map.get("gsdm").toString().trim(); 179 gsdm=map.get("gsdm").toString().trim();
180 } 180 }
181 - String fgsdm="";  
182 - if(map.get("fgsdm")!=null){  
183 - fgsdm=map.get("fgsdm").toString().trim();  
184 - } 181 +// String fgsdm="";
  182 +// if(map.get("fgsdm")!=null){
  183 +// fgsdm=map.get("fgsdm").toString().trim();
  184 +// }
185 String line=""; 185 String line="";
186 if(map.get("line")!=null){ 186 if(map.get("line")!=null){
187 line=map.get("line").toString().trim(); 187 line=map.get("line").toString().trim();
@@ -390,7 +390,11 @@ public class CalcWaybillController extends BaseController&lt;CalcWaybill, Integer&gt; @@ -390,7 +390,11 @@ public class CalcWaybillController extends BaseController&lt;CalcWaybill, Integer&gt;
390 } 390 }
391 391
392 @RequestMapping(value="/getBusMileage") 392 @RequestMapping(value="/getBusMileage")
393 - public List<Map<String, Object>> getBusMileage(@RequestParam Map<String, Object> map){ 393 + public List<Map<String, Object>> getBusMileage(@RequestParam Map<String, Object> map, String[] fgsdm){
  394 + String gsdm="";
  395 + if(map.get("gsdm")!=null){
  396 + gsdm=map.get("gsdm").toString().trim();
  397 + }
394 String line=""; 398 String line="";
395 if(map.get("line")!=null){ 399 if(map.get("line")!=null){
396 line=map.get("line").toString().trim(); 400 line=map.get("line").toString().trim();
@@ -419,11 +423,11 @@ public class CalcWaybillController extends BaseController&lt;CalcWaybill, Integer&gt; @@ -419,11 +423,11 @@ public class CalcWaybillController extends BaseController&lt;CalcWaybill, Integer&gt;
419 if(map.get("type")!=null){ 423 if(map.get("type")!=null){
420 type=map.get("type").toString().trim(); 424 type=map.get("type").toString().trim();
421 } 425 }
422 - return calcWaybillService.getBusMileage(line, date, date2, xlName, zt, by, type); 426 + return calcWaybillService.getBusMileage(gsdm, fgsdm,line, date, date2, xlName, zt, by, type);
423 } 427 }
424 428
425 @RequestMapping(value="/calcDetailMonthlyNew") 429 @RequestMapping(value="/calcDetailMonthlyNew")
426 - public List<List<String>> calcDetailMonthlyNew(@RequestParam Map<String, Object> map){  
427 - return calcWaybillService.calcDetailMonthlyNew(map); 430 + public List<List<String>> calcDetailMonthlyNew(@RequestParam Map<String, Object> map, String[] fgsdm){
  431 + return calcWaybillService.calcDetailMonthlyNew(map, fgsdm);
428 } 432 }
429 } 433 }
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -430,15 +430,15 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo, @@ -430,15 +430,15 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
430 } 430 }
431 431
432 @RequestMapping(value="/statisticsDailyTj") 432 @RequestMapping(value="/statisticsDailyTj")
433 - public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){ 433 + public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map, String[] fgsdm){
434 String gsdm=""; 434 String gsdm="";
435 if(map.get("gsdm")!=null){ 435 if(map.get("gsdm")!=null){
436 gsdm=map.get("gsdm").toString(); 436 gsdm=map.get("gsdm").toString();
437 } 437 }
438 - String fgsdm="";  
439 - if(map.get("fgsdm")!=null){  
440 - fgsdm=map.get("fgsdm").toString();  
441 - } 438 +// String fgsdm="";
  439 +// if(map.get("fgsdm")!=null){
  440 +// fgsdm=map.get("fgsdm").toString();
  441 +// }
442 String line=""; 442 String line="";
443 if(map.get("line")!=null){ 443 if(map.get("line")!=null){
444 line=map.get("line").toString(); 444 line=map.get("line").toString();
src/main/java/com/bsth/controller/report/CalcSheetController.java
@@ -19,8 +19,8 @@ public class CalcSheetController extends BaseController&lt;CalcSheet, Integer&gt;{ @@ -19,8 +19,8 @@ public class CalcSheetController extends BaseController&lt;CalcSheet, Integer&gt;{
19 CalcSheetService calcSheetService; 19 CalcSheetService calcSheetService;
20 //发车到站准点率统计 20 //发车到站准点率统计
21 @RequestMapping(value = "/countList",method = RequestMethod.GET) 21 @RequestMapping(value = "/countList",method = RequestMethod.GET)
22 - public List<CalcSheet> countList(@RequestParam Map<String, Object> map){  
23 - List<CalcSheet> list=calcSheetService.countListCalcSheet(map); 22 + public List<CalcSheet> countList(@RequestParam Map<String, Object> map, String[] fgs){
  23 + List<CalcSheet> list=calcSheetService.countListCalcSheet(map, fgs);
24 return list; 24 return list;
25 } 25 }
26 //发车到站准点率列表 26 //发车到站准点率列表
@@ -46,15 +46,15 @@ public class CalcSheetController extends BaseController&lt;CalcSheet, Integer&gt;{ @@ -46,15 +46,15 @@ public class CalcSheetController extends BaseController&lt;CalcSheet, Integer&gt;{
46 46
47 //营运线路出车率统计 47 //营运线路出车率统计
48 @RequestMapping(value = "/calcTurnoutrate",method = RequestMethod.GET) 48 @RequestMapping(value = "/calcTurnoutrate",method = RequestMethod.GET)
49 - public List<Map<String, Object>> calcTurnoutrate(@RequestParam Map<String, Object> map){  
50 - List<Map<String, Object>> list=calcSheetService.calcTurnoutrate(map); 49 + public List<Map<String, Object>> calcTurnoutrate(@RequestParam Map<String, Object> map, String[] fgsdmTurn){
  50 + List<Map<String, Object>> list=calcSheetService.calcTurnoutrate(map, fgsdmTurn);
51 return list; 51 return list;
52 } 52 }
53 53
54 54
55 @RequestMapping(value = "/calcTurnoutrateZgf",method = RequestMethod.GET) 55 @RequestMapping(value = "/calcTurnoutrateZgf",method = RequestMethod.GET)
56 - public List<Map<String, Object>> calcTurnoutrateZgf(@RequestParam Map<String, Object> map){  
57 - List<Map<String, Object>> list=calcSheetService.calcTurnoutrateZgf(map); 56 + public List<Map<String, Object>> calcTurnoutrateZgf(@RequestParam Map<String, Object> map, String[] fgsdmTurn){
  57 + List<Map<String, Object>> list=calcSheetService.calcTurnoutrateZgf(map, fgsdmTurn);
58 return list; 58 return list;
59 } 59 }
60 } 60 }
src/main/java/com/bsth/controller/report/ReportController.java
@@ -329,8 +329,8 @@ public class ReportController { @@ -329,8 +329,8 @@ public class ReportController {
329 } 329 }
330 330
331 @RequestMapping(value="/countBusMileage") 331 @RequestMapping(value="/countBusMileage")
332 - public List<Map<String,Object>> countBusMileage(@RequestParam Map<String, Object> map){  
333 - return service.countByBusList(map); 332 + public List<Map<String,Object>> countBusMileage(@RequestParam Map<String, Object> map, String[] fgsdm){
  333 + return service.countByBusList(map, fgsdm);
334 } 334 }
335 335
336 @RequestMapping(value="/countDjg") 336 @RequestMapping(value="/countDjg")
@@ -403,7 +403,7 @@ public class ReportController { @@ -403,7 +403,7 @@ public class ReportController {
403 * @return Map<String, Object> 403 * @return Map<String, Object>
404 */ 404 */
405 @RequestMapping(value = "/calcDetailMonthlyE" , method = RequestMethod.POST) 405 @RequestMapping(value = "/calcDetailMonthlyE" , method = RequestMethod.POST)
406 - public Map<String, Object> calcDetailMonthlyE(@RequestParam Map<String,Object> map) {  
407 - return service.calcDetailMonthlyE(map); 406 + public Map<String, Object> calcDetailMonthlyE(@RequestParam Map<String,Object> map, String[] fgsdm) {
  407 + return service.calcDetailMonthlyE(map, fgsdm);
408 } 408 }
409 } 409 }
src/main/java/com/bsth/controller/schedule/PeopleCarPlanController.java
@@ -25,8 +25,8 @@ public class PeopleCarPlanController { @@ -25,8 +25,8 @@ public class PeopleCarPlanController {
25 } 25 }
26 26
27 @RequestMapping(value="/workDaily", method = RequestMethod.GET) 27 @RequestMapping(value="/workDaily", method = RequestMethod.GET)
28 - public List<Map<String,Object>> workDaily(@RequestParam Map<String, Object> map){  
29 - return peopleCarPlanService.workDaily(map); 28 + public List<Map<String,Object>> workDaily(@RequestParam Map<String, Object> map, String[] subCompany){
  29 + return peopleCarPlanService.workDaily(map, subCompany);
30 } 30 }
31 31
32 @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) 32 @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET)
@@ -50,8 +50,8 @@ public class PeopleCarPlanController { @@ -50,8 +50,8 @@ public class PeopleCarPlanController {
50 } 50 }
51 51
52 @RequestMapping(value="/firstAndLastBus_sum", method = RequestMethod.GET) 52 @RequestMapping(value="/firstAndLastBus_sum", method = RequestMethod.GET)
53 - public List<Map<String,Object>> firstAndLastBus_sum(@RequestParam Map<String, Object> map){  
54 - return peopleCarPlanService.firstAndLastBus_sum(map); 53 + public List<Map<String,Object>> firstAndLastBus_sum(@RequestParam Map<String, Object> map, String[] subCompany){
  54 + return peopleCarPlanService.firstAndLastBus_sum(map, subCompany);
55 } 55 }
56 56
57 @RequestMapping(value="/commandState", method = RequestMethod.GET) 57 @RequestMapping(value="/commandState", method = RequestMethod.GET)
src/main/java/com/bsth/repository/calc/CalcBusMileageRepository.java
@@ -9,6 +9,7 @@ import com.bsth.repository.BaseRepository; @@ -9,6 +9,7 @@ import com.bsth.repository.BaseRepository;
9 9
10 import org.springframework.data.jpa.repository.Modifying; 10 import org.springframework.data.jpa.repository.Modifying;
11 import org.springframework.data.jpa.repository.Query; 11 import org.springframework.data.jpa.repository.Query;
  12 +import org.springframework.data.repository.query.Param;
12 import org.springframework.stereotype.Repository; 13 import org.springframework.stereotype.Repository;
13 14
14 /** 15 /**
@@ -25,6 +26,15 @@ public interface CalcBusMileageRepository extends BaseRepository&lt;CalcBusMileage, @@ -25,6 +26,15 @@ public interface CalcBusMileageRepository extends BaseRepository&lt;CalcBusMileage,
25 @Query(value="select DISTINCT c from CalcBusMileage c where c.xl = ?1 and c.dateStr between ?2 and ?3 order by c.id") 26 @Query(value="select DISTINCT c from CalcBusMileage c where c.xl = ?1 and c.dateStr between ?2 and ?3 order by c.id")
26 List<CalcBusMileage> selectByDateAndLineTj2(String line,String date,String date2); 27 List<CalcBusMileage> selectByDateAndLineTj2(String line,String date,String date2);
27 28
  29 + //按照时间段统计,日期公司分公司线路
  30 + @Query(value="select DISTINCT c from CalcBusMileage c where c.dateStr between :date and :date2"
  31 + + " and (:line IS NULL OR :line = '' OR c.xl = :line)"
  32 + + " and (:gsdm IS NULL OR :gsdm = '' OR c.gsdm = :gsdm)"
  33 + + " and (COALESCE(:fgsdm) IS NULL OR c.fgsdm IN :fgsdm)"
  34 + + " order by c.id")
  35 + List<CalcBusMileage> selectByDateAndLineTj3(@Param("date") String date,@Param("date2") String date2,
  36 + @Param("line") String line,@Param("gsdm") String gsdm,@Param("fgsdm") List<String> fgsdm);
  37 +
28 //按照日期和线路删除数据 38 //按照日期和线路删除数据
29 @Modifying 39 @Modifying
30 @Transactional 40 @Transactional
src/main/java/com/bsth/repository/calc/CalcIntervalRepository.java
@@ -41,10 +41,16 @@ public interface CalcIntervalRepository extends BaseRepository&lt;CalcInterval, Int @@ -41,10 +41,16 @@ public interface CalcIntervalRepository extends BaseRepository&lt;CalcInterval, Int
41 41
42 //按照时间段,公司统计 42 //按照时间段,公司统计
43 @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime " 43 @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
44 - + " from bsth_c_calc_interval where gsbm like %?1% and fgsbm like %?2% and date >=?3 and date <=?4 " 44 + + " from bsth_c_calc_interval where gsbm like %?1% and fgsbm in ?2 and date >=?3 and date <=?4 "
45 + " group by xl_bm,gsbm,fgsbm",nativeQuery=true) 45 + " group by xl_bm,gsbm,fgsbm",nativeQuery=true)
46 List<Object[]> countByDateAndLine(String gsbm,String fgsbm,String date,String date2); 46 List<Object[]> countByDateAndLine(String gsbm,String fgsbm,String date,String date2);
47 47
  48 + //按照时间段,公司统计
  49 + @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
  50 + + " from bsth_c_calc_interval where (:gsbm IS NULL OR :gsbm = '' OR gsbm = :gsbm) and (COALESCE(:fgsbm) IS NULL OR fgsbm IN (:fgsbm)) and date >= :date and date <= :date2 "
  51 + + " group by xl_bm,gsbm,fgsbm",nativeQuery=true)
  52 + List<Object[]> countByDateAndLine2(@Param("gsbm") String gsbm,@Param("fgsbm") List<String> fgsbm,@Param("date") String date,@Param("date2") String date2);
  53 +
48 //按照时间段,线路统计 54 //按照时间段,线路统计
49 @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime " 55 @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
50 + " from bsth_c_calc_interval where xl_bm =?1 and date >=?2 and date <=?3 " 56 + " from bsth_c_calc_interval where xl_bm =?1 and date >=?2 and date <=?3 "
src/main/java/com/bsth/repository/calc/CalcStatisticsRepository.java
@@ -12,6 +12,7 @@ import com.bsth.repository.BaseRepository; @@ -12,6 +12,7 @@ import com.bsth.repository.BaseRepository;
12 import org.springframework.data.jpa.repository.EntityGraph; 12 import org.springframework.data.jpa.repository.EntityGraph;
13 import org.springframework.data.jpa.repository.Modifying; 13 import org.springframework.data.jpa.repository.Modifying;
14 import org.springframework.data.jpa.repository.Query; 14 import org.springframework.data.jpa.repository.Query;
  15 +import org.springframework.data.repository.query.Param;
15 import org.springframework.stereotype.Repository; 16 import org.springframework.stereotype.Repository;
16 17
17 /** 18 /**
@@ -31,6 +32,14 @@ public interface CalcStatisticsRepository extends BaseRepository&lt;CalcStatistics, @@ -31,6 +32,14 @@ public interface CalcStatisticsRepository extends BaseRepository&lt;CalcStatistics,
31 //按照时间段统计 32 //按照时间段统计
32 @Query(value="select DISTINCT c from CalcStatistics c where c.dateStr between ?1 and ?2 order by c.gsdm,c.fgsdm,c.xl") 33 @Query(value="select DISTINCT c from CalcStatistics c where c.dateStr between ?1 and ?2 order by c.gsdm,c.fgsdm,c.xl")
33 List<CalcStatistics> selectByDateAndLineTj3(String date,String date2); 34 List<CalcStatistics> selectByDateAndLineTj3(String date,String date2);
  35 +
  36 + //按照时间段统计,公司下线路
  37 + @Query(value="select DISTINCT c from CalcStatistics c where (:line IS NULL OR :line = '' OR c.xl = :line)"
  38 + + " and c.dateStr between :date and :date2 and (:gsdm IS NULL OR :gsdm = '' OR c.gsdm = :gsdm)"
  39 + + " and (COALESCE(:fgsdm) IS NULL OR c.fgsdm IN :fgsdm) order by c.fgsdm,c.xl")
  40 + List<CalcStatistics> selectByDateAndLineTj4(@Param("line") String line,
  41 + @Param("date") String date,@Param("date2") String date2,
  42 + @Param("gsdm") String gsdm,@Param("fgsdm") List<String> fgsdm);
34 43
35 //按照日期和线路删除数据 44 //按照日期和线路删除数据
36 @Modifying 45 @Modifying
src/main/java/com/bsth/repository/calc/CalcWaybillRepository.java
@@ -15,6 +15,7 @@ import com.bsth.repository.BaseRepository; @@ -15,6 +15,7 @@ import com.bsth.repository.BaseRepository;
15 import org.springframework.data.jpa.repository.EntityGraph; 15 import org.springframework.data.jpa.repository.EntityGraph;
16 import org.springframework.data.jpa.repository.Modifying; 16 import org.springframework.data.jpa.repository.Modifying;
17 import org.springframework.data.jpa.repository.Query; 17 import org.springframework.data.jpa.repository.Query;
  18 +import org.springframework.data.repository.query.Param;
18 import org.springframework.stereotype.Repository; 19 import org.springframework.stereotype.Repository;
19 20
20 /** 21 /**
@@ -90,21 +91,29 @@ public interface CalcWaybillRepository extends BaseRepository&lt;CalcWaybill, Integ @@ -90,21 +91,29 @@ public interface CalcWaybillRepository extends BaseRepository&lt;CalcWaybill, Integ
90 91
91 92
92 //按照时间段统计,公司下线路 (驾驶员) 93 //按照时间段统计,公司下线路 (驾驶员)
93 - @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= ?1 and c.rqStr <= ?2 and c.gsdm in(?3) and c.fgsdm in(?4) " +  
94 - "and c.xl in (select l.lineCode from Line l where l.nature in (?5) and l.lineCode in (?6)) order by c.jGh,c.fgsdm,c.xl,c.rqStr")  
95 - List<CalcWaybill> scheduleByJsy2(String date, String date2, List<String> gsdm, List<String> fgsdm, List<String> nature, List<String> line); 94 + @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= :date and c.rqStr <= :date2 and c.gsdm in(:gsdm) and (:fgsdmStr = '' OR c.fgsdm IN :fgsdms) " +
  95 + "and c.xl in (select l.lineCode from Line l where l.nature in (:nature) and l.lineCode in (:line)) order by c.jGh,c.fgsdm,c.xl,c.rqStr")
  96 + List<CalcWaybill> scheduleByJsy2(@Param("date") String date,@Param("date2") String date2,
  97 + @Param("gsdm") List<String> gsdm,@Param("fgsdmStr") String fgsdmStr,@Param("fgsdms") List<String> fgsdms,
  98 + @Param("nature") List<String> nature,@Param("line") List<String> line);
96 //按照时间段统计,公司下线路 (售票员) coalesce(c.sGh,'') 99 //按照时间段统计,公司下线路 (售票员) coalesce(c.sGh,'')
97 - @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= ?1 and c.rqStr <= ?2 and c.gsdm in(?3) and c.fgsdm in(?4) and c.sGh <> null and c.sGh <> '' " +  
98 - "and c.xl in (select l.lineCode from Line l where l.nature in (?5) and l.lineCode in (?6)) order by c.sGh,c.fgsdm,c.xl,c.rqStr")  
99 - List<CalcWaybill> scheduleBySpy2(String date, String date2, List<String> gsdm, List<String> fgsdm, List<String> nature, List<String> line); 100 + @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= :date and c.rqStr <= :date2 and c.gsdm in(:gsdm) and (:fgsdmStr = '' OR c.fgsdm IN :fgsdms) and c.sGh <> null and c.sGh <> '' " +
  101 + "and c.xl in (select l.lineCode from Line l where l.nature in (:nature) and l.lineCode in (:line)) order by c.sGh,c.fgsdm,c.xl,c.rqStr")
  102 + List<CalcWaybill> scheduleBySpy2(@Param("date") String date,@Param("date2") String date2,
  103 + @Param("gsdm") List<String> gsdm,@Param("fgsdmStr") String fgsdmStr,@Param("fgsdms") List<String> fgsdms,
  104 + @Param("nature") List<String> nature,@Param("line") List<String> line);
100 //按照时间段统计,公司下线路 (车辆自编号) 105 //按照时间段统计,公司下线路 (车辆自编号)
101 - @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= ?1 and c.rqStr <= ?2 and c.gsdm in(?3) and c.fgsdm in(?4) " +  
102 - "and c.xl in (select l.lineCode from Line l where l.nature in (?5) and l.lineCode in (?6)) order by c.cl,c.fgsdm,c.xl,c.rqStr")  
103 - List<CalcWaybill> scheduleByZbh2(String date, String date2, List<String> gsdm, List<String> fgsdm, List<String> nature, List<String> line); 106 + @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= :date and c.rqStr <= :date2 and c.gsdm in(:gsdm) and (:fgsdmStr = '' OR c.fgsdm IN :fgsdms) " +
  107 + "and c.xl in (select l.lineCode from Line l where l.nature in (:nature) and l.lineCode in (:line)) order by c.cl,c.fgsdm,c.xl,c.rqStr")
  108 + List<CalcWaybill> scheduleByZbh2(@Param("date") String date,@Param("date2") String date2,
  109 + @Param("gsdm") List<String> gsdm,@Param("fgsdmStr") String fgsdmStr,@Param("fgsdms") List<String> fgsdms,
  110 + @Param("nature") List<String> nature,@Param("line") List<String> line);
104 //按照时间段统计,公司下线路 排序不同 111 //按照时间段统计,公司下线路 排序不同
105 - @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= ?1 and c.rqStr <= ?2 and c.gsdm in(?3) and c.fgsdm in(?4) " +  
106 - "and c.xl in (select l.lineCode from Line l where l.nature in (?5) and l.lineCode in (?6)) order by c.fgsdm,c.xl,c.rqStr")  
107 - List<CalcWaybill> scheduleByDateAndLineTjPx(String date, String date2, List<String> gsdm, List<String> fgsdm, List<String> nature, List<String> line); 112 + @Query(value="select DISTINCT c from CalcWaybill c where c.rqStr >= :date and c.rqStr <= :date2 and c.gsdm in(:gsdm) and (:fgsdmStr = '' OR c.fgsdm IN :fgsdms) " +
  113 + "and c.xl in (select l.lineCode from Line l where l.nature in (:nature) and l.lineCode in (:line)) order by c.fgsdm,c.xl,c.rqStr")
  114 + List<CalcWaybill> scheduleByDateAndLineTjPx(@Param("date") String date,@Param("date2") String date2,
  115 + @Param("gsdm") List<String> gsdm,@Param("fgsdmStr") String fgsdmStr,@Param("fgsdms") List<String> fgsdms,
  116 + @Param("nature") List<String> nature,@Param("line") List<String> line);
108 117
109 //路单没有的加油 118 //路单没有的加油
110 @Query(value="select DISTINCT y from Ylb y left join CalcWaybill c on y.rq = c.rq and y.xlbm = c.xl and y.jsy = c.jGh and y.nbbm = c.cl " + 119 @Query(value="select DISTINCT y from Ylb y left join CalcWaybill c on y.rq = c.rq and y.xlbm = c.xl and y.jsy = c.jGh and y.nbbm = c.cl " +
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -9,6 +9,7 @@ import org.springframework.data.jpa.domain.Specification; @@ -9,6 +9,7 @@ import org.springframework.data.jpa.domain.Specification;
9 import org.springframework.data.jpa.repository.EntityGraph; 9 import org.springframework.data.jpa.repository.EntityGraph;
10 import org.springframework.data.jpa.repository.Modifying; 10 import org.springframework.data.jpa.repository.Modifying;
11 import org.springframework.data.jpa.repository.Query; 11 import org.springframework.data.jpa.repository.Query;
  12 +import org.springframework.data.repository.query.Param;
12 import org.springframework.stereotype.Repository; 13 import org.springframework.stereotype.Repository;
13 14
14 import javax.transaction.Transactional; 15 import javax.transaction.Transactional;
@@ -199,6 +200,11 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI @@ -199,6 +200,11 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
199 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.scheduleDateStr >= ?1 and s.scheduleDateStr<= ?2 order by s.gsBm,s.fgsBm,s.xlBm") 200 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.scheduleDateStr >= ?1 and s.scheduleDateStr<= ?2 order by s.gsBm,s.fgsBm,s.xlBm")
200 List<ScheduleRealInfo> scheduleByDateAndLineTj3(String date,String date2); 201 List<ScheduleRealInfo> scheduleByDateAndLineTj3(String date,String date2);
201 202
  203 + //按照时间段统计
  204 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  205 + @Query(value="select DISTINCT s from ScheduleRealInfo s where (:line IS NULL OR :line = '' OR s.xlBm = :line) and s.scheduleDateStr between :date and :date2 and s.gsBm = :gsdm and (COALESCE(:fgsdm) IS NULL OR s.fgsBm IN :fgsdm) order by s.fgsBm, s.xlBm")
  206 + List<ScheduleRealInfo> scheduleByDateAndLineTj4(@Param("line") String line,@Param("date") String date,@Param("date2") String date2,@Param("gsdm") String gsdm,@Param("fgsdm") List<String> fgsdm);
  207 +
202 //月报表 208 //月报表
203 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) 209 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
204 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.xlBm") 210 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.xlBm")
src/main/java/com/bsth/service/BusIntervalService.java
@@ -3,6 +3,8 @@ package com.bsth.service; @@ -3,6 +3,8 @@ package com.bsth.service;
3 import java.util.List; 3 import java.util.List;
4 import java.util.Map; 4 import java.util.Map;
5 5
  6 +import org.apache.commons.httpclient.methods.multipart.StringPart;
  7 +
6 8
7 public interface BusIntervalService { 9 public interface BusIntervalService {
8 10
@@ -12,13 +14,13 @@ public interface BusIntervalService { @@ -12,13 +14,13 @@ public interface BusIntervalService {
12 14
13 List<Map<String, Object>> interval(Map<String, Object> map); 15 List<Map<String, Object>> interval(Map<String, Object> map);
14 16
15 - Map<String, Object> timeAndSpeed(Map<String, Object> map); 17 + Map<String, Object> timeAndSpeed(Map<String, Object> map, String[] subCompany);
16 18
17 List<Map<String, Object>> lineTimeAnaliy(Map<String, Object> map); 19 List<Map<String, Object>> lineTimeAnaliy(Map<String, Object> map);
18 20
19 - List<Map<String, Object>> lbStatuAnaly(Map<String, Object> map); 21 + List<Map<String, Object>> lbStatuAnaly(Map<String, Object> map, String[] subCompany);
20 22
21 - List<Map<String, Object>> correctStatis(Map<String, Object> map); 23 + List<Map<String, Object>> correctStatis(Map<String, Object> map, String[] subCompany);
22 24
23 Map<String, Object> exportWaybillMore(Map<String, Object> map); 25 Map<String, Object> exportWaybillMore(Map<String, Object> map);
24 26
src/main/java/com/bsth/service/calc/CalcWaybillService.java
@@ -30,7 +30,10 @@ public interface CalcWaybillService extends BaseService&lt;CalcWaybill, Integer&gt; { @@ -30,7 +30,10 @@ public interface CalcWaybillService extends BaseService&lt;CalcWaybill, Integer&gt; {
30 */ 30 */
31 String calcDaily(String rq, String line) throws Exception; 31 String calcDaily(String rq, String line) throws Exception;
32 32
33 - List<CalcStatistics> calcStatisticsDaily(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type,String nature); 33 + /**
  34 + * 2603加了分公司多选,fgsdm字段可以传null或者空数组表示查询全部分公司
  35 + */
  36 + List<CalcStatistics> calcStatisticsDaily(String gsdm,String[] fgsdm, String line, String date, String date2, String xlName, String type,String nature);
34 37
35 List<Map<String, Object>> calcStatisticsDaily2(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type,String nature); 38 List<Map<String, Object>> calcStatisticsDaily2(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type,String nature);
36 39
@@ -40,9 +43,9 @@ public interface CalcWaybillService extends BaseService&lt;CalcWaybill, Integer&gt; { @@ -40,9 +43,9 @@ public interface CalcWaybillService extends BaseService&lt;CalcWaybill, Integer&gt; {
40 43
41 List<Map<String, Object>> getLineMileage(String gsdm, String fgsdm, String line, String date, String date2, String xlName, String zt, String by, String type); 44 List<Map<String, Object>> getLineMileage(String gsdm, String fgsdm, String line, String date, String date2, String xlName, String zt, String by, String type);
42 45
43 - List<Map<String, Object>> getBusMileage(String line, String date, String date2, String xlName, String zt, String by, String type); 46 + List<Map<String, Object>> getBusMileage(String gsdm, String[] fgsdm, String line, String date, String date2, String xlName, String zt, String by, String type);
44 47
45 List<List<String>> calcDetailMonthly(Map<String, Object> map); 48 List<List<String>> calcDetailMonthly(Map<String, Object> map);
46 49
47 - List<List<String>> calcDetailMonthlyNew(Map<String, Object> map); 50 + List<List<String>> calcDetailMonthlyNew(Map<String, Object> map, String[] fgsdm);
48 } 51 }
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
@@ -755,18 +755,25 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -755,18 +755,25 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
755 return o1.compareTo(o2); 755 return o1.compareTo(o2);
756 } 756 }
757 } 757 }
758 - 758 +
  759 + /**
  760 + * 2603加了分公司多选,fgsdm字段可以传null或者空数组表示查询全部分公司
  761 + */
759 @Override 762 @Override
760 - public List<CalcStatistics> calcStatisticsDaily(String gsdm, String fgsdm, 763 + public List<CalcStatistics> calcStatisticsDaily(String gsdm, String[] fgsdm,
761 String line, String date, String date2, String xlName, String type,String nature) { 764 String line, String date, String date2, String xlName, String type,String nature) {
762 // TODO Auto-generated method stub 765 // TODO Auto-generated method stub
763 List<CalcStatistics> listAll = new ArrayList<CalcStatistics>(); 766 List<CalcStatistics> listAll = new ArrayList<CalcStatistics>();
764 - if(gsdm.equals("") && fgsdm.equals("") && line.equals("")){ 767 + if(gsdm.equals("") && (fgsdm==null||fgsdm.length == 0) && line.equals("")){
765 listAll = calcStatisticsRepository.selectByDateAndLineTj3(date, date2); 768 listAll = calcStatisticsRepository.selectByDateAndLineTj3(date, date2);
766 } else if(line.length() > 0){ 769 } else if(line.length() > 0){
767 listAll = calcStatisticsRepository.selectByDateAndLineTj2(line, date, date2); 770 listAll = calcStatisticsRepository.selectByDateAndLineTj2(line, date, date2);
768 } else { 771 } else {
769 - listAll = calcStatisticsRepository.selectByDateAndLineTj(line, date, date2, gsdm, fgsdm); 772 + List<String> fgsdms = null;
  773 + if(fgsdm!=null && fgsdm.length > 0){
  774 + fgsdms = Arrays.asList(fgsdm);
  775 + }
  776 + listAll = calcStatisticsRepository.selectByDateAndLineTj4(line, date, date2, gsdm, fgsdms);
770 } 777 }
771 Map<String, Boolean> lineMap=lineService.lineNature(); 778 Map<String, Boolean> lineMap=lineService.lineNature();
772 List<CalcStatistics> list = new ArrayList<CalcStatistics>(); 779 List<CalcStatistics> list = new ArrayList<CalcStatistics>();
@@ -1535,7 +1542,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1535,7 +1542,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1535 for(Map<String, String> tempMap : gsList){ 1542 for(Map<String, String> tempMap : gsList){
1536 map.put("gsdm", tempMap.get("gsdm").toString()); 1543 map.put("gsdm", tempMap.get("gsdm").toString());
1537 map.put("fgsdm", tempMap.get("fgsdm").toString()); 1544 map.put("fgsdm", tempMap.get("fgsdm").toString());
1538 - List<Map<String, Object>> countByList = reportService.countByBusList(map); 1545 + List<Map<String, Object>> countByList = reportService.countByBusList(map, new String[]{tempMap.get("fgsdm").toString()});
1539 for(Map<String, Object> m : countByList){ 1546 for(Map<String, Object> m : countByList){
1540 if(!m.containsKey("xlName") || m.get("xlName")==null 1547 if(!m.containsKey("xlName") || m.get("xlName")==null
1541 || m.get("xlName").toString().equals("合计")) 1548 || m.get("xlName").toString().equals("合计"))
@@ -1736,11 +1743,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1736,11 +1743,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1736 } 1743 }
1737 1744
1738 @Override 1745 @Override
1739 - public List<Map<String, Object>> getBusMileage(String line, String date, 1746 + public List<Map<String, Object>> getBusMileage(String gsdm, String[] fgsdm, String line, String date,
1740 String date2, String xlName, String zt, String by, String type) { 1747 String date2, String xlName, String zt, String by, String type) {
1741 List<CalcBusMileage> resList = new ArrayList<CalcBusMileage>(); 1748 List<CalcBusMileage> resList = new ArrayList<CalcBusMileage>();
1742 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); 1749 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>();
1743 - List<CalcBusMileage> list = calcBusMileageRepository.selectByDateAndLineTj2(line, date, date2); 1750 +
  1751 + List<String> fgsdms = null;
  1752 + if(fgsdm!=null && fgsdm.length > 0){
  1753 + fgsdms = Arrays.asList(fgsdm);
  1754 + }
  1755 + List<CalcBusMileage> list = calcBusMileageRepository.selectByDateAndLineTj3(date, date2, line, gsdm, fgsdms);
1744 1756
1745 if(zt.equals("zbh")){ 1757 if(zt.equals("zbh")){
1746 List<String> keyList = new ArrayList<String>(); 1758 List<String> keyList = new ArrayList<String>();
@@ -2044,16 +2056,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -2044,16 +2056,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
2044 int flag = 0; 2056 int flag = 0;
2045 if("jsy".equals(statisticalObj)){ 2057 if("jsy".equals(statisticalObj)){
2046 flag = 1; 2058 flag = 1;
2047 - list = calcRepository.scheduleByJsy2(startDate, endDate, gsdm, fgsdm, nature, line); 2059 + list = calcRepository.scheduleByJsy2(startDate, endDate, gsdm, fgsdmStr, fgsdm, nature, line);
2048 } else if("cwy".equals(statisticalObj)){ 2060 } else if("cwy".equals(statisticalObj)){
2049 flag = 2; 2061 flag = 2;
2050 - list = calcRepository.scheduleBySpy2(startDate, endDate, gsdm, fgsdm, nature, line); 2062 + list = calcRepository.scheduleBySpy2(startDate, endDate, gsdm, fgsdmStr, fgsdm, nature, line);
2051 } else if("cl".equals(statisticalObj)){ 2063 } else if("cl".equals(statisticalObj)){
2052 flag = 3; 2064 flag = 3;
2053 - list = calcRepository.scheduleByZbh2( startDate, endDate, gsdm, fgsdm, nature, line); 2065 + list = calcRepository.scheduleByZbh2(startDate, endDate, gsdm, fgsdmStr, fgsdm, nature, line);
2054 } else if("xl".equals(statisticalObj)){ 2066 } else if("xl".equals(statisticalObj)){
2055 flag = 4; 2067 flag = 4;
2056 - list = calcRepository.scheduleByDateAndLineTjPx(startDate, endDate, gsdm, fgsdm, nature, line); 2068 + list = calcRepository.scheduleByDateAndLineTjPx(startDate, endDate, gsdm, fgsdmStr, fgsdm, nature, line);
2057 } 2069 }
2058 2070
2059 2071
@@ -2593,7 +2605,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -2593,7 +2605,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
2593 2605
2594 List<String> list1 = new ArrayList<>(); 2606 List<String> list1 = new ArrayList<>();
2595 list1.add("序号"); 2607 list1.add("序号");
2596 - list1.add("所属公司"); 2608 + list1.add("线队");
2597 list1.add("线路"); 2609 list1.add("线路");
2598 if(flag==1 ||flag==2 ){ 2610 if(flag==1 ||flag==2 ){
2599 list1.add("工号"); 2611 list1.add("工号");
@@ -2778,7 +2790,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -2778,7 +2790,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
2778 2790
2779 //240820重写calcDetailMonthly方法 2791 //240820重写calcDetailMonthly方法
2780 @Override 2792 @Override
2781 - public List<List<String>> calcDetailMonthlyNew(Map<String, Object> map) { 2793 + public List<List<String>> calcDetailMonthlyNew(Map<String, Object> map, String[] fgsdm) {
2782 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); 2794 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
2783 SimpleDateFormat dateFormatMon = new SimpleDateFormat("yyyy-MM"); 2795 SimpleDateFormat dateFormatMon = new SimpleDateFormat("yyyy-MM");
2784 DecimalFormat df = new DecimalFormat("0.000");//格式化小数 2796 DecimalFormat df = new DecimalFormat("0.000");//格式化小数
@@ -2800,13 +2812,22 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -2800,13 +2812,22 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
2800 gsdm.add(gsdms[i]); 2812 gsdm.add(gsdms[i]);
2801 } 2813 }
2802 } 2814 }
2803 - List<String> fgsdm= new ArrayList<>(); 2815 +// List<String> fgsdms = new ArrayList<>();
  2816 +// String fgsdmStr = "";
  2817 +// if(map.get("fgsdm")!=null){
  2818 +// fgsdmStr = map.get("fgsdm").toString().trim();
  2819 +// String[] fgs = fgsdmStr.split(",");
  2820 +// for (int i = 0; i < fgs.length; i++){
  2821 +// fgsdms.add(fgs[i]);
  2822 +// }
  2823 +// }
  2824 + List<String> fgsdms = null; // 空列传值会报错,所以直接传NULL然后SQL判断非空
2804 String fgsdmStr = ""; 2825 String fgsdmStr = "";
2805 - if(map.get("fgsdm")!=null){  
2806 - fgsdmStr = map.get("fgsdm").toString().trim();  
2807 - String[] fgsdms = fgsdmStr.split(",");  
2808 - for (int i = 0; i < fgsdms.length; i++){  
2809 - fgsdm.add(fgsdms[i]); 2826 + if(fgsdm != null && fgsdm.length > 0){
  2827 + fgsdms = new ArrayList<>();
  2828 + for(String fgs : fgsdm){
  2829 + fgsdms.add(fgs);
  2830 + fgsdmStr += fgs;
2810 } 2831 }
2811 } 2832 }
2812 List<String> line= new ArrayList<>(); 2833 List<String> line= new ArrayList<>();
@@ -2885,16 +2906,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -2885,16 +2906,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
2885 int flag = 0; 2906 int flag = 0;
2886 if("jsy".equals(statisticalObj)){ 2907 if("jsy".equals(statisticalObj)){
2887 flag = 1; 2908 flag = 1;
2888 - list = calcRepository.scheduleByJsy2(startDate, endDate, gsdm, fgsdm, nature, line); 2909 + list = calcRepository.scheduleByJsy2(startDate, endDate, gsdm, fgsdmStr, fgsdms, nature, line);
2889 } else if("cwy".equals(statisticalObj)){ 2910 } else if("cwy".equals(statisticalObj)){
2890 flag = 2; 2911 flag = 2;
2891 - list = calcRepository.scheduleBySpy2(startDate, endDate, gsdm, fgsdm, nature, line); 2912 + list = calcRepository.scheduleBySpy2(startDate, endDate, gsdm, fgsdmStr, fgsdms, nature, line);
2892 } else if("cl".equals(statisticalObj)){ 2913 } else if("cl".equals(statisticalObj)){
2893 flag = 3; 2914 flag = 3;
2894 - list = calcRepository.scheduleByZbh2( startDate, endDate, gsdm, fgsdm, nature, line); 2915 + list = calcRepository.scheduleByZbh2(startDate, endDate, gsdm, fgsdmStr, fgsdms, nature, line);
2895 } else if("xl".equals(statisticalObj)){ 2916 } else if("xl".equals(statisticalObj)){
2896 flag = 4; 2917 flag = 4;
2897 - list = calcRepository.scheduleByDateAndLineTjPx(startDate, endDate, gsdm, fgsdm, nature, line); 2918 + list = calcRepository.scheduleByDateAndLineTjPx(startDate, endDate, gsdm, fgsdmStr, fgsdms, nature, line);
2898 } 2919 }
2899 2920
2900 // List类转换 2921 // List类转换
@@ -2918,8 +2939,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -2918,8 +2939,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
2918 2939
2919 if(flag != 2){ 2940 if(flag != 2){
2920 try { 2941 try {
2921 - List<Ylb> ylb = calcRepository.ylb(dateFormat.parse(startDate), dateFormat.parse(endDate), gsdm, fgsdm, nature, line);  
2922 - List<Dlb> dlb = calcRepository.dlb(dateFormat.parse(startDate), dateFormat.parse(endDate), gsdm, fgsdm, nature, line); 2942 + List<Ylb> ylb = calcRepository.ylb(dateFormat.parse(startDate), dateFormat.parse(endDate), gsdm, fgsdms, nature, line);
  2943 + List<Dlb> dlb = calcRepository.dlb(dateFormat.parse(startDate), dateFormat.parse(endDate), gsdm, fgsdms, nature, line);
2923 2944
2924 for(Ylb y : ylb){ 2945 for(Ylb y : ylb){
2925 String key = y.getSsgsdm() + "_" + y.getFgsdm() + "_" + y.getXlbm(); 2946 String key = y.getSsgsdm() + "_" + y.getFgsdm() + "_" + y.getXlbm();
@@ -3019,7 +3040,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -3019,7 +3040,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
3019 //表头 3040 //表头
3020 List<String> list1 = new ArrayList<>(); 3041 List<String> list1 = new ArrayList<>();
3021 list1.add("序号"); 3042 list1.add("序号");
3022 - list1.add("所属公司"); 3043 + list1.add("线队");
3023 list1.add("线路"); 3044 list1.add("线路");
3024 if(flag==1 || flag==2){ 3045 if(flag==1 || flag==2){
3025 list1.add("工号"); 3046 list1.add("工号");
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -92,22 +92,34 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -92,22 +92,34 @@ public class BusIntervalServiceImpl implements BusIntervalService {
92 private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 92 private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
93 private DecimalFormat df = new DecimalFormat("0.##"); 93 private DecimalFormat df = new DecimalFormat("0.##");
94 94
95 - public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String startDate, String endDate, String model, String times, boolean normal){ 95 + public List<ScheduleRealInfo> getSchedule(String company, String[] subCompany, String line, String startDate, String endDate, String model, String times, boolean normal){
96 List<Long> ttList = new ArrayList<Long>(); 96 List<Long> ttList = new ArrayList<Long>();
97 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 97 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
98 List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); 98 List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>();
99 99
100 try { 100 try {
  101 +
  102 + String fgsSQL = "";
  103 + if(subCompany != null && subCompany.length > 0){
  104 + fgsSQL = " and fgs_bm in ( ";
  105 + for(int i = 0; i < subCompany.length; i++){
  106 + fgsSQL += "?";
  107 + if(i < subCompany.length - 1){
  108 + fgsSQL += ",";
  109 + }
  110 + }
  111 + fgsSQL += ") ";
  112 + }
101 113
102 List<String> objList = new ArrayList<String>(); 114 List<String> objList = new ArrayList<String>();
103 String sql = "select * from bsth_c_s_sp_info_real where " + 115 String sql = "select * from bsth_c_s_sp_info_real where " +
104 "schedule_date_str >= ? and schedule_date_str <= ? " + 116 "schedule_date_str >= ? and schedule_date_str <= ? " +
105 - "and fcsj >= ? and fcsj <= ? and gs_bm like ? and fgs_bm like ? " + 117 + "and fcsj >= ? and fcsj <= ? and gs_bm like ? " + fgsSQL +
106 "and bc_type != ? and bc_type != ? and bc_type != ?"; 118 "and bc_type != ? and bc_type != ? and bc_type != ?";
107 if(line.length() != 0){ 119 if(line.length() != 0){
108 sql = "select * from bsth_c_s_sp_info_real where xl_bm = ? " + 120 sql = "select * from bsth_c_s_sp_info_real where xl_bm = ? " +
109 "and schedule_date_str >= ? and schedule_date_str <= ? " + 121 "and schedule_date_str >= ? and schedule_date_str <= ? " +
110 - "and fcsj >= ? and fcsj <= ? and gs_bm like ? and fgs_bm like ? " + 122 + "and fcsj >= ? and fcsj <= ? and gs_bm like ? " + fgsSQL +
111 "and bc_type != ? and bc_type != ? and bc_type != ?"; 123 "and bc_type != ? and bc_type != ? and bc_type != ?";
112 objList.add(line); 124 objList.add(line);
113 } 125 }
@@ -127,7 +139,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -127,7 +139,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
127 } 139 }
128 140
129 objList.add("%" + company + "%"); 141 objList.add("%" + company + "%");
130 - objList.add("%" + subCompany + "%"); 142 + if(subCompany != null && subCompany.length > 0){
  143 + for(String s : subCompany){
  144 + objList.add(s);
  145 + }
  146 + }
131 147
132 if(normal){ 148 if(normal){
133 objList.add("in"); 149 objList.add("in");
@@ -454,7 +470,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -454,7 +470,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
454 line = ""; 470 line = "";
455 } 471 }
456 472
457 - List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, 473 + List<ScheduleRealInfo> list = this.getSchedule(company, new String[]{subCompany}, line,
458 startDate, endDate, model, sfqr==1?times1+"-"+times2:"", true); 474 startDate, endDate, model, sfqr==1?times1+"-"+times2:"", true);
459 475
460 long time1 = 0; 476 long time1 = 0;
@@ -764,7 +780,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -764,7 +780,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
764 } 780 }
765 781
766 @Override 782 @Override
767 - public Map<String, Object> timeAndSpeed(Map<String, Object> map) { 783 + public Map<String, Object> timeAndSpeed(Map<String, Object> map, String[] subCompany) {
768 List<Map<String, Object>> ttList = new ArrayList<Map<String, Object>>(); 784 List<Map<String, Object>> ttList = new ArrayList<Map<String, Object>>();
769 List<ChildTaskPlan> cList = new ArrayList<ChildTaskPlan>(); 785 List<ChildTaskPlan> cList = new ArrayList<ChildTaskPlan>();
770 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 786 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
@@ -776,11 +792,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -776,11 +792,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
776 Set<Long> tsSet = new HashSet<Long>(); 792 Set<Long> tsSet = new HashSet<Long>();
777 Set<Long> ttSet = new HashSet<Long>(); 793 Set<Long> ttSet = new HashSet<Long>();
778 794
779 - String company = "", subCompany = ""; 795 + String company = "";
  796 +// String subCompany = "";
780 if(map.get("company")!=null) 797 if(map.get("company")!=null)
781 company = map.get("company").toString(); 798 company = map.get("company").toString();
782 - if(map.get("subCompany")!=null)  
783 - subCompany = map.get("subCompany").toString(); 799 +// if(map.get("subCompany")!=null)
  800 +// subCompany = map.get("subCompany").toString();
784 String lp = map.get("lp").toString(); 801 String lp = map.get("lp").toString();
785 String sfyy = map.get("sfyy").toString(); 802 String sfyy = map.get("sfyy").toString();
786 String line = map.get("line").toString(); 803 String line = map.get("line").toString();
@@ -816,7 +833,18 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -816,7 +833,18 @@ public class BusIntervalServiceImpl implements BusIntervalService {
816 strList.add("%%"); 833 strList.add("%%");
817 } 834 }
818 strList.add('%' + company + '%'); 835 strList.add('%' + company + '%');
819 - strList.add('%' + subCompany + '%'); 836 + String fgsSQL = "";
  837 + if(subCompany != null && subCompany.length > 0){
  838 + fgsSQL = " and fgs_bm in ( ";
  839 + for(int i = 0; i < subCompany.length; i++){
  840 + fgsSQL += "?";
  841 + if(i < subCompany.length - 1){
  842 + fgsSQL += ",";
  843 + }
  844 + strList.add(subCompany[i]);
  845 + }
  846 + fgsSQL += ") ";
  847 + }
820 if(sfqr == 1){ 848 if(sfqr == 1){
821 strList.add(times1); 849 strList.add(times1);
822 strList.add(times2); 850 strList.add(times2);
@@ -828,7 +856,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -828,7 +856,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
828 String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm," 856 String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm,"
829 + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" 857 + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id"
830 + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= ? and schedule_date_str <= ?" 858 + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= ? and schedule_date_str <= ?"
831 - + " and xl_bm like ? and lp_name like ? and gs_bm like ? and fgs_bm like ? and zdsj >= ? and fcsj <= ?" 859 + + " and xl_bm like ? and lp_name like ? and gs_bm like ? " + fgsSQL + " and zdsj >= ? and fcsj <= ?"
832 + " and bc_type != 'ldks'"; 860 + " and bc_type != 'ldks'";
833 861
834 List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(), 862 List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(),
@@ -1614,7 +1642,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1614,7 +1642,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1614 times = ""; 1642 times = "";
1615 } 1643 }
1616 1644
1617 - list = getSchedule(company, subCompany, line, startDate, endDate, model, times, false); 1645 + list = getSchedule(company, new String[]{subCompany}, line, startDate, endDate, model, times, false);
1618 1646
1619 String[] date1 = startDate.split("-"); 1647 String[] date1 = startDate.split("-");
1620 String[] date2 = endDate.split("-"); 1648 String[] date2 = endDate.split("-");
@@ -1829,18 +1857,19 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1829,18 +1857,19 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1829 } 1857 }
1830 1858
1831 @Override 1859 @Override
1832 - public List<Map<String, Object>> lbStatuAnaly(Map<String, Object> map) { 1860 + public List<Map<String, Object>> lbStatuAnaly(Map<String, Object> map, String[] subCompany) {
1833 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 1861 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1834 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 1862 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1835 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 1863 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
1836 1864
1837 - String company = "", subCompany = ""; 1865 + String company = "";
  1866 +// String subCompany = "";
1838 String sfyy = map.get("sfyy").toString(); 1867 String sfyy = map.get("sfyy").toString();
1839 String line = map.get("line").toString(); 1868 String line = map.get("line").toString();
1840 if(map.get("company")!=null) 1869 if(map.get("company")!=null)
1841 company = map.get("company").toString(); 1870 company = map.get("company").toString();
1842 - if(map.get("subCompany")!=null)  
1843 - subCompany = map.get("subCompany").toString(); 1871 +// if(map.get("subCompany")!=null)
  1872 +// subCompany = map.get("subCompany").toString();
1844 String startDate = map.get("startDate").toString(); 1873 String startDate = map.get("startDate").toString();
1845 String endDate = map.get("endDate").toString(); 1874 String endDate = map.get("endDate").toString();
1846 String model = map.get("model").toString(); 1875 String model = map.get("model").toString();
@@ -2237,20 +2266,21 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2237,20 +2266,21 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2237 } 2266 }
2238 2267
2239 @Override 2268 @Override
2240 - public List<Map<String, Object>> correctStatis(Map<String, Object> map) { 2269 + public List<Map<String, Object>> correctStatis(Map<String, Object> map, String[] subCompany) {
2241 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 2270 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
2242 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 2271 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
2243 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 2272 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
2244 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); 2273 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>();
2245 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); 2274 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>();
2246 2275
2247 - String company = "", subCompany = ""; 2276 + String company = "";
  2277 +// String subCompany = "";
2248 String sfyy = map.get("sfyy").toString(); 2278 String sfyy = map.get("sfyy").toString();
2249 String line = map.get("line").toString(); 2279 String line = map.get("line").toString();
2250 if(map.containsKey("company") && map.get("company")!=null) 2280 if(map.containsKey("company") && map.get("company")!=null)
2251 company = map.get("company").toString(); 2281 company = map.get("company").toString();
2252 - if(map.containsKey("subCompany") && map.get("subCompany")!=null)  
2253 - subCompany = map.get("subCompany").toString(); 2282 +// if(map.containsKey("subCompany") && map.get("subCompany")!=null)
  2283 +// subCompany = map.get("subCompany").toString();
2254 String startDate = map.get("startDate").toString(); 2284 String startDate = map.get("startDate").toString();
2255 String endDate = map.get("endDate").toString(); 2285 String endDate = map.get("endDate").toString();
2256 String times = map.get("times").toString(); 2286 String times = map.get("times").toString();
@@ -2264,10 +2294,22 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2264,10 +2294,22 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2264 endDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 2294 endDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
2265 } 2295 }
2266 try { 2296 try {
  2297 +
  2298 + String fgsSQL = "";
  2299 + if(subCompany != null && subCompany.length > 0){
  2300 + fgsSQL = " and fgs_bm in ( ";
  2301 + for(int i = 0; i < subCompany.length; i++){
  2302 + fgsSQL += "?";
  2303 + if(i < subCompany.length - 1){
  2304 + fgsSQL += ",";
  2305 + }
  2306 + }
  2307 + fgsSQL += ") ";
  2308 + }
2267 2309
2268 String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str" + 2310 String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str" +
2269 " >= ? and schedule_date_str <= ? and xl_bm like ?" + 2311 " >= ? and schedule_date_str <= ? and xl_bm like ?" +
2270 - " and fcsj >= ? and fcsj <= ? and gs_bm like ? and fgs_bm like ?" + 2312 + " and fcsj >= ? and fcsj <= ? and gs_bm like ? " + fgsSQL +
2271 " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; 2313 " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
2272 List<String> strList = new ArrayList<String>(); 2314 List<String> strList = new ArrayList<String>();
2273 strList.add(startDate); 2315 strList.add(startDate);
@@ -2282,7 +2324,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2282,7 +2324,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2282 strList.add("23:59"); 2324 strList.add("23:59");
2283 } 2325 }
2284 strList.add('%' + company + '%'); 2326 strList.add('%' + company + '%');
2285 - strList.add('%' + subCompany + '%'); 2327 + if(subCompany != null && subCompany.length > 0){
  2328 + for(String s : subCompany){
  2329 + strList.add(s);
  2330 + }
  2331 + }
2286 2332
2287 List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(), 2333 List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(),
2288 new RowMapper<ScheduleRealInfo>(){ 2334 new RowMapper<ScheduleRealInfo>(){
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -120,7 +120,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -120,7 +120,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
120 120
121 List<Map<String,Object>> dispatchDailySum(String date, String date2, String nature, String type); 121 List<Map<String,Object>> dispatchDailySum(String date, String date2, String nature, String type);
122 122
123 - List<Map<String,Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type,String nature); 123 + List<Map<String,Object>> statisticsDailyTj(String gsdm,String[] fgsdm,String line, String date,String date2, String xlName, String type,String nature);
124 124
125 //用于实时数据与统计数据合并查询 125 //用于实时数据与统计数据合并查询
126 List<Map<String,Object>> statisticsDailyTjHb(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type,String nature); 126 List<Map<String,Object>> statisticsDailyTjHb(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type,String nature);
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -12,6 +12,7 @@ import java.text.DecimalFormat; @@ -12,6 +12,7 @@ import java.text.DecimalFormat;
12 import java.text.ParseException; 12 import java.text.ParseException;
13 import java.text.SimpleDateFormat; 13 import java.text.SimpleDateFormat;
14 import java.util.ArrayList; 14 import java.util.ArrayList;
  15 +import java.util.Arrays;
15 import java.util.Calendar; 16 import java.util.Calendar;
16 import java.util.Collection; 17 import java.util.Collection;
17 import java.util.Collections; 18 import java.util.Collections;
@@ -3018,7 +3019,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3018,7 +3019,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3018 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 3019 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
3019 3020
3020 // List<Map<String, Object>> list = statisticsDailyTj("", "", "", date, date2, "", "query", nature); 3021 // List<Map<String, Object>> list = statisticsDailyTj("", "", "", date, date2, "", "query", nature);
3021 - List<CalcStatistics> calc = calcWaybillService.calcStatisticsDaily("", "", "", date, date2, "", "query", nature); 3022 + List<CalcStatistics> calc = calcWaybillService.calcStatisticsDaily("", null, "", date, date2, "", "query", nature);
3022 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); 3023 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
3023 try { 3024 try {
3024 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); 3025 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
@@ -3208,21 +3209,25 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3208,21 +3209,25 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3208 } 3209 }
3209 3210
3210 @Override 3211 @Override
3211 - public List<Map<String, Object>> statisticsDailyTj(String gsdm, String fgsdm, String line, String date, String date2, 3212 + public List<Map<String, Object>> statisticsDailyTj(String gsdm, String[] fgsdm, String line, String date, String date2,
3212 String xlName, String type,String nature) { 3213 String xlName, String type,String nature) {
3213 List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>(); 3214 List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>();
3214 List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); 3215 List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>();
3215 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); 3216 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
3216 List<Object[]> listInterval=new ArrayList<Object[]>(); 3217 List<Object[]> listInterval=new ArrayList<Object[]>();
3217 line = line.trim(); 3218 line = line.trim();
3218 - if(gsdm.equals("") && fgsdm.equals("") && line.equals("")){ 3219 + if(gsdm.equals("") && (fgsdm==null||fgsdm.length == 0) && line.equals("")){
3219 //查询所有公司 3220 //查询所有公司
3220 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj3(date, date2); 3221 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj3(date, date2);
3221 listInterval = calcIntervalRepository.countByDate(date, date2); 3222 listInterval = calcIntervalRepository.countByDate(date, date2);
3222 } else if (line.equals("")) { 3223 } else if (line.equals("")) {
3223 //查询所有线路 3224 //查询所有线路
3224 - listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm);  
3225 - listInterval = calcIntervalRepository.countByDateAndLine(gsdm, fgsdm, date, date2); 3225 + List<String> fgsdms = null;
  3226 + if(fgsdm!=null && fgsdm.length > 0){
  3227 + fgsdms = Arrays.asList(fgsdm);
  3228 + }
  3229 + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj4(line, date, date2, gsdm, fgsdms);
  3230 + listInterval = calcIntervalRepository.countByDateAndLine2(gsdm, fgsdms, date, date2);
3226 } else { 3231 } else {
3227 //查询单条线路 3232 //查询单条线路
3228 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2); 3233 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2);
src/main/java/com/bsth/service/report/CalcSheetService.java
@@ -8,10 +8,10 @@ import com.bsth.entity.sheet.Sheet; @@ -8,10 +8,10 @@ import com.bsth.entity.sheet.Sheet;
8 import com.bsth.service.BaseService; 8 import com.bsth.service.BaseService;
9 9
10 public interface CalcSheetService extends BaseService<CalcSheet, Integer>{ 10 public interface CalcSheetService extends BaseService<CalcSheet, Integer>{
11 - public List<CalcSheet> countListCalcSheet(Map<String, Object> map); 11 + public List<CalcSheet> countListCalcSheet(Map<String, Object> map, String[] fgs);
12 public List<CalcSheet> calcListSheet(Map<String, Object> map); 12 public List<CalcSheet> calcListSheet(Map<String, Object> map);
13 public List<CalcSheet> calcListSheet_d(Map<String, Object> map); 13 public List<CalcSheet> calcListSheet_d(Map<String, Object> map);
14 public List<Sheet> calcSheet(Map<String, Object> map); 14 public List<Sheet> calcSheet(Map<String, Object> map);
15 - public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map);  
16 - public List<Map<String, Object>> calcTurnoutrateZgf(Map<String, Object> map); 15 + public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map, String[] fgsdmTurn);
  16 + public List<Map<String, Object>> calcTurnoutrateZgf(Map<String, Object> map, String[] fgsdmTurn);
17 } 17 }
src/main/java/com/bsth/service/report/ReportService.java
@@ -57,7 +57,7 @@ public interface ReportService { @@ -57,7 +57,7 @@ public interface ReportService {
57 List<Map<String, Object>> countByList2(Map<String, Object> map); 57 List<Map<String, Object>> countByList2(Map<String, Object> map);
58 58
59 59
60 - List<Map<String, Object>> countByBusList(Map<String, Object> map); 60 + List<Map<String, Object>> countByBusList(Map<String, Object> map, String[] fgsdm);
61 61
62 List<Map<String, Object>> countDjg(Map<String, Object> map); 62 List<Map<String, Object>> countDjg(Map<String, Object> map);
63 63
@@ -67,5 +67,5 @@ public interface ReportService { @@ -67,5 +67,5 @@ public interface ReportService {
67 67
68 List<Map<String,Object>> singleEnergy(Map<String, Object> map); 68 List<Map<String,Object>> singleEnergy(Map<String, Object> map);
69 69
70 - Map<String,Object> calcDetailMonthlyE(Map<String, Object> map); 70 + Map<String,Object> calcDetailMonthlyE(Map<String, Object> map, String[] fgsdm);
71 } 71 }
src/main/java/com/bsth/service/report/impl/CalcSheetServiceImpl.java
@@ -56,7 +56,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -56,7 +56,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
56 Logger logger = LoggerFactory.getLogger(this.getClass()); 56 Logger logger = LoggerFactory.getLogger(this.getClass());
57 57
58 @Override 58 @Override
59 - public List<CalcSheet> countListCalcSheet(Map<String, Object> map) { 59 + public List<CalcSheet> countListCalcSheet(Map<String, Object> map, String[] fgs) {
60 // TODO Auto-generated method stub 60 // TODO Auto-generated method stub
61 final DecimalFormat df = new DecimalFormat("0.00"); 61 final DecimalFormat df = new DecimalFormat("0.00");
62 String line=""; 62 String line="";
@@ -67,10 +67,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -67,10 +67,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
67 if(map.get("gs")!=null){ 67 if(map.get("gs")!=null){
68 gs=map.get("gs").toString().trim(); 68 gs=map.get("gs").toString().trim();
69 } 69 }
70 - String fgs="";  
71 - if(map.get("fgs")!=null){  
72 - fgs=map.get("fgs").toString().trim();  
73 - } 70 +// String fgs="";
  71 +// if(map.get("fgs")!=null){
  72 +// fgs=map.get("fgs").toString().trim();
  73 +// }
74 String nature="0"; 74 String nature="0";
75 if(map.get("nature")!=null){ 75 if(map.get("nature")!=null){
76 nature=map.get("nature").toString(); 76 nature=map.get("nature").toString();
@@ -83,6 +83,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -83,6 +83,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
83 if(map.get("type")!=null){ 83 if(map.get("type")!=null){
84 type=map.get("type").toString(); 84 type=map.get("type").toString();
85 } 85 }
  86 + String lineName = "";
  87 + if(map.get("lineName")!=null){
  88 + lineName=map.get("lineName").toString();
  89 + }
86 90
87 Map<String, Boolean> lineMap=lineService.lineNature(); 91 Map<String, Boolean> lineMap=lineService.lineNature();
88 92
@@ -94,12 +98,22 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -94,12 +98,22 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
94 + " from bsth_c_calc_sheet where date >= ? and date <= ?"; 98 + " from bsth_c_calc_sheet where date >= ? and date <= ?";
95 objList.add(date); 99 objList.add(date);
96 objList.add(endDate); 100 objList.add(endDate);
97 - if("".equals(gs.trim()) && "".equals(fgs.trim()) && "".equals(line.trim())){ 101 + if("".equals(gs.trim()) && (fgs==null || fgs.length == 0) && "".equals(line.trim())){
98 102
99 } else if(line.equals("")){ 103 } else if(line.equals("")){
100 - sql +=" and gsdm = ? and fgsdm like CONCAT('%',?,'%')"; 104 + sql +=" and gsdm = ?";
101 objList.add(gs); 105 objList.add(gs);
102 - objList.add(fgs); 106 + if(fgs != null && fgs.length > 0){
  107 + sql += " and fgsdm in(";
  108 + for(int i = 0; i < fgs.length; i++){
  109 + sql += "?";
  110 + if(i < fgs.length - 1){
  111 + sql += ",";
  112 + }
  113 + objList.add(fgs[i]);
  114 + }
  115 + sql += ")";
  116 + }
103 }else{ 117 }else{
104 sql += " and xl = ?"; 118 sql += " and xl = ?";
105 objList.add(line); 119 objList.add(line);
@@ -196,14 +210,14 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -196,14 +210,14 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
196 } 210 }
197 211
198 if("export".equals(map.get("type"))){ 212 if("export".equals(map.get("type"))){
199 - String lineName="";  
200 - if(!line.equals("")){  
201 - lineName=list.get(0).getXlName();  
202 - }else if(!fgs.equals("")){  
203 - lineName=list.get(0).getFgsname();  
204 - }else{  
205 - lineName=list.get(0).getGsname();  
206 - } 213 +// String lineName="";
  214 +// if(!line.equals("")){
  215 +// lineName=list.get(0).getXlName();
  216 +// }else if(!fgs.equals("")){
  217 +// lineName=list.get(0).getFgsname();
  218 +// }else{
  219 +// lineName=list.get(0).getGsname();
  220 +// }
207 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 221 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
208 Map<String, Object> m = new HashMap<String, Object>(); 222 Map<String, Object> m = new HashMap<String, Object>();
209 m.put("date", date); 223 m.put("date", date);
@@ -443,7 +457,6 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -443,7 +457,6 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
443 @Override 457 @Override
444 public List<Sheet> calcSheet(Map<String, Object> map) { 458 public List<Sheet> calcSheet(Map<String, Object> map) {
445 // TODO Auto-generated method stub 459 // TODO Auto-generated method stub
446 - System.out.println();  
447 String line=map.get("line").toString(); 460 String line=map.get("line").toString();
448 String date=map.get("date").toString(); 461 String date=map.get("date").toString();
449 String dir =map.get("dir").toString(); 462 String dir =map.get("dir").toString();
@@ -985,7 +998,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -985,7 +998,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
985 } 998 }
986 999
987 @Override 1000 @Override
988 - public List<Map<String,Object>> calcTurnoutrateZgf(Map<String, Object> map){ 1001 + public List<Map<String,Object>> calcTurnoutrateZgf(Map<String, Object> map, String[] fgs){
989 final DecimalFormat df = new DecimalFormat("0.00"); 1002 final DecimalFormat df = new DecimalFormat("0.00");
990 String line=""; 1003 String line="";
991 if(map.get("line")!=null){ 1004 if(map.get("line")!=null){
@@ -995,10 +1008,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -995,10 +1008,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
995 if(map.get("gsdmTurn")!=null){ 1008 if(map.get("gsdmTurn")!=null){
996 gs=map.get("gsdmTurn").toString().trim(); 1009 gs=map.get("gsdmTurn").toString().trim();
997 } 1010 }
998 - String fgs="";  
999 - if(map.get("fgsdmTurn")!=null){  
1000 - fgs=map.get("fgsdmTurn").toString().trim();  
1001 - } 1011 +// String fgs="";
  1012 +// if(map.get("fgsdmTurn")!=null){
  1013 +// fgs=map.get("fgsdmTurn").toString().trim();
  1014 +// }
1002 String nature="0"; 1015 String nature="0";
1003 if(map.get("nature")!=null){ 1016 if(map.get("nature")!=null){
1004 nature=map.get("nature").toString(); 1017 nature=map.get("nature").toString();
@@ -1015,19 +1028,44 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -1015,19 +1028,44 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
1015 } 1028 }
1016 String type=map.get("type").toString(); 1029 String type=map.get("type").toString();
1017 final String dates=date; 1030 final String dates=date;
  1031 +// String sql_="";
  1032 +// if(line.equals("")){
  1033 +// sql_= " and gsdm ='"+gs+"' and fgsdm like '%"+fgs+"%'";
  1034 +// }else{
  1035 +// sql_=" and xl='"+line+"'";
  1036 +// }
1018 String sql_=""; 1037 String sql_="";
1019 - if(line.equals("")){  
1020 - sql_= " and gsdm ='"+gs+"' and fgsdm like '%"+fgs+"%'"; 1038 + List<String> objList = new ArrayList<String>();
  1039 + objList.add(startDate);
  1040 + objList.add(endDate);
  1041 + if("".equals(gs.trim()) && (fgs==null || fgs.length == 0) && "".equals(line.trim())){
  1042 +
  1043 + } else if(line.equals("")){
  1044 + sql_= " and gsdm = ? ";
  1045 + objList.add(gs);
  1046 + if(fgs != null && fgs.length > 0){
  1047 + sql_ += " and fgsdm in(";
  1048 + for(int i = 0; i < fgs.length; i++){
  1049 + sql_ += "?";
  1050 + if(i < fgs.length - 1){
  1051 + sql_ += ",";
  1052 + }
  1053 + objList.add(fgs[i]);
  1054 + }
  1055 + sql_ += ")";
  1056 + }
1021 }else{ 1057 }else{
1022 - sql_=" and xl='"+line+"'"; 1058 + sql_=" and xl = ? ";
  1059 + objList.add(line);
1023 } 1060 }
1024 String sql=" select gsdm,fgsdm,xl,xl_name,sum(jhcc) as jhcc,sum(sjcc) as sjcc," 1061 String sql=" select gsdm,fgsdm,xl,xl_name,sum(jhcc) as jhcc,sum(sjcc) as sjcc,"
1025 + " sum(jhcczgf) as jhcczgf, sum(sjcczgf) as sjcczgf " 1062 + " sum(jhcczgf) as jhcczgf, sum(sjcczgf) as sjcczgf "
1026 - + " from bsth_c_calc_sheet where date >='"+startDate+"' and date <='"+endDate+"'" 1063 + + " from bsth_c_calc_sheet where date >= ? and date <= ? "
1027 + sql_ 1064 + sql_
1028 + " group by gsdm,fgsdm,xl,xl_name"; 1065 + " group by gsdm,fgsdm,xl,xl_name";
1029 - List<Map<String, Object>> lists=jdbcTemplate.query(sql,  
1030 - new RowMapper<Map<String, Object>>(){ 1066 + List<Map<String, Object>> lists=jdbcTemplate.query(sql,
  1067 + objList.toArray(),
  1068 + new RowMapper<Map<String, Object>>(){
1031 @Override 1069 @Override
1032 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { 1070 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
1033 Map<String, Object> s=new HashMap<String,Object>(); 1071 Map<String, Object> s=new HashMap<String,Object>();
@@ -1104,6 +1142,8 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -1104,6 +1142,8 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
1104 1142
1105 Map<String, Object> tempMap=new HashMap<String,Object>(); 1143 Map<String, Object> tempMap=new HashMap<String,Object>();
1106 tempMap.put("rq", "分类汇总"); 1144 tempMap.put("rq", "分类汇总");
  1145 + tempMap.put("gsName", "");
  1146 + tempMap.put("fgsName", "");
1107 tempMap.put("line_", "共" + list.size() + "条线路"); 1147 tempMap.put("line_", "共" + list.size() + "条线路");
1108 tempMap.put("xlName", "共" +count + "条线路"); 1148 tempMap.put("xlName", "共" +count + "条线路");
1109 tempMap.put("jhcc", jhcc); 1149 tempMap.put("jhcc", jhcc);
@@ -1135,7 +1175,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -1135,7 +1175,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
1135 } 1175 }
1136 1176
1137 @Override 1177 @Override
1138 - public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map) { 1178 + public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map, String[] fgs) {
1139 final DecimalFormat df = new DecimalFormat("0.00"); 1179 final DecimalFormat df = new DecimalFormat("0.00");
1140 String line=""; 1180 String line="";
1141 if(map.get("line")!=null){ 1181 if(map.get("line")!=null){
@@ -1145,10 +1185,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -1145,10 +1185,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
1145 if(map.get("gsdmTurn")!=null){ 1185 if(map.get("gsdmTurn")!=null){
1146 gs=map.get("gsdmTurn").toString().trim(); 1186 gs=map.get("gsdmTurn").toString().trim();
1147 } 1187 }
1148 - String fgs="";  
1149 - if(map.get("fgsdmTurn")!=null){  
1150 - fgs=map.get("fgsdmTurn").toString().trim();  
1151 - } 1188 +// String fgs="";
  1189 +// if(map.get("fgsdmTurn")!=null){
  1190 +// fgs=map.get("fgsdmTurn").toString().trim();
  1191 +// }
1152 String nature="0"; 1192 String nature="0";
1153 if(map.get("nature")!=null){ 1193 if(map.get("nature")!=null){
1154 nature=map.get("nature").toString(); 1194 nature=map.get("nature").toString();
@@ -1169,12 +1209,22 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im @@ -1169,12 +1209,22 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
1169 List<String> objList = new ArrayList<String>(); 1209 List<String> objList = new ArrayList<String>();
1170 objList.add(startDate); 1210 objList.add(startDate);
1171 objList.add(endDate); 1211 objList.add(endDate);
1172 - if("".equals(gs.trim()) && "".equals(fgs.trim()) && "".equals(line.trim())){ 1212 + if("".equals(gs.trim()) && (fgs==null || fgs.length == 0) && "".equals(line.trim())){
1173 1213
1174 } else if(line.equals("")){ 1214 } else if(line.equals("")){
1175 - sql_= " and gsdm = ? and fgsdm like CONCAT('%',?,'%') "; 1215 + sql_= " and gsdm = ? ";
1176 objList.add(gs); 1216 objList.add(gs);
1177 - objList.add(fgs); 1217 + if(fgs != null && fgs.length > 0){
  1218 + sql_ += " and fgsdm in(";
  1219 + for(int i = 0; i < fgs.length; i++){
  1220 + sql_ += "?";
  1221 + if(i < fgs.length - 1){
  1222 + sql_ += ",";
  1223 + }
  1224 + objList.add(fgs[i]);
  1225 + }
  1226 + sql_ += ")";
  1227 + }
1178 }else{ 1228 }else{
1179 sql_=" and xl = ? "; 1229 sql_=" and xl = ? ";
1180 objList.add(line); 1230 objList.add(line);
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
@@ -1438,9 +1438,9 @@ public class CulateMileageServiceImpl implements CulateMileageService{ @@ -1438,9 +1438,9 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1438 // Collections.sort(listInfo,new ComparableAcuals()); 1438 // Collections.sort(listInfo,new ComparableAcuals());
1439 //查询所有线路 1439 //查询所有线路
1440 String xlSql="select line_code,spac_grade from bsth_c_line" 1440 String xlSql="select line_code,spac_grade from bsth_c_line"
1441 - + " where line_code ='"+line+"'"; 1441 + + " where line_code = ?";
1442 1442
1443 - List<Map<String, Object>> xlList=jdbcTemplate.query(xlSql, new RowMapper<Map<String, Object>>() { 1443 + List<Map<String, Object>> xlList=jdbcTemplate.query(xlSql, new Object[]{line}, new RowMapper<Map<String, Object>>() {
1444 @Override 1444 @Override
1445 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { 1445 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {
1446 Map<String, Object> map=new HashMap<String,Object>(); 1446 Map<String, Object> map=new HashMap<String,Object>();
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -3051,7 +3051,7 @@ public class ReportServiceImpl implements ReportService{ @@ -3051,7 +3051,7 @@ public class ReportServiceImpl implements ReportService{
3051 return map; 3051 return map;
3052 } 3052 }
3053 @Override 3053 @Override
3054 - public List<Map<String, Object>> countByBusList(Map<String, Object> map) { 3054 + public List<Map<String, Object>> countByBusList(Map<String, Object> map, String[] fgsdm) {
3055 // TODO Auto-generated method stub 3055 // TODO Auto-generated method stub
3056 SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); 3056 SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
3057 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); 3057 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>();
@@ -3060,10 +3060,10 @@ public class ReportServiceImpl implements ReportService{ @@ -3060,10 +3060,10 @@ public class ReportServiceImpl implements ReportService{
3060 if(map.get("gsdm")!=null){ 3060 if(map.get("gsdm")!=null){
3061 gsdm=map.get("gsdm").toString(); 3061 gsdm=map.get("gsdm").toString();
3062 } 3062 }
3063 - String fgsdm="";  
3064 - if(map.get("fgsdm")!=null){  
3065 - fgsdm=map.get("fgsdm").toString();  
3066 - } 3063 +// String fgsdm="";
  3064 +// if(map.get("fgsdm")!=null){
  3065 +// fgsdm=map.get("fgsdm").toString();
  3066 +// }
3067 String line=""; 3067 String line="";
3068 if(map.get("line")!=null){ 3068 if(map.get("line")!=null){
3069 line=map.get("line").toString(); 3069 line=map.get("line").toString();
@@ -3093,7 +3093,11 @@ public class ReportServiceImpl implements ReportService{ @@ -3093,7 +3093,11 @@ public class ReportServiceImpl implements ReportService{
3093 line =line.trim(); 3093 line =line.trim();
3094 if(line.equals("")){ 3094 if(line.equals("")){
3095 //查询所有线路 3095 //查询所有线路
3096 - list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date,date2,gsdm,fgsdm); 3096 + List<String> fgsdms = null;
  3097 + if(fgsdm!=null && fgsdm.length > 0){
  3098 + fgsdms = Arrays.asList(fgsdm);
  3099 + }
  3100 + list = scheduleRealInfoRepository.scheduleByDateAndLineTj4(line, date,date2,gsdm,fgsdms);
3097 }else{ 3101 }else{
3098 //查询单条线路 3102 //查询单条线路
3099 list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2); 3103 list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2);
@@ -3104,10 +3108,19 @@ public class ReportServiceImpl implements ReportService{ @@ -3104,10 +3108,19 @@ public class ReportServiceImpl implements ReportService{
3104 objList.add(date2); 3108 objList.add(date2);
3105 String ylbSql=" select * from bsth_c_ylb where rq BETWEEN ? and ?"; 3109 String ylbSql=" select * from bsth_c_ylb where rq BETWEEN ? and ?";
3106 if(line.equals("")){ 3110 if(line.equals("")){
3107 - ylbSql +=" and ssgsdm = ?"  
3108 - + " and fgsdm = ?"; 3111 + ylbSql +=" and ssgsdm = ?";
3109 objList.add(gsdm); 3112 objList.add(gsdm);
3110 - objList.add(fgsdm); 3113 + if(fgsdm != null && fgsdm.length > 0){
  3114 + ylbSql += " and fgsdm in (";
  3115 + for(int i = 0; i < fgsdm.length; i++){
  3116 + ylbSql += "?";
  3117 + if(i < fgsdm.length - 1){
  3118 + ylbSql += ",";
  3119 + }
  3120 + objList.add(fgsdm[i]);
  3121 + }
  3122 + ylbSql += ")";
  3123 + }
3111 }else{ 3124 }else{
3112 ylbSql += " and xlbm = ?"; 3125 ylbSql += " and xlbm = ?";
3113 objList.add(line); 3126 objList.add(line);
@@ -3119,10 +3132,19 @@ public class ReportServiceImpl implements ReportService{ @@ -3119,10 +3132,19 @@ public class ReportServiceImpl implements ReportService{
3119 objList2.add(date2); 3132 objList2.add(date2);
3120 String dlbSql=" select * from bsth_c_dlb where rq BETWEEN ? and ?"; 3133 String dlbSql=" select * from bsth_c_dlb where rq BETWEEN ? and ?";
3121 if(line.equals("")){ 3134 if(line.equals("")){
3122 - dlbSql +=" and ssgsdm = ?"  
3123 - + " and fgsdm = ?"; 3135 + dlbSql +=" and ssgsdm = ?";
3124 objList2.add(gsdm); 3136 objList2.add(gsdm);
3125 - objList2.add(fgsdm); 3137 + if(fgsdm != null && fgsdm.length > 0){
  3138 + dlbSql += " and fgsdm in (";
  3139 + for(int i = 0; i < fgsdm.length; i++){
  3140 + dlbSql += "?";
  3141 + if(i < fgsdm.length - 1){
  3142 + dlbSql += ",";
  3143 + }
  3144 + objList2.add(fgsdm[i]);
  3145 + }
  3146 + dlbSql += ")";
  3147 + }
3126 }else{ 3148 }else{
3127 dlbSql += " and xlbm = ?"; 3149 dlbSql += " and xlbm = ?";
3128 objList2.add(line); 3150 objList2.add(line);
@@ -3134,14 +3156,23 @@ public class ReportServiceImpl implements ReportService{ @@ -3134,14 +3156,23 @@ public class ReportServiceImpl implements ReportService{
3134 List<String> objList3 = new ArrayList<String>(); 3156 List<String> objList3 = new ArrayList<String>();
3135 objList3.add(date); 3157 objList3.add(date);
3136 objList3.add(date2); 3158 objList3.add(date2);
3137 - sql+="select r.xl_bm,r.cl_zbh" 3159 + sql+="select r.xl_bm,r.cl_zbh, gs_bm, fgs_bm"
3138 + " from bsth_c_s_sp_info_real r where" 3160 + " from bsth_c_s_sp_info_real r where"
3139 + " r.schedule_date_str BETWEEN ? and ?"; 3161 + " r.schedule_date_str BETWEEN ? and ?";
3140 if(line.equals("")){ 3162 if(line.equals("")){
3141 - sql +=" and r.gs_bm = ?"  
3142 - + " and r.fgs_bm = ?"; 3163 + sql +=" and r.gs_bm = ?";
3143 objList3.add(gsdm); 3164 objList3.add(gsdm);
3144 - objList3.add(fgsdm); 3165 + if(fgsdm != null && fgsdm.length > 0){
  3166 + sql += " and r.fgs_bm in (";
  3167 + for(int i = 0; i < fgsdm.length; i++){
  3168 + sql += "?";
  3169 + if(i < fgsdm.length - 1){
  3170 + sql += ",";
  3171 + }
  3172 + objList3.add(fgsdm[i]);
  3173 + }
  3174 + sql += ")";
  3175 + }
3145 }else{ 3176 }else{
3146 sql += " and r.xl_bm = ?"; 3177 sql += " and r.xl_bm = ?";
3147 objList3.add(line); 3178 objList3.add(line);
@@ -3153,6 +3184,8 @@ public class ReportServiceImpl implements ReportService{ @@ -3153,6 +3184,8 @@ public class ReportServiceImpl implements ReportService{
3153 Map<String, Object> map=new HashMap<String,Object>(); 3184 Map<String, Object> map=new HashMap<String,Object>();
3154 map.put("line",arg0.getString("xl_bm")); 3185 map.put("line",arg0.getString("xl_bm"));
3155 map.put("nbbm", arg0.getString("cl_zbh")); 3186 map.put("nbbm", arg0.getString("cl_zbh"));
  3187 + map.put("gsBm", arg0.getString("gs_bm"));
  3188 + map.put("fgsBm", arg0.getString("fgs_bm"));
3156 return map; 3189 return map;
3157 } 3190 }
3158 }); 3191 });
@@ -3160,14 +3193,23 @@ public class ReportServiceImpl implements ReportService{ @@ -3160,14 +3193,23 @@ public class ReportServiceImpl implements ReportService{
3160 List<String> objList4 = new ArrayList<String>(); 3193 List<String> objList4 = new ArrayList<String>();
3161 objList4.add(date); 3194 objList4.add(date);
3162 objList4.add(date2); 3195 objList4.add(date2);
3163 - sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh" 3196 + sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh, gs_bm, fgs_bm"
3164 + " from bsth_c_s_sp_info_real r where" 3197 + " from bsth_c_s_sp_info_real r where"
3165 + " r.schedule_date_str BETWEEN ? and ?"; 3198 + " r.schedule_date_str BETWEEN ? and ?";
3166 if(line.equals("")){ 3199 if(line.equals("")){
3167 - sql +=" and r.gs_bm = ? "  
3168 - + " and r.fgs_bm = ?"; 3200 + sql +=" and r.gs_bm = ? ";
3169 objList4.add(gsdm); 3201 objList4.add(gsdm);
3170 - objList4.add(fgsdm); 3202 + if(fgsdm != null && fgsdm.length > 0){
  3203 + sql += " and r.fgs_bm in (";
  3204 + for(int i = 0; i < fgsdm.length; i++){
  3205 + sql += "?";
  3206 + if(i < fgsdm.length - 1){
  3207 + sql += ",";
  3208 + }
  3209 + objList4.add(fgsdm[i]);
  3210 + }
  3211 + sql += ")";
  3212 + }
3171 }else{ 3213 }else{
3172 sql += " and r.xl_bm = ?"; 3214 sql += " and r.xl_bm = ?";
3173 objList4.add(line); 3215 objList4.add(line);
@@ -3181,6 +3223,8 @@ public class ReportServiceImpl implements ReportService{ @@ -3181,6 +3223,8 @@ public class ReportServiceImpl implements ReportService{
3181 map.put("nbbm", arg0.getString("cl_zbh")); 3223 map.put("nbbm", arg0.getString("cl_zbh"));
3182 map.put("jGh", arg0.getString("j_gh")); 3224 map.put("jGh", arg0.getString("j_gh"));
3183 map.put("sGh", arg0.getString("s_gh")); 3225 map.put("sGh", arg0.getString("s_gh"));
  3226 + map.put("gsBm", arg0.getString("gs_bm"));
  3227 + map.put("fgsBm", arg0.getString("fgs_bm"));
3184 return map; 3228 return map;
3185 } 3229 }
3186 }); 3230 });
@@ -3296,7 +3340,7 @@ public class ReportServiceImpl implements ReportService{ @@ -3296,7 +3340,7 @@ public class ReportServiceImpl implements ReportService{
3296 3340
3297 } 3341 }
3298 if(!zt.equals("zbh")){ 3342 if(!zt.equals("zbh")){
3299 - lMap=lists(listGroupBy, lMaps, gsdm, fgsdm, date, date2); 3343 + lMap=lists(listGroupBy, lMaps, date, date2);
3300 } 3344 }
3301 if(type.equals("export")){ 3345 if(type.equals("export")){
3302 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 3346 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
@@ -3385,7 +3429,6 @@ public class ReportServiceImpl implements ReportService{ @@ -3385,7 +3429,6 @@ public class ReportServiceImpl implements ReportService{
3385 3429
3386 public final List<Map<String, Object>> lists(List<Map<String, Object>> listGb, 3430 public final List<Map<String, Object>> lists(List<Map<String, Object>> listGb,
3387 List<Map<String, Object>> listLc, 3431 List<Map<String, Object>> listLc,
3388 - String gsdm,String fgsdm,  
3389 String date,String date2){ 3432 String date,String date2){
3390 List<Map<String, Object>> lMap=new ArrayList<Map<String,Object>>(); 3433 List<Map<String, Object>> lMap=new ArrayList<Map<String,Object>>();
3391 for (int i = 0; i < listGb.size(); i++) { 3434 for (int i = 0; i < listGb.size(); i++) {
@@ -3396,6 +3439,8 @@ public class ReportServiceImpl implements ReportService{ @@ -3396,6 +3439,8 @@ public class ReportServiceImpl implements ReportService{
3396 String jName=m.get("jName")==null?"":m.get("jName").toString(); 3439 String jName=m.get("jName")==null?"":m.get("jName").toString();
3397 String sGh= m.get("sGh")==null?"":m.get("sGh").toString(); 3440 String sGh= m.get("sGh")==null?"":m.get("sGh").toString();
3398 String sName=m.get("sName")==null?"":m.get("sName").toString(); 3441 String sName=m.get("sName")==null?"":m.get("sName").toString();
  3442 + String gsBm= m.get("gsBm")==null?"":m.get("gsBm").toString();
  3443 + String fgsBm= m.get("fgsBm")==null?"":m.get("fgsBm").toString();
3399 double jhzlc = 0.0,jhlc= 0.0,jcclc= 0.0,zlc= 0.0,jhnlc= 0.0,jhwlc= 0.0, 3444 double jhzlc = 0.0,jhlc= 0.0,jcclc= 0.0,zlc= 0.0,jhnlc= 0.0,jhwlc= 0.0,
3400 jhnjcclc= 0.0,jhwjcclc= 0.0,jhwjcclc_z=0.0,zrwjcclc= 0.0,zrwjcclc1= 0.0,zrwjcclc2= 0.0, 3445 jhnjcclc= 0.0,jhwjcclc= 0.0,jhwjcclc_z=0.0,zrwjcclc= 0.0,zrwjcclc1= 0.0,zrwjcclc2= 0.0,
3401 zrwjcclcqt=0.0,lbss= 0.0,ssgl_lz= 0.0, 3446 zrwjcclcqt=0.0,lbss= 0.0,ssgl_lz= 0.0,
@@ -3453,7 +3498,7 @@ public class ReportServiceImpl implements ReportService{ @@ -3453,7 +3498,7 @@ public class ReportServiceImpl implements ReportService{
3453 }else{ 3498 }else{
3454 newMap.put("rq", date+"至"+date2); 3499 newMap.put("rq", date+"至"+date2);
3455 } 3500 }
3456 - newMap.put("fgs", BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); 3501 + newMap.put("fgs", BasicData.businessFgsCodeNameMap.get(fgsBm+"_"+gsBm));
3457 newMap.put("xlName", BasicData.lineCode2NameMap.get(xl_bm)); 3502 newMap.put("xlName", BasicData.lineCode2NameMap.get(xl_bm));
3458 newMap.put("xlBm", xl_bm); 3503 newMap.put("xlBm", xl_bm);
3459 newMap.put("jGh", jGh); 3504 newMap.put("jGh", jGh);
@@ -4573,11 +4618,11 @@ public class ReportServiceImpl implements ReportService{ @@ -4573,11 +4618,11 @@ public class ReportServiceImpl implements ReportService{
4573 return listAll; 4618 return listAll;
4574 } 4619 }
4575 4620
4576 - public Map<String,Object> calcDetailMonthlyE(Map<String, Object> map){ 4621 + public Map<String,Object> calcDetailMonthlyE(Map<String, Object> map, String[] fgsdm){
4577 4622
4578 Map<String, Object> resultMap = new HashMap<String, Object>(); 4623 Map<String, Object> resultMap = new HashMap<String, Object>();
4579 try { 4624 try {
4580 - List<List<String>> list = calcWaybillService.calcDetailMonthlyNew(map); 4625 + List<List<String>> list = calcWaybillService.calcDetailMonthlyNew(map, fgsdm);
4581 4626
4582 String name = map.get("name").toString(); 4627 String name = map.get("name").toString();
4583 String type = map.get("statisticalObj").toString(); 4628 String type = map.get("statisticalObj").toString();
src/main/java/com/bsth/service/schedule/PeopleCarPlanService.java
@@ -7,7 +7,7 @@ public interface PeopleCarPlanService { @@ -7,7 +7,7 @@ public interface PeopleCarPlanService {
7 7
8 List<Map<String, Object>> queryPeopleCar(Map<String, Object> map); 8 List<Map<String, Object>> queryPeopleCar(Map<String, Object> map);
9 9
10 - List<Map<String, Object>> workDaily(Map<String, Object> map); 10 + List<Map<String, Object>> workDaily(Map<String, Object> map, String[] subCompany);
11 11
12 Map<String, Object> scheduleAnaly(Map<String, Object> map); 12 Map<String, Object> scheduleAnaly(Map<String, Object> map);
13 13
@@ -17,7 +17,7 @@ public interface PeopleCarPlanService { @@ -17,7 +17,7 @@ public interface PeopleCarPlanService {
17 17
18 List<Map<String, Object>> firstAndLastBus(Map<String, Object> map); 18 List<Map<String, Object>> firstAndLastBus(Map<String, Object> map);
19 19
20 - List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map); 20 + List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map, String[] subCompany);
21 21
22 List<Map<String, Object>> commandState(Map<String, Object> map); 22 List<Map<String, Object>> commandState(Map<String, Object> map);
23 List<Map<String, Object>> commandByLineList(Map<String, Object> map); 23 List<Map<String, Object>> commandByLineList(Map<String, Object> map);
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
@@ -46,22 +46,39 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -46,22 +46,39 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
46 @Autowired 46 @Autowired
47 private JdbcTemplate jdbcTemplate; 47 private JdbcTemplate jdbcTemplate;
48 48
49 - public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){ 49 + public List<ScheduleRealInfo> getSchedule(String company, String[] subCompany, String line, String date){
50 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 50 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
51 51
52 try { 52 try {
53 - String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str = '"+date+"'"; 53 + String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str = ?";
54 54
55 - if(line.length() != 0)  
56 - sql += " and xl_bm = '"+line+"'";  
57 - if(company.length() != 0)  
58 - sql += " and gs_bm = '"+company+"'";  
59 - if(subCompany.length() != 0)  
60 - sql += " and fgs_bm = '"+subCompany+"'"; 55 + List<String> objList = new ArrayList<String>();
  56 + objList.add(date);
  57 +
  58 + if(line.length() != 0){
  59 + sql += " and xl_bm = ?";
  60 + objList.add(line);
  61 + }
  62 + if(company.length() != 0){
  63 + sql += " and gs_bm = ?";
  64 + objList.add(company);
  65 + }
  66 + if(subCompany != null && subCompany.length != 0){
  67 + sql += " and fgs_bm in (";
  68 + for(int i = 0; i < subCompany.length; i++){
  69 + sql += "?";
  70 + if(i < subCompany.length - 1){
  71 + sql += ",";
  72 + }
  73 + objList.add(subCompany[i]);
  74 + }
  75 + sql += ")";
  76 + }
61 77
62 sql += " order by gs_bm, fgs_bm, xl_bm"; 78 sql += " order by gs_bm, fgs_bm, xl_bm";
63 79
64 list = jdbcTemplate.query(sql, 80 list = jdbcTemplate.query(sql,
  81 + objList.toArray(),
65 new RowMapper<ScheduleRealInfo>(){ 82 new RowMapper<ScheduleRealInfo>(){
66 @Override 83 @Override
67 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { 84 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -327,18 +344,19 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -327,18 +344,19 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
327 } 344 }
328 345
329 @Override 346 @Override
330 - public List<Map<String, Object>> workDaily(Map<String, Object> map) { 347 + public List<Map<String, Object>> workDaily(Map<String, Object> map, String[] subCompany) {
331 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 348 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
332 Set<String> lineSet = getNotOperation(); 349 Set<String> lineSet = getNotOperation();
333 DecimalFormat df = new DecimalFormat("###0.##"); 350 DecimalFormat df = new DecimalFormat("###0.##");
334 351
335 - String sfyy = "", company = "", subCompany = ""; 352 + String sfyy = "", company = "";
  353 +// String subCompany = "";
336 if(map.get("sfyy")!=null) 354 if(map.get("sfyy")!=null)
337 sfyy = map.get("sfyy").toString(); 355 sfyy = map.get("sfyy").toString();
338 if(map.get("company")!=null) 356 if(map.get("company")!=null)
339 company = map.get("company").toString(); 357 company = map.get("company").toString();
340 - if(map.get("subCompany")!=null)  
341 - subCompany = map.get("subCompany").toString(); 358 +// if(map.get("subCompany")!=null)
  359 +// subCompany = map.get("subCompany").toString();
342 String line = map.get("line").toString(); 360 String line = map.get("line").toString();
343 String date = map.get("date").toString(); 361 String date = map.get("date").toString();
344 String type = map.get("type").toString(); 362 String type = map.get("type").toString();
@@ -397,7 +415,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -397,7 +415,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
397 // TODO Auto-generated catch block 415 // TODO Auto-generated catch block
398 e.printStackTrace(); 416 e.printStackTrace();
399 } 417 }
400 - String companyName = "", subCompanyName = "";  
401 418
402 for(String key : keyMap.keySet()){ 419 for(String key : keyMap.keySet()){
403 Map<String, Object> tempMap = new HashMap<String, Object>(); 420 Map<String, Object> tempMap = new HashMap<String, Object>();
@@ -407,6 +424,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -407,6 +424,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
407 int upfm = 0, updm = 0, dnfm = 0, dndm = 0; 424 int upfm = 0, updm = 0, dnfm = 0, dndm = 0;
408 int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0; 425 int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0;
409 int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0; 426 int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0;
  427 + String companyName = "", subCompanyName = "";
410 for(ScheduleRealInfo schedule : keyMap.get(key)){ 428 for(ScheduleRealInfo schedule : keyMap.get(key)){
411 if(schedule.isCcService()){ 429 if(schedule.isCcService()){
412 continue; 430 continue;
@@ -1676,7 +1694,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1676,7 +1694,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1676 } 1694 }
1677 1695
1678 @Override 1696 @Override
1679 - public List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map) { 1697 + public List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map, String[] subCompany) {
1680 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 1698 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
1681 NumberFormat nf = NumberFormat.getNumberInstance(); 1699 NumberFormat nf = NumberFormat.getNumberInstance();
1682 nf.setMinimumFractionDigits(2); 1700 nf.setMinimumFractionDigits(2);
@@ -1684,13 +1702,14 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1684,13 +1702,14 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1684 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 1702 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1685 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 1703 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1686 1704
1687 - String sfyy = "", company = "", subCompany = "", line = ""; 1705 + String sfyy = "", company = "", line = "";
  1706 +// String subCompany = "";
1688 if(map.get("sfyy")!=null) 1707 if(map.get("sfyy")!=null)
1689 sfyy = map.get("sfyy").toString().trim(); 1708 sfyy = map.get("sfyy").toString().trim();
1690 if(map.get("company")!=null) 1709 if(map.get("company")!=null)
1691 company = map.get("company").toString().trim(); 1710 company = map.get("company").toString().trim();
1692 - if(map.get("subCompany")!=null)  
1693 - subCompany = map.get("subCompany").toString().trim(); 1711 +// if(map.get("subCompany")!=null)
  1712 +// subCompany = map.get("subCompany").toString().trim();
1694 if(map.get("line")!=null) 1713 if(map.get("line")!=null)
1695 line = map.get("line").toString().trim(); 1714 line = map.get("line").toString().trim();
1696 String startDate = map.get("startDate").toString().trim(); 1715 String startDate = map.get("startDate").toString().trim();
@@ -1730,9 +1749,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1730,9 +1749,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1730 sql += " and gs_bm = ?"; 1749 sql += " and gs_bm = ?";
1731 objList.add(company); 1750 objList.add(company);
1732 } 1751 }
1733 - if(subCompany.length() != 0){  
1734 - sql += " and fgs_bm = ?";  
1735 - objList.add(subCompany); 1752 + if(subCompany != null && subCompany.length != 0){
  1753 + sql += " and fgs_bm in (";
  1754 + for(int i = 0; i < subCompany.length; i++){
  1755 + sql += "?";
  1756 + if(i < subCompany.length - 1){
  1757 + sql += ",";
  1758 + }
  1759 + objList.add(subCompany[i]);
  1760 + }
  1761 + sql += ")";
1736 } 1762 }
1737 1763
1738 listSp = jdbcTemplate.query(sql, 1764 listSp = jdbcTemplate.query(sql,
@@ -1775,9 +1801,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1775,9 +1801,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1775 sql += " and gs_bm = ? "; 1801 sql += " and gs_bm = ? ";
1776 objList.add(company); 1802 objList.add(company);
1777 } 1803 }
1778 - if(subCompany.length() != 0){  
1779 - sql += " and fgs_bm = ? ";  
1780 - objList.add(subCompany); 1804 + if(subCompany != null && subCompany.length != 0){
  1805 + sql += " and fgs_bm in (";
  1806 + for(int i = 0; i < subCompany.length; i++){
  1807 + sql += "?";
  1808 + if(i < subCompany.length - 1){
  1809 + sql += ",";
  1810 + }
  1811 + objList.add(subCompany[i]);
  1812 + }
  1813 + sql += ")";
1781 } 1814 }
1782 1815
1783 list = jdbcTemplate.query(sql, 1816 list = jdbcTemplate.query(sql,
@@ -2272,9 +2305,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2272,9 +2305,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2272 Map<String,Object> m = new HashMap<String, Object>(); 2305 Map<String,Object> m = new HashMap<String, Object>();
2273 ReportUtils ee = new ReportUtils(); 2306 ReportUtils ee = new ReportUtils();
2274 try { 2307 try {
2275 - if(resList.size() > 0)  
2276 - listI.add(((List<Map<String, Object>>)resList.get(resList.size() - 1).get("map")).iterator());  
2277 - listI.add(resList.iterator()); 2308 + listI.add(mapList.iterator());
2278 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 2309 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2279 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_delay.xls", 2310 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_delay.xls",
2280 path+"export/" + dateTime + "-" + lineName + "-首末班误点班次.xls"); 2311 path+"export/" + dateTime + "-" + lineName + "-首末班误点班次.xls");
src/main/resources/static/pages/calc/company/countBusMileage.html
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> 42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> 44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
45 - <span class="item-label" style="width: 80px;">分公司: </span>  
46 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> 45 + <span class="item-label" style="width: 80px;">线队: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;" multiple="multiple"></select>
47 </div> 47 </div>
48 <div style="display: inline-block;margin-left: 43px;"> 48 <div style="display: inline-block;margin-left: 43px;">
49 <span class="item-label" style="width: 80px;">线路: </span> 49 <span class="item-label" style="width: 80px;">线路: </span>
@@ -141,23 +141,34 @@ @@ -141,23 +141,34 @@
141 $("#gsdm").on("change",updateCompany); 141 $("#gsdm").on("change",updateCompany);
142 function updateCompany(){ 142 function updateCompany(){
143 var company = $('#gsdm').val(); 143 var company = $('#gsdm').val();
144 - var options = ''; 144 +// var options = '';
  145 +// for(var i = 0; i < obj.length; i++){
  146 +// if(obj[i].companyCode == company){
  147 +// var children = obj[i].children;
  148 +// for(var j = 0; j < children.length; j++){
  149 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  150 +// }
  151 +// }
  152 +// }
  153 +// $('#fgsdm').html(options);
  154 + var data = [];
145 for(var i = 0; i < obj.length; i++){ 155 for(var i = 0; i < obj.length; i++){
146 if(obj[i].companyCode == company){ 156 if(obj[i].companyCode == company){
147 var children = obj[i].children; 157 var children = obj[i].children;
148 for(var j = 0; j < children.length; j++){ 158 for(var j = 0; j < children.length; j++){
149 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 159 + data.push({id: children[j].code, text: children[j].name});
150 } 160 }
151 } 161 }
152 } 162 }
153 - $('#fgsdm').html(options); 163 + $("#fgsdm").empty();
  164 + initPinYinSelect2('#fgsdm',data,'');
154 } 165 }
155 166
156 167
157 var tempData = {}; 168 var tempData = {};
158 $.get('/report/lineList',function(xlList){ 169 $.get('/report/lineList',function(xlList){
159 var data = []; 170 var data = [];
160 -// data.push({id: " ", text: "全部线路"}); 171 + data.push({id: " ", text: "全部线路"});
161 $.get('/user/companyData', function(result){ 172 $.get('/user/companyData', function(result){
162 for(var i = 0; i < result.length; i++){ 173 for(var i = 0; i < result.length; i++){
163 var companyCode = result[i].companyCode; 174 var companyCode = result[i].companyCode;
@@ -213,7 +224,14 @@ @@ -213,7 +224,14 @@
213 date = $("#date").val(); 224 date = $("#date").val();
214 date2 =$("#date2").val(); 225 date2 =$("#date2").val();
215 gsdm =$("#gsdm").val(); 226 gsdm =$("#gsdm").val();
216 - fgsdm=$("#fgsdm").val(); 227 +// fgsdm=$("#fgsdm").val();
  228 + fgsdm="";
  229 + $($("#fgsdm").val()).each(function(i, e){
  230 + fgsdm += e + ",";
  231 + });
  232 + if(fgsdm.length > 0){
  233 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  234 + }
217 zt=$("#zt").val(); 235 zt=$("#zt").val();
218 xlName = $("#select2-line-container").html(); 236 xlName = $("#select2-line-container").html();
219 if(xlName == "全部线路") 237 if(xlName == "全部线路")
@@ -226,7 +244,7 @@ @@ -226,7 +244,7 @@
226 }else{ 244 }else{
227 var params = {}; 245 var params = {};
228 params['gsdm'] = gsdm; 246 params['gsdm'] = gsdm;
229 - params['fgsdm'] =fgsdm ; 247 + params['fgsdm'] =fgsdm;
230 params['line'] = line; 248 params['line'] = line;
231 params['date'] = date; 249 params['date'] = date;
232 params['date2'] = date2; 250 params['date2'] = date2;
@@ -287,7 +305,7 @@ @@ -287,7 +305,7 @@
287 <tr> 305 <tr>
288 <td>序号</td> 306 <td>序号</td>
289 <td>日期</td> 307 <td>日期</td>
290 - <td>所属公司</td> 308 + <td>线队</td>
291 <td>线路</td> 309 <td>线路</td>
292 <td>车号</td> 310 <td>车号</td>
293 {{if zt=='js'}} 311 {{if zt=='js'}}
src/main/resources/static/pages/calc/countBusMileage.html
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> 42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> 44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
45 - <span class="item-label" style="width: 80px;">分公司: </span>  
46 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> 45 + <span class="item-label" style="width: 80px;">线队: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;" multiple="multiple"></select>
47 </div> 47 </div>
48 <div style="display: inline-block;margin-left: 43px;"> 48 <div style="display: inline-block;margin-left: 43px;">
49 <span class="item-label" style="width: 80px;">线路: </span> 49 <span class="item-label" style="width: 80px;">线路: </span>
@@ -141,23 +141,34 @@ @@ -141,23 +141,34 @@
141 $("#gsdm").on("change",updateCompany); 141 $("#gsdm").on("change",updateCompany);
142 function updateCompany(){ 142 function updateCompany(){
143 var company = $('#gsdm').val(); 143 var company = $('#gsdm').val();
144 - var options = ''; 144 +// var options = '';
  145 +// for(var i = 0; i < obj.length; i++){
  146 +// if(obj[i].companyCode == company){
  147 +// var children = obj[i].children;
  148 +// for(var j = 0; j < children.length; j++){
  149 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  150 +// }
  151 +// }
  152 +// }
  153 +// $('#fgsdm').html(options);
  154 + var data = [];
145 for(var i = 0; i < obj.length; i++){ 155 for(var i = 0; i < obj.length; i++){
146 if(obj[i].companyCode == company){ 156 if(obj[i].companyCode == company){
147 var children = obj[i].children; 157 var children = obj[i].children;
148 for(var j = 0; j < children.length; j++){ 158 for(var j = 0; j < children.length; j++){
149 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 159 + data.push({id: children[j].code, text: children[j].name});
150 } 160 }
151 } 161 }
152 } 162 }
153 - $('#fgsdm').html(options); 163 + $("#fgsdm").empty();
  164 + initPinYinSelect2('#fgsdm',data,'');
154 } 165 }
155 166
156 167
157 var tempData = {}; 168 var tempData = {};
158 $.get('/report/lineList',function(xlList){ 169 $.get('/report/lineList',function(xlList){
159 var data = []; 170 var data = [];
160 -// data.push({id: " ", text: "全部线路"}); 171 + data.push({id: " ", text: "全部线路"});
161 $.get('/user/companyData', function(result){ 172 $.get('/user/companyData', function(result){
162 for(var i = 0; i < result.length; i++){ 173 for(var i = 0; i < result.length; i++){
163 var companyCode = result[i].companyCode; 174 var companyCode = result[i].companyCode;
@@ -213,7 +224,14 @@ @@ -213,7 +224,14 @@
213 date = $("#date").val(); 224 date = $("#date").val();
214 date2 =$("#date2").val(); 225 date2 =$("#date2").val();
215 gsdm =$("#gsdm").val(); 226 gsdm =$("#gsdm").val();
216 - fgsdm=$("#fgsdm").val(); 227 +// fgsdm=$("#fgsdm").val();
  228 + fgsdm="";
  229 + $($("#fgsdm").val()).each(function(i, e){
  230 + fgsdm += e + ",";
  231 + });
  232 + if(fgsdm.length > 0){
  233 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  234 + }
217 zt=$("#zt").val(); 235 zt=$("#zt").val();
218 xlName = $("#select2-line-container").html(); 236 xlName = $("#select2-line-container").html();
219 if(xlName == "全部线路") 237 if(xlName == "全部线路")
@@ -287,7 +305,7 @@ @@ -287,7 +305,7 @@
287 <tr> 305 <tr>
288 <td>序号</td> 306 <td>序号</td>
289 <td>日期</td> 307 <td>日期</td>
290 - <td>所属公司</td> 308 + <td>线队</td>
291 <td>线路</td> 309 <td>线路</td>
292 <td>车号</td> 310 <td>车号</td>
293 {{if zt=='js'}} 311 {{if zt=='js'}}
src/main/resources/static/pages/forms/calc/calcDetailMonthly.html
@@ -66,8 +66,8 @@ @@ -66,8 +66,8 @@
66 <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select> 66 <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select>
67 </div> 67 </div>
68 <div style="display: inline-block; margin-left: 13px;" id="fgsdmDiv_daily"> 68 <div style="display: inline-block; margin-left: 13px;" id="fgsdmDiv_daily">
69 - <span class="item-label" style="width: 80px;">&#12288;分公司: </span>  
70 - <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;"></select> 69 + <span class="item-label" style="width: 80px;">&#12288;线队: </span>
  70 + <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;" multiple="multiple"></select>
71 </div> 71 </div>
72 <!--<div style="display: inline-block;margin-left: 33px;"> 72 <!--<div style="display: inline-block;margin-left: 33px;">
73 <span class="item-label" style="width: 80px;">&#12288;&#12288;线路: </span> 73 <span class="item-label" style="width: 80px;">&#12288;&#12288;线路: </span>
@@ -208,20 +208,30 @@ @@ -208,20 +208,30 @@
208 function updateCompany(){ 208 function updateCompany(){
209 var company = $('#gsdm').val(); 209 var company = $('#gsdm').val();
210 $.get('/user/companyData', function(obj) { 210 $.get('/user/companyData', function(obj) {
211 - var option = '';  
212 - var allC = "";  
213 - for (var i = 0; i < obj.length; i++) {  
214 - if (obj[i].companyCode == company) {  
215 - var children = obj[i].children;  
216 - for (var j = 0; j < children.length; j++) {  
217 - allC += children[j].code+",";  
218 - option += '<option value="' + children[j].code + '">' + children[j].name + '</option>';  
219 - }  
220 - }  
221 - }  
222 -  
223 - var options = '<option value="'+allC.substring(0,allC.length-1)+'">所有分公司</option>'+option;  
224 - $('#fgsdm').html(options); 211 +// var option = '';
  212 +// var allC = "";
  213 +// for (var i = 0; i < obj.length; i++) {
  214 +// if (obj[i].companyCode == company) {
  215 +// var children = obj[i].children;
  216 +// for (var j = 0; j < children.length; j++) {
  217 +// allC += children[j].code+",";
  218 +// option += '<option value="' + children[j].code + '">' + children[j].name + '</option>';
  219 +// }
  220 +// }
  221 +// }
  222 +// var options = '<option value="'+allC.substring(0,allC.length-1)+'">所有线队</option>'+option;
  223 +// $('#fgsdm').html(options);
  224 + var data = [];
  225 + for(var i = 0; i < obj.length; i++){
  226 + if(obj[i].companyCode == company){
  227 + var children = obj[i].children;
  228 + for(var j = 0; j < children.length; j++){
  229 + data.push({id: children[j].code, text: children[j].name});
  230 + }
  231 + }
  232 + }
  233 + $("#fgsdm").empty();
  234 + initPinYinSelect2('#fgsdm',data,'');
225 }); 235 });
226 } 236 }
227 237
@@ -262,7 +272,14 @@ @@ -262,7 +272,14 @@
262 var lineName = ''; 272 var lineName = '';
263 $("#query").on("click",function(){ 273 $("#query").on("click",function(){
264 var gsdm = $("#gsdm").val(); 274 var gsdm = $("#gsdm").val();
265 - var fgsdm = $("#fgsdm").val(); 275 +// var fgsdm = $("#fgsdm").val();
  276 + fgsdm="";
  277 + $($("#fgsdm").val()).each(function(i, e){
  278 + fgsdm += e + ",";
  279 + });
  280 + if(fgsdm.length > 0){
  281 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  282 + }
266 var startDate = $("#startDate").val(); 283 var startDate = $("#startDate").val();
267 var endDate = $("#endDate").val(); 284 var endDate = $("#endDate").val();
268 var statisticalObj = $("#statisticalObj").val(); 285 var statisticalObj = $("#statisticalObj").val();
@@ -281,11 +298,11 @@ @@ -281,11 +298,11 @@
281 datas.statisticalObj = $("#statisticalObj").val(); 298 datas.statisticalObj = $("#statisticalObj").val();
282 datas.itemDetails = $("#itemDetails").val(); 299 datas.itemDetails = $("#itemDetails").val();
283 var itemDetails = datas.itemDetails, 300 var itemDetails = datas.itemDetails,
284 - type = "加注量[全部]"; 301 + type = "加注量(全部)";
285 if(itemDetails=="jzl0"){ 302 if(itemDetails=="jzl0"){
286 - type = "加注量[0#]" 303 + type = "加注量(0)"
287 } else if(itemDetails=="jzl-10"){ 304 } else if(itemDetails=="jzl-10"){
288 - type = "加注量[-10#]" 305 + type = "加注量(-10)"
289 } else if(itemDetails=="yhl"){ 306 } else if(itemDetails=="yhl"){
290 type = "油耗量" 307 type = "油耗量"
291 } else if(itemDetails=="cccy"){ 308 } else if(itemDetails=="cccy"){
src/main/resources/static/pages/forms/calc/calcDetailYear.html
@@ -66,8 +66,8 @@ @@ -66,8 +66,8 @@
66 <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select> 66 <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select>
67 </div> 67 </div>
68 <div style="display: inline-block; margin-left: 13px;" id="fgsdmDiv_daily"> 68 <div style="display: inline-block; margin-left: 13px;" id="fgsdmDiv_daily">
69 - <span class="item-label" style="width: 80px;">&#12288;分公司: </span>  
70 - <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;"></select> 69 + <span class="item-label" style="width: 80px;">&#12288;线队: </span>
  70 + <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;" multiple="multiple"></select>
71 </div> 71 </div>
72 <!--<div style="display: inline-block;margin-left: 33px;"> 72 <!--<div style="display: inline-block;margin-left: 33px;">
73 <span class="item-label" style="width: 80px;">&#12288;&#12288;线路: </span> 73 <span class="item-label" style="width: 80px;">&#12288;&#12288;线路: </span>
@@ -205,20 +205,30 @@ @@ -205,20 +205,30 @@
205 function updateCompany(){ 205 function updateCompany(){
206 var company = $('#gsdm').val(); 206 var company = $('#gsdm').val();
207 $.get('/user/companyData', function(obj) { 207 $.get('/user/companyData', function(obj) {
208 - var option = '';  
209 - var allC = "";  
210 - for (var i = 0; i < obj.length; i++) {  
211 - if (obj[i].companyCode == company) {  
212 - var children = obj[i].children;  
213 - for (var j = 0; j < children.length; j++) {  
214 - allC += children[j].code+",";  
215 - option += '<option value="' + children[j].code + '">' + children[j].name + '</option>';  
216 - }  
217 - }  
218 - }  
219 -  
220 - var options = '<option value="'+allC.substring(0,allC.length-1)+'">所有分公司</option>'+option;  
221 - $('#fgsdm').html(options); 208 +// var option = '';
  209 +// var allC = "";
  210 +// for (var i = 0; i < obj.length; i++) {
  211 +// if (obj[i].companyCode == company) {
  212 +// var children = obj[i].children;
  213 +// for (var j = 0; j < children.length; j++) {
  214 +// allC += children[j].code+",";
  215 +// option += '<option value="' + children[j].code + '">' + children[j].name + '</option>';
  216 +// }
  217 +// }
  218 +// }
  219 +// var options = '<option value="'+allC.substring(0,allC.length-1)+'">所有线队</option>'+option;
  220 +// $('#fgsdm').html(options);
  221 + var data = [];
  222 + for(var i = 0; i < obj.length; i++){
  223 + if(obj[i].companyCode == company){
  224 + var children = obj[i].children;
  225 + for(var j = 0; j < children.length; j++){
  226 + data.push({id: children[j].code, text: children[j].name});
  227 + }
  228 + }
  229 + }
  230 + $("#fgsdm").empty();
  231 + initPinYinSelect2('#fgsdm',data,'');
222 }); 232 });
223 } 233 }
224 234
@@ -260,7 +270,14 @@ @@ -260,7 +270,14 @@
260 var lineName = ''; 270 var lineName = '';
261 $("#query").on("click",function(){ 271 $("#query").on("click",function(){
262 var gsdm = $("#gsdm").val(); 272 var gsdm = $("#gsdm").val();
263 - var fgsdm = $("#fgsdm").val(); 273 +// var fgsdm = $("#fgsdm").val();
  274 + fgsdm="";
  275 + $($("#fgsdm").val()).each(function(i, e){
  276 + fgsdm += e + ",";
  277 + });
  278 + if(fgsdm.length > 0){
  279 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  280 + }
264 var startDate = $("#startDate").val(); 281 var startDate = $("#startDate").val();
265 var endDate = $("#endDate").val(); 282 var endDate = $("#endDate").val();
266 var statisticalObj = $("#statisticalObj").val(); 283 var statisticalObj = $("#statisticalObj").val();
@@ -281,11 +298,11 @@ @@ -281,11 +298,11 @@
281 datas.item = item; 298 datas.item = item;
282 299
283 var itemDetails = datas.itemDetails, 300 var itemDetails = datas.itemDetails,
284 - type = "加注量[全部]"; 301 + type = "加注量(全部)";
285 if(itemDetails=="jzl0"){ 302 if(itemDetails=="jzl0"){
286 - type = "加注量[0#]" 303 + type = "加注量(0)"
287 } else if(itemDetails=="jzl-10"){ 304 } else if(itemDetails=="jzl-10"){
288 - type = "加注量[-10#]" 305 + type = "加注量(-10)"
289 } else if(itemDetails=="yhl"){ 306 } else if(itemDetails=="yhl"){
290 type = "油耗量" 307 type = "油耗量"
291 } else if(itemDetails=="cccy"){ 308 } else if(itemDetails=="cccy"){
src/main/resources/static/pages/forms/mould/calcLbStatuAnaly.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/calcSheetList.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/calcSheetList1.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/calcTurnoutrate.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/calcTurnoutrateZgf.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByBus1.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByBus1s.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByBus2.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByBus2s.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByLine.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/countByLines.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/firstAndLastBus.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/firstAndLastBus_delay.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/firstAndLastBus_map.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/firstAndLastBus_sum.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/lbStatuAnaly.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/sheetList.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/sheetList1.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/statisticsDaily_2.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/statisticsDaily_3.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/statisticsDaily_4.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/timeAndSpeed.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/workDaily.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/correctStatis.html
@@ -32,8 +32,8 @@ @@ -32,8 +32,8 @@
32 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 32 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
33 </div> 33 </div>
34 <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> 34 <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
35 - <span class="item-label" style="width: 80px;">分公司: </span>  
36 - <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 35 + <span class="item-label" style="width: 80px;">线队: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;" multiple="multiple"></select>
37 </div> 37 </div>
38 <div style="display: inline-block; margin-left: 20px;"> 38 <div style="display: inline-block; margin-left: 20px;">
39 <span class="item-label" style="width: 80px;">选择线路: </span> 39 <span class="item-label" style="width: 80px;">选择线路: </span>
@@ -186,16 +186,27 @@ @@ -186,16 +186,27 @@
186 $("#company").on("change",updateCompany); 186 $("#company").on("change",updateCompany);
187 function updateCompany(){ 187 function updateCompany(){
188 var company = $('#company').val(); 188 var company = $('#company').val();
189 - var options = '<option value="">全部分公司</option>'; 189 +// var options = '<option value="">全部线队</option>';
  190 +// for(var i = 0; i < obj.length; i++){
  191 +// if(obj[i].companyCode == company){
  192 +// var children = obj[i].children;
  193 +// for(var j = 0; j < children.length; j++){
  194 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  195 +// }
  196 +// }
  197 +// }
  198 +// $('#subCompany').html(options);
  199 + var data = [];
190 for(var i = 0; i < obj.length; i++){ 200 for(var i = 0; i < obj.length; i++){
191 if(obj[i].companyCode == company){ 201 if(obj[i].companyCode == company){
192 var children = obj[i].children; 202 var children = obj[i].children;
193 for(var j = 0; j < children.length; j++){ 203 for(var j = 0; j < children.length; j++){
194 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 204 + data.push({id: children[j].code, text: children[j].name});
195 } 205 }
196 } 206 }
197 } 207 }
198 - $('#subCompany').html(options); 208 + $("#subCompany").empty();
  209 + initPinYinSelect2('#subCompany',data,'');
199 } 210 }
200 211
201 var tempData = {}; 212 var tempData = {};
@@ -242,7 +253,7 @@ @@ -242,7 +253,7 @@
242 var sfqr = 0; 253 var sfqr = 0;
243 var sfyy = 1; 254 var sfyy = 1;
244 var company = $("#company").val(); 255 var company = $("#company").val();
245 - var subCompany = $("#subCompany").val(); 256 + var subCompany = "";
246 var lines; 257 var lines;
247 var line = $("#line").val(); 258 var line = $("#line").val();
248 var startDate = $("#startDate").val(); 259 var startDate = $("#startDate").val();
@@ -264,7 +275,14 @@ @@ -264,7 +275,14 @@
264 endDate = $("#endDate").val(); 275 endDate = $("#endDate").val();
265 times = $("#times1").val() + "-" + $("#times2").val(); 276 times = $("#times1").val() + "-" + $("#times2").val();
266 company = $("#company").val(); 277 company = $("#company").val();
267 - subCompany = $("#subCompany").val(); 278 +// subCompany = $("#subCompany").val();
  279 + subCompany="";
  280 + $($("#subCompany").val()).each(function(i, e){
  281 + subCompany += e + ",";
  282 + });
  283 + if(subCompany.length > 0){
  284 + subCompany = subCompany.substring(0, subCompany.length - 1);
  285 + }
268 params['sfqr'] = sfqr; 286 params['sfqr'] = sfqr;
269 params['line'] = line; 287 params['line'] = line;
270 params['sfyy'] = sfyy; 288 params['sfyy'] = sfyy;
@@ -399,7 +417,7 @@ @@ -399,7 +417,7 @@
399 <th class="hidden"></th> 417 <th class="hidden"></th>
400 <th rowspan="2" width="120px">日期</th> 418 <th rowspan="2" width="120px">日期</th>
401 <th rowspan="2">公司</th> 419 <th rowspan="2">公司</th>
402 - <th rowspan="2">分公司</th> 420 + <th rowspan="2">线队</th>
403 <th rowspan="2">线路</th> 421 <th rowspan="2">线路</th>
404 <th rowspan="2">实际营运班次</th> 422 <th rowspan="2">实际营运班次</th>
405 <th colspan="3" align="center">待发调整数</th> 423 <th colspan="3" align="center">待发调整数</th>
src/main/resources/static/pages/forms/statement/firstAndLastBus_delay.html
@@ -33,8 +33,8 @@ @@ -33,8 +33,8 @@
33 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 33 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
34 </div> 34 </div>
35 <div style="display: inline-block;margin-left: 19px;" id="subCompany1"> 35 <div style="display: inline-block;margin-left: 19px;" id="subCompany1">
36 - <span class="item-label" style="width: 80px;">分公司: </span>  
37 - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 36 + <span class="item-label" style="width: 80px;">线队: </span>
  37 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;" multiple="multiple"></select>
38 </div> 38 </div>
39 <div style="display: inline-block;margin-left: 33px;"> 39 <div style="display: inline-block;margin-left: 33px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
@@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
70 <tr class="hidden"> 70 <tr class="hidden">
71 <th align="center">序号</th> 71 <th align="center">序号</th>
72 <th>日期</th> 72 <th>日期</th>
73 - <th>分公司</th> 73 + <th>线队</th>
74 <th>线路</th> 74 <th>线路</th>
75 <th>首末班次</th> 75 <th>首末班次</th>
76 <th>计发</th> 76 <th>计发</th>
@@ -143,16 +143,27 @@ @@ -143,16 +143,27 @@
143 $("#company").on("change",updateCompany); 143 $("#company").on("change",updateCompany);
144 function updateCompany(){ 144 function updateCompany(){
145 var company = $('#company').val(); 145 var company = $('#company').val();
146 - var options = '<option value="">全部分公司</option>'; 146 +// var options = '<option value="">全部线队</option>';
  147 +// for(var i = 0; i < obj.length; i++){
  148 +// if(obj[i].companyCode == company){
  149 +// var children = obj[i].children;
  150 +// for(var j = 0; j < children.length; j++){
  151 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  152 +// }
  153 +// }
  154 +// }
  155 +// $('#subCompany').html(options);
  156 + var data = [];
147 for(var i = 0; i < obj.length; i++){ 157 for(var i = 0; i < obj.length; i++){
148 if(obj[i].companyCode == company){ 158 if(obj[i].companyCode == company){
149 var children = obj[i].children; 159 var children = obj[i].children;
150 for(var j = 0; j < children.length; j++){ 160 for(var j = 0; j < children.length; j++){
151 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 161 + data.push({id: children[j].code, text: children[j].name});
152 } 162 }
153 } 163 }
154 } 164 }
155 - $('#subCompany').html(options); 165 + $("#subCompany").empty();
  166 + initPinYinSelect2('#subCompany',data,'');
156 } 167 }
157 168
158 var tempData = {}; 169 var tempData = {};
@@ -214,10 +225,17 @@ @@ -214,10 +225,17 @@
214 var params = {}; 225 var params = {};
215 sfyy = $("#sfyy").val(); 226 sfyy = $("#sfyy").val();
216 line = $("#line").val(); 227 line = $("#line").val();
217 - company = $("#company").val();  
218 - subCompany = $("#subCompany").val();  
219 startDate = $("#startDate").val(); 228 startDate = $("#startDate").val();
220 endDate = $("#endDate").val(); 229 endDate = $("#endDate").val();
  230 + company = $("#company").val();
  231 +// subCompany = $("#subCompany").val();
  232 + subCompany="";
  233 + $($("#subCompany").val()).each(function(i, e){
  234 + subCompany += e + ",";
  235 + });
  236 + if(subCompany.length > 0){
  237 + subCompany = subCompany.substring(0, subCompany.length - 1);
  238 + }
221 lineName = $('#line option:selected').text(); 239 lineName = $('#line option:selected').text();
222 if(lineName == "全部线路") 240 if(lineName == "全部线路")
223 lineName = $('#subCompany option:selected').text(); 241 lineName = $('#subCompany option:selected').text();
@@ -257,13 +275,6 @@ @@ -257,13 +275,6 @@
257 $("#export").on("click",function(){ 275 $("#export").on("click",function(){
258 var i = layer.load(2); 276 var i = layer.load(2);
259 var params = {}; 277 var params = {};
260 - company = $("#company").val();  
261 - subCompany = $("#subCompany").val();  
262 - line = $("#line").val();  
263 - startDate = $("#startDate").val();  
264 - endDate = $("#endDate").val();  
265 - if(line == " ")  
266 - line = "";  
267 params['sfyy'] = sfyy; 278 params['sfyy'] = sfyy;
268 params['line'] = line; 279 params['line'] = line;
269 params['company'] = company; 280 params['company'] = company;
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
@@ -33,8 +33,8 @@ @@ -33,8 +33,8 @@
33 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 33 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
34 </div> 34 </div>
35 <div style="display: inline-block;margin-left: 19px;" id="subCompany1"> 35 <div style="display: inline-block;margin-left: 19px;" id="subCompany1">
36 - <span class="item-label" style="width: 80px;">分公司: </span>  
37 - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 36 + <span class="item-label" style="width: 80px;">线队: </span>
  37 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;" multiple="multiple"></select>
38 </div> 38 </div>
39 <div style="display: inline-block;margin-left: 33px;"> 39 <div style="display: inline-block;margin-left: 33px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 <tr class="hidden"> 71 <tr class="hidden">
72 <th width="240px">日期</th> 72 <th width="240px">日期</th>
73 <th>公司</th> 73 <th>公司</th>
74 - <th>分公司</th> 74 + <th>线队</th>
75 <th>线路</th> 75 <th>线路</th>
76 <th>计划首末班次数</th> 76 <th>计划首末班次数</th>
77 <th>实际准点首末班次数</th> 77 <th>实际准点首末班次数</th>
@@ -125,7 +125,7 @@ @@ -125,7 +125,7 @@
125 <tr class="hidden"> 125 <tr class="hidden">
126 <th align="center">序号</th> 126 <th align="center">序号</th>
127 <th>日期</th> 127 <th>日期</th>
128 - <th>分公司</th> 128 + <th>线队</th>
129 <th>线路</th> 129 <th>线路</th>
130 <th>首末班次</th> 130 <th>首末班次</th>
131 <th>计发</th> 131 <th>计发</th>
@@ -198,16 +198,27 @@ @@ -198,16 +198,27 @@
198 $("#company").on("change",updateCompany); 198 $("#company").on("change",updateCompany);
199 function updateCompany(){ 199 function updateCompany(){
200 var company = $('#company').val(); 200 var company = $('#company').val();
201 - var options = '<option value="">全部分公司</option>'; 201 +// var options = '<option value="">全部线队</option>';
  202 +// for(var i = 0; i < obj.length; i++){
  203 +// if(obj[i].companyCode == company){
  204 +// var children = obj[i].children;
  205 +// for(var j = 0; j < children.length; j++){
  206 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  207 +// }
  208 +// }
  209 +// }
  210 +// $('#subCompany').html(options);
  211 + var data = [];
202 for(var i = 0; i < obj.length; i++){ 212 for(var i = 0; i < obj.length; i++){
203 if(obj[i].companyCode == company){ 213 if(obj[i].companyCode == company){
204 var children = obj[i].children; 214 var children = obj[i].children;
205 for(var j = 0; j < children.length; j++){ 215 for(var j = 0; j < children.length; j++){
206 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 216 + data.push({id: children[j].code, text: children[j].name});
207 } 217 }
208 } 218 }
209 } 219 }
210 - $('#subCompany').html(options); 220 + $("#subCompany").empty();
  221 + initPinYinSelect2('#subCompany',data,'');
211 } 222 }
212 223
213 var tempData = {}; 224 var tempData = {};
@@ -289,7 +300,7 @@ @@ -289,7 +300,7 @@
289 var sfyy = 1; 300 var sfyy = 1;
290 var line = $("#line").val(); 301 var line = $("#line").val();
291 var company = $("#company").val(); 302 var company = $("#company").val();
292 - var subCompany = $("#subCompany").val(); 303 + var subCompany = "";
293 var startDate = $("#startDate").val(); 304 var startDate = $("#startDate").val();
294 var endDate = $("#endDate").val(); 305 var endDate = $("#endDate").val();
295 var lineName = $('#line option:selected').text(); 306 var lineName = $('#line option:selected').text();
@@ -305,8 +316,6 @@ @@ -305,8 +316,6 @@
305 var params = {}; 316 var params = {};
306 sfyy = $("#sfyy").val(); 317 sfyy = $("#sfyy").val();
307 line = $("#line").val(); 318 line = $("#line").val();
308 - company = $("#company").val();  
309 - subCompany = $("#subCompany").val();  
310 startDate = $("#startDate").val(); 319 startDate = $("#startDate").val();
311 endDate = $("#endDate").val(); 320 endDate = $("#endDate").val();
312 lineName = $('#line option:selected').text(); 321 lineName = $('#line option:selected').text();
@@ -314,6 +323,15 @@ @@ -314,6 +323,15 @@
314 lineName = $('#subCompany option:selected').text(); 323 lineName = $('#subCompany option:selected').text();
315 if(line == " ") 324 if(line == " ")
316 line = ""; 325 line = "";
  326 + company = $("#company").val();
  327 +// subCompany = $("#subCompany").val();
  328 + subCompany="";
  329 + $($("#subCompany").val()).each(function(i, e){
  330 + subCompany += e + ",";
  331 + });
  332 + if(subCompany.length > 0){
  333 + subCompany = subCompany.substring(0, subCompany.length - 1);
  334 + }
317 params['sfyy'] = sfyy; 335 params['sfyy'] = sfyy;
318 params['line'] = line; 336 params['line'] = line;
319 params['company'] = company; 337 params['company'] = company;
@@ -548,7 +566,7 @@ @@ -548,7 +566,7 @@
548 <td>{{obj.firstOrLast}}</td> 566 <td>{{obj.firstOrLast}}</td>
549 <td>{{obj.jhfc}}</td> 567 <td>{{obj.jhfc}}</td>
550 <td>{{obj.sjfc}}</td> 568 <td>{{obj.sjfc}}</td>
551 - <td> {{obj.delay}}</td> 569 + <td>{{obj.delay}}</td>
552 <td>{{obj.remarks1}}</td> 570 <td>{{obj.remarks1}}</td>
553 </tr> 571 </tr>
554 {{/each}} 572 {{/each}}
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -51,8 +51,8 @@ @@ -51,8 +51,8 @@
51 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 51 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
52 </div> 52 </div>
53 <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> 53 <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
54 - <span class="item-label" style="width: 80px;">分公司: </span>  
55 - <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 54 + <span class="item-label" style="width: 80px;">线队: </span>
  55 + <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;" multiple="multiple"></select>
56 </div> 56 </div>
57 <div style="display: inline-block; margin-left: 10px;"> 57 <div style="display: inline-block; margin-left: 10px;">
58 <span class="item-label" style="width: 80px;">选择线路: </span> 58 <span class="item-label" style="width: 80px;">选择线路: </span>
@@ -195,18 +195,29 @@ @@ -195,18 +195,29 @@
195 function updateCompany(){ 195 function updateCompany(){
196 var company = $('#company').val(); 196 var company = $('#company').val();
197 var options = ''; 197 var options = '';
198 - if(fage){  
199 - options = '<option value="">全部分公司</option>';  
200 - } 198 +// if(fage){
  199 +// options = '<option value="">全部线队</option>';
  200 +// }
  201 +// for(var i = 0; i < obj.length; i++){
  202 +// if(obj[i].companyCode == company){
  203 +// var children = obj[i].children;
  204 +// for(var j = 0; j < children.length; j++){
  205 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  206 +// }
  207 +// }
  208 +// }
  209 +// $('#subCompany').html(options);
  210 + var data = [];
201 for(var i = 0; i < obj.length; i++){ 211 for(var i = 0; i < obj.length; i++){
202 if(obj[i].companyCode == company){ 212 if(obj[i].companyCode == company){
203 var children = obj[i].children; 213 var children = obj[i].children;
204 for(var j = 0; j < children.length; j++){ 214 for(var j = 0; j < children.length; j++){
205 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 215 + data.push({id: children[j].code, text: children[j].name});
206 } 216 }
207 } 217 }
208 } 218 }
209 - $('#subCompany').html(options); 219 + $("#subCompany").empty();
  220 + initPinYinSelect2('#subCompany',data,'');
210 } 221 }
211 222
212 var tempData = {}; 223 var tempData = {};
@@ -282,9 +293,9 @@ @@ -282,9 +293,9 @@
282 var endDate = $("#endDate").val(); 293 var endDate = $("#endDate").val();
283 var model = $("#model").val(); 294 var model = $("#model").val();
284 var times = $("#times1").val() + "-" + $("#times2").val(); 295 var times = $("#times1").val() + "-" + $("#times2").val();
285 - var company = $("#company").val();  
286 - var subCompany = $("#subCompany").val();  
287 var lineName = $('#line option:selected').text(); 296 var lineName = $('#line option:selected').text();
  297 + var company = $("#company").val();
  298 + var subCompany = "";
288 function jsDoQuery(pagination){ 299 function jsDoQuery(pagination){
289 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){ 300 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
290 layer.msg("请选择日期"); 301 layer.msg("请选择日期");
@@ -305,7 +316,14 @@ @@ -305,7 +316,14 @@
305 model = $("#model").val(); 316 model = $("#model").val();
306 times = $("#times1").val() + "-" + $("#times2").val(); 317 times = $("#times1").val() + "-" + $("#times2").val();
307 company = $("#company").val(); 318 company = $("#company").val();
308 - subCompany = $("#subCompany").val(); 319 +// subCompany = $("#subCompany").val();
  320 + subCompany="";
  321 + $($("#subCompany").val()).each(function(i, e){
  322 + subCompany += e + ",";
  323 + });
  324 + if(subCompany.length > 0){
  325 + subCompany = subCompany.substring(0, subCompany.length - 1);
  326 + }
309 params['sfqr'] = sfqr; 327 params['sfqr'] = sfqr;
310 params['line'] = line; 328 params['line'] = line;
311 params['sfyy'] = sfyy; 329 params['sfyy'] = sfyy;
@@ -489,7 +507,7 @@ @@ -489,7 +507,7 @@
489 <th rowspan="3" style=" width:120px;">日期</th> 507 <th rowspan="3" style=" width:120px;">日期</th>
490 <th rowspan="3">时段</th> 508 <th rowspan="3">时段</th>
491 <th rowspan="3">公司</th> 509 <th rowspan="3">公司</th>
492 - <th rowspan="3">分公司</th> 510 + <th rowspan="3">线队</th>
493 <th rowspan="3">线路</th> 511 <th rowspan="3">线路</th>
494 <th rowspan="2" colspan="3">总班次</th> 512 <th rowspan="2" colspan="3">总班次</th>
495 <th rowspan="2" colspan="3">总营运公里</th> 513 <th rowspan="2" colspan="3">总营运公里</th>
src/main/resources/static/pages/forms/statement/statisticsDaily.html
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> 42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> 44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
45 - <span class="item-label" style="width: 80px;">分公司: </span>  
46 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> 45 + <span class="item-label" style="width: 80px;">线队: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;" multiple="multiple"></select>
47 </div> 47 </div>
48 <div style="display: inline-block;margin-left: 42px;"> 48 <div style="display: inline-block;margin-left: 42px;">
49 <span class="item-label" style="width: 80px;">线路: </span> 49 <span class="item-label" style="width: 80px;">线路: </span>
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 <th colspan="46"><label id="tjrq"></label> 线路统计日报</th> 84 <th colspan="46"><label id="tjrq"></label> 线路统计日报</th>
85 </tr> 85 </tr>
86 <tr> 86 <tr>
87 - <td rowspan="3"><span >分公司</span></td> 87 + <td rowspan="3"><span >线队</span></td>
88 <td rowspan="3"><span >路线名</span></td> 88 <td rowspan="3"><span >路线名</span></td>
89 <td colspan="23">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> 89 <td colspan="23">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td>
90 <td colspan="15">全日营运班次</td> 90 <td colspan="15">全日营运班次</td>
@@ -219,19 +219,29 @@ @@ -219,19 +219,29 @@
219 function updateCompany(){ 219 function updateCompany(){
220 var company = $('#gsdm').val(); 220 var company = $('#gsdm').val();
221 var options = ''; 221 var options = '';
222 - if(fage){  
223 - options = '<option value="">请选择</option>';  
224 - } 222 +// if(fage){
  223 +// options = '<option value="">请选择</option>';
  224 +// }
  225 +// for(var i = 0; i < obj.length; i++){
  226 +// if(obj[i].companyCode == company){
  227 +// var children = obj[i].children;
  228 +// for(var j = 0; j < children.length; j++){
  229 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  230 +// }
  231 +// }
  232 +// }
  233 +// $('#fgsdm').html(options);
  234 + var data = [];
225 for(var i = 0; i < obj.length; i++){ 235 for(var i = 0; i < obj.length; i++){
226 if(obj[i].companyCode == company){ 236 if(obj[i].companyCode == company){
227 var children = obj[i].children; 237 var children = obj[i].children;
228 for(var j = 0; j < children.length; j++){ 238 for(var j = 0; j < children.length; j++){
229 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 239 + data.push({id: children[j].code, text: children[j].name});
230 } 240 }
231 } 241 }
232 } 242 }
233 - $('#fgsdm').html(options);  
234 -// initXl(); 243 + $("#fgsdm").empty();
  244 + initPinYinSelect2('#fgsdm',data,'');
235 } 245 }
236 246
237 var tempData = {}; 247 var tempData = {};
@@ -295,9 +305,16 @@ @@ -295,9 +305,16 @@
295 line = $("#line").val(); 305 line = $("#line").val();
296 date = $("#date").val(); 306 date = $("#date").val();
297 date2 =$("#date2").val(); 307 date2 =$("#date2").val();
298 - gsdm =$("#gsdm").val();  
299 - fgsdm=$("#fgsdm").val();  
300 nature=$("#nature").val(); 308 nature=$("#nature").val();
  309 + gsdm =$("#gsdm").val();
  310 +// fgsdm=$("#fgsdm").val();
  311 + fgsdm="";
  312 + $($("#fgsdm").val()).each(function(i, e){
  313 + fgsdm += e + ",";
  314 + });
  315 + if(fgsdm.length > 0){
  316 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  317 + }
301 xlName = $("#select2-line-container").html(); 318 xlName = $("#select2-line-container").html();
302 if(xlName == "全部线路") 319 if(xlName == "全部线路")
303 xlName = $('#fgsdm option:selected').text(); 320 xlName = $('#fgsdm option:selected').text();
@@ -319,7 +336,7 @@ @@ -319,7 +336,7 @@
319 $("#tjrq").html(date+"至"+date2); 336 $("#tjrq").html(date+"至"+date2);
320 var params = {}; 337 var params = {};
321 params['gsdm'] = gsdm; 338 params['gsdm'] = gsdm;
322 - params['fgsdm'] =fgsdm ; 339 + params['fgsdm'] = fgsdm;
323 params['line'] = line; 340 params['line'] = line;
324 params['date'] = date; 341 params['date'] = date;
325 params['date2'] = date2; 342 params['date2'] = date2;
@@ -327,7 +344,7 @@ @@ -327,7 +344,7 @@
327 params['nature'] = nature; 344 params['nature'] = nature;
328 params['type'] = "query"; 345 params['type'] = "query";
329 var i = layer.load(2); 346 var i = layer.load(2);
330 - $get('/realSchedule/statisticsDailyTj',params,function(result){ 347 + $get('/realSchedule/statisticsDailyTj',params,function(result){;
331 348
332 $.each(result, function(i, e){ 349 $.each(result, function(i, e){
333 if(e && e.startDate && e.startDate < '2025-11-01'){ 350 if(e && e.startDate && e.startDate < '2025-11-01'){
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> 42 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> 44 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
45 - <span class="item-label" style="width: 80px;">分公司: </span>  
46 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> 45 + <span class="item-label" style="width: 80px;">线队: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;" multiple="multiple"></select>
47 </div> 47 </div>
48 <div style="display: inline-block;margin-left: 42px;"> 48 <div style="display: inline-block;margin-left: 42px;">
49 <span class="item-label" style="width: 80px;">线路: </span> 49 <span class="item-label" style="width: 80px;">线路: </span>
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 <th colspan="46"><label id="tjrq"></label> 线路统计日报</th> 84 <th colspan="46"><label id="tjrq"></label> 线路统计日报</th>
85 </tr> 85 </tr>
86 <tr> 86 <tr>
87 - <td rowspan="3"><span >分公司</span></td> 87 + <td rowspan="3"><span >线队</span></td>
88 <td rowspan="3"><span >路线名</span></td> 88 <td rowspan="3"><span >路线名</span></td>
89 <td colspan="23">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> 89 <td colspan="23">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td>
90 <td colspan="15">全日营运班次</td> 90 <td colspan="15">全日营运班次</td>
@@ -217,19 +217,29 @@ @@ -217,19 +217,29 @@
217 function updateCompany(){ 217 function updateCompany(){
218 var company = $('#gsdm').val(); 218 var company = $('#gsdm').val();
219 var options = ''; 219 var options = '';
220 - if(fage){  
221 - options = '<option value="">请选择</option>';  
222 - } 220 +// if(fage){
  221 +// options = '<option value="">请选择</option>';
  222 +// }
  223 +// for(var i = 0; i < obj.length; i++){
  224 +// if(obj[i].companyCode == company){
  225 +// var children = obj[i].children;
  226 +// for(var j = 0; j < children.length; j++){
  227 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  228 +// }
  229 +// }
  230 +// }
  231 +// $('#fgsdm').html(options);
  232 + var data = [];
223 for(var i = 0; i < obj.length; i++){ 233 for(var i = 0; i < obj.length; i++){
224 if(obj[i].companyCode == company){ 234 if(obj[i].companyCode == company){
225 var children = obj[i].children; 235 var children = obj[i].children;
226 for(var j = 0; j < children.length; j++){ 236 for(var j = 0; j < children.length; j++){
227 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 237 + data.push({id: children[j].code, text: children[j].name});
228 } 238 }
229 } 239 }
230 } 240 }
231 - $('#fgsdm').html(options);  
232 -// initXl(); 241 + $("#fgsdm").empty();
  242 + initPinYinSelect2('#fgsdm',data,'');
233 } 243 }
234 244
235 var tempData = {}; 245 var tempData = {};
@@ -290,9 +300,16 @@ @@ -290,9 +300,16 @@
290 line = $("#line").val(); 300 line = $("#line").val();
291 date = $("#date").val(); 301 date = $("#date").val();
292 date2 =$("#date2").val(); 302 date2 =$("#date2").val();
293 - gsdm =$("#gsdm").val();  
294 - fgsdm=$("#fgsdm").val();  
295 nature=$("#nature").val(); 303 nature=$("#nature").val();
  304 + gsdm =$("#gsdm").val();
  305 +// fgsdm=$("#fgsdm").val();
  306 + fgsdm="";
  307 + $($("#fgsdm").val()).each(function(i, e){
  308 + fgsdm += e + ",";
  309 + });
  310 + if(fgsdm.length > 0){
  311 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  312 + }
296 xlName = $("#select2-line-container").html(); 313 xlName = $("#select2-line-container").html();
297 if(xlName == "全部线路") 314 if(xlName == "全部线路")
298 xlName = $('#fgsdm option:selected').text(); 315 xlName = $('#fgsdm option:selected').text();
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
@@ -41,8 +41,8 @@ @@ -41,8 +41,8 @@
41 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 41 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
42 </div> 42 </div>
43 <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> 43 <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
44 - <span class="item-label" style="width: 80px;">分公司: </span>  
45 - <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 44 + <span class="item-label" style="width: 80px;">线队: </span>
  45 + <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;" multiple="multiple"></select>
46 </div> 46 </div>
47 <div style="display: inline-block; margin-left: 10px;"> 47 <div style="display: inline-block; margin-left: 10px;">
48 <span class="item-label" style="width: 80px;">选择线路: </span> 48 <span class="item-label" style="width: 80px;">选择线路: </span>
@@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
106 <span class="item-label" style="width: 80px;" id="date0"></span> 106 <span class="item-label" style="width: 80px;" id="date0"></span>
107 <span class="item-label" style="width: 80px;margin-left: 60px;">公司: </span> 107 <span class="item-label" style="width: 80px;margin-left: 60px;">公司: </span>
108 <span class="item-label" style="width: 80px;" id="company0"></span> 108 <span class="item-label" style="width: 80px;" id="company0"></span>
109 - <span class="item-label" style="width: 80px;margin-left: 60px;">分公司: </span> 109 + <span class="item-label" style="width: 80px;margin-left: 60px;">线队: </span>
110 <span class="item-label" style="width: 80px;" id="subCompany0"></span> 110 <span class="item-label" style="width: 80px;" id="subCompany0"></span>
111 <span class="item-label" style="width: 80px;margin-left: 60px;">线路: </span> 111 <span class="item-label" style="width: 80px;margin-left: 60px;">线路: </span>
112 <span class="item-label" style="width: 80px;" id="line0"></span> 112 <span class="item-label" style="width: 80px;" id="line0"></span>
@@ -194,16 +194,27 @@ @@ -194,16 +194,27 @@
194 $("#company").on("change",updateCompany); 194 $("#company").on("change",updateCompany);
195 function updateCompany(){ 195 function updateCompany(){
196 var company = $('#company').val(); 196 var company = $('#company').val();
197 - var options = '<option value="">全部分公司</option>'; 197 +// var options = '<option value="">全部线队</option>';
  198 +// for(var i = 0; i < obj.length; i++){
  199 +// if(obj[i].companyCode == company){
  200 +// var children = obj[i].children;
  201 +// for(var j = 0; j < children.length; j++){
  202 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  203 +// }
  204 +// }
  205 +// }
  206 +// $('#subCompany').html(options);
  207 + var data = [];
198 for(var i = 0; i < obj.length; i++){ 208 for(var i = 0; i < obj.length; i++){
199 if(obj[i].companyCode == company){ 209 if(obj[i].companyCode == company){
200 var children = obj[i].children; 210 var children = obj[i].children;
201 for(var j = 0; j < children.length; j++){ 211 for(var j = 0; j < children.length; j++){
202 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 212 + data.push({id: children[j].code, text: children[j].name});
203 } 213 }
204 } 214 }
205 } 215 }
206 - $('#subCompany').html(options); 216 + $("#subCompany").empty();
  217 + initPinYinSelect2('#subCompany',data,'');
207 } 218 }
208 219
209 var tempData = {}; 220 var tempData = {};
@@ -265,10 +276,10 @@ @@ -265,10 +276,10 @@
265 var times1 = $("#times1").val(); 276 var times1 = $("#times1").val();
266 var times2 = $("#times2").val(); 277 var times2 = $("#times2").val();
267 var model = $("#model").val(); 278 var model = $("#model").val();
268 - var company = $("#company").val();  
269 - var subCompany = $("#subCompany").val();  
270 var lp = $("#lp").val(); 279 var lp = $("#lp").val();
271 var lineName = $('#line option:selected').text(); 280 var lineName = $('#line option:selected').text();
  281 + var company = $("#company").val();
  282 + var subCompany = "";
272 function jsDoQuery(pagination){ 283 function jsDoQuery(pagination){
273 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){ 284 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
274 layer.msg("请选择日期"); 285 layer.msg("请选择日期");
@@ -286,12 +297,19 @@ @@ -286,12 +297,19 @@
286 times1 = $("#times1").val(); 297 times1 = $("#times1").val();
287 times2 = $("#times2").val(); 298 times2 = $("#times2").val();
288 model = $("#model").val(); 299 model = $("#model").val();
289 - company = $("#company").val();  
290 - subCompany = $("#subCompany").val();  
291 lp = $("#lp").val(); 300 lp = $("#lp").val();
292 lineName = $('#line option:selected').text(); 301 lineName = $('#line option:selected').text();
293 if(lineName == "全部线路") 302 if(lineName == "全部线路")
294 lineName = $('#subCompany option:selected').text(); 303 lineName = $('#subCompany option:selected').text();
  304 + company = $("#company").val();
  305 +// subCompany = $("#subCompany").val();
  306 + subCompany="";
  307 + $($("#subCompany").val()).each(function(i, e){
  308 + subCompany += e + ",";
  309 + });
  310 + if(subCompany.length > 0){
  311 + subCompany = subCompany.substring(0, subCompany.length - 1);
  312 + }
295 params['lp'] = lp; 313 params['lp'] = lp;
296 params['sfyy'] = sfyy; 314 params['sfyy'] = sfyy;
297 params['line'] = line; 315 params['line'] = line;
@@ -545,7 +563,7 @@ @@ -545,7 +563,7 @@
545 <tr> 563 <tr>
546 <th width='80px'>日期</th> 564 <th width='80px'>日期</th>
547 <th style='text-align:center;'>公司</th> 565 <th style='text-align:center;'>公司</th>
548 - <th style='text-align:center;'>分公司</th> 566 + <th style='text-align:center;'>线队</th>
549 <th style='text-align:center;'>线路</th> 567 <th style='text-align:center;'>线路</th>
550 {{if list.statu == 0}}<th style='text-align:center;'>路牌数量</th>{{/if}} 568 {{if list.statu == 0}}<th style='text-align:center;'>路牌数量</th>{{/if}}
551 {{if list.statu == 1}}<th style='text-align:center;'>路牌名</th>{{/if}} 569 {{if list.statu == 1}}<th style='text-align:center;'>路牌名</th>{{/if}}
@@ -603,7 +621,7 @@ @@ -603,7 +621,7 @@
603 <tr> 621 <tr>
604 <th width='80px'>日期</th> 622 <th width='80px'>日期</th>
605 <th style='text-align:center;'>公司</th> 623 <th style='text-align:center;'>公司</th>
606 - <th style='text-align:center;'>分公司</th> 624 + <th style='text-align:center;'>线队</th>
607 <th style='text-align:center;'>线路</th> 625 <th style='text-align:center;'>线路</th>
608 <th style='text-align:center;'>路牌名</th> 626 <th style='text-align:center;'>路牌名</th>
609 <th>计划营运时间(小时)</th> 627 <th>计划营运时间(小时)</th>
src/main/resources/static/pages/forms/statement/workDaily.html
@@ -33,8 +33,8 @@ @@ -33,8 +33,8 @@
33 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 33 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
34 </div> 34 </div>
35 <div style="display: inline-block; margin-left: 5px;" id="subCompany1"> 35 <div style="display: inline-block; margin-left: 5px;" id="subCompany1">
36 - <span class="item-label" style="width: 80px;">分公司: </span>  
37 - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 36 + <span class="item-label" style="width: 80px;">线队: </span>
  37 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;" multiple="multiple"></select>
38 </div> 38 </div>
39 <div style="display: inline-block; margin-left: 10px;"> 39 <div style="display: inline-block; margin-left: 10px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
@@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
66 <tr class="hidden"> 66 <tr class="hidden">
67 <th width="80px">日期</th> 67 <th width="80px">日期</th>
68 <th>公司</th> 68 <th>公司</th>
69 - <th>分公司</th> 69 + <th>线队</th>
70 <th>线路</th> 70 <th>线路</th>
71 <th>计划班次</th> 71 <th>计划班次</th>
72 <th>待发调整</th> 72 <th>待发调整</th>
@@ -149,16 +149,27 @@ @@ -149,16 +149,27 @@
149 $("#company").on("change",updateCompany); 149 $("#company").on("change",updateCompany);
150 function updateCompany(){ 150 function updateCompany(){
151 var company = $('#company').val(); 151 var company = $('#company').val();
152 - var options = ''; 152 +// var options = '';
  153 +// for(var i = 0; i < obj.length; i++){
  154 +// if(obj[i].companyCode == company){
  155 +// var children = obj[i].children;
  156 +// for(var j = 0; j < children.length; j++){
  157 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  158 +// }
  159 +// }
  160 +// }
  161 +// $('#subCompany').html(options);
  162 + var data = [];
153 for(var i = 0; i < obj.length; i++){ 163 for(var i = 0; i < obj.length; i++){
154 if(obj[i].companyCode == company){ 164 if(obj[i].companyCode == company){
155 var children = obj[i].children; 165 var children = obj[i].children;
156 for(var j = 0; j < children.length; j++){ 166 for(var j = 0; j < children.length; j++){
157 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 167 + data.push({id: children[j].code, text: children[j].name});
158 } 168 }
159 } 169 }
160 } 170 }
161 - $('#subCompany').html(options); 171 + $("#subCompany").empty();
  172 + initPinYinSelect2('#subCompany',data,'');
162 } 173 }
163 174
164 var tempData = {}; 175 var tempData = {};
@@ -207,7 +218,7 @@ @@ -207,7 +218,7 @@
207 var line = $("#line").val(); 218 var line = $("#line").val();
208 var date = $("#date").val(); 219 var date = $("#date").val();
209 var company = $("#company").val(); 220 var company = $("#company").val();
210 - var subCompany = $("#subCompany").val(); 221 + var subCompany = "";
211 var lineName = $('#line option:selected').text(); 222 var lineName = $('#line option:selected').text();
212 function jsDoQuery(pagination){ 223 function jsDoQuery(pagination){
213 if($("#date").val() == null || $("#date").val().trim().length == 0){ 224 if($("#date").val() == null || $("#date").val().trim().length == 0){
@@ -219,7 +230,14 @@ @@ -219,7 +230,14 @@
219 line = $("#line").val(); 230 line = $("#line").val();
220 date = $("#date").val(); 231 date = $("#date").val();
221 company = $("#company").val(); 232 company = $("#company").val();
222 - subCompany = $("#subCompany").val(); 233 +// subCompany = $("#subCompany").val();
  234 + subCompany="";
  235 + $($("#subCompany").val()).each(function(i, e){
  236 + subCompany += e + ",";
  237 + });
  238 + if(subCompany.length > 0){
  239 + subCompany = subCompany.substring(0, subCompany.length - 1);
  240 + }
223 lineName = $('#line option:selected').text(); 241 lineName = $('#line option:selected').text();
224 if(lineName == "全部线路") 242 if(lineName == "全部线路")
225 lineName = $('#subCompany option:selected').text(); 243 lineName = $('#subCompany option:selected').text();
src/main/resources/static/pages/mforms/turnoutrates/calcTurnoutrate.html
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select> 42 <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 20px;" id="fgsdmDiv_turn"> 44 <div style="display: inline-block; margin-left: 20px;" id="fgsdmDiv_turn">
45 - <span class="item-label" style="width: 80px;margin-left: 5px;">分公司: </span>  
46 - <select class="form-control" name="subCompany" id="fgsdmTurn" style="width: 140px;"></select> 45 + <span class="item-label" style="width: 80px;margin-left: 5px;">线队: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdmTurn" style="width: 140px;" multiple="multiple"></select>
47 </div> 47 </div>
48 <div style="display: inline-block; margin-left: 33px;"> 48 <div style="display: inline-block; margin-left: 33px;">
49 <span class="item-label" style="width: 80px;margin-left: 11px;">线路: </span> 49 <span class="item-label" style="width: 80px;margin-left: 11px;">线路: </span>
@@ -84,11 +84,11 @@ @@ -84,11 +84,11 @@
84 <tr> 84 <tr>
85 <td rowspan="3" style=" padding-top: 20px;">日期</td> 85 <td rowspan="3" style=" padding-top: 20px;">日期</td>
86 <td rowspan="3" style=" padding-top: 20px;">公司</td> 86 <td rowspan="3" style=" padding-top: 20px;">公司</td>
87 - <td rowspan="3" style=" padding-top: 20px;">直属公司</td> 87 + <td rowspan="3" style=" padding-top: 20px;">线队</td>
88 <td rowspan="3" style=" padding-top: 20px;">线路条数</td> 88 <td rowspan="3" style=" padding-top: 20px;">线路条数</td>
89 <td colspan="4">出车数</td> 89 <td colspan="4">出车数</td>
90 - <td colspan="2">出车率</td>  
91 - <td colspan="2" >班次数</td> 90 + <td colspan="2">出车率</td>
  91 + <td colspan="2">班次数</td>
92 <td rowspan="3" style=" padding-top: 20px;">班次执行率</td> 92 <td rowspan="3" style=" padding-top: 20px;">班次执行率</td>
93 <td rowspan="3" style=" padding-top: 20px;">说明</td> 93 <td rowspan="3" style=" padding-top: 20px;">说明</td>
94 </tr> 94 </tr>
@@ -171,19 +171,30 @@ @@ -171,19 +171,30 @@
171 $("#gsdmTurn").on("change",updateCompany); 171 $("#gsdmTurn").on("change",updateCompany);
172 function updateCompany(){ 172 function updateCompany(){
173 var company = $('#gsdmTurn').val(); 173 var company = $('#gsdmTurn').val();
174 - var options = '';  
175 - if(fage){  
176 - options = '<option value="">请选择</option>';  
177 - } 174 +// var options = '';
  175 +// if(fage){
  176 +// options = '<option value="">请选择</option>';
  177 +// }
  178 +// for(var i = 0; i < obj.length; i++){
  179 +// if(obj[i].companyCode == company){
  180 +// var children = obj[i].children;
  181 +// for(var j = 0; j < children.length; j++){
  182 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  183 +// }
  184 +// }
  185 +// }
  186 +// $('#fgsdmTurn').html(options);
  187 + var data = [];
178 for(var i = 0; i < obj.length; i++){ 188 for(var i = 0; i < obj.length; i++){
179 if(obj[i].companyCode == company){ 189 if(obj[i].companyCode == company){
180 var children = obj[i].children; 190 var children = obj[i].children;
181 for(var j = 0; j < children.length; j++){ 191 for(var j = 0; j < children.length; j++){
182 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 192 + data.push({id: children[j].code, text: children[j].name});
183 } 193 }
184 } 194 }
185 } 195 }
186 - $('#fgsdmTurn').html(options); 196 + $("#fgsdmTurn").empty();
  197 + initPinYinSelect2('#fgsdmTurn',data,'');
187 } 198 }
188 199
189 var tempData = {}; 200 var tempData = {};
@@ -234,9 +245,16 @@ @@ -234,9 +245,16 @@
234 line = $("#line").val(); 245 line = $("#line").val();
235 startDate=$("#startDate").val(); 246 startDate=$("#startDate").val();
236 endDate=$("#endDate").val(); 247 endDate=$("#endDate").val();
237 - gsdmTurn=$("#gsdmTurn").val();  
238 - fgsdmTurn=$("#fgsdmTurn").val();  
239 nature=$("#nature").val(); 248 nature=$("#nature").val();
  249 + gsdmTurn=$("#gsdmTurn").val();
  250 +// fgsdmTurn=$("#fgsdmTurn").val();
  251 + fgsdmTurn="";
  252 + $($("#fgsdmTurn").val()).each(function(i, e){
  253 + fgsdmTurn += e + ",";
  254 + });
  255 + if(fgsdmTurn.length > 0){
  256 + fgsdmTurn = fgsdmTurn.substring(0, fgsdmTurn.length - 1);
  257 + }
240 if(startDate!=''&&endDate!=''){ 258 if(startDate!=''&&endDate!=''){
241 var i = layer.load(2); 259 var i = layer.load(2);
242 $get('/calcSheet/calcTurnoutrate', 260 $get('/calcSheet/calcTurnoutrate',
@@ -272,11 +290,18 @@ @@ -272,11 +290,18 @@
272 290
273 $("#export").on("click",function(){ 291 $("#export").on("click",function(){
274 line = $("#line").val(); 292 line = $("#line").val();
275 - startDate=$("#startDate").val();  
276 - endDate=$("#endDate").val();  
277 - gsdmTurn=$("#gsdmTurn").val();  
278 - fgsdmTurn=$("#fgsdmTurn").val();  
279 - nature=$("#nature").val(); 293 + startDate=$("#startDate").val();
  294 + endDate=$("#endDate").val();
  295 + nature=$("#nature").val();
  296 + gsdmTurn=$("#gsdmTurn").val();
  297 +// fgsdmTurn=$("#fgsdmTurn").val();
  298 + fgsdmTurn="";
  299 + $($("#fgsdmTurn").val()).each(function(i, e){
  300 + fgsdmTurn += e + ",";
  301 + });
  302 + if(fgsdmTurn.length > 0){
  303 + fgsdmTurn = fgsdmTurn.substring(0, fgsdmTurn.length - 1);
  304 + }
280 var lineName = $('#line option:selected').text(); 305 var lineName = $('#line option:selected').text();
281 if(lineName == "全部线路") 306 if(lineName == "全部线路")
282 lineName = $('#fgsdmTurn option:selected').text(); 307 lineName = $('#fgsdmTurn option:selected').text();
src/main/resources/static/pages/mforms/turnoutrates/calcTurnoutrateZgf.html
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select> 42 <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 20px;" id="fgsdmDiv_turn"> 44 <div style="display: inline-block; margin-left: 20px;" id="fgsdmDiv_turn">
45 - <span class="item-label" style="width: 80px;margin-left: 5px;">分公司: </span>  
46 - <select class="form-control" name="subCompany" id="fgsdmTurn" style="width: 140px;"></select> 45 + <span class="item-label" style="width: 80px;margin-left: 5px;">线队: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdmTurn" style="width: 140px;" multiple="multiple"></select>
47 </div> 47 </div>
48 <div style="display: inline-block; margin-left: 33px;"> 48 <div style="display: inline-block; margin-left: 33px;">
49 <span class="item-label" style="width: 80px;margin-left: 11px;">线路: </span> 49 <span class="item-label" style="width: 80px;margin-left: 11px;">线路: </span>
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 <tr> 83 <tr>
84 <td style=" padding-top: 20px;">日期</td> 84 <td style=" padding-top: 20px;">日期</td>
85 <td style=" padding-top: 20px;">公司</td> 85 <td style=" padding-top: 20px;">公司</td>
86 - <td style=" padding-top: 20px;">直属公司</td> 86 + <td style=" padding-top: 20px;">线队</td>
87 <td style=" padding-top: 20px;">线路</td> 87 <td style=" padding-top: 20px;">线路</td>
88 <td style=" padding-top: 20px;">计划全日</td> 88 <td style=" padding-top: 20px;">计划全日</td>
89 <td style=" padding-top: 20px;">实际全日</td> 89 <td style=" padding-top: 20px;">实际全日</td>
@@ -160,19 +160,30 @@ @@ -160,19 +160,30 @@
160 $("#gsdmTurn").on("change",updateCompany); 160 $("#gsdmTurn").on("change",updateCompany);
161 function updateCompany(){ 161 function updateCompany(){
162 var company = $('#gsdmTurn').val(); 162 var company = $('#gsdmTurn').val();
163 - var options = '';  
164 - if(fage){  
165 - options = '<option value="">请选择</option>';  
166 - } 163 +// var options = '';
  164 +// if(fage){
  165 +// options = '<option value="">请选择</option>';
  166 +// }
  167 +// for(var i = 0; i < obj.length; i++){
  168 +// if(obj[i].companyCode == company){
  169 +// var children = obj[i].children;
  170 +// for(var j = 0; j < children.length; j++){
  171 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  172 +// }
  173 +// }
  174 +// }
  175 +// $('#fgsdmTurn').html(options);
  176 + var data = [];
167 for(var i = 0; i < obj.length; i++){ 177 for(var i = 0; i < obj.length; i++){
168 if(obj[i].companyCode == company){ 178 if(obj[i].companyCode == company){
169 var children = obj[i].children; 179 var children = obj[i].children;
170 for(var j = 0; j < children.length; j++){ 180 for(var j = 0; j < children.length; j++){
171 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 181 + data.push({id: children[j].code, text: children[j].name});
172 } 182 }
173 } 183 }
174 } 184 }
175 - $('#fgsdmTurn').html(options); 185 + $("#fgsdmTurn").empty();
  186 + initPinYinSelect2('#fgsdmTurn',data,'');
176 } 187 }
177 188
178 var tempData = {}; 189 var tempData = {};
@@ -223,9 +234,16 @@ @@ -223,9 +234,16 @@
223 line = $("#line").val(); 234 line = $("#line").val();
224 startDate=$("#startDate").val(); 235 startDate=$("#startDate").val();
225 endDate=$("#endDate").val(); 236 endDate=$("#endDate").val();
226 - gsdmTurn=$("#gsdmTurn").val();  
227 - fgsdmTurn=$("#fgsdmTurn").val();  
228 nature=$("#nature").val(); 237 nature=$("#nature").val();
  238 + gsdmTurn=$("#gsdmTurn").val();
  239 +// fgsdmTurn=$("#fgsdmTurn").val();
  240 + fgsdmTurn="";
  241 + $($("#fgsdmTurn").val()).each(function(i, e){
  242 + fgsdmTurn += e + ",";
  243 + });
  244 + if(fgsdmTurn.length > 0){
  245 + fgsdmTurn = fgsdmTurn.substring(0, fgsdmTurn.length - 1);
  246 + }
229 if(startDate!=''&&endDate!=''){ 247 if(startDate!=''&&endDate!=''){
230 var i = layer.load(2); 248 var i = layer.load(2);
231 $get('/calcSheet/calcTurnoutrateZgf', 249 $get('/calcSheet/calcTurnoutrateZgf',
@@ -261,11 +279,18 @@ @@ -261,11 +279,18 @@
261 279
262 $("#export").on("click",function(){ 280 $("#export").on("click",function(){
263 line = $("#line").val(); 281 line = $("#line").val();
264 - startDate=$("#startDate").val();  
265 - endDate=$("#endDate").val();  
266 - gsdmTurn=$("#gsdmTurn").val();  
267 - fgsdmTurn=$("#fgsdmTurn").val();  
268 - nature=$("#nature").val(); 282 + startDate=$("#startDate").val();
  283 + endDate=$("#endDate").val();
  284 + nature=$("#nature").val();
  285 + gsdmTurn=$("#gsdmTurn").val();
  286 +// fgsdmTurn=$("#fgsdmTurn").val();
  287 + fgsdmTurn="";
  288 + $($("#fgsdmTurn").val()).each(function(i, e){
  289 + fgsdmTurn += e + ",";
  290 + });
  291 + if(fgsdmTurn.length > 0){
  292 + fgsdmTurn = fgsdmTurn.substring(0, fgsdmTurn.length - 1);
  293 + }
269 var lineName = $('#line option:selected').text(); 294 var lineName = $('#line option:selected').text();
270 if(lineName == "全部线路") 295 if(lineName == "全部线路")
271 lineName = $('#fgsdmTurn option:selected').text(); 296 lineName = $('#fgsdmTurn option:selected').text();
src/main/resources/static/pages/report/countMileage/countBus/company/countBusMileage.html
@@ -43,8 +43,8 @@ @@ -43,8 +43,8 @@
43 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> 43 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
44 </div> 44 </div>
45 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> 45 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
46 - <span class="item-label" style="width: 80px;">分公司: </span>  
47 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> 46 + <span class="item-label" style="width: 80px;">线队: </span>
  47 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;" multiple="multiple"></select>
48 </div> 48 </div>
49 <div style="display: inline-block;margin-left: 43px;"> 49 <div style="display: inline-block;margin-left: 43px;">
50 <span class="item-label" style="width: 80px;">线路: </span> 50 <span class="item-label" style="width: 80px;">线路: </span>
@@ -140,23 +140,34 @@ @@ -140,23 +140,34 @@
140 $("#gsdm").on("change",updateCompany); 140 $("#gsdm").on("change",updateCompany);
141 function updateCompany(){ 141 function updateCompany(){
142 var company = $('#gsdm').val(); 142 var company = $('#gsdm').val();
143 - var options = ''; 143 +// var options = '';
  144 +// for(var i = 0; i < obj.length; i++){
  145 +// if(obj[i].companyCode == company){
  146 +// var children = obj[i].children;
  147 +// for(var j = 0; j < children.length; j++){
  148 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  149 +// }
  150 +// }
  151 +// }
  152 +// $('#fgsdm').html(options);
  153 + var data = [];
144 for(var i = 0; i < obj.length; i++){ 154 for(var i = 0; i < obj.length; i++){
145 if(obj[i].companyCode == company){ 155 if(obj[i].companyCode == company){
146 var children = obj[i].children; 156 var children = obj[i].children;
147 for(var j = 0; j < children.length; j++){ 157 for(var j = 0; j < children.length; j++){
148 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 158 + data.push({id: children[j].code, text: children[j].name});
149 } 159 }
150 } 160 }
151 } 161 }
152 - $('#fgsdm').html(options); 162 + $("#fgsdm").empty();
  163 + initPinYinSelect2('#fgsdm',data,'');
153 } 164 }
154 165
155 166
156 var tempData = {}; 167 var tempData = {};
157 $.get('/report/lineList',function(xlList){ 168 $.get('/report/lineList',function(xlList){
158 var data = []; 169 var data = [];
159 -// data.push({id: " ", text: "全部线路"}); 170 + data.push({id: " ", text: "全部线路"});
160 $.get('/user/companyData', function(result){ 171 $.get('/user/companyData', function(result){
161 for(var i = 0; i < result.length; i++){ 172 for(var i = 0; i < result.length; i++){
162 var companyCode = result[i].companyCode; 173 var companyCode = result[i].companyCode;
@@ -212,7 +223,14 @@ @@ -212,7 +223,14 @@
212 date = $("#date").val(); 223 date = $("#date").val();
213 date2 =$("#date2").val(); 224 date2 =$("#date2").val();
214 gsdm =$("#gsdm").val(); 225 gsdm =$("#gsdm").val();
215 - fgsdm=$("#fgsdm").val(); 226 +// fgsdm=$("#fgsdm").val();
  227 + fgsdm="";
  228 + $($("#fgsdm").val()).each(function(i, e){
  229 + fgsdm += e + ",";
  230 + });
  231 + if(fgsdm.length > 0){
  232 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  233 + }
216 zt=$("#zt").val(); 234 zt=$("#zt").val();
217 xlName = $("#select2-line-container").html(); 235 xlName = $("#select2-line-container").html();
218 if(xlName == "全部线路") 236 if(xlName == "全部线路")
@@ -284,7 +302,7 @@ @@ -284,7 +302,7 @@
284 <tr> 302 <tr>
285 <td>序号</td> 303 <td>序号</td>
286 <td>日期</td> 304 <td>日期</td>
287 - <td>所属公司</td> 305 + <td>线队</td>
288 <td>线路</td> 306 <td>线路</td>
289 <td>车号</td> 307 <td>车号</td>
290 {{if zt=='js'}} 308 {{if zt=='js'}}
src/main/resources/static/pages/report/countMileage/countBus/countBusMileage.html
@@ -43,8 +43,8 @@ @@ -43,8 +43,8 @@
43 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> 43 <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
44 </div> 44 </div>
45 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> 45 <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
46 - <span class="item-label" style="width: 80px;">分公司: </span>  
47 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> 46 + <span class="item-label" style="width: 80px;">线队: </span>
  47 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;" multiple="multiple"></select>
48 </div> 48 </div>
49 <div style="display: inline-block;margin-left: 43px;"> 49 <div style="display: inline-block;margin-left: 43px;">
50 <span class="item-label" style="width: 80px;">线路: </span> 50 <span class="item-label" style="width: 80px;">线路: </span>
@@ -140,23 +140,34 @@ @@ -140,23 +140,34 @@
140 $("#gsdm").on("change",updateCompany); 140 $("#gsdm").on("change",updateCompany);
141 function updateCompany(){ 141 function updateCompany(){
142 var company = $('#gsdm').val(); 142 var company = $('#gsdm').val();
143 - var options = ''; 143 +// var options = '';
  144 +// for(var i = 0; i < obj.length; i++){
  145 +// if(obj[i].companyCode == company){
  146 +// var children = obj[i].children;
  147 +// for(var j = 0; j < children.length; j++){
  148 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  149 +// }
  150 +// }
  151 +// }
  152 +// $('#fgsdm').html(options);
  153 + var data = [];
144 for(var i = 0; i < obj.length; i++){ 154 for(var i = 0; i < obj.length; i++){
145 if(obj[i].companyCode == company){ 155 if(obj[i].companyCode == company){
146 var children = obj[i].children; 156 var children = obj[i].children;
147 for(var j = 0; j < children.length; j++){ 157 for(var j = 0; j < children.length; j++){
148 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 158 + data.push({id: children[j].code, text: children[j].name});
149 } 159 }
150 } 160 }
151 } 161 }
152 - $('#fgsdm').html(options); 162 + $("#fgsdm").empty();
  163 + initPinYinSelect2('#fgsdm',data,'');
153 } 164 }
154 165
155 166
156 var tempData = {}; 167 var tempData = {};
157 $.get('/report/lineList',function(xlList){ 168 $.get('/report/lineList',function(xlList){
158 var data = []; 169 var data = [];
159 -// data.push({id: " ", text: "全部线路"}); 170 + data.push({id: " ", text: "全部线路"});
160 $.get('/user/companyData', function(result){ 171 $.get('/user/companyData', function(result){
161 for(var i = 0; i < result.length; i++){ 172 for(var i = 0; i < result.length; i++){
162 var companyCode = result[i].companyCode; 173 var companyCode = result[i].companyCode;
@@ -212,7 +223,14 @@ @@ -212,7 +223,14 @@
212 date = $("#date").val(); 223 date = $("#date").val();
213 date2 =$("#date2").val(); 224 date2 =$("#date2").val();
214 gsdm =$("#gsdm").val(); 225 gsdm =$("#gsdm").val();
215 - fgsdm=$("#fgsdm").val(); 226 +// fgsdm=$("#fgsdm").val();
  227 + fgsdm="";
  228 + $($("#fgsdm").val()).each(function(i, e){
  229 + fgsdm += e + ",";
  230 + });
  231 + if(fgsdm.length > 0){
  232 + fgsdm = fgsdm.substring(0, fgsdm.length - 1);
  233 + }
216 zt=$("#zt").val(); 234 zt=$("#zt").val();
217 xlName = $("#select2-line-container").html(); 235 xlName = $("#select2-line-container").html();
218 if(xlName == "全部线路") 236 if(xlName == "全部线路")
@@ -286,7 +304,7 @@ @@ -286,7 +304,7 @@
286 <tr> 304 <tr>
287 <td>序号</td> 305 <td>序号</td>
288 <td>日期</td> 306 <td>日期</td>
289 - <td>所属公司</td> 307 + <td>线队</td>
290 <td>线路</td> 308 <td>线路</td>
291 <td>车号</td> 309 <td>车号</td>
292 {{if zt=='js'}} 310 {{if zt=='js'}}
src/main/resources/static/pages/report/sheet/calcSheetList.html
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 id="fgsdmDiv"> 36 id="fgsdmDiv">
37 <span class="item-label" style="width: 80px;">分公司: </span> <select 37 <span class="item-label" style="width: 80px;">分公司: </span> <select
38 class="form-control" name="subCompany" id="fgsdm" 38 class="form-control" name="subCompany" id="fgsdm"
39 - style="width: 180px;"></select> 39 + style="width: 180px;" multiple="multiple"></select>
40 </div> 40 </div>
41 41
42 <div style="display: inline-block; margin-left: 43px;"> 42 <div style="display: inline-block; margin-left: 43px;">
@@ -195,19 +195,30 @@ @@ -195,19 +195,30 @@
195 $("#gsdm").on("change",updateCompany); 195 $("#gsdm").on("change",updateCompany);
196 function updateCompany(){ 196 function updateCompany(){
197 var company = $('#gsdm').val(); 197 var company = $('#gsdm').val();
198 - var options ='';  
199 - if(fage){  
200 - options = '<option value="">请选择</option>';  
201 - } 198 +// var options ='';
  199 +// if(fage){
  200 +// options = '<option value="">请选择</option>';
  201 +// }
  202 +// for(var i = 0; i < obj.length; i++){
  203 +// if(obj[i].companyCode == company){
  204 +// var children = obj[i].children;
  205 +// for(var j = 0; j < children.length; j++){
  206 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  207 +// }
  208 +// }
  209 +// }
  210 +// $('#fgsdm').html(options);
  211 + var data = [];
202 for(var i = 0; i < obj.length; i++){ 212 for(var i = 0; i < obj.length; i++){
203 if(obj[i].companyCode == company){ 213 if(obj[i].companyCode == company){
204 var children = obj[i].children; 214 var children = obj[i].children;
205 for(var j = 0; j < children.length; j++){ 215 for(var j = 0; j < children.length; j++){
206 - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; 216 + data.push({id: children[j].code, text: children[j].name});
207 } 217 }
208 } 218 }
209 } 219 }
210 - $('#fgsdm').html(options); 220 + $("#fgsdm").empty();
  221 + initPinYinSelect2('#fgsdm',data,'');
211 } 222 }
212 223
213 var tempData = {}; 224 var tempData = {};
@@ -255,10 +266,17 @@ @@ -255,10 +266,17 @@
255 var line = $("#line").val(); 266 var line = $("#line").val();
256 var date = $("#date").val(); 267 var date = $("#date").val();
257 var endDate = $("#endDate").val(); 268 var endDate = $("#endDate").val();
258 - var fgs=$('#fgsdm').val();  
259 - var gs=$('#gsdm').val();  
260 var nature=$("#nature").val(); 269 var nature=$("#nature").val();
261 var plate=$("#plate").val(); 270 var plate=$("#plate").val();
  271 + var gs=$('#gsdm').val();
  272 +// var fgs=$('#fgsdm').val();
  273 + var fgs="";
  274 + $($("#fgsdm").val()).each(function(i, e){
  275 + fgs += e + ",";
  276 + });
  277 + if(fgs.length > 0){
  278 + fgs = fgs.substring(0, fgs.length - 1);
  279 + }
262 var i = layer.load(2); 280 var i = layer.load(2);
263 $get('/calcSheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,plate:plate,type:'query'},function(result){ 281 $get('/calcSheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,plate:plate,type:'query'},function(result){
264 layer.close(i); 282 layer.close(i);
@@ -328,17 +346,24 @@ @@ -328,17 +346,24 @@
328 var line = $("#line").val(); 346 var line = $("#line").val();
329 var date = $("#date").val(); 347 var date = $("#date").val();
330 var endDate = $("#endDate").val(); 348 var endDate = $("#endDate").val();
331 - var fgs=$('#fgsdm').val();  
332 - var gs=$('#gsdm').val();  
333 var nature=$("#nature").val(); 349 var nature=$("#nature").val();
334 var plate=$("#plate").val(); 350 var plate=$("#plate").val();
  351 + var gs=$('#gsdm').val();
  352 +// var fgs=$('#fgsdm').val();
  353 + var fgs="";
  354 + $($("#fgsdm").val()).each(function(i, e){
  355 + fgs += e + ",";
  356 + });
  357 + if(fgs.length > 0){
  358 + fgs = fgs.substring(0, fgs.length - 1);
  359 + }
335 var lineName = $('#line option:selected').text(); 360 var lineName = $('#line option:selected').text();
336 if(lineName == "全部线路") 361 if(lineName == "全部线路")
337 lineName = $('#fgsdm option:selected').text(); 362 lineName = $('#fgsdm option:selected').text();
338 if(lineName == "请选择") 363 if(lineName == "请选择")
339 lineName =$('#gsdm option:selected').text(); 364 lineName =$('#gsdm option:selected').text();
340 var i = layer.load(2); 365 var i = layer.load(2);
341 - $get('/calcSheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,plate:plate,type:'export'},function(result){ 366 + $get('/calcSheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,plate:plate,lineName:lineName,type:'export'},function(result){
342 var dateTime = ""; 367 var dateTime = "";
343 if(date == endDate){ 368 if(date == endDate){
344 dateTime = moment(date).format("YYYYMMDD"); 369 dateTime = moment(date).format("YYYYMMDD");
@@ -443,7 +468,7 @@ @@ -443,7 +468,7 @@
443 <td>{{obj.szfczdl}}</td> 468 <td>{{obj.szfczdl}}</td>
444 <td> 469 <td>
445 <button type="button" class="btn btn-sm blue btn-calcSheetList_1" 470 <button type="button" class="btn btn-sm blue btn-calcSheetList_1"
446 - data-id="{{obj.xl}}" data-date="{{obj.date}}">详细</button> 471 + data-id="{{obj.xl}}" data-date="{{obj.date}}" >详细</button>
447 </td> 472 </td>
448 <td>{{obj.sjszddzds}}</td> 473 <td>{{obj.sjszddzds}}</td>
449 <td>{{obj.szddzdl}}</td> 474 <td>{{obj.szddzdl}}</td>