Commit 10d26d62edc9073778d7f319a17197fa3bcca7c0
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 | 34 | } |
| 35 | 35 | |
| 36 | 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 | 41 | @RequestMapping(value = "/lineTimeAnaliy", method = RequestMethod.GET) |
| ... | ... | @@ -44,13 +44,13 @@ public class BusIntervalController { |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 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 | 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 | 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<CalcWaybill, Integer> |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 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 | 177 | String gsdm=""; |
| 178 | 178 | if(map.get("gsdm")!=null){ |
| 179 | 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 | 185 | String line=""; |
| 186 | 186 | if(map.get("line")!=null){ |
| 187 | 187 | line=map.get("line").toString().trim(); |
| ... | ... | @@ -390,7 +390,11 @@ public class CalcWaybillController extends BaseController<CalcWaybill, Integer> |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 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 | 398 | String line=""; |
| 395 | 399 | if(map.get("line")!=null){ |
| 396 | 400 | line=map.get("line").toString().trim(); |
| ... | ... | @@ -419,11 +423,11 @@ public class CalcWaybillController extends BaseController<CalcWaybill, Integer> |
| 419 | 423 | if(map.get("type")!=null){ |
| 420 | 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 | 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<ScheduleRealInfo, |
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 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 | 434 | String gsdm=""; |
| 435 | 435 | if(map.get("gsdm")!=null){ |
| 436 | 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 | 442 | String line=""; |
| 443 | 443 | if(map.get("line")!=null){ |
| 444 | 444 | line=map.get("line").toString(); | ... | ... |
src/main/java/com/bsth/controller/report/CalcSheetController.java
| ... | ... | @@ -19,8 +19,8 @@ public class CalcSheetController extends BaseController<CalcSheet, Integer>{ |
| 19 | 19 | CalcSheetService calcSheetService; |
| 20 | 20 | //发车到站准点率统计 |
| 21 | 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 | 24 | return list; |
| 25 | 25 | } |
| 26 | 26 | //发车到站准点率列表 |
| ... | ... | @@ -46,15 +46,15 @@ public class CalcSheetController extends BaseController<CalcSheet, Integer>{ |
| 46 | 46 | |
| 47 | 47 | //营运线路出车率统计 |
| 48 | 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 | 51 | return list; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | |
| 55 | 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 | 58 | return list; |
| 59 | 59 | } |
| 60 | 60 | } | ... | ... |
src/main/java/com/bsth/controller/report/ReportController.java
| ... | ... | @@ -329,8 +329,8 @@ public class ReportController { |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 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 | 336 | @RequestMapping(value="/countDjg") |
| ... | ... | @@ -403,7 +403,7 @@ public class ReportController { |
| 403 | 403 | * @return Map<String, Object> |
| 404 | 404 | */ |
| 405 | 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 | 25 | } |
| 26 | 26 | |
| 27 | 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 | 32 | @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) |
| ... | ... | @@ -50,8 +50,8 @@ public class PeopleCarPlanController { |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 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 | 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 | 9 | |
| 10 | 10 | import org.springframework.data.jpa.repository.Modifying; |
| 11 | 11 | import org.springframework.data.jpa.repository.Query; |
| 12 | +import org.springframework.data.repository.query.Param; | |
| 12 | 13 | import org.springframework.stereotype.Repository; |
| 13 | 14 | |
| 14 | 15 | /** |
| ... | ... | @@ -25,6 +26,15 @@ public interface CalcBusMileageRepository extends BaseRepository<CalcBusMileage, |
| 25 | 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 | 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 | 39 | @Modifying |
| 30 | 40 | @Transactional | ... | ... |
src/main/java/com/bsth/repository/calc/CalcIntervalRepository.java
| ... | ... | @@ -41,10 +41,16 @@ public interface CalcIntervalRepository extends BaseRepository<CalcInterval, Int |
| 41 | 41 | |
| 42 | 42 | //按照时间段,公司统计 |
| 43 | 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 | 45 | + " group by xl_bm,gsbm,fgsbm",nativeQuery=true) |
| 46 | 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 | 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 | 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 | 12 | import org.springframework.data.jpa.repository.EntityGraph; |
| 13 | 13 | import org.springframework.data.jpa.repository.Modifying; |
| 14 | 14 | import org.springframework.data.jpa.repository.Query; |
| 15 | +import org.springframework.data.repository.query.Param; | |
| 15 | 16 | import org.springframework.stereotype.Repository; |
| 16 | 17 | |
| 17 | 18 | /** |
| ... | ... | @@ -31,6 +32,14 @@ public interface CalcStatisticsRepository extends BaseRepository<CalcStatistics, |
| 31 | 32 | //按照时间段统计 |
| 32 | 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 | 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 | 45 | @Modifying | ... | ... |
src/main/java/com/bsth/repository/calc/CalcWaybillRepository.java
| ... | ... | @@ -15,6 +15,7 @@ import com.bsth.repository.BaseRepository; |
| 15 | 15 | import org.springframework.data.jpa.repository.EntityGraph; |
| 16 | 16 | import org.springframework.data.jpa.repository.Modifying; |
| 17 | 17 | import org.springframework.data.jpa.repository.Query; |
| 18 | +import org.springframework.data.repository.query.Param; | |
| 18 | 19 | import org.springframework.stereotype.Repository; |
| 19 | 20 | |
| 20 | 21 | /** |
| ... | ... | @@ -90,21 +91,29 @@ public interface CalcWaybillRepository extends BaseRepository<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 | 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 | 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 | 9 | import org.springframework.data.jpa.repository.EntityGraph; |
| 10 | 10 | import org.springframework.data.jpa.repository.Modifying; |
| 11 | 11 | import org.springframework.data.jpa.repository.Query; |
| 12 | +import org.springframework.data.repository.query.Param; | |
| 12 | 13 | import org.springframework.stereotype.Repository; |
| 13 | 14 | |
| 14 | 15 | import javax.transaction.Transactional; |
| ... | ... | @@ -199,6 +200,11 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 199 | 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 | 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 | 209 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) |
| 204 | 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 | 3 | import java.util.List; |
| 4 | 4 | import java.util.Map; |
| 5 | 5 | |
| 6 | +import org.apache.commons.httpclient.methods.multipart.StringPart; | |
| 7 | + | |
| 6 | 8 | |
| 7 | 9 | public interface BusIntervalService { |
| 8 | 10 | |
| ... | ... | @@ -12,13 +14,13 @@ public interface BusIntervalService { |
| 12 | 14 | |
| 13 | 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 | 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 | 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<CalcWaybill, Integer> { |
| 30 | 30 | */ |
| 31 | 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 | 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<CalcWaybill, Integer> { |
| 40 | 43 | |
| 41 | 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 | 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<CalcWaybill, Integer |
| 755 | 755 | return o1.compareTo(o2); |
| 756 | 756 | } |
| 757 | 757 | } |
| 758 | - | |
| 758 | + | |
| 759 | + /** | |
| 760 | + * 2603加了分公司多选,fgsdm字段可以传null或者空数组表示查询全部分公司 | |
| 761 | + */ | |
| 759 | 762 | @Override |
| 760 | - public List<CalcStatistics> calcStatisticsDaily(String gsdm, String fgsdm, | |
| 763 | + public List<CalcStatistics> calcStatisticsDaily(String gsdm, String[] fgsdm, | |
| 761 | 764 | String line, String date, String date2, String xlName, String type,String nature) { |
| 762 | 765 | // TODO Auto-generated method stub |
| 763 | 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 | 768 | listAll = calcStatisticsRepository.selectByDateAndLineTj3(date, date2); |
| 766 | 769 | } else if(line.length() > 0){ |
| 767 | 770 | listAll = calcStatisticsRepository.selectByDateAndLineTj2(line, date, date2); |
| 768 | 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 | 778 | Map<String, Boolean> lineMap=lineService.lineNature(); |
| 772 | 779 | List<CalcStatistics> list = new ArrayList<CalcStatistics>(); |
| ... | ... | @@ -1535,7 +1542,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 1535 | 1542 | for(Map<String, String> tempMap : gsList){ |
| 1536 | 1543 | map.put("gsdm", tempMap.get("gsdm").toString()); |
| 1537 | 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 | 1546 | for(Map<String, Object> m : countByList){ |
| 1540 | 1547 | if(!m.containsKey("xlName") || m.get("xlName")==null |
| 1541 | 1548 | || m.get("xlName").toString().equals("合计")) |
| ... | ... | @@ -1736,11 +1743,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 1736 | 1743 | } |
| 1737 | 1744 | |
| 1738 | 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 | 1747 | String date2, String xlName, String zt, String by, String type) { |
| 1741 | 1748 | List<CalcBusMileage> resList = new ArrayList<CalcBusMileage>(); |
| 1742 | 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 | 1757 | if(zt.equals("zbh")){ |
| 1746 | 1758 | List<String> keyList = new ArrayList<String>(); |
| ... | ... | @@ -2044,16 +2056,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 2044 | 2056 | int flag = 0; |
| 2045 | 2057 | if("jsy".equals(statisticalObj)){ |
| 2046 | 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 | 2060 | } else if("cwy".equals(statisticalObj)){ |
| 2049 | 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 | 2063 | } else if("cl".equals(statisticalObj)){ |
| 2052 | 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 | 2066 | } else if("xl".equals(statisticalObj)){ |
| 2055 | 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<CalcWaybill, Integer |
| 2593 | 2605 | |
| 2594 | 2606 | List<String> list1 = new ArrayList<>(); |
| 2595 | 2607 | list1.add("序号"); |
| 2596 | - list1.add("所属公司"); | |
| 2608 | + list1.add("线队"); | |
| 2597 | 2609 | list1.add("线路"); |
| 2598 | 2610 | if(flag==1 ||flag==2 ){ |
| 2599 | 2611 | list1.add("工号"); |
| ... | ... | @@ -2778,7 +2790,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 2778 | 2790 | |
| 2779 | 2791 | //240820重写calcDetailMonthly方法 |
| 2780 | 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 | 2794 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| 2783 | 2795 | SimpleDateFormat dateFormatMon = new SimpleDateFormat("yyyy-MM"); |
| 2784 | 2796 | DecimalFormat df = new DecimalFormat("0.000");//格式化小数 |
| ... | ... | @@ -2800,13 +2812,22 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 2800 | 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 | 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 | 2833 | List<String> line= new ArrayList<>(); |
| ... | ... | @@ -2885,16 +2906,16 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 2885 | 2906 | int flag = 0; |
| 2886 | 2907 | if("jsy".equals(statisticalObj)){ |
| 2887 | 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 | 2910 | } else if("cwy".equals(statisticalObj)){ |
| 2890 | 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 | 2913 | } else if("cl".equals(statisticalObj)){ |
| 2893 | 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 | 2916 | } else if("xl".equals(statisticalObj)){ |
| 2896 | 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 | 2921 | // List类转换 |
| ... | ... | @@ -2918,8 +2939,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 2918 | 2939 | |
| 2919 | 2940 | if(flag != 2){ |
| 2920 | 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 | 2945 | for(Ylb y : ylb){ |
| 2925 | 2946 | String key = y.getSsgsdm() + "_" + y.getFgsdm() + "_" + y.getXlbm(); |
| ... | ... | @@ -3019,7 +3040,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 3019 | 3040 | //表头 |
| 3020 | 3041 | List<String> list1 = new ArrayList<>(); |
| 3021 | 3042 | list1.add("序号"); |
| 3022 | - list1.add("所属公司"); | |
| 3043 | + list1.add("线队"); | |
| 3023 | 3044 | list1.add("线路"); |
| 3024 | 3045 | if(flag==1 || flag==2){ |
| 3025 | 3046 | list1.add("工号"); | ... | ... |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -92,22 +92,34 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 92 | 92 | private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 93 | 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 | 96 | List<Long> ttList = new ArrayList<Long>(); |
| 97 | 97 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 98 | 98 | List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); |
| 99 | 99 | |
| 100 | 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 | 114 | List<String> objList = new ArrayList<String>(); |
| 103 | 115 | String sql = "select * from bsth_c_s_sp_info_real where " + |
| 104 | 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 | 118 | "and bc_type != ? and bc_type != ? and bc_type != ?"; |
| 107 | 119 | if(line.length() != 0){ |
| 108 | 120 | sql = "select * from bsth_c_s_sp_info_real where xl_bm = ? " + |
| 109 | 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 | 123 | "and bc_type != ? and bc_type != ? and bc_type != ?"; |
| 112 | 124 | objList.add(line); |
| 113 | 125 | } |
| ... | ... | @@ -127,7 +139,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 127 | 139 | } |
| 128 | 140 | |
| 129 | 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 | 148 | if(normal){ |
| 133 | 149 | objList.add("in"); |
| ... | ... | @@ -454,7 +470,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 454 | 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 | 474 | startDate, endDate, model, sfqr==1?times1+"-"+times2:"", true); |
| 459 | 475 | |
| 460 | 476 | long time1 = 0; |
| ... | ... | @@ -764,7 +780,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 764 | 780 | } |
| 765 | 781 | |
| 766 | 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 | 784 | List<Map<String, Object>> ttList = new ArrayList<Map<String, Object>>(); |
| 769 | 785 | List<ChildTaskPlan> cList = new ArrayList<ChildTaskPlan>(); |
| 770 | 786 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| ... | ... | @@ -776,11 +792,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 776 | 792 | Set<Long> tsSet = new HashSet<Long>(); |
| 777 | 793 | Set<Long> ttSet = new HashSet<Long>(); |
| 778 | 794 | |
| 779 | - String company = "", subCompany = ""; | |
| 795 | + String company = ""; | |
| 796 | +// String subCompany = ""; | |
| 780 | 797 | if(map.get("company")!=null) |
| 781 | 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 | 801 | String lp = map.get("lp").toString(); |
| 785 | 802 | String sfyy = map.get("sfyy").toString(); |
| 786 | 803 | String line = map.get("line").toString(); |
| ... | ... | @@ -816,7 +833,18 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 816 | 833 | strList.add("%%"); |
| 817 | 834 | } |
| 818 | 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 | 848 | if(sfqr == 1){ |
| 821 | 849 | strList.add(times1); |
| 822 | 850 | strList.add(times2); |
| ... | ... | @@ -828,7 +856,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 828 | 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 | 857 | + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" |
| 830 | 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 | 860 | + " and bc_type != 'ldks'"; |
| 833 | 861 | |
| 834 | 862 | List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(), |
| ... | ... | @@ -1614,7 +1642,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1614 | 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 | 1647 | String[] date1 = startDate.split("-"); |
| 1620 | 1648 | String[] date2 = endDate.split("-"); |
| ... | ... | @@ -1829,18 +1857,19 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1829 | 1857 | } |
| 1830 | 1858 | |
| 1831 | 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 | 1861 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1834 | 1862 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 1835 | 1863 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 1836 | 1864 | |
| 1837 | - String company = "", subCompany = ""; | |
| 1865 | + String company = ""; | |
| 1866 | +// String subCompany = ""; | |
| 1838 | 1867 | String sfyy = map.get("sfyy").toString(); |
| 1839 | 1868 | String line = map.get("line").toString(); |
| 1840 | 1869 | if(map.get("company")!=null) |
| 1841 | 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 | 1873 | String startDate = map.get("startDate").toString(); |
| 1845 | 1874 | String endDate = map.get("endDate").toString(); |
| 1846 | 1875 | String model = map.get("model").toString(); |
| ... | ... | @@ -2237,20 +2266,21 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2237 | 2266 | } |
| 2238 | 2267 | |
| 2239 | 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 | 2270 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 2242 | 2271 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 2243 | 2272 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 2244 | 2273 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); |
| 2245 | 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 | 2278 | String sfyy = map.get("sfyy").toString(); |
| 2249 | 2279 | String line = map.get("line").toString(); |
| 2250 | 2280 | if(map.containsKey("company") && map.get("company")!=null) |
| 2251 | 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 | 2284 | String startDate = map.get("startDate").toString(); |
| 2255 | 2285 | String endDate = map.get("endDate").toString(); |
| 2256 | 2286 | String times = map.get("times").toString(); |
| ... | ... | @@ -2264,10 +2294,22 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2264 | 2294 | endDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 2265 | 2295 | } |
| 2266 | 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 | 2310 | String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str" + |
| 2269 | 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 | 2313 | " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 2272 | 2314 | List<String> strList = new ArrayList<String>(); |
| 2273 | 2315 | strList.add(startDate); |
| ... | ... | @@ -2282,7 +2324,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2282 | 2324 | strList.add("23:59"); |
| 2283 | 2325 | } |
| 2284 | 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 | 2333 | List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(), |
| 2288 | 2334 | new RowMapper<ScheduleRealInfo>(){ | ... | ... |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| ... | ... | @@ -120,7 +120,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L |
| 120 | 120 | |
| 121 | 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 | 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 | 12 | import java.text.ParseException; |
| 13 | 13 | import java.text.SimpleDateFormat; |
| 14 | 14 | import java.util.ArrayList; |
| 15 | +import java.util.Arrays; | |
| 15 | 16 | import java.util.Calendar; |
| 16 | 17 | import java.util.Collection; |
| 17 | 18 | import java.util.Collections; |
| ... | ... | @@ -3018,7 +3019,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3018 | 3019 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 3019 | 3020 | |
| 3020 | 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 | 3023 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 3023 | 3024 | try { |
| 3024 | 3025 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); |
| ... | ... | @@ -3208,21 +3209,25 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3208 | 3209 | } |
| 3209 | 3210 | |
| 3210 | 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 | 3213 | String xlName, String type,String nature) { |
| 3213 | 3214 | List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>(); |
| 3214 | 3215 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); |
| 3215 | 3216 | List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); |
| 3216 | 3217 | List<Object[]> listInterval=new ArrayList<Object[]>(); |
| 3217 | 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 | 3221 | listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj3(date, date2); |
| 3221 | 3222 | listInterval = calcIntervalRepository.countByDate(date, date2); |
| 3222 | 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 | 3231 | } else { |
| 3227 | 3232 | //查询单条线路 |
| 3228 | 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 | 8 | import com.bsth.service.BaseService; |
| 9 | 9 | |
| 10 | 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 | 12 | public List<CalcSheet> calcListSheet(Map<String, Object> map); |
| 13 | 13 | public List<CalcSheet> calcListSheet_d(Map<String, Object> map); |
| 14 | 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 | 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 | 62 | List<Map<String, Object>> countDjg(Map<String, Object> map); |
| 63 | 63 | |
| ... | ... | @@ -67,5 +67,5 @@ public interface ReportService { |
| 67 | 67 | |
| 68 | 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<CalcSheet, Integer> im |
| 56 | 56 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 57 | 57 | |
| 58 | 58 | @Override |
| 59 | - public List<CalcSheet> countListCalcSheet(Map<String, Object> map) { | |
| 59 | + public List<CalcSheet> countListCalcSheet(Map<String, Object> map, String[] fgs) { | |
| 60 | 60 | // TODO Auto-generated method stub |
| 61 | 61 | final DecimalFormat df = new DecimalFormat("0.00"); |
| 62 | 62 | String line=""; |
| ... | ... | @@ -67,10 +67,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 67 | 67 | if(map.get("gs")!=null){ |
| 68 | 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 | 74 | String nature="0"; |
| 75 | 75 | if(map.get("nature")!=null){ |
| 76 | 76 | nature=map.get("nature").toString(); |
| ... | ... | @@ -83,6 +83,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 83 | 83 | if(map.get("type")!=null){ |
| 84 | 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 | 91 | Map<String, Boolean> lineMap=lineService.lineNature(); |
| 88 | 92 | |
| ... | ... | @@ -94,12 +98,22 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 94 | 98 | + " from bsth_c_calc_sheet where date >= ? and date <= ?"; |
| 95 | 99 | objList.add(date); |
| 96 | 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 | 103 | } else if(line.equals("")){ |
| 100 | - sql +=" and gsdm = ? and fgsdm like CONCAT('%',?,'%')"; | |
| 104 | + sql +=" and gsdm = ?"; | |
| 101 | 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 | 117 | }else{ |
| 104 | 118 | sql += " and xl = ?"; |
| 105 | 119 | objList.add(line); |
| ... | ... | @@ -196,14 +210,14 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 196 | 210 | } |
| 197 | 211 | |
| 198 | 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 | 221 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 208 | 222 | Map<String, Object> m = new HashMap<String, Object>(); |
| 209 | 223 | m.put("date", date); |
| ... | ... | @@ -443,7 +457,6 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 443 | 457 | @Override |
| 444 | 458 | public List<Sheet> calcSheet(Map<String, Object> map) { |
| 445 | 459 | // TODO Auto-generated method stub |
| 446 | - System.out.println(); | |
| 447 | 460 | String line=map.get("line").toString(); |
| 448 | 461 | String date=map.get("date").toString(); |
| 449 | 462 | String dir =map.get("dir").toString(); |
| ... | ... | @@ -985,7 +998,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 985 | 998 | } |
| 986 | 999 | |
| 987 | 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 | 1002 | final DecimalFormat df = new DecimalFormat("0.00"); |
| 990 | 1003 | String line=""; |
| 991 | 1004 | if(map.get("line")!=null){ |
| ... | ... | @@ -995,10 +1008,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 995 | 1008 | if(map.get("gsdmTurn")!=null){ |
| 996 | 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 | 1015 | String nature="0"; |
| 1003 | 1016 | if(map.get("nature")!=null){ |
| 1004 | 1017 | nature=map.get("nature").toString(); |
| ... | ... | @@ -1015,19 +1028,44 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 1015 | 1028 | } |
| 1016 | 1029 | String type=map.get("type").toString(); |
| 1017 | 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 | 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 | 1057 | }else{ |
| 1022 | - sql_=" and xl='"+line+"'"; | |
| 1058 | + sql_=" and xl = ? "; | |
| 1059 | + objList.add(line); | |
| 1023 | 1060 | } |
| 1024 | 1061 | String sql=" select gsdm,fgsdm,xl,xl_name,sum(jhcc) as jhcc,sum(sjcc) as sjcc," |
| 1025 | 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 | 1064 | + sql_ |
| 1028 | 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 | 1069 | @Override |
| 1032 | 1070 | public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| 1033 | 1071 | Map<String, Object> s=new HashMap<String,Object>(); |
| ... | ... | @@ -1104,6 +1142,8 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 1104 | 1142 | |
| 1105 | 1143 | Map<String, Object> tempMap=new HashMap<String,Object>(); |
| 1106 | 1144 | tempMap.put("rq", "分类汇总"); |
| 1145 | + tempMap.put("gsName", ""); | |
| 1146 | + tempMap.put("fgsName", ""); | |
| 1107 | 1147 | tempMap.put("line_", "共" + list.size() + "条线路"); |
| 1108 | 1148 | tempMap.put("xlName", "共" +count + "条线路"); |
| 1109 | 1149 | tempMap.put("jhcc", jhcc); |
| ... | ... | @@ -1135,7 +1175,7 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 1135 | 1175 | } |
| 1136 | 1176 | |
| 1137 | 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 | 1179 | final DecimalFormat df = new DecimalFormat("0.00"); |
| 1140 | 1180 | String line=""; |
| 1141 | 1181 | if(map.get("line")!=null){ |
| ... | ... | @@ -1145,10 +1185,10 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 1145 | 1185 | if(map.get("gsdmTurn")!=null){ |
| 1146 | 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 | 1192 | String nature="0"; |
| 1153 | 1193 | if(map.get("nature")!=null){ |
| 1154 | 1194 | nature=map.get("nature").toString(); |
| ... | ... | @@ -1169,12 +1209,22 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 1169 | 1209 | List<String> objList = new ArrayList<String>(); |
| 1170 | 1210 | objList.add(startDate); |
| 1171 | 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 | 1214 | } else if(line.equals("")){ |
| 1175 | - sql_= " and gsdm = ? and fgsdm like CONCAT('%',?,'%') "; | |
| 1215 | + sql_= " and gsdm = ? "; | |
| 1176 | 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 | 1228 | }else{ |
| 1179 | 1229 | sql_=" and xl = ? "; |
| 1180 | 1230 | objList.add(line); | ... | ... |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| ... | ... | @@ -1438,9 +1438,9 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 1438 | 1438 | // Collections.sort(listInfo,new ComparableAcuals()); |
| 1439 | 1439 | //查询所有线路 |
| 1440 | 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 | 1444 | @Override |
| 1445 | 1445 | public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 1446 | 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 | 3051 | return map; |
| 3052 | 3052 | } |
| 3053 | 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 | 3055 | // TODO Auto-generated method stub |
| 3056 | 3056 | SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); |
| 3057 | 3057 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); |
| ... | ... | @@ -3060,10 +3060,10 @@ public class ReportServiceImpl implements ReportService{ |
| 3060 | 3060 | if(map.get("gsdm")!=null){ |
| 3061 | 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 | 3067 | String line=""; |
| 3068 | 3068 | if(map.get("line")!=null){ |
| 3069 | 3069 | line=map.get("line").toString(); |
| ... | ... | @@ -3093,7 +3093,11 @@ public class ReportServiceImpl implements ReportService{ |
| 3093 | 3093 | line =line.trim(); |
| 3094 | 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 | 3101 | }else{ |
| 3098 | 3102 | //查询单条线路 |
| 3099 | 3103 | list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2); |
| ... | ... | @@ -3104,10 +3108,19 @@ public class ReportServiceImpl implements ReportService{ |
| 3104 | 3108 | objList.add(date2); |
| 3105 | 3109 | String ylbSql=" select * from bsth_c_ylb where rq BETWEEN ? and ?"; |
| 3106 | 3110 | if(line.equals("")){ |
| 3107 | - ylbSql +=" and ssgsdm = ?" | |
| 3108 | - + " and fgsdm = ?"; | |
| 3111 | + ylbSql +=" and ssgsdm = ?"; | |
| 3109 | 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 | 3124 | }else{ |
| 3112 | 3125 | ylbSql += " and xlbm = ?"; |
| 3113 | 3126 | objList.add(line); |
| ... | ... | @@ -3119,10 +3132,19 @@ public class ReportServiceImpl implements ReportService{ |
| 3119 | 3132 | objList2.add(date2); |
| 3120 | 3133 | String dlbSql=" select * from bsth_c_dlb where rq BETWEEN ? and ?"; |
| 3121 | 3134 | if(line.equals("")){ |
| 3122 | - dlbSql +=" and ssgsdm = ?" | |
| 3123 | - + " and fgsdm = ?"; | |
| 3135 | + dlbSql +=" and ssgsdm = ?"; | |
| 3124 | 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 | 3148 | }else{ |
| 3127 | 3149 | dlbSql += " and xlbm = ?"; |
| 3128 | 3150 | objList2.add(line); |
| ... | ... | @@ -3134,14 +3156,23 @@ public class ReportServiceImpl implements ReportService{ |
| 3134 | 3156 | List<String> objList3 = new ArrayList<String>(); |
| 3135 | 3157 | objList3.add(date); |
| 3136 | 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 | 3160 | + " from bsth_c_s_sp_info_real r where" |
| 3139 | 3161 | + " r.schedule_date_str BETWEEN ? and ?"; |
| 3140 | 3162 | if(line.equals("")){ |
| 3141 | - sql +=" and r.gs_bm = ?" | |
| 3142 | - + " and r.fgs_bm = ?"; | |
| 3163 | + sql +=" and r.gs_bm = ?"; | |
| 3143 | 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 | 3176 | }else{ |
| 3146 | 3177 | sql += " and r.xl_bm = ?"; |
| 3147 | 3178 | objList3.add(line); |
| ... | ... | @@ -3153,6 +3184,8 @@ public class ReportServiceImpl implements ReportService{ |
| 3153 | 3184 | Map<String, Object> map=new HashMap<String,Object>(); |
| 3154 | 3185 | map.put("line",arg0.getString("xl_bm")); |
| 3155 | 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 | 3189 | return map; |
| 3157 | 3190 | } |
| 3158 | 3191 | }); |
| ... | ... | @@ -3160,14 +3193,23 @@ public class ReportServiceImpl implements ReportService{ |
| 3160 | 3193 | List<String> objList4 = new ArrayList<String>(); |
| 3161 | 3194 | objList4.add(date); |
| 3162 | 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 | 3197 | + " from bsth_c_s_sp_info_real r where" |
| 3165 | 3198 | + " r.schedule_date_str BETWEEN ? and ?"; |
| 3166 | 3199 | if(line.equals("")){ |
| 3167 | - sql +=" and r.gs_bm = ? " | |
| 3168 | - + " and r.fgs_bm = ?"; | |
| 3200 | + sql +=" and r.gs_bm = ? "; | |
| 3169 | 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 | 3213 | }else{ |
| 3172 | 3214 | sql += " and r.xl_bm = ?"; |
| 3173 | 3215 | objList4.add(line); |
| ... | ... | @@ -3181,6 +3223,8 @@ public class ReportServiceImpl implements ReportService{ |
| 3181 | 3223 | map.put("nbbm", arg0.getString("cl_zbh")); |
| 3182 | 3224 | map.put("jGh", arg0.getString("j_gh")); |
| 3183 | 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 | 3228 | return map; |
| 3185 | 3229 | } |
| 3186 | 3230 | }); |
| ... | ... | @@ -3296,7 +3340,7 @@ public class ReportServiceImpl implements ReportService{ |
| 3296 | 3340 | |
| 3297 | 3341 | } |
| 3298 | 3342 | if(!zt.equals("zbh")){ |
| 3299 | - lMap=lists(listGroupBy, lMaps, gsdm, fgsdm, date, date2); | |
| 3343 | + lMap=lists(listGroupBy, lMaps, date, date2); | |
| 3300 | 3344 | } |
| 3301 | 3345 | if(type.equals("export")){ |
| 3302 | 3346 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| ... | ... | @@ -3385,7 +3429,6 @@ public class ReportServiceImpl implements ReportService{ |
| 3385 | 3429 | |
| 3386 | 3430 | public final List<Map<String, Object>> lists(List<Map<String, Object>> listGb, |
| 3387 | 3431 | List<Map<String, Object>> listLc, |
| 3388 | - String gsdm,String fgsdm, | |
| 3389 | 3432 | String date,String date2){ |
| 3390 | 3433 | List<Map<String, Object>> lMap=new ArrayList<Map<String,Object>>(); |
| 3391 | 3434 | for (int i = 0; i < listGb.size(); i++) { |
| ... | ... | @@ -3396,6 +3439,8 @@ public class ReportServiceImpl implements ReportService{ |
| 3396 | 3439 | String jName=m.get("jName")==null?"":m.get("jName").toString(); |
| 3397 | 3440 | String sGh= m.get("sGh")==null?"":m.get("sGh").toString(); |
| 3398 | 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 | 3444 | double jhzlc = 0.0,jhlc= 0.0,jcclc= 0.0,zlc= 0.0,jhnlc= 0.0,jhwlc= 0.0, |
| 3400 | 3445 | jhnjcclc= 0.0,jhwjcclc= 0.0,jhwjcclc_z=0.0,zrwjcclc= 0.0,zrwjcclc1= 0.0,zrwjcclc2= 0.0, |
| 3401 | 3446 | zrwjcclcqt=0.0,lbss= 0.0,ssgl_lz= 0.0, |
| ... | ... | @@ -3453,7 +3498,7 @@ public class ReportServiceImpl implements ReportService{ |
| 3453 | 3498 | }else{ |
| 3454 | 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 | 3502 | newMap.put("xlName", BasicData.lineCode2NameMap.get(xl_bm)); |
| 3458 | 3503 | newMap.put("xlBm", xl_bm); |
| 3459 | 3504 | newMap.put("jGh", jGh); |
| ... | ... | @@ -4573,11 +4618,11 @@ public class ReportServiceImpl implements ReportService{ |
| 4573 | 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 | 4623 | Map<String, Object> resultMap = new HashMap<String, Object>(); |
| 4579 | 4624 | try { |
| 4580 | - List<List<String>> list = calcWaybillService.calcDetailMonthlyNew(map); | |
| 4625 | + List<List<String>> list = calcWaybillService.calcDetailMonthlyNew(map, fgsdm); | |
| 4581 | 4626 | |
| 4582 | 4627 | String name = map.get("name").toString(); |
| 4583 | 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 | |
| 8 | 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 | 12 | Map<String, Object> scheduleAnaly(Map<String, Object> map); |
| 13 | 13 | |
| ... | ... | @@ -17,7 +17,7 @@ public interface PeopleCarPlanService { |
| 17 | 17 | |
| 18 | 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 | 22 | List<Map<String, Object>> commandState(Map<String, Object> map); |
| 23 | 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 | 46 | @Autowired |
| 47 | 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 | 50 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 51 | 51 | |
| 52 | 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 | 78 | sql += " order by gs_bm, fgs_bm, xl_bm"; |
| 63 | 79 | |
| 64 | 80 | list = jdbcTemplate.query(sql, |
| 81 | + objList.toArray(), | |
| 65 | 82 | new RowMapper<ScheduleRealInfo>(){ |
| 66 | 83 | @Override |
| 67 | 84 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -327,18 +344,19 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 327 | 344 | } |
| 328 | 345 | |
| 329 | 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 | 348 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 332 | 349 | Set<String> lineSet = getNotOperation(); |
| 333 | 350 | DecimalFormat df = new DecimalFormat("###0.##"); |
| 334 | 351 | |
| 335 | - String sfyy = "", company = "", subCompany = ""; | |
| 352 | + String sfyy = "", company = ""; | |
| 353 | +// String subCompany = ""; | |
| 336 | 354 | if(map.get("sfyy")!=null) |
| 337 | 355 | sfyy = map.get("sfyy").toString(); |
| 338 | 356 | if(map.get("company")!=null) |
| 339 | 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 | 360 | String line = map.get("line").toString(); |
| 343 | 361 | String date = map.get("date").toString(); |
| 344 | 362 | String type = map.get("type").toString(); |
| ... | ... | @@ -397,7 +415,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 397 | 415 | // TODO Auto-generated catch block |
| 398 | 416 | e.printStackTrace(); |
| 399 | 417 | } |
| 400 | - String companyName = "", subCompanyName = ""; | |
| 401 | 418 | |
| 402 | 419 | for(String key : keyMap.keySet()){ |
| 403 | 420 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| ... | ... | @@ -407,6 +424,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 407 | 424 | int upfm = 0, updm = 0, dnfm = 0, dndm = 0; |
| 408 | 425 | int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0; |
| 409 | 426 | int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0; |
| 427 | + String companyName = "", subCompanyName = ""; | |
| 410 | 428 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 411 | 429 | if(schedule.isCcService()){ |
| 412 | 430 | continue; |
| ... | ... | @@ -1676,7 +1694,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1676 | 1694 | } |
| 1677 | 1695 | |
| 1678 | 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 | 1698 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 1681 | 1699 | NumberFormat nf = NumberFormat.getNumberInstance(); |
| 1682 | 1700 | nf.setMinimumFractionDigits(2); |
| ... | ... | @@ -1684,13 +1702,14 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1684 | 1702 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 1685 | 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 | 1707 | if(map.get("sfyy")!=null) |
| 1689 | 1708 | sfyy = map.get("sfyy").toString().trim(); |
| 1690 | 1709 | if(map.get("company")!=null) |
| 1691 | 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 | 1713 | if(map.get("line")!=null) |
| 1695 | 1714 | line = map.get("line").toString().trim(); |
| 1696 | 1715 | String startDate = map.get("startDate").toString().trim(); |
| ... | ... | @@ -1730,9 +1749,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1730 | 1749 | sql += " and gs_bm = ?"; |
| 1731 | 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 | 1764 | listSp = jdbcTemplate.query(sql, |
| ... | ... | @@ -1775,9 +1801,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1775 | 1801 | sql += " and gs_bm = ? "; |
| 1776 | 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 | 1816 | list = jdbcTemplate.query(sql, |
| ... | ... | @@ -2272,9 +2305,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 2272 | 2305 | Map<String,Object> m = new HashMap<String, Object>(); |
| 2273 | 2306 | ReportUtils ee = new ReportUtils(); |
| 2274 | 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 | 2309 | String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; |
| 2279 | 2310 | ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_delay.xls", |
| 2280 | 2311 | path+"export/" + dateTime + "-" + lineName + "-首末班误点班次.xls"); | ... | ... |
src/main/resources/static/pages/calc/company/countBusMileage.html
| ... | ... | @@ -42,8 +42,8 @@ |
| 42 | 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 43 | 43 | </div> |
| 44 | 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 | 47 | </div> |
| 48 | 48 | <div style="display: inline-block;margin-left: 43px;"> |
| 49 | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -141,23 +141,34 @@ |
| 141 | 141 | $("#gsdm").on("change",updateCompany); |
| 142 | 142 | function updateCompany(){ |
| 143 | 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 | 155 | for(var i = 0; i < obj.length; i++){ |
| 146 | 156 | if(obj[i].companyCode == company){ |
| 147 | 157 | var children = obj[i].children; |
| 148 | 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 | 168 | var tempData = {}; |
| 158 | 169 | $.get('/report/lineList',function(xlList){ |
| 159 | 170 | var data = []; |
| 160 | -// data.push({id: " ", text: "全部线路"}); | |
| 171 | + data.push({id: " ", text: "全部线路"}); | |
| 161 | 172 | $.get('/user/companyData', function(result){ |
| 162 | 173 | for(var i = 0; i < result.length; i++){ |
| 163 | 174 | var companyCode = result[i].companyCode; |
| ... | ... | @@ -213,7 +224,14 @@ |
| 213 | 224 | date = $("#date").val(); |
| 214 | 225 | date2 =$("#date2").val(); |
| 215 | 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 | 235 | zt=$("#zt").val(); |
| 218 | 236 | xlName = $("#select2-line-container").html(); |
| 219 | 237 | if(xlName == "全部线路") |
| ... | ... | @@ -226,7 +244,7 @@ |
| 226 | 244 | }else{ |
| 227 | 245 | var params = {}; |
| 228 | 246 | params['gsdm'] = gsdm; |
| 229 | - params['fgsdm'] =fgsdm ; | |
| 247 | + params['fgsdm'] =fgsdm; | |
| 230 | 248 | params['line'] = line; |
| 231 | 249 | params['date'] = date; |
| 232 | 250 | params['date2'] = date2; |
| ... | ... | @@ -287,7 +305,7 @@ |
| 287 | 305 | <tr> |
| 288 | 306 | <td>序号</td> |
| 289 | 307 | <td>日期</td> |
| 290 | - <td>所属公司</td> | |
| 308 | + <td>线队</td> | |
| 291 | 309 | <td>线路</td> |
| 292 | 310 | <td>车号</td> |
| 293 | 311 | {{if zt=='js'}} | ... | ... |
src/main/resources/static/pages/calc/countBusMileage.html
| ... | ... | @@ -42,8 +42,8 @@ |
| 42 | 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 43 | 43 | </div> |
| 44 | 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 | 47 | </div> |
| 48 | 48 | <div style="display: inline-block;margin-left: 43px;"> |
| 49 | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -141,23 +141,34 @@ |
| 141 | 141 | $("#gsdm").on("change",updateCompany); |
| 142 | 142 | function updateCompany(){ |
| 143 | 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 | 155 | for(var i = 0; i < obj.length; i++){ |
| 146 | 156 | if(obj[i].companyCode == company){ |
| 147 | 157 | var children = obj[i].children; |
| 148 | 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 | 168 | var tempData = {}; |
| 158 | 169 | $.get('/report/lineList',function(xlList){ |
| 159 | 170 | var data = []; |
| 160 | -// data.push({id: " ", text: "全部线路"}); | |
| 171 | + data.push({id: " ", text: "全部线路"}); | |
| 161 | 172 | $.get('/user/companyData', function(result){ |
| 162 | 173 | for(var i = 0; i < result.length; i++){ |
| 163 | 174 | var companyCode = result[i].companyCode; |
| ... | ... | @@ -213,7 +224,14 @@ |
| 213 | 224 | date = $("#date").val(); |
| 214 | 225 | date2 =$("#date2").val(); |
| 215 | 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 | 235 | zt=$("#zt").val(); |
| 218 | 236 | xlName = $("#select2-line-container").html(); |
| 219 | 237 | if(xlName == "全部线路") |
| ... | ... | @@ -287,7 +305,7 @@ |
| 287 | 305 | <tr> |
| 288 | 306 | <td>序号</td> |
| 289 | 307 | <td>日期</td> |
| 290 | - <td>所属公司</td> | |
| 308 | + <td>线队</td> | |
| 291 | 309 | <td>线路</td> |
| 292 | 310 | <td>车号</td> |
| 293 | 311 | {{if zt=='js'}} | ... | ... |
src/main/resources/static/pages/forms/calc/calcDetailMonthly.html
| ... | ... | @@ -66,8 +66,8 @@ |
| 66 | 66 | <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select> |
| 67 | 67 | </div> |
| 68 | 68 | <div style="display: inline-block; margin-left: 13px;" id="fgsdmDiv_daily"> |
| 69 | - <span class="item-label" style="width: 80px;"> 分公司: </span> | |
| 70 | - <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;"></select> | |
| 69 | + <span class="item-label" style="width: 80px;"> 线队: </span> | |
| 70 | + <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;" multiple="multiple"></select> | |
| 71 | 71 | </div> |
| 72 | 72 | <!--<div style="display: inline-block;margin-left: 33px;"> |
| 73 | 73 | <span class="item-label" style="width: 80px;">  线路: </span> |
| ... | ... | @@ -208,20 +208,30 @@ |
| 208 | 208 | function updateCompany(){ |
| 209 | 209 | var company = $('#gsdm').val(); |
| 210 | 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 | 272 | var lineName = ''; |
| 263 | 273 | $("#query").on("click",function(){ |
| 264 | 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 | 283 | var startDate = $("#startDate").val(); |
| 267 | 284 | var endDate = $("#endDate").val(); |
| 268 | 285 | var statisticalObj = $("#statisticalObj").val(); |
| ... | ... | @@ -281,11 +298,11 @@ |
| 281 | 298 | datas.statisticalObj = $("#statisticalObj").val(); |
| 282 | 299 | datas.itemDetails = $("#itemDetails").val(); |
| 283 | 300 | var itemDetails = datas.itemDetails, |
| 284 | - type = "加注量[全部]"; | |
| 301 | + type = "加注量(全部)"; | |
| 285 | 302 | if(itemDetails=="jzl0"){ |
| 286 | - type = "加注量[0#]" | |
| 303 | + type = "加注量(0)" | |
| 287 | 304 | } else if(itemDetails=="jzl-10"){ |
| 288 | - type = "加注量[-10#]" | |
| 305 | + type = "加注量(-10)" | |
| 289 | 306 | } else if(itemDetails=="yhl"){ |
| 290 | 307 | type = "油耗量" |
| 291 | 308 | } else if(itemDetails=="cccy"){ | ... | ... |
src/main/resources/static/pages/forms/calc/calcDetailYear.html
| ... | ... | @@ -66,8 +66,8 @@ |
| 66 | 66 | <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select> |
| 67 | 67 | </div> |
| 68 | 68 | <div style="display: inline-block; margin-left: 13px;" id="fgsdmDiv_daily"> |
| 69 | - <span class="item-label" style="width: 80px;"> 分公司: </span> | |
| 70 | - <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;"></select> | |
| 69 | + <span class="item-label" style="width: 80px;"> 线队: </span> | |
| 70 | + <select class="form-control" name="fgsdm" id="fgsdm" style="width: 150px;" multiple="multiple"></select> | |
| 71 | 71 | </div> |
| 72 | 72 | <!--<div style="display: inline-block;margin-left: 33px;"> |
| 73 | 73 | <span class="item-label" style="width: 80px;">  线路: </span> |
| ... | ... | @@ -205,20 +205,30 @@ |
| 205 | 205 | function updateCompany(){ |
| 206 | 206 | var company = $('#gsdm').val(); |
| 207 | 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 | 270 | var lineName = ''; |
| 261 | 271 | $("#query").on("click",function(){ |
| 262 | 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 | 281 | var startDate = $("#startDate").val(); |
| 265 | 282 | var endDate = $("#endDate").val(); |
| 266 | 283 | var statisticalObj = $("#statisticalObj").val(); |
| ... | ... | @@ -281,11 +298,11 @@ |
| 281 | 298 | datas.item = item; |
| 282 | 299 | |
| 283 | 300 | var itemDetails = datas.itemDetails, |
| 284 | - type = "加注量[全部]"; | |
| 301 | + type = "加注量(全部)"; | |
| 285 | 302 | if(itemDetails=="jzl0"){ |
| 286 | - type = "加注量[0#]" | |
| 303 | + type = "加注量(0)" | |
| 287 | 304 | } else if(itemDetails=="jzl-10"){ |
| 288 | - type = "加注量[-10#]" | |
| 305 | + type = "加注量(-10)" | |
| 289 | 306 | } else if(itemDetails=="yhl"){ |
| 290 | 307 | type = "油耗量" |
| 291 | 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 | 32 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> |
| 33 | 33 | </div> |
| 34 | 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 | 37 | </div> |
| 38 | 38 | <div style="display: inline-block; margin-left: 20px;"> |
| 39 | 39 | <span class="item-label" style="width: 80px;">选择线路: </span> |
| ... | ... | @@ -186,16 +186,27 @@ |
| 186 | 186 | $("#company").on("change",updateCompany); |
| 187 | 187 | function updateCompany(){ |
| 188 | 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 | 200 | for(var i = 0; i < obj.length; i++){ |
| 191 | 201 | if(obj[i].companyCode == company){ |
| 192 | 202 | var children = obj[i].children; |
| 193 | 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 | 212 | var tempData = {}; |
| ... | ... | @@ -242,7 +253,7 @@ |
| 242 | 253 | var sfqr = 0; |
| 243 | 254 | var sfyy = 1; |
| 244 | 255 | var company = $("#company").val(); |
| 245 | - var subCompany = $("#subCompany").val(); | |
| 256 | + var subCompany = ""; | |
| 246 | 257 | var lines; |
| 247 | 258 | var line = $("#line").val(); |
| 248 | 259 | var startDate = $("#startDate").val(); |
| ... | ... | @@ -264,7 +275,14 @@ |
| 264 | 275 | endDate = $("#endDate").val(); |
| 265 | 276 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 266 | 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 | 286 | params['sfqr'] = sfqr; |
| 269 | 287 | params['line'] = line; |
| 270 | 288 | params['sfyy'] = sfyy; |
| ... | ... | @@ -399,7 +417,7 @@ |
| 399 | 417 | <th class="hidden"></th> |
| 400 | 418 | <th rowspan="2" width="120px">日期</th> |
| 401 | 419 | <th rowspan="2">公司</th> |
| 402 | - <th rowspan="2">分公司</th> | |
| 420 | + <th rowspan="2">线队</th> | |
| 403 | 421 | <th rowspan="2">线路</th> |
| 404 | 422 | <th rowspan="2">实际营运班次</th> |
| 405 | 423 | <th colspan="3" align="center">待发调整数</th> | ... | ... |
src/main/resources/static/pages/forms/statement/firstAndLastBus_delay.html
| ... | ... | @@ -33,8 +33,8 @@ |
| 33 | 33 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> |
| 34 | 34 | </div> |
| 35 | 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 | 38 | </div> |
| 39 | 39 | <div style="display: inline-block;margin-left: 33px;"> |
| 40 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -70,7 +70,7 @@ |
| 70 | 70 | <tr class="hidden"> |
| 71 | 71 | <th align="center">序号</th> |
| 72 | 72 | <th>日期</th> |
| 73 | - <th>分公司</th> | |
| 73 | + <th>线队</th> | |
| 74 | 74 | <th>线路</th> |
| 75 | 75 | <th>首末班次</th> |
| 76 | 76 | <th>计发</th> |
| ... | ... | @@ -143,16 +143,27 @@ |
| 143 | 143 | $("#company").on("change",updateCompany); |
| 144 | 144 | function updateCompany(){ |
| 145 | 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 | 157 | for(var i = 0; i < obj.length; i++){ |
| 148 | 158 | if(obj[i].companyCode == company){ |
| 149 | 159 | var children = obj[i].children; |
| 150 | 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 | 169 | var tempData = {}; |
| ... | ... | @@ -214,10 +225,17 @@ |
| 214 | 225 | var params = {}; |
| 215 | 226 | sfyy = $("#sfyy").val(); |
| 216 | 227 | line = $("#line").val(); |
| 217 | - company = $("#company").val(); | |
| 218 | - subCompany = $("#subCompany").val(); | |
| 219 | 228 | startDate = $("#startDate").val(); |
| 220 | 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 | 239 | lineName = $('#line option:selected').text(); |
| 222 | 240 | if(lineName == "全部线路") |
| 223 | 241 | lineName = $('#subCompany option:selected').text(); |
| ... | ... | @@ -257,13 +275,6 @@ |
| 257 | 275 | $("#export").on("click",function(){ |
| 258 | 276 | var i = layer.load(2); |
| 259 | 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 | 278 | params['sfyy'] = sfyy; |
| 268 | 279 | params['line'] = line; |
| 269 | 280 | params['company'] = company; | ... | ... |
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
| ... | ... | @@ -33,8 +33,8 @@ |
| 33 | 33 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> |
| 34 | 34 | </div> |
| 35 | 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 | 38 | </div> |
| 39 | 39 | <div style="display: inline-block;margin-left: 33px;"> |
| 40 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -71,7 +71,7 @@ |
| 71 | 71 | <tr class="hidden"> |
| 72 | 72 | <th width="240px">日期</th> |
| 73 | 73 | <th>公司</th> |
| 74 | - <th>分公司</th> | |
| 74 | + <th>线队</th> | |
| 75 | 75 | <th>线路</th> |
| 76 | 76 | <th>计划首末班次数</th> |
| 77 | 77 | <th>实际准点首末班次数</th> |
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | <tr class="hidden"> |
| 126 | 126 | <th align="center">序号</th> |
| 127 | 127 | <th>日期</th> |
| 128 | - <th>分公司</th> | |
| 128 | + <th>线队</th> | |
| 129 | 129 | <th>线路</th> |
| 130 | 130 | <th>首末班次</th> |
| 131 | 131 | <th>计发</th> |
| ... | ... | @@ -198,16 +198,27 @@ |
| 198 | 198 | $("#company").on("change",updateCompany); |
| 199 | 199 | function updateCompany(){ |
| 200 | 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 | 212 | for(var i = 0; i < obj.length; i++){ |
| 203 | 213 | if(obj[i].companyCode == company){ |
| 204 | 214 | var children = obj[i].children; |
| 205 | 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 | 224 | var tempData = {}; |
| ... | ... | @@ -289,7 +300,7 @@ |
| 289 | 300 | var sfyy = 1; |
| 290 | 301 | var line = $("#line").val(); |
| 291 | 302 | var company = $("#company").val(); |
| 292 | - var subCompany = $("#subCompany").val(); | |
| 303 | + var subCompany = ""; | |
| 293 | 304 | var startDate = $("#startDate").val(); |
| 294 | 305 | var endDate = $("#endDate").val(); |
| 295 | 306 | var lineName = $('#line option:selected').text(); |
| ... | ... | @@ -305,8 +316,6 @@ |
| 305 | 316 | var params = {}; |
| 306 | 317 | sfyy = $("#sfyy").val(); |
| 307 | 318 | line = $("#line").val(); |
| 308 | - company = $("#company").val(); | |
| 309 | - subCompany = $("#subCompany").val(); | |
| 310 | 319 | startDate = $("#startDate").val(); |
| 311 | 320 | endDate = $("#endDate").val(); |
| 312 | 321 | lineName = $('#line option:selected').text(); |
| ... | ... | @@ -314,6 +323,15 @@ |
| 314 | 323 | lineName = $('#subCompany option:selected').text(); |
| 315 | 324 | if(line == " ") |
| 316 | 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 | 335 | params['sfyy'] = sfyy; |
| 318 | 336 | params['line'] = line; |
| 319 | 337 | params['company'] = company; |
| ... | ... | @@ -548,7 +566,7 @@ |
| 548 | 566 | <td>{{obj.firstOrLast}}</td> |
| 549 | 567 | <td>{{obj.jhfc}}</td> |
| 550 | 568 | <td>{{obj.sjfc}}</td> |
| 551 | - <td> {{obj.delay}}</td> | |
| 569 | + <td>{{obj.delay}}</td> | |
| 552 | 570 | <td>{{obj.remarks1}}</td> |
| 553 | 571 | </tr> |
| 554 | 572 | {{/each}} | ... | ... |
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
| ... | ... | @@ -51,8 +51,8 @@ |
| 51 | 51 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> |
| 52 | 52 | </div> |
| 53 | 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 | 56 | </div> |
| 57 | 57 | <div style="display: inline-block; margin-left: 10px;"> |
| 58 | 58 | <span class="item-label" style="width: 80px;">选择线路: </span> |
| ... | ... | @@ -195,18 +195,29 @@ |
| 195 | 195 | function updateCompany(){ |
| 196 | 196 | var company = $('#company').val(); |
| 197 | 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 | 211 | for(var i = 0; i < obj.length; i++){ |
| 202 | 212 | if(obj[i].companyCode == company){ |
| 203 | 213 | var children = obj[i].children; |
| 204 | 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 | 223 | var tempData = {}; |
| ... | ... | @@ -282,9 +293,9 @@ |
| 282 | 293 | var endDate = $("#endDate").val(); |
| 283 | 294 | var model = $("#model").val(); |
| 284 | 295 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 285 | - var company = $("#company").val(); | |
| 286 | - var subCompany = $("#subCompany").val(); | |
| 287 | 296 | var lineName = $('#line option:selected').text(); |
| 297 | + var company = $("#company").val(); | |
| 298 | + var subCompany = ""; | |
| 288 | 299 | function jsDoQuery(pagination){ |
| 289 | 300 | if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){ |
| 290 | 301 | layer.msg("请选择日期"); |
| ... | ... | @@ -305,7 +316,14 @@ |
| 305 | 316 | model = $("#model").val(); |
| 306 | 317 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 307 | 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 | 327 | params['sfqr'] = sfqr; |
| 310 | 328 | params['line'] = line; |
| 311 | 329 | params['sfyy'] = sfyy; |
| ... | ... | @@ -489,7 +507,7 @@ |
| 489 | 507 | <th rowspan="3" style=" width:120px;">日期</th> |
| 490 | 508 | <th rowspan="3">时段</th> |
| 491 | 509 | <th rowspan="3">公司</th> |
| 492 | - <th rowspan="3">分公司</th> | |
| 510 | + <th rowspan="3">线队</th> | |
| 493 | 511 | <th rowspan="3">线路</th> |
| 494 | 512 | <th rowspan="2" colspan="3">总班次</th> |
| 495 | 513 | <th rowspan="2" colspan="3">总营运公里</th> | ... | ... |
src/main/resources/static/pages/forms/statement/statisticsDaily.html
| ... | ... | @@ -42,8 +42,8 @@ |
| 42 | 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 43 | 43 | </div> |
| 44 | 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 | 47 | </div> |
| 48 | 48 | <div style="display: inline-block;margin-left: 42px;"> |
| 49 | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -84,7 +84,7 @@ |
| 84 | 84 | <th colspan="46"><label id="tjrq"></label> 线路统计日报</th> |
| 85 | 85 | </tr> |
| 86 | 86 | <tr> |
| 87 | - <td rowspan="3"><span >分公司</span></td> | |
| 87 | + <td rowspan="3"><span >线队</span></td> | |
| 88 | 88 | <td rowspan="3"><span >路线名</span></td> |
| 89 | 89 | <td colspan="23">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> |
| 90 | 90 | <td colspan="15">全日营运班次</td> |
| ... | ... | @@ -219,19 +219,29 @@ |
| 219 | 219 | function updateCompany(){ |
| 220 | 220 | var company = $('#gsdm').val(); |
| 221 | 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 | 235 | for(var i = 0; i < obj.length; i++){ |
| 226 | 236 | if(obj[i].companyCode == company){ |
| 227 | 237 | var children = obj[i].children; |
| 228 | 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 | 247 | var tempData = {}; |
| ... | ... | @@ -295,9 +305,16 @@ |
| 295 | 305 | line = $("#line").val(); |
| 296 | 306 | date = $("#date").val(); |
| 297 | 307 | date2 =$("#date2").val(); |
| 298 | - gsdm =$("#gsdm").val(); | |
| 299 | - fgsdm=$("#fgsdm").val(); | |
| 300 | 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 | 318 | xlName = $("#select2-line-container").html(); |
| 302 | 319 | if(xlName == "全部线路") |
| 303 | 320 | xlName = $('#fgsdm option:selected').text(); |
| ... | ... | @@ -319,7 +336,7 @@ |
| 319 | 336 | $("#tjrq").html(date+"至"+date2); |
| 320 | 337 | var params = {}; |
| 321 | 338 | params['gsdm'] = gsdm; |
| 322 | - params['fgsdm'] =fgsdm ; | |
| 339 | + params['fgsdm'] = fgsdm; | |
| 323 | 340 | params['line'] = line; |
| 324 | 341 | params['date'] = date; |
| 325 | 342 | params['date2'] = date2; |
| ... | ... | @@ -327,7 +344,7 @@ |
| 327 | 344 | params['nature'] = nature; |
| 328 | 345 | params['type'] = "query"; |
| 329 | 346 | var i = layer.load(2); |
| 330 | - $get('/realSchedule/statisticsDailyTj',params,function(result){ | |
| 347 | + $get('/realSchedule/statisticsDailyTj',params,function(result){; | |
| 331 | 348 | |
| 332 | 349 | $.each(result, function(i, e){ |
| 333 | 350 | if(e && e.startDate && e.startDate < '2025-11-01'){ | ... | ... |
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
| ... | ... | @@ -42,8 +42,8 @@ |
| 42 | 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 43 | 43 | </div> |
| 44 | 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 | 47 | </div> |
| 48 | 48 | <div style="display: inline-block;margin-left: 42px;"> |
| 49 | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -84,7 +84,7 @@ |
| 84 | 84 | <th colspan="46"><label id="tjrq"></label> 线路统计日报</th> |
| 85 | 85 | </tr> |
| 86 | 86 | <tr> |
| 87 | - <td rowspan="3"><span >分公司</span></td> | |
| 87 | + <td rowspan="3"><span >线队</span></td> | |
| 88 | 88 | <td rowspan="3"><span >路线名</span></td> |
| 89 | 89 | <td colspan="23">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> |
| 90 | 90 | <td colspan="15">全日营运班次</td> |
| ... | ... | @@ -217,19 +217,29 @@ |
| 217 | 217 | function updateCompany(){ |
| 218 | 218 | var company = $('#gsdm').val(); |
| 219 | 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 | 233 | for(var i = 0; i < obj.length; i++){ |
| 224 | 234 | if(obj[i].companyCode == company){ |
| 225 | 235 | var children = obj[i].children; |
| 226 | 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 | 245 | var tempData = {}; |
| ... | ... | @@ -290,9 +300,16 @@ |
| 290 | 300 | line = $("#line").val(); |
| 291 | 301 | date = $("#date").val(); |
| 292 | 302 | date2 =$("#date2").val(); |
| 293 | - gsdm =$("#gsdm").val(); | |
| 294 | - fgsdm=$("#fgsdm").val(); | |
| 295 | 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 | 313 | xlName = $("#select2-line-container").html(); |
| 297 | 314 | if(xlName == "全部线路") |
| 298 | 315 | xlName = $('#fgsdm option:selected').text(); | ... | ... |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| ... | ... | @@ -41,8 +41,8 @@ |
| 41 | 41 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> |
| 42 | 42 | </div> |
| 43 | 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 | 46 | </div> |
| 47 | 47 | <div style="display: inline-block; margin-left: 10px;"> |
| 48 | 48 | <span class="item-label" style="width: 80px;">选择线路: </span> |
| ... | ... | @@ -106,7 +106,7 @@ |
| 106 | 106 | <span class="item-label" style="width: 80px;" id="date0"></span> |
| 107 | 107 | <span class="item-label" style="width: 80px;margin-left: 60px;">公司: </span> |
| 108 | 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 | 110 | <span class="item-label" style="width: 80px;" id="subCompany0"></span> |
| 111 | 111 | <span class="item-label" style="width: 80px;margin-left: 60px;">线路: </span> |
| 112 | 112 | <span class="item-label" style="width: 80px;" id="line0"></span> |
| ... | ... | @@ -194,16 +194,27 @@ |
| 194 | 194 | $("#company").on("change",updateCompany); |
| 195 | 195 | function updateCompany(){ |
| 196 | 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 | 208 | for(var i = 0; i < obj.length; i++){ |
| 199 | 209 | if(obj[i].companyCode == company){ |
| 200 | 210 | var children = obj[i].children; |
| 201 | 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 | 220 | var tempData = {}; |
| ... | ... | @@ -265,10 +276,10 @@ |
| 265 | 276 | var times1 = $("#times1").val(); |
| 266 | 277 | var times2 = $("#times2").val(); |
| 267 | 278 | var model = $("#model").val(); |
| 268 | - var company = $("#company").val(); | |
| 269 | - var subCompany = $("#subCompany").val(); | |
| 270 | 279 | var lp = $("#lp").val(); |
| 271 | 280 | var lineName = $('#line option:selected').text(); |
| 281 | + var company = $("#company").val(); | |
| 282 | + var subCompany = ""; | |
| 272 | 283 | function jsDoQuery(pagination){ |
| 273 | 284 | if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){ |
| 274 | 285 | layer.msg("请选择日期"); |
| ... | ... | @@ -286,12 +297,19 @@ |
| 286 | 297 | times1 = $("#times1").val(); |
| 287 | 298 | times2 = $("#times2").val(); |
| 288 | 299 | model = $("#model").val(); |
| 289 | - company = $("#company").val(); | |
| 290 | - subCompany = $("#subCompany").val(); | |
| 291 | 300 | lp = $("#lp").val(); |
| 292 | 301 | lineName = $('#line option:selected').text(); |
| 293 | 302 | if(lineName == "全部线路") |
| 294 | 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 | 313 | params['lp'] = lp; |
| 296 | 314 | params['sfyy'] = sfyy; |
| 297 | 315 | params['line'] = line; |
| ... | ... | @@ -545,7 +563,7 @@ |
| 545 | 563 | <tr> |
| 546 | 564 | <th width='80px'>日期</th> |
| 547 | 565 | <th style='text-align:center;'>公司</th> |
| 548 | - <th style='text-align:center;'>分公司</th> | |
| 566 | + <th style='text-align:center;'>线队</th> | |
| 549 | 567 | <th style='text-align:center;'>线路</th> |
| 550 | 568 | {{if list.statu == 0}}<th style='text-align:center;'>路牌数量</th>{{/if}} |
| 551 | 569 | {{if list.statu == 1}}<th style='text-align:center;'>路牌名</th>{{/if}} |
| ... | ... | @@ -603,7 +621,7 @@ |
| 603 | 621 | <tr> |
| 604 | 622 | <th width='80px'>日期</th> |
| 605 | 623 | <th style='text-align:center;'>公司</th> |
| 606 | - <th style='text-align:center;'>分公司</th> | |
| 624 | + <th style='text-align:center;'>线队</th> | |
| 607 | 625 | <th style='text-align:center;'>线路</th> |
| 608 | 626 | <th style='text-align:center;'>路牌名</th> |
| 609 | 627 | <th>计划营运时间(小时)</th> | ... | ... |
src/main/resources/static/pages/forms/statement/workDaily.html
| ... | ... | @@ -33,8 +33,8 @@ |
| 33 | 33 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> |
| 34 | 34 | </div> |
| 35 | 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 | 38 | </div> |
| 39 | 39 | <div style="display: inline-block; margin-left: 10px;"> |
| 40 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -66,7 +66,7 @@ |
| 66 | 66 | <tr class="hidden"> |
| 67 | 67 | <th width="80px">日期</th> |
| 68 | 68 | <th>公司</th> |
| 69 | - <th>分公司</th> | |
| 69 | + <th>线队</th> | |
| 70 | 70 | <th>线路</th> |
| 71 | 71 | <th>计划班次</th> |
| 72 | 72 | <th>待发调整</th> |
| ... | ... | @@ -149,16 +149,27 @@ |
| 149 | 149 | $("#company").on("change",updateCompany); |
| 150 | 150 | function updateCompany(){ |
| 151 | 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 | 163 | for(var i = 0; i < obj.length; i++){ |
| 154 | 164 | if(obj[i].companyCode == company){ |
| 155 | 165 | var children = obj[i].children; |
| 156 | 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 | 175 | var tempData = {}; |
| ... | ... | @@ -207,7 +218,7 @@ |
| 207 | 218 | var line = $("#line").val(); |
| 208 | 219 | var date = $("#date").val(); |
| 209 | 220 | var company = $("#company").val(); |
| 210 | - var subCompany = $("#subCompany").val(); | |
| 221 | + var subCompany = ""; | |
| 211 | 222 | var lineName = $('#line option:selected').text(); |
| 212 | 223 | function jsDoQuery(pagination){ |
| 213 | 224 | if($("#date").val() == null || $("#date").val().trim().length == 0){ |
| ... | ... | @@ -219,7 +230,14 @@ |
| 219 | 230 | line = $("#line").val(); |
| 220 | 231 | date = $("#date").val(); |
| 221 | 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 | 241 | lineName = $('#line option:selected').text(); |
| 224 | 242 | if(lineName == "全部线路") |
| 225 | 243 | lineName = $('#subCompany option:selected').text(); | ... | ... |
src/main/resources/static/pages/mforms/turnoutrates/calcTurnoutrate.html
| ... | ... | @@ -42,8 +42,8 @@ |
| 42 | 42 | <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select> |
| 43 | 43 | </div> |
| 44 | 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 | 47 | </div> |
| 48 | 48 | <div style="display: inline-block; margin-left: 33px;"> |
| 49 | 49 | <span class="item-label" style="width: 80px;margin-left: 11px;">线路: </span> |
| ... | ... | @@ -84,11 +84,11 @@ |
| 84 | 84 | <tr> |
| 85 | 85 | <td rowspan="3" style=" padding-top: 20px;">日期</td> |
| 86 | 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 | 88 | <td rowspan="3" style=" padding-top: 20px;">线路条数</td> |
| 89 | 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 | 92 | <td rowspan="3" style=" padding-top: 20px;">班次执行率</td> |
| 93 | 93 | <td rowspan="3" style=" padding-top: 20px;">说明</td> |
| 94 | 94 | </tr> |
| ... | ... | @@ -171,19 +171,30 @@ |
| 171 | 171 | $("#gsdmTurn").on("change",updateCompany); |
| 172 | 172 | function updateCompany(){ |
| 173 | 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 | 188 | for(var i = 0; i < obj.length; i++){ |
| 179 | 189 | if(obj[i].companyCode == company){ |
| 180 | 190 | var children = obj[i].children; |
| 181 | 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 | 200 | var tempData = {}; |
| ... | ... | @@ -234,9 +245,16 @@ |
| 234 | 245 | line = $("#line").val(); |
| 235 | 246 | startDate=$("#startDate").val(); |
| 236 | 247 | endDate=$("#endDate").val(); |
| 237 | - gsdmTurn=$("#gsdmTurn").val(); | |
| 238 | - fgsdmTurn=$("#fgsdmTurn").val(); | |
| 239 | 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 | 258 | if(startDate!=''&&endDate!=''){ |
| 241 | 259 | var i = layer.load(2); |
| 242 | 260 | $get('/calcSheet/calcTurnoutrate', |
| ... | ... | @@ -272,11 +290,18 @@ |
| 272 | 290 | |
| 273 | 291 | $("#export").on("click",function(){ |
| 274 | 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 | 305 | var lineName = $('#line option:selected').text(); |
| 281 | 306 | if(lineName == "全部线路") |
| 282 | 307 | lineName = $('#fgsdmTurn option:selected').text(); | ... | ... |
src/main/resources/static/pages/mforms/turnoutrates/calcTurnoutrateZgf.html
| ... | ... | @@ -42,8 +42,8 @@ |
| 42 | 42 | <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select> |
| 43 | 43 | </div> |
| 44 | 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 | 47 | </div> |
| 48 | 48 | <div style="display: inline-block; margin-left: 33px;"> |
| 49 | 49 | <span class="item-label" style="width: 80px;margin-left: 11px;">线路: </span> |
| ... | ... | @@ -83,7 +83,7 @@ |
| 83 | 83 | <tr> |
| 84 | 84 | <td style=" padding-top: 20px;">日期</td> |
| 85 | 85 | <td style=" padding-top: 20px;">公司</td> |
| 86 | - <td style=" padding-top: 20px;">直属公司</td> | |
| 86 | + <td style=" padding-top: 20px;">线队</td> | |
| 87 | 87 | <td style=" padding-top: 20px;">线路</td> |
| 88 | 88 | <td style=" padding-top: 20px;">计划全日</td> |
| 89 | 89 | <td style=" padding-top: 20px;">实际全日</td> |
| ... | ... | @@ -160,19 +160,30 @@ |
| 160 | 160 | $("#gsdmTurn").on("change",updateCompany); |
| 161 | 161 | function updateCompany(){ |
| 162 | 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 | 177 | for(var i = 0; i < obj.length; i++){ |
| 168 | 178 | if(obj[i].companyCode == company){ |
| 169 | 179 | var children = obj[i].children; |
| 170 | 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 | 189 | var tempData = {}; |
| ... | ... | @@ -223,9 +234,16 @@ |
| 223 | 234 | line = $("#line").val(); |
| 224 | 235 | startDate=$("#startDate").val(); |
| 225 | 236 | endDate=$("#endDate").val(); |
| 226 | - gsdmTurn=$("#gsdmTurn").val(); | |
| 227 | - fgsdmTurn=$("#fgsdmTurn").val(); | |
| 228 | 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 | 247 | if(startDate!=''&&endDate!=''){ |
| 230 | 248 | var i = layer.load(2); |
| 231 | 249 | $get('/calcSheet/calcTurnoutrateZgf', |
| ... | ... | @@ -261,11 +279,18 @@ |
| 261 | 279 | |
| 262 | 280 | $("#export").on("click",function(){ |
| 263 | 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 | 294 | var lineName = $('#line option:selected').text(); |
| 270 | 295 | if(lineName == "全部线路") |
| 271 | 296 | lineName = $('#fgsdmTurn option:selected').text(); | ... | ... |
src/main/resources/static/pages/report/countMileage/countBus/company/countBusMileage.html
| ... | ... | @@ -43,8 +43,8 @@ |
| 43 | 43 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 44 | 44 | </div> |
| 45 | 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 | 48 | </div> |
| 49 | 49 | <div style="display: inline-block;margin-left: 43px;"> |
| 50 | 50 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -140,23 +140,34 @@ |
| 140 | 140 | $("#gsdm").on("change",updateCompany); |
| 141 | 141 | function updateCompany(){ |
| 142 | 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 | 154 | for(var i = 0; i < obj.length; i++){ |
| 145 | 155 | if(obj[i].companyCode == company){ |
| 146 | 156 | var children = obj[i].children; |
| 147 | 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 | 167 | var tempData = {}; |
| 157 | 168 | $.get('/report/lineList',function(xlList){ |
| 158 | 169 | var data = []; |
| 159 | -// data.push({id: " ", text: "全部线路"}); | |
| 170 | + data.push({id: " ", text: "全部线路"}); | |
| 160 | 171 | $.get('/user/companyData', function(result){ |
| 161 | 172 | for(var i = 0; i < result.length; i++){ |
| 162 | 173 | var companyCode = result[i].companyCode; |
| ... | ... | @@ -212,7 +223,14 @@ |
| 212 | 223 | date = $("#date").val(); |
| 213 | 224 | date2 =$("#date2").val(); |
| 214 | 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 | 234 | zt=$("#zt").val(); |
| 217 | 235 | xlName = $("#select2-line-container").html(); |
| 218 | 236 | if(xlName == "全部线路") |
| ... | ... | @@ -284,7 +302,7 @@ |
| 284 | 302 | <tr> |
| 285 | 303 | <td>序号</td> |
| 286 | 304 | <td>日期</td> |
| 287 | - <td>所属公司</td> | |
| 305 | + <td>线队</td> | |
| 288 | 306 | <td>线路</td> |
| 289 | 307 | <td>车号</td> |
| 290 | 308 | {{if zt=='js'}} | ... | ... |
src/main/resources/static/pages/report/countMileage/countBus/countBusMileage.html
| ... | ... | @@ -43,8 +43,8 @@ |
| 43 | 43 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 44 | 44 | </div> |
| 45 | 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 | 48 | </div> |
| 49 | 49 | <div style="display: inline-block;margin-left: 43px;"> |
| 50 | 50 | <span class="item-label" style="width: 80px;">线路: </span> |
| ... | ... | @@ -140,23 +140,34 @@ |
| 140 | 140 | $("#gsdm").on("change",updateCompany); |
| 141 | 141 | function updateCompany(){ |
| 142 | 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 | 154 | for(var i = 0; i < obj.length; i++){ |
| 145 | 155 | if(obj[i].companyCode == company){ |
| 146 | 156 | var children = obj[i].children; |
| 147 | 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 | 167 | var tempData = {}; |
| 157 | 168 | $.get('/report/lineList',function(xlList){ |
| 158 | 169 | var data = []; |
| 159 | -// data.push({id: " ", text: "全部线路"}); | |
| 170 | + data.push({id: " ", text: "全部线路"}); | |
| 160 | 171 | $.get('/user/companyData', function(result){ |
| 161 | 172 | for(var i = 0; i < result.length; i++){ |
| 162 | 173 | var companyCode = result[i].companyCode; |
| ... | ... | @@ -212,7 +223,14 @@ |
| 212 | 223 | date = $("#date").val(); |
| 213 | 224 | date2 =$("#date2").val(); |
| 214 | 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 | 234 | zt=$("#zt").val(); |
| 217 | 235 | xlName = $("#select2-line-container").html(); |
| 218 | 236 | if(xlName == "全部线路") |
| ... | ... | @@ -286,7 +304,7 @@ |
| 286 | 304 | <tr> |
| 287 | 305 | <td>序号</td> |
| 288 | 306 | <td>日期</td> |
| 289 | - <td>所属公司</td> | |
| 307 | + <td>线队</td> | |
| 290 | 308 | <td>线路</td> |
| 291 | 309 | <td>车号</td> |
| 292 | 310 | {{if zt=='js'}} | ... | ... |
src/main/resources/static/pages/report/sheet/calcSheetList.html
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | id="fgsdmDiv"> |
| 37 | 37 | <span class="item-label" style="width: 80px;">分公司: </span> <select |
| 38 | 38 | class="form-control" name="subCompany" id="fgsdm" |
| 39 | - style="width: 180px;"></select> | |
| 39 | + style="width: 180px;" multiple="multiple"></select> | |
| 40 | 40 | </div> |
| 41 | 41 | |
| 42 | 42 | <div style="display: inline-block; margin-left: 43px;"> |
| ... | ... | @@ -195,19 +195,30 @@ |
| 195 | 195 | $("#gsdm").on("change",updateCompany); |
| 196 | 196 | function updateCompany(){ |
| 197 | 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 | 212 | for(var i = 0; i < obj.length; i++){ |
| 203 | 213 | if(obj[i].companyCode == company){ |
| 204 | 214 | var children = obj[i].children; |
| 205 | 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 | 224 | var tempData = {}; |
| ... | ... | @@ -255,10 +266,17 @@ |
| 255 | 266 | var line = $("#line").val(); |
| 256 | 267 | var date = $("#date").val(); |
| 257 | 268 | var endDate = $("#endDate").val(); |
| 258 | - var fgs=$('#fgsdm').val(); | |
| 259 | - var gs=$('#gsdm').val(); | |
| 260 | 269 | var nature=$("#nature").val(); |
| 261 | 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 | 280 | var i = layer.load(2); |
| 263 | 281 | $get('/calcSheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,plate:plate,type:'query'},function(result){ |
| 264 | 282 | layer.close(i); |
| ... | ... | @@ -328,17 +346,24 @@ |
| 328 | 346 | var line = $("#line").val(); |
| 329 | 347 | var date = $("#date").val(); |
| 330 | 348 | var endDate = $("#endDate").val(); |
| 331 | - var fgs=$('#fgsdm').val(); | |
| 332 | - var gs=$('#gsdm').val(); | |
| 333 | 349 | var nature=$("#nature").val(); |
| 334 | 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 | 360 | var lineName = $('#line option:selected').text(); |
| 336 | 361 | if(lineName == "全部线路") |
| 337 | 362 | lineName = $('#fgsdm option:selected').text(); |
| 338 | 363 | if(lineName == "请选择") |
| 339 | 364 | lineName =$('#gsdm option:selected').text(); |
| 340 | 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 | 367 | var dateTime = ""; |
| 343 | 368 | if(date == endDate){ |
| 344 | 369 | dateTime = moment(date).format("YYYYMMDD"); |
| ... | ... | @@ -443,7 +468,7 @@ |
| 443 | 468 | <td>{{obj.szfczdl}}</td> |
| 444 | 469 | <td> |
| 445 | 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 | 472 | </td> |
| 448 | 473 | <td>{{obj.sjszddzds}}</td> |
| 449 | 474 | <td>{{obj.szddzdl}}</td> | ... | ... |