Commit 8cbd28e97f7535944eb3372cd22d4b8223e78ae3
1 parent
3d433fce
统计日报,营运线路出车率,班次准点率报表修改
Showing
30 changed files
with
2636 additions
and
189 deletions
src/main/java/com/bsth/controller/calc/CalcWaybillController.java
| @@ -147,7 +147,11 @@ public class CalcWaybillController extends BaseController<CalcWaybill, Integer> | @@ -147,7 +147,11 @@ public class CalcWaybillController extends BaseController<CalcWaybill, Integer> | ||
| 147 | if(map.get("type")!=null){ | 147 | if(map.get("type")!=null){ |
| 148 | type=map.get("type").toString().trim(); | 148 | type=map.get("type").toString().trim(); |
| 149 | } | 149 | } |
| 150 | - return calcWaybillService.calcStatisticsDaily(gsdm,fgsdm,line,date,date2,xlName,type); | 150 | + String nature="0"; |
| 151 | + if(map.get("nature")!=null){ | ||
| 152 | + nature=map.get("nature").toString(); | ||
| 153 | + } | ||
| 154 | + return calcWaybillService.calcStatisticsDaily(gsdm,fgsdm,line,date,date2,xlName,type,nature); | ||
| 151 | } | 155 | } |
| 152 | 156 | ||
| 153 | @RequestMapping(value="/calcStatisticsDaily2") | 157 | @RequestMapping(value="/calcStatisticsDaily2") |
| @@ -180,7 +184,11 @@ public class CalcWaybillController extends BaseController<CalcWaybill, Integer> | @@ -180,7 +184,11 @@ public class CalcWaybillController extends BaseController<CalcWaybill, Integer> | ||
| 180 | if(map.get("type")!=null){ | 184 | if(map.get("type")!=null){ |
| 181 | type=map.get("type").toString().trim(); | 185 | type=map.get("type").toString().trim(); |
| 182 | } | 186 | } |
| 183 | - return calcWaybillService.calcStatisticsDaily2(gsdm,fgsdm,line,date,date2,xlName,type); | 187 | + String nature="0"; |
| 188 | + if(map.get("nature")!=null){ | ||
| 189 | + nature=map.get("nature").toString(); | ||
| 190 | + } | ||
| 191 | + return calcWaybillService.calcStatisticsDaily2(gsdm,fgsdm,line,date,date2,xlName,type,nature); | ||
| 184 | } | 192 | } |
| 185 | 193 | ||
| 186 | @RequestMapping(value="/generateLineMileage") | 194 | @RequestMapping(value="/generateLineMileage") |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -417,7 +417,11 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -417,7 +417,11 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 417 | if(map.get("type")!=null){ | 417 | if(map.get("type")!=null){ |
| 418 | type=map.get("type").toString(); | 418 | type=map.get("type").toString(); |
| 419 | } | 419 | } |
| 420 | - return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type); | 420 | + String nature="0"; |
| 421 | + if(map.get("nature")!=null){ | ||
| 422 | + nature=map.get("nature").toString(); | ||
| 423 | + } | ||
| 424 | + return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature); | ||
| 421 | } | 425 | } |
| 422 | 426 | ||
| 423 | /* | 427 | /* |
src/main/java/com/bsth/controller/report/CalcSheetController.java
0 → 100644
| 1 | +package com.bsth.controller.report; | ||
| 2 | +import java.util.List; | ||
| 3 | +import java.util.Map; | ||
| 4 | + | ||
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 7 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 8 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 9 | +import org.springframework.web.bind.annotation.RestController; | ||
| 10 | +import com.bsth.controller.BaseController; | ||
| 11 | +import com.bsth.entity.sheet.CalcSheet; | ||
| 12 | +import com.bsth.entity.sheet.Sheet; | ||
| 13 | +import com.bsth.service.report.CalcSheetService; | ||
| 14 | + | ||
| 15 | +@RestController | ||
| 16 | +@RequestMapping("calcSheet") | ||
| 17 | +public class CalcSheetController extends BaseController<CalcSheet, Integer>{ | ||
| 18 | + @Autowired | ||
| 19 | + CalcSheetService calcSheetService; | ||
| 20 | + //发车到站准点率统计 | ||
| 21 | + @RequestMapping(value = "/countList",method = RequestMethod.GET) | ||
| 22 | + public List<CalcSheet> countList(@RequestParam Map<String, Object> map){ | ||
| 23 | + List<CalcSheet> list=calcSheetService.countListCalcSheet(map); | ||
| 24 | + return list; | ||
| 25 | + } | ||
| 26 | + //发车到站准点率列表 | ||
| 27 | + @RequestMapping(value = "/calcListSheet",method = RequestMethod.GET) | ||
| 28 | + public List<CalcSheet> calcListSheet(@RequestParam Map<String, Object> map){ | ||
| 29 | + List<CalcSheet> list=calcSheetService.calcListSheet(map); | ||
| 30 | + return list; | ||
| 31 | + } | ||
| 32 | + //发车站点准点率详细 | ||
| 33 | + @RequestMapping(value = "/calcSheet",method = RequestMethod.GET) | ||
| 34 | + public List<Sheet> calcSheet(@RequestParam Map<String, Object> map){ | ||
| 35 | + List<Sheet> list=calcSheetService.calcSheet(map); | ||
| 36 | + return list; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + //营运线路出车率统计 | ||
| 40 | + @RequestMapping(value = "/calcTurnoutrate",method = RequestMethod.GET) | ||
| 41 | + public List<Map<String, Object>> calcTurnoutrate(@RequestParam Map<String, Object> map){ | ||
| 42 | + List<Map<String, Object>> list=calcSheetService.calcTurnoutrate(map); | ||
| 43 | + return list; | ||
| 44 | + } | ||
| 45 | +} |
src/main/java/com/bsth/entity/calc/CalcStatistics.java
| @@ -6,6 +6,7 @@ import javax.persistence.Entity; | @@ -6,6 +6,7 @@ import javax.persistence.Entity; | ||
| 6 | import javax.persistence.GeneratedValue; | 6 | import javax.persistence.GeneratedValue; |
| 7 | import javax.persistence.Id; | 7 | import javax.persistence.Id; |
| 8 | import javax.persistence.Table; | 8 | import javax.persistence.Table; |
| 9 | +import javax.persistence.Transient; | ||
| 9 | 10 | ||
| 10 | @Entity | 11 | @Entity |
| 11 | @Table(name = "calc_statistics") | 12 | @Table(name = "calc_statistics") |
| @@ -106,8 +107,9 @@ public class CalcStatistics { | @@ -106,8 +107,9 @@ public class CalcStatistics { | ||
| 106 | private int djgsj; | 107 | private int djgsj; |
| 107 | /* 备注*/ | 108 | /* 备注*/ |
| 108 | private String remark; | 109 | private String remark; |
| 109 | - | ||
| 110 | - | 110 | + /*分公司名字*/ |
| 111 | + @Transient | ||
| 112 | + private String fgsName; | ||
| 111 | public Long getId() { | 113 | public Long getId() { |
| 112 | return id; | 114 | return id; |
| 113 | } | 115 | } |
| @@ -390,5 +392,11 @@ public class CalcStatistics { | @@ -390,5 +392,11 @@ public class CalcStatistics { | ||
| 390 | public void setRemark(String remark) { | 392 | public void setRemark(String remark) { |
| 391 | this.remark = remark; | 393 | this.remark = remark; |
| 392 | } | 394 | } |
| 395 | + public String getFgsName() { | ||
| 396 | + return fgsName; | ||
| 397 | + } | ||
| 398 | + public void setFgsName(String fgsName) { | ||
| 399 | + this.fgsName = fgsName; | ||
| 400 | + } | ||
| 393 | 401 | ||
| 394 | } | 402 | } |
src/main/java/com/bsth/entity/sheet/CalcSheet.java
0 → 100644
| 1 | +package com.bsth.entity.sheet; | ||
| 2 | + | ||
| 3 | +import javax.persistence.Entity; | ||
| 4 | +import javax.persistence.GeneratedValue; | ||
| 5 | +import javax.persistence.Id; | ||
| 6 | +import javax.persistence.Table; | ||
| 7 | +import javax.persistence.Transient; | ||
| 8 | + | ||
| 9 | +import com.bsth.data.BasicData; | ||
| 10 | + | ||
| 11 | +@Entity | ||
| 12 | +@Table(name = "bsth_c_calc_sheet") | ||
| 13 | +public class CalcSheet { | ||
| 14 | + /* 主键*/ | ||
| 15 | + @Id | ||
| 16 | + @GeneratedValue | ||
| 17 | + private Integer id; | ||
| 18 | + /* 公司代码*/ | ||
| 19 | + private String gsdm; | ||
| 20 | + /* 分公司代码*/ | ||
| 21 | + private String fgsdm; | ||
| 22 | + /* 日期字符串*/ | ||
| 23 | + private String date; | ||
| 24 | + /* 线路编码*/ | ||
| 25 | + private String xl; | ||
| 26 | + /* 线路名称*/ | ||
| 27 | + private String xlName; | ||
| 28 | + /*计划首站发车数*/ | ||
| 29 | + private String jhszfcs; | ||
| 30 | + /*实际首站发车正点数*/ | ||
| 31 | + private String sjszfczds; | ||
| 32 | + /*首站发车正点率*/ | ||
| 33 | + private String szfczdl; | ||
| 34 | + /*首站发车到达正点数*/ | ||
| 35 | + private String sjszddzds; | ||
| 36 | + /*首站发车到达正点率*/ | ||
| 37 | + private String szddzdl; | ||
| 38 | + /*计划出车数*/ | ||
| 39 | + private String jhcc; | ||
| 40 | + /*实际出车数*/ | ||
| 41 | + private String sjcc; | ||
| 42 | + /*早高峰实际出车*/ | ||
| 43 | + private String sjcczgf; | ||
| 44 | + /*晚高峰实际出车*/ | ||
| 45 | + private String sjccwgf; | ||
| 46 | + /*计划班次数*/ | ||
| 47 | + private String jhbcs; | ||
| 48 | + /*实际班次数*/ | ||
| 49 | + private String sjbcs; | ||
| 50 | + /*临加班次数*/ | ||
| 51 | + private String ljbcs; | ||
| 52 | + /*公司名字*/ | ||
| 53 | + @Transient | ||
| 54 | + private String gsname; | ||
| 55 | + /*分公司名字*/ | ||
| 56 | + @Transient | ||
| 57 | + private String fgsname; | ||
| 58 | + public Integer getId() { | ||
| 59 | + return id; | ||
| 60 | + } | ||
| 61 | + public void setId(Integer id) { | ||
| 62 | + this.id = id; | ||
| 63 | + } | ||
| 64 | + public String getGsdm() { | ||
| 65 | + return gsdm; | ||
| 66 | + } | ||
| 67 | + public void setGsdm(String gsdm) { | ||
| 68 | + this.gsdm = gsdm; | ||
| 69 | + } | ||
| 70 | + public String getFgsdm() { | ||
| 71 | + return fgsdm; | ||
| 72 | + } | ||
| 73 | + public void setFgsdm(String fgsdm) { | ||
| 74 | + this.fgsdm = fgsdm; | ||
| 75 | + } | ||
| 76 | + public String getDate() { | ||
| 77 | + return date; | ||
| 78 | + } | ||
| 79 | + public void setDate(String date) { | ||
| 80 | + this.date = date; | ||
| 81 | + } | ||
| 82 | + public String getXl() { | ||
| 83 | + return xl; | ||
| 84 | + } | ||
| 85 | + public void setXl(String xl) { | ||
| 86 | + this.xl = xl; | ||
| 87 | + } | ||
| 88 | + public String getXlName() { | ||
| 89 | + return xlName; | ||
| 90 | + } | ||
| 91 | + public void setXlName(String xlName) { | ||
| 92 | + this.xlName = xlName; | ||
| 93 | + } | ||
| 94 | + public String getJhszfcs() { | ||
| 95 | + return jhszfcs; | ||
| 96 | + } | ||
| 97 | + public void setJhszfcs(String jhszfcs) { | ||
| 98 | + this.jhszfcs = jhszfcs; | ||
| 99 | + } | ||
| 100 | + public String getSjszfczds() { | ||
| 101 | + return sjszfczds; | ||
| 102 | + } | ||
| 103 | + public void setSjszfczds(String sjszfczds) { | ||
| 104 | + this.sjszfczds = sjszfczds; | ||
| 105 | + } | ||
| 106 | + public String getSzfczdl() { | ||
| 107 | + return szfczdl; | ||
| 108 | + } | ||
| 109 | + public void setSzfczdl(String szfczdl) { | ||
| 110 | + this.szfczdl = szfczdl; | ||
| 111 | + } | ||
| 112 | + public String getSjszddzds() { | ||
| 113 | + return sjszddzds; | ||
| 114 | + } | ||
| 115 | + public void setSjszddzds(String sjszddzds) { | ||
| 116 | + this.sjszddzds = sjszddzds; | ||
| 117 | + } | ||
| 118 | + public String getSzddzdl() { | ||
| 119 | + return szddzdl; | ||
| 120 | + } | ||
| 121 | + public void setSzddzdl(String szddzdl) { | ||
| 122 | + this.szddzdl = szddzdl; | ||
| 123 | + } | ||
| 124 | + public String getJhcc() { | ||
| 125 | + return jhcc; | ||
| 126 | + } | ||
| 127 | + public void setJhcc(String jhcc) { | ||
| 128 | + this.jhcc = jhcc; | ||
| 129 | + } | ||
| 130 | + public String getSjcc() { | ||
| 131 | + return sjcc; | ||
| 132 | + } | ||
| 133 | + public void setSjcc(String sjcc) { | ||
| 134 | + this.sjcc = sjcc; | ||
| 135 | + } | ||
| 136 | + public String getSjcczgf() { | ||
| 137 | + return sjcczgf; | ||
| 138 | + } | ||
| 139 | + public void setSjcczgf(String sjcczgf) { | ||
| 140 | + this.sjcczgf = sjcczgf; | ||
| 141 | + } | ||
| 142 | + public String getSjccwgf() { | ||
| 143 | + return sjccwgf; | ||
| 144 | + } | ||
| 145 | + public void setSjccwgf(String sjccwgf) { | ||
| 146 | + this.sjccwgf = sjccwgf; | ||
| 147 | + } | ||
| 148 | + public String getJhbcs() { | ||
| 149 | + return jhbcs; | ||
| 150 | + } | ||
| 151 | + public void setJhbcs(String jhbcs) { | ||
| 152 | + this.jhbcs = jhbcs; | ||
| 153 | + } | ||
| 154 | + public String getSjbcs() { | ||
| 155 | + return sjbcs; | ||
| 156 | + } | ||
| 157 | + public void setSjbcs(String sjbcs) { | ||
| 158 | + this.sjbcs = sjbcs; | ||
| 159 | + } | ||
| 160 | + public String getLjbcs() { | ||
| 161 | + return ljbcs; | ||
| 162 | + } | ||
| 163 | + public void setLjbcs(String ljbcs) { | ||
| 164 | + this.ljbcs = ljbcs; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + public String getGsname() { | ||
| 168 | + return BasicData.businessCodeNameMap.get(this.gsdm); | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + public void setGsname(String gsname) { | ||
| 172 | + this.gsname = gsname; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + | ||
| 176 | + public String getFgsname() { | ||
| 177 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + public void setFgsname(String fgsname) { | ||
| 181 | + this.fgsname = fgsname; | ||
| 182 | + } | ||
| 183 | +} |
src/main/java/com/bsth/repository/calc/CalcStatisticsRepository.java
| @@ -19,11 +19,11 @@ import org.springframework.stereotype.Repository; | @@ -19,11 +19,11 @@ import org.springframework.stereotype.Repository; | ||
| 19 | public interface CalcStatisticsRepository extends BaseRepository<CalcStatistics, Integer>{ | 19 | public interface CalcStatisticsRepository extends BaseRepository<CalcStatistics, Integer>{ |
| 20 | 20 | ||
| 21 | //按照时间段统计,公司下线路 | 21 | //按照时间段统计,公司下线路 |
| 22 | - @Query(value="select DISTINCT c from CalcStatistics c where c.xl like %?1% and c.dateStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% order by c.xl") | 22 | + @Query(value="select DISTINCT c from CalcStatistics c where c.xl like %?1% and c.dateStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% order by c.fgsdm,c.xl") |
| 23 | List<CalcStatistics> selectByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm); | 23 | List<CalcStatistics> selectByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm); |
| 24 | 24 | ||
| 25 | //按照时间段统计,单条线路 | 25 | //按照时间段统计,单条线路 |
| 26 | - @Query(value="select DISTINCT c from CalcStatistics c where c.xl = ?1 and c.dateStr between ?2 and ?3 order by c.xl") | 26 | + @Query(value="select DISTINCT c from CalcStatistics c where c.xl = ?1 and c.dateStr between ?2 and ?3 order by c.fgsdm,c.xl") |
| 27 | List<CalcStatistics> selectByDateAndLineTj2(String line,String date,String date2); | 27 | List<CalcStatistics> selectByDateAndLineTj2(String line,String date,String date2); |
| 28 | 28 | ||
| 29 | //按照日期和线路删除数据 | 29 | //按照日期和线路删除数据 |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -180,12 +180,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -180,12 +180,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 180 | 180 | ||
| 181 | //按照时间段统计 | 181 | //按照时间段统计 |
| 182 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) | 182 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) |
| 183 | - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr between ?2 and ?3 and gsBm = ?4 and fgsBm = ?5 order by s.xlBm") | 183 | + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr between ?2 and ?3 and gsBm = ?4 and fgsBm like %?5% order by s.fgsBm, s.xlBm") |
| 184 | List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm); | 184 | List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm); |
| 185 | 185 | ||
| 186 | //按照时间段统计 | 186 | //按照时间段统计 |
| 187 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) | 187 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) |
| 188 | - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.xlBm") | 188 | + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.fgsBm,s.xlBm") |
| 189 | List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2); | 189 | List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2); |
| 190 | //月报表 | 190 | //月报表 |
| 191 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) | 191 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) |
src/main/java/com/bsth/repository/sheet/CalcSheetRepository.java
0 → 100644
| 1 | +package com.bsth.repository.sheet; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.sheet.CalcSheet; | ||
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | + | ||
| 6 | +import org.springframework.stereotype.Repository; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * | ||
| 10 | + */ | ||
| 11 | +@Repository | ||
| 12 | +public interface CalcSheetRepository extends BaseRepository<CalcSheet, Integer>{ | ||
| 13 | + | ||
| 14 | +} |
src/main/java/com/bsth/service/LineService.java
| @@ -37,4 +37,6 @@ public interface LineService extends BaseService<Line, Integer> { | @@ -37,4 +37,6 @@ public interface LineService extends BaseService<Line, Integer> { | ||
| 37 | Map<String, Object> update(Line l); | 37 | Map<String, Object> update(Line l); |
| 38 | 38 | ||
| 39 | Map<String,Object> remove(Integer id); | 39 | Map<String,Object> remove(Integer id); |
| 40 | + | ||
| 41 | + Map<String, Boolean> lineNature(); | ||
| 40 | } | 42 | } |
src/main/java/com/bsth/service/calc/CalcWaybillService.java
| @@ -30,9 +30,9 @@ public interface CalcWaybillService extends BaseService<CalcWaybill, Integer> { | @@ -30,9 +30,9 @@ public interface CalcWaybillService extends BaseService<CalcWaybill, Integer> { | ||
| 30 | */ | 30 | */ |
| 31 | String calcDaily(String rq, String line) throws Exception; | 31 | String calcDaily(String rq, String line) throws Exception; |
| 32 | 32 | ||
| 33 | - List<CalcStatistics> calcStatisticsDaily(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type); | 33 | + List<CalcStatistics> calcStatisticsDaily(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type,String nature); |
| 34 | 34 | ||
| 35 | - List<Map<String, Object>> calcStatisticsDaily2(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type); | 35 | + List<Map<String, Object>> calcStatisticsDaily2(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type,String nature); |
| 36 | 36 | ||
| 37 | Map<String, Object> calcLineMileage(String date, String line); | 37 | Map<String, Object> calcLineMileage(String date, String line); |
| 38 | 38 |
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
| @@ -20,6 +20,7 @@ import java.util.Set; | @@ -20,6 +20,7 @@ import java.util.Set; | ||
| 20 | import javax.transaction.Transactional; | 20 | import javax.transaction.Transactional; |
| 21 | 21 | ||
| 22 | import com.bsth.common.ResponseCode; | 22 | import com.bsth.common.ResponseCode; |
| 23 | +import com.bsth.data.BasicData; | ||
| 23 | import com.bsth.entity.Line; | 24 | import com.bsth.entity.Line; |
| 24 | import com.bsth.entity.calc.CalcBusMileage; | 25 | import com.bsth.entity.calc.CalcBusMileage; |
| 25 | import com.bsth.entity.calc.CalcInterval; | 26 | import com.bsth.entity.calc.CalcInterval; |
| @@ -36,6 +37,7 @@ import com.bsth.repository.calc.CalcLineMileageRepository; | @@ -36,6 +37,7 @@ import com.bsth.repository.calc.CalcLineMileageRepository; | ||
| 36 | import com.bsth.repository.calc.CalcStatisticsRepository; | 37 | import com.bsth.repository.calc.CalcStatisticsRepository; |
| 37 | import com.bsth.repository.calc.CalcWaybillRepository; | 38 | import com.bsth.repository.calc.CalcWaybillRepository; |
| 38 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 39 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 40 | +import com.bsth.service.LineService; | ||
| 39 | import com.bsth.service.calc.CalcToolService; | 41 | import com.bsth.service.calc.CalcToolService; |
| 40 | import com.bsth.service.calc.CalcWaybillService; | 42 | import com.bsth.service.calc.CalcWaybillService; |
| 41 | import com.bsth.service.impl.BaseServiceImpl; | 43 | import com.bsth.service.impl.BaseServiceImpl; |
| @@ -91,7 +93,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -91,7 +93,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 91 | 93 | ||
| 92 | @Autowired | 94 | @Autowired |
| 93 | private LineRepository lineRepository; | 95 | private LineRepository lineRepository; |
| 94 | - | 96 | + @Autowired |
| 97 | + private LineService lineService; | ||
| 95 | @Autowired | 98 | @Autowired |
| 96 | private ReportService reportService; | 99 | private ReportService reportService; |
| 97 | 100 | ||
| @@ -733,28 +736,51 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -733,28 +736,51 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 733 | 736 | ||
| 734 | @Override | 737 | @Override |
| 735 | public List<CalcStatistics> calcStatisticsDaily(String gsdm, String fgsdm, | 738 | public List<CalcStatistics> calcStatisticsDaily(String gsdm, String fgsdm, |
| 736 | - String line, String date, String date2, String xlName, String type) { | 739 | + String line, String date, String date2, String xlName, String type,String nature) { |
| 737 | // TODO Auto-generated method stub | 740 | // TODO Auto-generated method stub |
| 738 | - List<CalcStatistics> list = new ArrayList<CalcStatistics>(); | 741 | + List<CalcStatistics> listAll = new ArrayList<CalcStatistics>(); |
| 739 | if(line.length() > 0){ | 742 | if(line.length() > 0){ |
| 740 | - list = calcStatisticsRepository.selectByDateAndLineTj2(line, date, date2); | 743 | + listAll = calcStatisticsRepository.selectByDateAndLineTj2(line, date, date2); |
| 741 | } else { | 744 | } else { |
| 742 | - list = calcStatisticsRepository.selectByDateAndLineTj(line, date, date2, gsdm, fgsdm); | 745 | + listAll = calcStatisticsRepository.selectByDateAndLineTj(line, date, date2, gsdm, fgsdm); |
| 746 | + } | ||
| 747 | + Map<String, Boolean> lineMap=lineService.lineNature(); | ||
| 748 | + List<CalcStatistics> list = new ArrayList<CalcStatistics>(); | ||
| 749 | + if(nature.equals("0")){ | ||
| 750 | + list=listAll; | ||
| 751 | + }else{ | ||
| 752 | + for (int i = 0; i < listAll.size(); i++) { | ||
| 753 | + CalcStatistics c=listAll.get(i); | ||
| 754 | + if(nature.equals("1")){ | ||
| 755 | + if(lineMap.get(c.getXl())){ | ||
| 756 | + list.add(c); | ||
| 757 | + } | ||
| 758 | + }else{ | ||
| 759 | + if(!lineMap.get(c.getXl())){ | ||
| 760 | + list.add(c); | ||
| 761 | + } | ||
| 762 | + } | ||
| 763 | + } | ||
| 743 | } | 764 | } |
| 744 | - | ||
| 745 | List<CalcStatistics> resList = new ArrayList<CalcStatistics>(); | 765 | List<CalcStatistics> resList = new ArrayList<CalcStatistics>(); |
| 746 | Map<String, List<CalcStatistics>> keyMap = new HashMap<String, List<CalcStatistics>>(); | 766 | Map<String, List<CalcStatistics>> keyMap = new HashMap<String, List<CalcStatistics>>(); |
| 747 | List<String> keyList = new ArrayList<String>(); | 767 | List<String> keyList = new ArrayList<String>(); |
| 748 | 768 | ||
| 749 | for(CalcStatistics s : list){ | 769 | for(CalcStatistics s : list){ |
| 750 | try { | 770 | try { |
| 751 | - String key = PinyinHelper.convertToPinyinString(s.getXlName(), "" , PinyinFormat.WITHOUT_TONE); | ||
| 752 | - if(!keyMap.containsKey(key)){ | 771 | +// String key = PinyinHelper.convertToPinyinString(s.getXl(), "" , PinyinFormat.WITHOUT_TONE); |
| 772 | + String key =s.getFgsdm()+s.getXl(); | ||
| 773 | +// if(line.equals("")){ | ||
| 774 | +// key =s.getFgsdm()+s.getXl(); | ||
| 775 | +// }else{ | ||
| 776 | +// key =s.getXl(); | ||
| 777 | +// } | ||
| 778 | + if(!keyMap.containsKey(key)){ | ||
| 753 | keyMap.put(key, new ArrayList<CalcStatistics>()); | 779 | keyMap.put(key, new ArrayList<CalcStatistics>()); |
| 754 | keyList.add(key); | 780 | keyList.add(key); |
| 755 | } | 781 | } |
| 756 | keyMap.get(key).add(s); | 782 | keyMap.get(key).add(s); |
| 757 | - } catch (PinyinException e) { | 783 | + } catch (Exception e) { |
| 758 | // TODO Auto-generated catch block | 784 | // TODO Auto-generated catch block |
| 759 | e.printStackTrace(); | 785 | e.printStackTrace(); |
| 760 | } | 786 | } |
| @@ -769,6 +795,13 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -769,6 +795,13 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 769 | CalcStatistics s_ = keyMap.get(key).get(i); | 795 | CalcStatistics s_ = keyMap.get(key).get(i); |
| 770 | s = addStatistics(s, s_); | 796 | s = addStatistics(s, s_); |
| 771 | } | 797 | } |
| 798 | +// if(line.equals("")){ | ||
| 799 | + s.setFgsName(BasicData.businessFgsCodeNameMap.get(s.getFgsdm()+"_"+s.getGsdm())); | ||
| 800 | + /*}else{ | ||
| 801 | + List<Line> l=lineRepository.findLineByCode(line); | ||
| 802 | + if(l.size()>0) | ||
| 803 | + s.setFgsName(BasicData.businessFgsCodeNameMap.get(l.get(0).getBrancheCompany()+"_"+l.get(0).getCompany())); | ||
| 804 | + }*/ | ||
| 772 | resList.add(s); | 805 | resList.add(s); |
| 773 | } | 806 | } |
| 774 | } | 807 | } |
| @@ -776,6 +809,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -776,6 +809,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 776 | if(resList.size() > 0){ | 809 | if(resList.size() > 0){ |
| 777 | CalcStatistics temp = new CalcStatistics(); | 810 | CalcStatistics temp = new CalcStatistics(); |
| 778 | temp.setXlName("合计"); | 811 | temp.setXlName("合计"); |
| 812 | + temp.setFgsName(""); | ||
| 779 | for(CalcStatistics s : resList){ | 813 | for(CalcStatistics s : resList){ |
| 780 | temp = addStatistics(temp, s); | 814 | temp = addStatistics(temp, s); |
| 781 | } | 815 | } |
| @@ -785,6 +819,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -785,6 +819,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 785 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); | 819 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| 786 | for(CalcStatistics c : resList){ | 820 | for(CalcStatistics c : resList){ |
| 787 | Map<String, Object> m = new HashMap<String, Object>(); | 821 | Map<String, Object> m = new HashMap<String, Object>(); |
| 822 | + m.put("fgsName", c.getFgsName()); | ||
| 788 | m.put("xlName", c.getXlName()); | 823 | m.put("xlName", c.getXlName()); |
| 789 | m.put("jhzlc", c.getJhzlc()); | 824 | m.put("jhzlc", c.getJhzlc()); |
| 790 | m.put("jhlc", c.getJhyylc()); | 825 | m.put("jhlc", c.getJhyylc()); |
| @@ -859,7 +894,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -859,7 +894,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 859 | 894 | ||
| 860 | @Override | 895 | @Override |
| 861 | public List<Map<String, Object>> calcStatisticsDaily2(String gsdm, String fgsdm, | 896 | public List<Map<String, Object>> calcStatisticsDaily2(String gsdm, String fgsdm, |
| 862 | - String line, String date, String date2, String xlName, String type) { | 897 | + String line, String date, String date2, String xlName, String type,String nature) { |
| 863 | // TODO Auto-generated method stub | 898 | // TODO Auto-generated method stub |
| 864 | SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd"); | 899 | SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd"); |
| 865 | Date beginDate = new Date(); | 900 | Date beginDate = new Date(); |
| @@ -899,26 +934,47 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -899,26 +934,47 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 899 | } | 934 | } |
| 900 | 935 | ||
| 901 | 936 | ||
| 902 | - List<CalcStatistics> list = new ArrayList<CalcStatistics>(); | 937 | + List<CalcStatistics> listAll = new ArrayList<CalcStatistics>(); |
| 903 | if(line.length() > 0){ | 938 | if(line.length() > 0){ |
| 904 | - list = calcStatisticsRepository.selectByDateAndLineTj2(line, d1, d2); | 939 | + listAll = calcStatisticsRepository.selectByDateAndLineTj2(line, d1, d2); |
| 905 | } else { | 940 | } else { |
| 906 | - list = calcStatisticsRepository.selectByDateAndLineTj(line, d1, d2, gsdm, fgsdm); | 941 | + listAll = calcStatisticsRepository.selectByDateAndLineTj(line, d1, d2, gsdm, fgsdm); |
| 942 | + } | ||
| 943 | + Map<String, Boolean> lineMap=lineService.lineNature(); | ||
| 944 | + List<CalcStatistics> list=new ArrayList<CalcStatistics>(); | ||
| 945 | + for (int i = 0; i < listAll.size(); i++) { | ||
| 946 | + CalcStatistics s=listAll.get(i); | ||
| 947 | + if(nature.equals("0")){ | ||
| 948 | + list.add(s); | ||
| 949 | + }else if(nature.equals("1")){ | ||
| 950 | + if(lineMap.get(s.getXl())){ | ||
| 951 | + list.add(s); | ||
| 952 | + } | ||
| 953 | + }else{ | ||
| 954 | + if(!lineMap.get(s.getXl())){ | ||
| 955 | + list.add(s); | ||
| 956 | + } | ||
| 957 | + } | ||
| 907 | } | 958 | } |
| 908 | - | ||
| 909 | List<CalcStatistics> resList = new ArrayList<CalcStatistics>(); | 959 | List<CalcStatistics> resList = new ArrayList<CalcStatistics>(); |
| 910 | Map<String, List<CalcStatistics>> keyMap = new HashMap<String, List<CalcStatistics>>(); | 960 | Map<String, List<CalcStatistics>> keyMap = new HashMap<String, List<CalcStatistics>>(); |
| 911 | List<String> keyList = new ArrayList<String>(); | 961 | List<String> keyList = new ArrayList<String>(); |
| 912 | 962 | ||
| 913 | for(CalcStatistics s : list){ | 963 | for(CalcStatistics s : list){ |
| 914 | try { | 964 | try { |
| 915 | - String key = PinyinHelper.convertToPinyinString(s.getXlName(), "" , PinyinFormat.WITHOUT_TONE); | ||
| 916 | - if(!keyMap.containsKey(key)){ | 965 | +// String key = PinyinHelper.convertToPinyinString(s.getXlName(), "" , PinyinFormat.WITHOUT_TONE); |
| 966 | + String key =s.getFgsdm()+s.getXl(); | ||
| 967 | +// if(line.equals("")){ | ||
| 968 | +// key =s.getFgsdm()+s.getXl(); | ||
| 969 | +// }else{ | ||
| 970 | +// key =s.getXl(); | ||
| 971 | +// } | ||
| 972 | + if(!keyMap.containsKey(key)){ | ||
| 917 | keyMap.put(key, new ArrayList<CalcStatistics>()); | 973 | keyMap.put(key, new ArrayList<CalcStatistics>()); |
| 918 | keyList.add(key); | 974 | keyList.add(key); |
| 919 | } | 975 | } |
| 920 | keyMap.get(key).add(s); | 976 | keyMap.get(key).add(s); |
| 921 | - } catch (PinyinException e) { | 977 | + } catch (Exception e) { |
| 922 | // TODO Auto-generated catch block | 978 | // TODO Auto-generated catch block |
| 923 | e.printStackTrace(); | 979 | e.printStackTrace(); |
| 924 | } | 980 | } |
| @@ -950,6 +1006,13 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -950,6 +1006,13 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 950 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); | 1006 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| 951 | for(CalcStatistics c : resList){ | 1007 | for(CalcStatistics c : resList){ |
| 952 | Map<String, Object> m = new HashMap<String, Object>(); | 1008 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1009 | + if(c.getXl().equals("hj")){ | ||
| 1010 | + m.put("fgsName", ""); | ||
| 1011 | + m.put("fgsBm", ""); | ||
| 1012 | + }else{ | ||
| 1013 | + m.put("fgsName", BasicData.businessFgsCodeNameMap.get(c.getFgsdm()+"_"+c.getGsdm())); | ||
| 1014 | + m.put("fgsBm", c.getFgsdm()); | ||
| 1015 | + } | ||
| 953 | m.put("xlBm", c.getXl()); | 1016 | m.put("xlBm", c.getXl()); |
| 954 | m.put("xlName", c.getXlName()); | 1017 | m.put("xlName", c.getXlName()); |
| 955 | m.put("jhzlc", c.getJhzlc()); | 1018 | m.put("jhzlc", c.getJhzlc()); |
| @@ -1003,7 +1066,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -1003,7 +1066,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 1003 | //实时数据 | 1066 | //实时数据 |
| 1004 | List<Map<String, Object>> tjlist=new ArrayList<Map<String, Object>>(); | 1067 | List<Map<String, Object>> tjlist=new ArrayList<Map<String, Object>>(); |
| 1005 | if(!d4.equals("")){ | 1068 | if(!d4.equals("")){ |
| 1006 | - tjlist= scheduleRealInfoService.statisticsDailyTjHb(gsdm, fgsdm, line, d3, d4, xlName, type); | 1069 | + tjlist= scheduleRealInfoService.statisticsDailyTjHb(gsdm, fgsdm, line, d3, d4, xlName, type,nature); |
| 1007 | } | 1070 | } |
| 1008 | List<Map<String, Object>> mapListHj = new ArrayList<Map<String, Object>>(); | 1071 | List<Map<String, Object>> mapListHj = new ArrayList<Map<String, Object>>(); |
| 1009 | // List<String> lineList=new ArrayList<String>(); | 1072 | // List<String> lineList=new ArrayList<String>(); |
| @@ -1011,24 +1074,37 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -1011,24 +1074,37 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 1011 | mapList.addAll(tjlist); | 1074 | mapList.addAll(tjlist); |
| 1012 | for (int i = 0; i < mapList.size(); i++) { | 1075 | for (int i = 0; i < mapList.size(); i++) { |
| 1013 | Map<String, Object> m =mapList.get(i); | 1076 | Map<String, Object> m =mapList.get(i); |
| 1014 | - if(kMap.get(m.get("xlBm").toString())==null){ | ||
| 1015 | - kMap.put(m.get("xlBm").toString(), m.get("xlBm").toString()); | ||
| 1016 | - } | 1077 | +// if(line.equals("")){ |
| 1078 | + if(kMap.get(m.get("fgsBm")+"_"+m.get("xlBm").toString())==null){ | ||
| 1079 | + kMap.put(m.get("fgsBm")+"_"+m.get("xlBm").toString(), m.get("fgsBm")+"_"+m.get("xlBm").toString()); | ||
| 1080 | + } | ||
| 1081 | +// }else{ | ||
| 1082 | +// if(kMap.get(m.get("xlBm").toString())==null){ | ||
| 1083 | +// kMap.put(m.get("xlBm").toString(), m.get("xlBm").toString()); | ||
| 1084 | +// } | ||
| 1085 | +// } | ||
| 1086 | + | ||
| 1017 | } | 1087 | } |
| 1018 | for (Object xlbm : kMap.keySet()) { | 1088 | for (Object xlbm : kMap.keySet()) { |
| 1019 | Map<String, Object> hjMap = new HashMap<String, Object>(); | 1089 | Map<String, Object> hjMap = new HashMap<String, Object>(); |
| 1020 | for (int i = 0; i < mapList.size(); i++) { | 1090 | for (int i = 0; i < mapList.size(); i++) { |
| 1021 | Map<String, Object> lsMap=mapList.get(i); | 1091 | Map<String, Object> lsMap=mapList.get(i); |
| 1022 | - if (lsMap.get("xlBm").toString().equals(xlbm)) { | 1092 | + String xlbm_=""; |
| 1093 | +// if(line.equals("")){ | ||
| 1094 | + xlbm_=lsMap.get("fgsBm").toString()+"_"+lsMap.get("xlBm").toString(); | ||
| 1095 | +// }else{ | ||
| 1096 | +// xlbm_=lsMap.get("xlBm").toString(); | ||
| 1097 | +// } | ||
| 1098 | + if (xlbm_.equals(xlbm)) { | ||
| 1023 | if(hjMap.get("xlBm")==null){ | 1099 | if(hjMap.get("xlBm")==null){ |
| 1024 | hjMap.put("xlBm", lsMap.get("xlBm")); | 1100 | hjMap.put("xlBm", lsMap.get("xlBm")); |
| 1025 | hjMap.put("xlName", lsMap.get("xlName")); | 1101 | hjMap.put("xlName", lsMap.get("xlName")); |
| 1102 | + hjMap.put("fgsName", lsMap.get("fgsName")); | ||
| 1026 | try { | 1103 | try { |
| 1027 | if(lsMap.get("xlBm").toString().equals("hj")){ | 1104 | if(lsMap.get("xlBm").toString().equals("hj")){ |
| 1028 | hjMap.put("xlNamePy", "zzzzz"); | 1105 | hjMap.put("xlNamePy", "zzzzz"); |
| 1029 | - | ||
| 1030 | }else{ | 1106 | }else{ |
| 1031 | - hjMap.put("xlNamePy", PinyinHelper.convertToPinyinString(lsMap.get("xlName").toString(), "", PinyinFormat.WITHOUT_TONE)); | 1107 | + hjMap.put("xlNamePy", PinyinHelper.convertToPinyinString(lsMap.get("fgsBm").toString()+lsMap.get("xlName").toString(), "", PinyinFormat.WITHOUT_TONE)); |
| 1032 | } | 1108 | } |
| 1033 | } catch (PinyinException e) { | 1109 | } catch (PinyinException e) { |
| 1034 | // TODO Auto-generated catch block | 1110 | // TODO Auto-generated catch block |
| @@ -1082,8 +1158,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -1082,8 +1158,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 1082 | hjMap.put("djg_time",hjMap.get("djg_time")); | 1158 | hjMap.put("djg_time",hjMap.get("djg_time")); |
| 1083 | } | 1159 | } |
| 1084 | } | 1160 | } |
| 1085 | - | ||
| 1086 | - | ||
| 1087 | double jl = Arith.sub(Arith.add(hjMap.get("jhlc"), hjMap.get("ljgl")), hjMap.get("ssgl")); | 1161 | double jl = Arith.sub(Arith.add(hjMap.get("jhlc"), hjMap.get("ljgl")), hjMap.get("ssgl")); |
| 1088 | if (jl == Double.parseDouble(hjMap.get("sjgl").toString())) { | 1162 | if (jl == Double.parseDouble(hjMap.get("sjgl").toString())) { |
| 1089 | hjMap.put("zt", 0); | 1163 | hjMap.put("zt", 0); |
| @@ -1097,7 +1171,15 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -1097,7 +1171,15 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 1097 | 1171 | ||
| 1098 | Collections.sort(mapListHj, new AccountXlbmByping()); | 1172 | Collections.sort(mapListHj, new AccountXlbmByping()); |
| 1099 | 1173 | ||
| 1100 | - | 1174 | + /*if(!line.equals("")){ |
| 1175 | + for (int i = 0; i < mapListHj.size(); i++) { | ||
| 1176 | + if(mapListHj.get(i).get("xlBm").equals(line)){ | ||
| 1177 | + List<Line> l=lineRepository.findLineByCode(line); | ||
| 1178 | + if(l.size()>0) | ||
| 1179 | + mapListHj.get(i).put("fgsName", BasicData.businessFgsCodeNameMap.get(l.get(0).getBrancheCompany()+"_"+l.get(0).getCompany())); | ||
| 1180 | + } | ||
| 1181 | + } | ||
| 1182 | + }*/ | ||
| 1101 | if (type != null && type.length() != 0 && type.equals("export")) { | 1183 | if (type != null && type.length() != 0 && type.equals("export")) { |
| 1102 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 1184 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 1103 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 1185 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| @@ -1115,7 +1197,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -1115,7 +1197,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 1115 | } | 1197 | } |
| 1116 | listI.add(mapListHj.iterator()); | 1198 | listI.add(mapListHj.iterator()); |
| 1117 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | 1199 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; |
| 1118 | - ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls", | 1200 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_2.xls", |
| 1119 | path + "export/" + dateTime + "-" + xlName + "-统计日报.xls"); | 1201 | path + "export/" + dateTime + "-" + xlName + "-统计日报.xls"); |
| 1120 | } catch (Exception e) { | 1202 | } catch (Exception e) { |
| 1121 | // TODO: handle exception | 1203 | // TODO: handle exception |
src/main/java/com/bsth/service/impl/LineServiceImpl.java
| @@ -6,10 +6,14 @@ import com.bsth.repository.LineRepository; | @@ -6,10 +6,14 @@ import com.bsth.repository.LineRepository; | ||
| 6 | import com.bsth.service.LineService; | 6 | import com.bsth.service.LineService; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.jdbc.core.JdbcTemplate; | 8 | import org.springframework.jdbc.core.JdbcTemplate; |
| 9 | +import org.springframework.jdbc.core.RowMapper; | ||
| 9 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 10 | import org.springframework.transaction.annotation.Transactional; | 11 | import org.springframework.transaction.annotation.Transactional; |
| 11 | 12 | ||
| 13 | +import java.sql.ResultSet; | ||
| 14 | +import java.sql.SQLException; | ||
| 12 | import java.util.HashMap; | 15 | import java.util.HashMap; |
| 16 | +import java.util.List; | ||
| 13 | import java.util.Map; | 17 | import java.util.Map; |
| 14 | 18 | ||
| 15 | /** | 19 | /** |
| @@ -117,4 +121,34 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L | @@ -117,4 +121,34 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L | ||
| 117 | } | 121 | } |
| 118 | return map; | 122 | return map; |
| 119 | } | 123 | } |
| 124 | + | ||
| 125 | + /*获取线路性质*/ | ||
| 126 | + @Override | ||
| 127 | + public Map<String, Boolean> lineNature() { | ||
| 128 | + // TODO Auto-generated method stub | ||
| 129 | +// List<Line> lineList=repository.findLineBygsBm(gsBm, fgsBm, line); | ||
| 130 | + String sql="select * from bsth_c_line "; | ||
| 131 | + List<Line> lineList=jdbcTemplate.query(sql, | ||
| 132 | + new RowMapper<Line>(){ | ||
| 133 | + @Override | ||
| 134 | + public Line mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 135 | + Line l=new Line(); | ||
| 136 | + l.setLineCode(rs.getString("line_code")); | ||
| 137 | + l.setNature(rs.getString("nature")); | ||
| 138 | + return l; | ||
| 139 | + } | ||
| 140 | + }); | ||
| 141 | + Map<String, Boolean> map=new HashMap<String,Boolean>(); | ||
| 142 | + for (int i = 0; i < lineList.size(); i++) { | ||
| 143 | + Line t=lineList.get(i); | ||
| 144 | + String nature=t.getNature()==null?"":t.getNature(); | ||
| 145 | + if(nature.equals("yxl")||nature.equals("cgxl")||nature.equals("gjxl") | ||
| 146 | + ||nature.equals("csbs")||nature.equals("cctxl")){ | ||
| 147 | + map.put(t.getLineCode(), true); | ||
| 148 | + }else{ | ||
| 149 | + map.put(t.getLineCode(), false); | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | + return map; | ||
| 153 | + } | ||
| 120 | } | 154 | } |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -117,10 +117,10 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -117,10 +117,10 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 117 | 117 | ||
| 118 | List<Map<String,Object>> statisticsDaily(String line, String date, String xlName, String type); | 118 | List<Map<String,Object>> statisticsDaily(String line, String date, String xlName, String type); |
| 119 | 119 | ||
| 120 | - List<Map<String,Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type); | 120 | + List<Map<String,Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type,String nature); |
| 121 | 121 | ||
| 122 | //用于实时数据与统计数据合并查询 | 122 | //用于实时数据与统计数据合并查询 |
| 123 | - List<Map<String,Object>> statisticsDailyTjHb(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type); | 123 | + List<Map<String,Object>> statisticsDailyTjHb(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type,String nature); |
| 124 | 124 | ||
| 125 | //List<Object> scheduleDaily(String line,String date); | 125 | //List<Object> scheduleDaily(String line,String date); |
| 126 | 126 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -53,6 +53,7 @@ import com.bsth.repository.schedule.CarConfigInfoRepository; | @@ -53,6 +53,7 @@ import com.bsth.repository.schedule.CarConfigInfoRepository; | ||
| 53 | import com.bsth.repository.schedule.EmployeeConfigInfoRepository; | 53 | import com.bsth.repository.schedule.EmployeeConfigInfoRepository; |
| 54 | import com.bsth.repository.schedule.GuideboardInfoRepository; | 54 | import com.bsth.repository.schedule.GuideboardInfoRepository; |
| 55 | import com.bsth.security.util.SecurityUtils; | 55 | import com.bsth.security.util.SecurityUtils; |
| 56 | +import com.bsth.service.LineService; | ||
| 56 | import com.bsth.service.SectionRouteService; | 57 | import com.bsth.service.SectionRouteService; |
| 57 | import com.bsth.service.directive.DirectiveService; | 58 | import com.bsth.service.directive.DirectiveService; |
| 58 | import com.bsth.service.impl.BaseServiceImpl; | 59 | import com.bsth.service.impl.BaseServiceImpl; |
| @@ -114,7 +115,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -114,7 +115,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 114 | 115 | ||
| 115 | @Autowired | 116 | @Autowired |
| 116 | LineRepository lineRepository; | 117 | LineRepository lineRepository; |
| 117 | - | 118 | + @Autowired |
| 119 | + LineService lineService; | ||
| 118 | @Autowired | 120 | @Autowired |
| 119 | GuideboardInfoRepository guideboardInfoRepository; | 121 | GuideboardInfoRepository guideboardInfoRepository; |
| 120 | 122 | ||
| @@ -2666,10 +2668,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2666,10 +2668,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2666 | } | 2668 | } |
| 2667 | Map<String, Object> map = new HashMap<String, Object>(); | 2669 | Map<String, Object> map = new HashMap<String, Object>(); |
| 2668 | if (list.size() > 0) { | 2670 | if (list.size() > 0) { |
| 2671 | + map.put("fgsBm", list.get(0).getFgsBm()); | ||
| 2669 | map.put("xlBm", list.get(0).getXlBm()); | 2672 | map.put("xlBm", list.get(0).getXlBm()); |
| 2670 | map.put("xlName", list.get(0).getXlName()); | 2673 | map.put("xlName", list.get(0).getXlName()); |
| 2674 | + map.put("fgsName", list.get(0).getFgsName()); | ||
| 2671 | try { | 2675 | try { |
| 2672 | - map.put("xlNamePy", PinyinHelper.convertToPinyinString(list.get(0).getXlName(), "", PinyinFormat.WITHOUT_TONE)); | 2676 | + map.put("xlNamePy", PinyinHelper.convertToPinyinString(list.get(0).getFgsBm()+list.get(0).getXlName(), "", PinyinFormat.WITHOUT_TONE)); |
| 2673 | } catch (PinyinException e) { | 2677 | } catch (PinyinException e) { |
| 2674 | // TODO Auto-generated catch block | 2678 | // TODO Auto-generated catch block |
| 2675 | e.printStackTrace(); | 2679 | e.printStackTrace(); |
| @@ -2679,7 +2683,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2679,7 +2683,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2679 | map.put("jhlc", jhyygl); | 2683 | map.put("jhlc", jhyygl); |
| 2680 | map.put("jcclc", jhjcclc); | 2684 | map.put("jcclc", jhjcclc); |
| 2681 | map.put("jhzlc", Arith.add(jhyygl, jhjcclc)); | 2685 | map.put("jhzlc", Arith.add(jhyygl, jhjcclc)); |
| 2682 | - | 2686 | + double ljks=culateService.culateLjksgl(lists); |
| 2687 | + map.put("ljks", ljks); | ||
| 2683 | double ljgl = culateService.culateLjgl(lists); | 2688 | double ljgl = culateService.culateLjgl(lists); |
| 2684 | double sjyygl = culateService.culateSjgl(lists); | 2689 | double sjyygl = culateService.culateSjgl(lists); |
| 2685 | double zyygl = Arith.add(sjyygl, ljgl); | 2690 | double zyygl = Arith.add(sjyygl, ljgl); |
| @@ -2744,18 +2749,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2744,18 +2749,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2744 | 2749 | ||
| 2745 | @Override | 2750 | @Override |
| 2746 | public List<Map<String, Object>> statisticsDailyTj(String gsdm, String fgsdm, String line, String date, String date2, | 2751 | public List<Map<String, Object>> statisticsDailyTj(String gsdm, String fgsdm, String line, String date, String date2, |
| 2747 | - String xlName, String type) { | ||
| 2748 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 2752 | + String xlName, String type,String nature) { |
| 2753 | + List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>(); | ||
| 2749 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); | 2754 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); |
| 2750 | List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); | 2755 | List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); |
| 2751 | line = line.trim(); | 2756 | line = line.trim(); |
| 2752 | if (line.equals("")) { | 2757 | if (line.equals("")) { |
| 2753 | //查询所有线路 | 2758 | //查询所有线路 |
| 2754 | - list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm); | 2759 | + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm); |
| 2755 | } else { | 2760 | } else { |
| 2756 | //查询单条线路 | 2761 | //查询单条线路 |
| 2757 | - list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2); | ||
| 2758 | - } | 2762 | + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2); |
| 2763 | + } | ||
| 2764 | + Map<String, Boolean> lineMap=lineService.lineNature(); | ||
| 2765 | + List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>(); | ||
| 2766 | + for (int i = 0; i < listAll.size(); i++) { | ||
| 2767 | + ScheduleRealInfo s=listAll.get(i); | ||
| 2768 | + if (nature.equals("0")) { | ||
| 2769 | + list.add(s); | ||
| 2770 | + }else if(nature.equals("1")){ | ||
| 2771 | + if(lineMap.get(s.getXlBm())){ | ||
| 2772 | + list.add(s); | ||
| 2773 | + } | ||
| 2774 | + }else{ | ||
| 2775 | + if(!lineMap.get(s.getXlBm())){ | ||
| 2776 | + list.add(s); | ||
| 2777 | + } | ||
| 2778 | + } | ||
| 2779 | + } | ||
| 2759 | for (int i = 0; i < list.size(); i++) { | 2780 | for (int i = 0; i < list.size(); i++) { |
| 2760 | ScheduleRealInfo s = list.get(i); | 2781 | ScheduleRealInfo s = list.get(i); |
| 2761 | Set<ChildTaskPlan> cts = s.getcTasks(); | 2782 | Set<ChildTaskPlan> cts = s.getcTasks(); |
| @@ -2770,7 +2791,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2770,7 +2791,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2770 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); | 2791 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); |
| 2771 | for (int i = 0; i < list.size(); i++) { | 2792 | for (int i = 0; i < list.size(); i++) { |
| 2772 | if (i < list.size() - 1) { | 2793 | if (i < list.size() - 1) { |
| 2773 | - if (list.get(i + 1).getXlBm().equals(list.get(i).getXlBm())) { | 2794 | + if ((list.get(i+1).getFgsBm()+list.get(i + 1).getXlBm()).equals(list.get(i).getFgsBm()+list.get(i).getXlBm())) { |
| 2774 | lists.add(list.get(i)); | 2795 | lists.add(list.get(i)); |
| 2775 | } else { | 2796 | } else { |
| 2776 | lists.add(list.get(i)); | 2797 | lists.add(list.get(i)); |
| @@ -2779,7 +2800,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2779,7 +2800,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2779 | lists = new ArrayList<ScheduleRealInfo>(); | 2800 | lists = new ArrayList<ScheduleRealInfo>(); |
| 2780 | } | 2801 | } |
| 2781 | } else { | 2802 | } else { |
| 2782 | - if (list.get(i).getXlBm().equals(list.get(i - 1).getXlBm())) { | 2803 | + if ((list.get(i).getFgsBm()+list.get(i).getXlBm()).equals(list.get(i - 1).getFgsBm()+list.get(i - 1).getXlBm())) { |
| 2783 | lists.add(list.get(i)); | 2804 | lists.add(list.get(i)); |
| 2784 | Map<String, Object> map = staticTj(lists); | 2805 | Map<String, Object> map = staticTj(lists); |
| 2785 | lMap.add(map); | 2806 | lMap.add(map); |
| @@ -2791,10 +2812,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2791,10 +2812,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2791 | } | 2812 | } |
| 2792 | } | 2813 | } |
| 2793 | } | 2814 | } |
| 2794 | - | 2815 | + /*if(!line.equals("")){ |
| 2816 | + List<Line> l=lineRepository.findLineByCode(line); | ||
| 2817 | + if(l.size()>0) | ||
| 2818 | + lMap.get(0).put("fgsName", BasicData.businessFgsCodeNameMap.get(l.get(0).getBrancheCompany()+"_"+l.get(0).getCompany())); | ||
| 2819 | + }*/ | ||
| 2795 | Collections.sort(lMap, new AccountXlbm()); | 2820 | Collections.sort(lMap, new AccountXlbm()); |
| 2796 | Map<String, Object> map = new HashMap<String, Object>(); | 2821 | Map<String, Object> map = new HashMap<String, Object>(); |
| 2797 | map.put("xlName", "合计"); | 2822 | map.put("xlName", "合计"); |
| 2823 | + map.put("fgsName", ""); | ||
| 2798 | double jhyygl = culateService.culateJhgl(list);//计划营运公里 | 2824 | double jhyygl = culateService.culateJhgl(list);//计划营运公里 |
| 2799 | double jhjcclc = culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) | 2825 | double jhjcclc = culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) |
| 2800 | map.put("jhlc", jhyygl); | 2826 | map.put("jhlc", jhyygl); |
| @@ -2804,7 +2830,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2804,7 +2830,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2804 | double ljgl = culateService.culateLjgl(list_s); | 2830 | double ljgl = culateService.culateLjgl(list_s); |
| 2805 | double sjyygl = culateService.culateSjgl(list_s); | 2831 | double sjyygl = culateService.culateSjgl(list_s); |
| 2806 | double zyygl = Arith.add(sjyygl, ljgl); | 2832 | double zyygl = Arith.add(sjyygl, ljgl); |
| 2807 | - | 2833 | + double ljks=culateService.culateLjksgl(list_s); |
| 2834 | + map.put("ljks", ljks); | ||
| 2808 | double sjjccgl = culateService.culateJccgl(list_s); | 2835 | double sjjccgl = culateService.culateJccgl(list_s); |
| 2809 | double sjksgl = culateService.culateKsgl(list_s); | 2836 | double sjksgl = culateService.culateKsgl(list_s); |
| 2810 | double zksgl = Arith.add(sjjccgl, sjksgl); | 2837 | double zksgl = Arith.add(sjjccgl, sjksgl); |
| @@ -2902,7 +2929,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2902,7 +2929,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2902 | } | 2929 | } |
| 2903 | listI.add(lMap.iterator()); | 2930 | listI.add(lMap.iterator()); |
| 2904 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | 2931 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; |
| 2905 | - ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls", | 2932 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_2.xls", |
| 2906 | path + "export/" + dateTime + "-" + xlName + "-统计日报.xls"); | 2933 | path + "export/" + dateTime + "-" + xlName + "-统计日报.xls"); |
| 2907 | } catch (Exception e) { | 2934 | } catch (Exception e) { |
| 2908 | // TODO: handle exception | 2935 | // TODO: handle exception |
| @@ -2916,18 +2943,35 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2916,18 +2943,35 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2916 | 2943 | ||
| 2917 | @Override | 2944 | @Override |
| 2918 | public List<Map<String, Object>> statisticsDailyTjHb(String gsdm, String fgsdm, String line, String date, String date2, | 2945 | public List<Map<String, Object>> statisticsDailyTjHb(String gsdm, String fgsdm, String line, String date, String date2, |
| 2919 | - String xlName, String type) { | ||
| 2920 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 2946 | + String xlName, String type,String nature) { |
| 2947 | + List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>(); | ||
| 2921 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); | 2948 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); |
| 2922 | List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); | 2949 | List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); |
| 2923 | line = line.trim(); | 2950 | line = line.trim(); |
| 2924 | if (line.equals("")) { | 2951 | if (line.equals("")) { |
| 2925 | //查询所有线路 | 2952 | //查询所有线路 |
| 2926 | - list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm); | 2953 | + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm); |
| 2927 | } else { | 2954 | } else { |
| 2928 | //查询单条线路 | 2955 | //查询单条线路 |
| 2929 | - list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2); | ||
| 2930 | - } | 2956 | + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2); |
| 2957 | + } | ||
| 2958 | + | ||
| 2959 | + Map<String, Boolean> lineMap=lineService.lineNature(); | ||
| 2960 | + List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>(); | ||
| 2961 | + for (int i = 0; i < listAll.size(); i++) { | ||
| 2962 | + ScheduleRealInfo s=listAll.get(i); | ||
| 2963 | + if (nature.equals("0")) { | ||
| 2964 | + list.add(s); | ||
| 2965 | + }else if(nature.equals("1")){ | ||
| 2966 | + if(lineMap.get(s.getXlBm())){ | ||
| 2967 | + list.add(s); | ||
| 2968 | + } | ||
| 2969 | + }else{ | ||
| 2970 | + if(!lineMap.get(s.getXlBm())){ | ||
| 2971 | + list.add(s); | ||
| 2972 | + } | ||
| 2973 | + } | ||
| 2974 | + } | ||
| 2931 | for (int i = 0; i < list.size(); i++) { | 2975 | for (int i = 0; i < list.size(); i++) { |
| 2932 | ScheduleRealInfo s = list.get(i); | 2976 | ScheduleRealInfo s = list.get(i); |
| 2933 | Set<ChildTaskPlan> cts = s.getcTasks(); | 2977 | Set<ChildTaskPlan> cts = s.getcTasks(); |
| @@ -2942,7 +2986,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2942,7 +2986,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2942 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); | 2986 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); |
| 2943 | for (int i = 0; i < list.size(); i++) { | 2987 | for (int i = 0; i < list.size(); i++) { |
| 2944 | if (i < list.size() - 1) { | 2988 | if (i < list.size() - 1) { |
| 2945 | - if (list.get(i + 1).getXlBm().equals(list.get(i).getXlBm())) { | 2989 | + if ((list.get(i + 1).getFgsBm()+list.get(i + 1).getXlBm()).equals(list.get(i).getFgsBm()+list.get(i).getXlBm())) { |
| 2946 | lists.add(list.get(i)); | 2990 | lists.add(list.get(i)); |
| 2947 | } else { | 2991 | } else { |
| 2948 | lists.add(list.get(i)); | 2992 | lists.add(list.get(i)); |
| @@ -2951,7 +2995,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2951,7 +2995,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2951 | lists = new ArrayList<ScheduleRealInfo>(); | 2995 | lists = new ArrayList<ScheduleRealInfo>(); |
| 2952 | } | 2996 | } |
| 2953 | } else { | 2997 | } else { |
| 2954 | - if (list.get(i).getXlBm().equals(list.get(i - 1).getXlBm())) { | 2998 | + if ((list.get(i).getFgsBm()+list.get(i).getXlBm()).equals(list.get(i - 1).getFgsBm()+list.get(i - 1).getXlBm())) { |
| 2955 | lists.add(list.get(i)); | 2999 | lists.add(list.get(i)); |
| 2956 | Map<String, Object> map = staticTj(lists); | 3000 | Map<String, Object> map = staticTj(lists); |
| 2957 | lMap.add(map); | 3001 | lMap.add(map); |
| @@ -2968,6 +3012,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2968,6 +3012,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2968 | Map<String, Object> map = new HashMap<String, Object>(); | 3012 | Map<String, Object> map = new HashMap<String, Object>(); |
| 2969 | map.put("xlBm", "hj"); | 3013 | map.put("xlBm", "hj"); |
| 2970 | map.put("xlName", "合计"); | 3014 | map.put("xlName", "合计"); |
| 3015 | + map.put("fgsBm", ""); | ||
| 3016 | + map.put("fgsName", ""); | ||
| 3017 | + map.put("gsBm", ""); | ||
| 2971 | double jhyygl = culateService.culateJhgl(list);//计划营运公里 | 3018 | double jhyygl = culateService.culateJhgl(list);//计划营运公里 |
| 2972 | double jhjcclc = culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) | 3019 | double jhjcclc = culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) |
| 2973 | map.put("jhlc", jhyygl); | 3020 | map.put("jhlc", jhyygl); |
| @@ -2977,7 +3024,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2977,7 +3024,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2977 | double ljgl = culateService.culateLjgl(list_s); | 3024 | double ljgl = culateService.culateLjgl(list_s); |
| 2978 | double sjyygl = culateService.culateSjgl(list_s); | 3025 | double sjyygl = culateService.culateSjgl(list_s); |
| 2979 | double zyygl = Arith.add(sjyygl, ljgl); | 3026 | double zyygl = Arith.add(sjyygl, ljgl); |
| 2980 | - | 3027 | + double ljks=culateService.culateLjksgl(list_s); |
| 3028 | + map.put("ljks", ljks); | ||
| 2981 | double sjjccgl = culateService.culateJccgl(list_s); | 3029 | double sjjccgl = culateService.culateJccgl(list_s); |
| 2982 | double sjksgl = culateService.culateKsgl(list_s); | 3030 | double sjksgl = culateService.culateKsgl(list_s); |
| 2983 | double zksgl = Arith.add(sjjccgl, sjksgl); | 3031 | double zksgl = Arith.add(sjjccgl, sjksgl); |
src/main/java/com/bsth/service/report/CalcSheetService.java
0 → 100644
| 1 | +package com.bsth.service.report; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import java.util.Map; | ||
| 5 | + | ||
| 6 | +import com.bsth.entity.sheet.CalcSheet; | ||
| 7 | +import com.bsth.entity.sheet.Sheet; | ||
| 8 | +import com.bsth.service.BaseService; | ||
| 9 | + | ||
| 10 | +public interface CalcSheetService extends BaseService<CalcSheet, Integer>{ | ||
| 11 | + public List<CalcSheet> countListCalcSheet(Map<String, Object> map); | ||
| 12 | + public List<CalcSheet> calcListSheet(Map<String, Object> map); | ||
| 13 | + public List<Sheet> calcSheet(Map<String, Object> map); | ||
| 14 | + public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map); | ||
| 15 | +} |
src/main/java/com/bsth/service/report/CulateMileageService.java
| @@ -4,6 +4,7 @@ import java.util.List; | @@ -4,6 +4,7 @@ import java.util.List; | ||
| 4 | import java.util.Map; | 4 | import java.util.Map; |
| 5 | 5 | ||
| 6 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 6 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 7 | +import com.google.common.util.concurrent.AbstractScheduledService.Scheduler; | ||
| 7 | 8 | ||
| 8 | public interface CulateMileageService { | 9 | public interface CulateMileageService { |
| 9 | 10 | ||
| @@ -12,6 +13,7 @@ public interface CulateMileageService { | @@ -12,6 +13,7 @@ public interface CulateMileageService { | ||
| 12 | int culateLbbc(List<ScheduleRealInfo> lists); | 13 | int culateLbbc(List<ScheduleRealInfo> lists); |
| 13 | 14 | ||
| 14 | List<Map<String,Object>> jobLjqk(List<ScheduleRealInfo> lists); | 15 | List<Map<String,Object>> jobLjqk(List<ScheduleRealInfo> lists); |
| 16 | + double culateLjksgl(List<ScheduleRealInfo> lists); | ||
| 15 | double culateLjgl(List<ScheduleRealInfo> lists); | 17 | double culateLjgl(List<ScheduleRealInfo> lists); |
| 16 | double culateLjgl_(List<ScheduleRealInfo> lists,String item); | 18 | double culateLjgl_(List<ScheduleRealInfo> lists,String item); |
| 17 | double culateLjgl_spy(List<ScheduleRealInfo> lists); | 19 | double culateLjgl_spy(List<ScheduleRealInfo> lists); |
| @@ -43,7 +45,7 @@ public interface CulateMileageService { | @@ -43,7 +45,7 @@ public interface CulateMileageService { | ||
| 43 | 45 | ||
| 44 | int culateDtfzbc(List<ScheduleRealInfo> lists,String type,String status,String item); | 46 | int culateDtfzbc(List<ScheduleRealInfo> lists,String type,String status,String item); |
| 45 | 47 | ||
| 46 | - | 48 | + |
| 47 | //以下计算方法供新报表使用 | 49 | //以下计算方法供新报表使用 |
| 48 | Map<String, Double> culateSjlcMap(List<ScheduleRealInfo> lists);//计划内营运and计划外营运 | 50 | Map<String, Double> culateSjlcMap(List<ScheduleRealInfo> lists);//计划内营运and计划外营运 |
| 49 | 51 |
src/main/java/com/bsth/service/report/impl/CalcSheetServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.report.impl; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import java.lang.reflect.InvocationTargetException; | ||
| 5 | +import java.sql.ResultSet; | ||
| 6 | +import java.sql.SQLException; | ||
| 7 | +import java.text.DecimalFormat; | ||
| 8 | +import java.text.ParseException; | ||
| 9 | +import java.text.SimpleDateFormat; | ||
| 10 | +import java.util.ArrayList; | ||
| 11 | +import java.util.Calendar; | ||
| 12 | +import java.util.Collections; | ||
| 13 | +import java.util.Comparator; | ||
| 14 | +import java.util.Date; | ||
| 15 | +import java.util.GregorianCalendar; | ||
| 16 | +import java.util.HashMap; | ||
| 17 | +import java.util.Iterator; | ||
| 18 | +import java.util.List; | ||
| 19 | +import java.util.Map; | ||
| 20 | + | ||
| 21 | +import org.apache.commons.lang3.StringUtils; | ||
| 22 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 23 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 24 | +import org.springframework.jdbc.core.RowMapper; | ||
| 25 | +import org.springframework.stereotype.Service; | ||
| 26 | + | ||
| 27 | +import com.bsth.data.BasicData; | ||
| 28 | +import com.bsth.entity.Line; | ||
| 29 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 30 | +import com.bsth.entity.sheet.CalcSheet; | ||
| 31 | +import com.bsth.entity.sheet.Sheet; | ||
| 32 | +import com.bsth.repository.LineRepository; | ||
| 33 | +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | ||
| 34 | +import com.bsth.service.LineService; | ||
| 35 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 36 | +import com.bsth.service.report.CalcSheetService; | ||
| 37 | +import com.bsth.util.ComparableReal; | ||
| 38 | +import com.bsth.util.ReportRelatedUtils; | ||
| 39 | +import com.bsth.util.ReportUtils; | ||
| 40 | + | ||
| 41 | + | ||
| 42 | +@Service | ||
| 43 | +public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> implements CalcSheetService { | ||
| 44 | + @Autowired | ||
| 45 | + JdbcTemplate jdbcTemplate; | ||
| 46 | + @Autowired | ||
| 47 | + ScheduleRealInfoRepository scheduleRealInfoRepository; | ||
| 48 | + @Autowired | ||
| 49 | + LineRepository lineRepository; | ||
| 50 | + @Autowired | ||
| 51 | + LineService lineService; | ||
| 52 | + @Override | ||
| 53 | + public List<CalcSheet> countListCalcSheet(Map<String, Object> map) { | ||
| 54 | + // TODO Auto-generated method stub | ||
| 55 | + final DecimalFormat df = new DecimalFormat("0.00"); | ||
| 56 | + String line=""; | ||
| 57 | + if(map.get("line")!=null){ | ||
| 58 | + line =map.get("line").toString().trim(); | ||
| 59 | + } | ||
| 60 | + String gs=""; | ||
| 61 | + if(map.get("gs")!=null){ | ||
| 62 | + gs=map.get("gs").toString().trim(); | ||
| 63 | + } | ||
| 64 | + String fgs=""; | ||
| 65 | + if(map.get("fgs")!=null){ | ||
| 66 | + fgs=map.get("fgs").toString().trim(); | ||
| 67 | + } | ||
| 68 | + String nature="0"; | ||
| 69 | + if(map.get("nature")!=null){ | ||
| 70 | + nature=map.get("nature").toString(); | ||
| 71 | + } | ||
| 72 | + Map<String, Boolean> lineMap=lineService.lineNature(); | ||
| 73 | + | ||
| 74 | + String date=map.get("date").toString(); | ||
| 75 | + String endDate=map.get("endDate").toString(); | ||
| 76 | + String sql="select gsdm,fgsdm,xl,xl_name,max(id) as id,sum(jhszfcs) as jhszfcs ," | ||
| 77 | + + " sum(sjszfczds) as sjszfczds,sum(sjszddzds) as sjszddzds" | ||
| 78 | + + " from bsth_c_calc_sheet where date >= '"+date+"' and date <= '"+endDate+"'"; | ||
| 79 | + if(line.trim().equals("")){ | ||
| 80 | + sql +=" and gsdm = '"+gs+"' and fgsdm like '%"+fgs+"%'"; | ||
| 81 | + }else{ | ||
| 82 | + sql +=" and xl ='"+line+"'"; | ||
| 83 | + } | ||
| 84 | + sql +=" group by gsdm,fgsdm,xl,xl_name"; | ||
| 85 | + List<CalcSheet> lists=jdbcTemplate.query(sql, | ||
| 86 | + new RowMapper<CalcSheet>(){ | ||
| 87 | + @Override | ||
| 88 | + public CalcSheet mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 89 | + CalcSheet s=new CalcSheet(); | ||
| 90 | + s.setGsdm(rs.getString("gsdm")); | ||
| 91 | + s.setFgsdm(rs.getString("fgsdm")); | ||
| 92 | + s.setXl(rs.getString("xl")); | ||
| 93 | + s.setXlName(rs.getString("xl_name")); | ||
| 94 | + s.setId(rs.getInt("id")); | ||
| 95 | + s.setJhszfcs(rs.getString("jhszfcs")); | ||
| 96 | + s.setSjszfczds(rs.getString("sjszfczds")); | ||
| 97 | + s.setSjszddzds(rs.getString("sjszddzds")); | ||
| 98 | + int jhfc=Integer.parseInt(rs.getString("jhszfcs")); | ||
| 99 | + int zdfc=Integer.parseInt(rs.getString("sjszfczds")); | ||
| 100 | + int zddd=Integer.parseInt(rs.getString("sjszddzds")); | ||
| 101 | + if(jhfc>0){ | ||
| 102 | + double zdl=(zdfc*1.0)/(jhfc*1.0)*100; | ||
| 103 | + s.setSzfczdl(df.format(zdl)+"%"); | ||
| 104 | + zdl=(zddd*1.0)/(jhfc*1.0)*100; | ||
| 105 | + s.setSzddzdl(df.format(zdl)+"%"); | ||
| 106 | + }else{ | ||
| 107 | + s.setSzfczdl("0.0%"); | ||
| 108 | + s.setSzddzdl("0.0%"); | ||
| 109 | + } | ||
| 110 | + return s; | ||
| 111 | + } | ||
| 112 | + }); | ||
| 113 | + List<CalcSheet> list=new ArrayList<CalcSheet>(); | ||
| 114 | + for (int i = 0; i < lists.size(); i++) { | ||
| 115 | + if (nature.equals("0")) { | ||
| 116 | + list.add(lists.get(i)); | ||
| 117 | + }else if(nature.equals("1")){ | ||
| 118 | + if(lineMap.get(lists.get(i).getXl())){ | ||
| 119 | + list.add(lists.get(i)); | ||
| 120 | + } | ||
| 121 | + }else{ | ||
| 122 | + if(!lineMap.get(lists.get(i).getXl())){ | ||
| 123 | + list.add(lists.get(i)); | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + } | ||
| 127 | + if(map.get("type").equals("export")){ | ||
| 128 | + String lineName=""; | ||
| 129 | + if(!line.equals("")){ | ||
| 130 | + lineName=list.get(0).getXlName(); | ||
| 131 | + }else if(!fgs.equals("")){ | ||
| 132 | + lineName=list.get(0).getFgsname(); | ||
| 133 | + }else{ | ||
| 134 | + lineName=list.get(0).getGsname(); | ||
| 135 | + } | ||
| 136 | + List<Map<String, Object>> listmap=new ArrayList<Map<String, Object>>(); | ||
| 137 | + for (int i = 0; i < list.size(); i++) { | ||
| 138 | + CalcSheet c=list.get(i); | ||
| 139 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 140 | + m.put("gs", c.getGsname()); | ||
| 141 | + m.put("fgs", c.getFgsname()); | ||
| 142 | + m.put("line", c.getXlName()); | ||
| 143 | + m.put("bcs", c.getJhszfcs()); | ||
| 144 | + m.put("zdbcs", c.getSjszfczds()); | ||
| 145 | + m.put("zdlv", c.getSzfczdl()); | ||
| 146 | + m.put("ddzdbcs", c.getSjszddzds()); | ||
| 147 | + m.put("ddzdlv", c.getSzddzdl()); | ||
| 148 | + listmap.add(m); | ||
| 149 | + } | ||
| 150 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 151 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 152 | + m.put("date", date); | ||
| 153 | + m.put("endDate", endDate); | ||
| 154 | + ReportUtils ee = new ReportUtils(); | ||
| 155 | + try { | ||
| 156 | + String dateTime = ""; | ||
| 157 | + if(date.equals(endDate)){ | ||
| 158 | + dateTime = date.replaceAll("-", ""); | ||
| 159 | + } else { | ||
| 160 | + dateTime = date.replaceAll("-", "")+"-"+ | ||
| 161 | + endDate.replaceAll("-", ""); | ||
| 162 | + } | ||
| 163 | + listI.add(listmap.iterator()); | ||
| 164 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 165 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + "calcSheetList.xls", | ||
| 166 | + path + "export/"+dateTime+"-"+lineName+"-发车到站准点率.xls"); | ||
| 167 | + } catch (Exception e) { | ||
| 168 | + // TODO: handle exception | ||
| 169 | + e.printStackTrace(); | ||
| 170 | + } | ||
| 171 | + } | ||
| 172 | + return list; | ||
| 173 | + } | ||
| 174 | + @Override | ||
| 175 | + public List<CalcSheet> calcListSheet(Map<String, Object> map) { | ||
| 176 | + // TODO Auto-generated method stub | ||
| 177 | + String line=map.get("line").toString(); | ||
| 178 | + String date=map.get("date").toString(); | ||
| 179 | + String endDate=map.get("endDate").toString(); | ||
| 180 | + String sql="select * from bsth_c_calc_sheet where date >= '"+date+"' and " | ||
| 181 | + + " date <= '"+endDate+"' and xl = '"+line+"' order by date"; | ||
| 182 | + List<CalcSheet> list=jdbcTemplate.query(sql, | ||
| 183 | + new RowMapper<CalcSheet>(){ | ||
| 184 | + @Override | ||
| 185 | + public CalcSheet mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 186 | + CalcSheet s=new CalcSheet(); | ||
| 187 | + s.setGsdm(rs.getString("gsdm")); | ||
| 188 | + s.setFgsdm(rs.getString("fgsdm")); | ||
| 189 | + s.setXl(rs.getString("xl")); | ||
| 190 | + s.setXlName(rs.getString("xl_name")); | ||
| 191 | + s.setId(rs.getInt("id")); | ||
| 192 | + s.setDate(rs.getString("date")); | ||
| 193 | + s.setJhszfcs(rs.getString("jhszfcs")); | ||
| 194 | + s.setSjszfczds(rs.getString("sjszfczds")); | ||
| 195 | + s.setSzfczdl(rs.getString("szfczdl")); | ||
| 196 | + s.setSjszddzds(rs.getString("sjszddzds")); | ||
| 197 | + s.setSzddzdl(rs.getString("szddzdl")); | ||
| 198 | + return s; | ||
| 199 | + } | ||
| 200 | + }); | ||
| 201 | + if(map.get("type").equals("export")){ | ||
| 202 | + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | ||
| 203 | + for (int i = 0; i < list.size(); i++) { | ||
| 204 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 205 | + CalcSheet c = list.get(i); | ||
| 206 | + m.put("gs", c.getGsname()); | ||
| 207 | + m.put("fgs", c.getFgsname()); | ||
| 208 | + m.put("date", c.getDate()); | ||
| 209 | + m.put("line", c.getXlName()); | ||
| 210 | + m.put("bcs", c.getJhszfcs()); | ||
| 211 | + m.put("zdbcs", c.getSjszfczds()); | ||
| 212 | + m.put("zdlv", c.getSzfczdl()+"%"); | ||
| 213 | + m.put("ddzdbcs", c.getSjszddzds()); | ||
| 214 | + m.put("ddzdlv", c.getSzddzdl()+"%"); | ||
| 215 | + tempList.add(m); | ||
| 216 | + } | ||
| 217 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 218 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 219 | + m.put("date", date); | ||
| 220 | + m.put("endDate", endDate); | ||
| 221 | + ReportUtils ee = new ReportUtils(); | ||
| 222 | + try { | ||
| 223 | + listI.add(tempList.iterator()); | ||
| 224 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 225 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + "calcSheetList1.xls", | ||
| 226 | + path + "export/发车到站准点率"+date.replaceAll("-", "")+"-"+endDate.replaceAll("-", "")+".xls"); | ||
| 227 | + } catch (Exception e) { | ||
| 228 | + // TODO: handle exception | ||
| 229 | + e.printStackTrace(); | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + return list; | ||
| 233 | + } | ||
| 234 | + @Override | ||
| 235 | + public List<Sheet> calcSheet(Map<String, Object> map) { | ||
| 236 | + // TODO Auto-generated method stub | ||
| 237 | + System.out.println(); | ||
| 238 | + String line=map.get("line").toString(); | ||
| 239 | + String date=map.get("date").toString(); | ||
| 240 | + String dir =map.get("dir").toString(); | ||
| 241 | + List<ScheduleRealInfo> list=scheduleRealInfoRepository.scheduleDaily(line, date); | ||
| 242 | + Line l =lineRepository.findByLineCode(line); | ||
| 243 | + List<Sheet> listSheet=new ArrayList<Sheet>(); | ||
| 244 | + if(list.size()>0){ | ||
| 245 | + if(dir.equals("1")){ | ||
| 246 | + listSheet=calcSheetFcZdl(list, list.get(0).getXlBm(),l.getStartStationName(),l.getEndStationName()); | ||
| 247 | + }else{ | ||
| 248 | + listSheet=calcSheetDdZdl(list, list.get(0).getXlBm(),l.getStartStationName(),l.getEndStationName()); | ||
| 249 | + } | ||
| 250 | + if(map.get("type").equals("export")){ | ||
| 251 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 252 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 253 | + ReportUtils ee = new ReportUtils(); | ||
| 254 | + try { | ||
| 255 | + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | ||
| 256 | + for(int i = 0; i < listSheet.size(); i++){ | ||
| 257 | + Map<String, Object> temp = new HashMap<String, Object>(); | ||
| 258 | + Sheet s = listSheet.get(i); | ||
| 259 | + temp.put("id", i+1); | ||
| 260 | + temp.put("date", s.getDate()); | ||
| 261 | + temp.put("line", s.getLine()); | ||
| 262 | + temp.put("zdname", s.getZdname()); | ||
| 263 | + temp.put("jhsj", s.getJhsj()); | ||
| 264 | + temp.put("sjsj", s.getSjsj()); | ||
| 265 | + temp.put("sfzd", s.getSfzd()); | ||
| 266 | + tempList.add(temp); | ||
| 267 | + } | ||
| 268 | + listI.add(tempList.iterator()); | ||
| 269 | + m.put("date", date); | ||
| 270 | + String fileName=""; | ||
| 271 | + if(dir.equals("1")){ | ||
| 272 | + fileName="发车准点率"+date; | ||
| 273 | + }else{ | ||
| 274 | + fileName="到站准点率"+date; | ||
| 275 | + } | ||
| 276 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 277 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/sheetList2.xls", | ||
| 278 | + path + "export/"+fileName+".xls"); | ||
| 279 | + } catch (Exception e) { | ||
| 280 | + // TODO: handle exception | ||
| 281 | + e.printStackTrace(); | ||
| 282 | + } | ||
| 283 | + | ||
| 284 | + } | ||
| 285 | + } | ||
| 286 | + return listSheet; | ||
| 287 | + } | ||
| 288 | + | ||
| 289 | + private List<Sheet> calcSheetFcZdl(List<ScheduleRealInfo> lists,String line,String qdz,String zdz) { | ||
| 290 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | ||
| 291 | + SimpleDateFormat sdf_ = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 292 | + DecimalFormat df = new DecimalFormat("0.00"); | ||
| 293 | + List<Sheet> listSheet=new ArrayList<Sheet>(); | ||
| 294 | + List<ScheduleRealInfo> listjh0 = new ArrayList<ScheduleRealInfo>(); | ||
| 295 | + List<ScheduleRealInfo> listjh1 = new ArrayList<ScheduleRealInfo>(); | ||
| 296 | + List<ScheduleRealInfo> listsj0 = new ArrayList<ScheduleRealInfo>(); | ||
| 297 | + List<ScheduleRealInfo> listsj1 = new ArrayList<ScheduleRealInfo>(); | ||
| 298 | + long minFcsj = minFcsj(line); | ||
| 299 | + for (int j = 0; j < lists.size(); j++) { | ||
| 300 | + ScheduleRealInfo s = lists.get(j); | ||
| 301 | + boolean fage=true; | ||
| 302 | + if(s.getBcType().equals("region")){ | ||
| 303 | + if(s.getXlDir().equals("0")){ | ||
| 304 | + if(!s.getQdzName().equals(qdz)) | ||
| 305 | + fage=false; | ||
| 306 | + }else{ | ||
| 307 | + if(!s.getQdzName().equals(zdz)) | ||
| 308 | + fage=false; | ||
| 309 | + } | ||
| 310 | + } | ||
| 311 | + if (!isInOut(s) && fage) { | ||
| 312 | + String[] fcsj = s.getFcsj().split(":"); | ||
| 313 | + Long fcsjL = Long.parseLong(fcsj[0]) * 60 + Long.parseLong(fcsj[1]); | ||
| 314 | + Long fcsjT = 0L; | ||
| 315 | + if (fcsjL < minFcsj) { | ||
| 316 | + Calendar calendar = new GregorianCalendar(); | ||
| 317 | + calendar.setTime(s.getScheduleDate()); | ||
| 318 | + calendar.add(calendar.DATE, 1); | ||
| 319 | + Date date = calendar.getTime(); | ||
| 320 | + try { | ||
| 321 | + fcsjT = sdf.parse(sdf_.format(date) + " " + s.getFcsj()).getTime(); | ||
| 322 | + } catch (ParseException e) { | ||
| 323 | + // TODO Auto-generated catch block | ||
| 324 | + e.printStackTrace(); | ||
| 325 | + } | ||
| 326 | + } else { | ||
| 327 | + try { | ||
| 328 | + fcsjT = sdf.parse(s.getScheduleDateStr() + " " + s.getFcsj()).getTime(); | ||
| 329 | + } catch (ParseException e) { | ||
| 330 | + // TODO Auto-generated catch block | ||
| 331 | + e.printStackTrace(); | ||
| 332 | + } | ||
| 333 | + } | ||
| 334 | + Long fcsjAcual = 0L; | ||
| 335 | + if (StringUtils.isEmpty(s.getFcsjActual())) { | ||
| 336 | + s.setFcsjActualTime(0L); | ||
| 337 | + s.setFcsjT(fcsjT); | ||
| 338 | + } else { | ||
| 339 | + try { | ||
| 340 | + fcsjAcual = sdf.parse(s.getRealExecDate() + " " + s.getFcsjActual()).getTime(); | ||
| 341 | + s.setFcsjActualTime(fcsjAcual); | ||
| 342 | + s.setFcsjT(fcsjT); | ||
| 343 | + } catch (ParseException e) { | ||
| 344 | + // TODO Auto-generated catch block | ||
| 345 | + e.printStackTrace(); | ||
| 346 | + } | ||
| 347 | + } | ||
| 348 | + if (s.isSflj()) { | ||
| 349 | + if (s.getXlDir().equals("0")) { | ||
| 350 | + listsj0.add(s); | ||
| 351 | + } else { | ||
| 352 | + listsj1.add(s); | ||
| 353 | + } | ||
| 354 | + } else { | ||
| 355 | + if (s.getXlDir().equals("0")) { | ||
| 356 | + listsj0.add(s); | ||
| 357 | + listjh0.add(s); | ||
| 358 | + } else { | ||
| 359 | + listsj1.add(s); | ||
| 360 | + listjh1.add(s); | ||
| 361 | + } | ||
| 362 | + } | ||
| 363 | + } | ||
| 364 | + } | ||
| 365 | + Collections.sort(listjh0, new ComparableReal()); | ||
| 366 | + Collections.sort(listjh1, new ComparableReal()); | ||
| 367 | + Collections.sort(listsj0, new ComparableAcual()); | ||
| 368 | + Collections.sort(listsj1, new ComparableAcual()); | ||
| 369 | + Map<String, Object> mjh = new HashMap<String, Object>(); | ||
| 370 | + Map<String, Object> msj = new HashMap<String, Object>(); | ||
| 371 | + Sheet sheet; | ||
| 372 | + //获取上行所有准点班次 | ||
| 373 | + for (int k = 0; k < listjh0.size(); k++) { | ||
| 374 | + ScheduleRealInfo sJh = listjh0.get(k); | ||
| 375 | + for (int j = 0; j < listsj0.size(); j++) { | ||
| 376 | + ScheduleRealInfo sSj = listsj0.get(j); | ||
| 377 | + long sjc = sSj.getFcsjActualTime() - sJh.getFcsjT(); | ||
| 378 | + if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) { | ||
| 379 | + if (mjh.get(String.valueOf(sJh.getId())) == null && msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 380 | + sheet = new Sheet(); | ||
| 381 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 382 | + sheet.setRealDate(sSj.getRealExecDate()); | ||
| 383 | + sheet.setLine(sJh.getXlName()); | ||
| 384 | + sheet.setZdname(sJh.getQdzName()); | ||
| 385 | + sheet.setJhsj(sJh.getFcsj()); | ||
| 386 | + sheet.setSjsj(sSj.getFcsjActual()); | ||
| 387 | + sheet.setSfzd("准点"); | ||
| 388 | + sheet.setXlDir("0"); | ||
| 389 | + listSheet.add(sheet); | ||
| 390 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 391 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 392 | + } | ||
| 393 | + } | ||
| 394 | + } | ||
| 395 | + } | ||
| 396 | + // 获取上行所有不准点班次 | ||
| 397 | + | ||
| 398 | + for (int k = 0; k < listjh0.size(); k++) { | ||
| 399 | + ScheduleRealInfo sJh = listjh0.get(k); | ||
| 400 | + for (int j = 0; j < listsj0.size(); j++) { | ||
| 401 | + ScheduleRealInfo sSj = listsj0.get(j); | ||
| 402 | + if (mjh.get(String.valueOf(sJh.getId())) == null&&msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 403 | + sheet = new Sheet(); | ||
| 404 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 405 | + sheet.setRealDate(sSj.getRealExecDate()); | ||
| 406 | + sheet.setLine(sJh.getXlName()); | ||
| 407 | + sheet.setZdname(sJh.getQdzName()); | ||
| 408 | + sheet.setJhsj(sJh.getFcsj()); | ||
| 409 | + sheet.setSjsj(sSj.getFcsjActual()==null?"烂班":sSj.getFcsjActual()); | ||
| 410 | + sheet.setSfzd("不准点"); | ||
| 411 | + sheet.setXlDir("0"); | ||
| 412 | + listSheet.add(sheet); | ||
| 413 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 414 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 415 | + } | ||
| 416 | + | ||
| 417 | + } | ||
| 418 | + } | ||
| 419 | + // 获取下行所有准点班次 | ||
| 420 | + for (int k = 0; k < listjh1.size(); k++) { | ||
| 421 | + ScheduleRealInfo sJh = listjh1.get(k); | ||
| 422 | + for (int j = 0; j < listsj1.size(); j++) { | ||
| 423 | + ScheduleRealInfo sSj = listsj1.get(j); | ||
| 424 | + long sjc = sSj.getFcsjActualTime() - sJh.getFcsjT(); | ||
| 425 | + if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) { | ||
| 426 | + if (mjh.get(String.valueOf(sJh.getId())) == null && msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 427 | + sheet = new Sheet(); | ||
| 428 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 429 | + sheet.setRealDate(sSj.getRealExecDate()); | ||
| 430 | + sheet.setLine(sJh.getXlName()); | ||
| 431 | + sheet.setZdname(sJh.getQdzName()); | ||
| 432 | + sheet.setJhsj(sJh.getFcsj()); | ||
| 433 | + sheet.setSjsj(sSj.getFcsjActual()); | ||
| 434 | + sheet.setSfzd("准点"); | ||
| 435 | + sheet.setXlDir("1"); | ||
| 436 | + listSheet.add(sheet); | ||
| 437 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 438 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 439 | + } | ||
| 440 | + } | ||
| 441 | + } | ||
| 442 | + } | ||
| 443 | + | ||
| 444 | + // 获取下行所有不准点班次 | ||
| 445 | + | ||
| 446 | + for (int k = 0; k < listjh1.size(); k++) { | ||
| 447 | + ScheduleRealInfo sJh = listjh1.get(k); | ||
| 448 | + for (int j = 0; j < listsj1.size(); j++) { | ||
| 449 | + ScheduleRealInfo sSj = listsj1.get(j); | ||
| 450 | + if (mjh.get(String.valueOf(sJh.getId())) == null&&msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 451 | + sheet = new Sheet(); | ||
| 452 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 453 | + sheet.setRealDate(sSj.getRealExecDate()); | ||
| 454 | + sheet.setLine(sJh.getXlName()); | ||
| 455 | + sheet.setZdname(sJh.getQdzName()); | ||
| 456 | + sheet.setJhsj(sJh.getFcsj()); | ||
| 457 | + sheet.setSjsj(sSj.getFcsjActual()==null?"烂班":sSj.getFcsjActual()); | ||
| 458 | + sheet.setSfzd("不准点"); | ||
| 459 | + sheet.setXlDir("1"); | ||
| 460 | + listSheet.add(sheet); | ||
| 461 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 462 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 463 | + } | ||
| 464 | + | ||
| 465 | + } | ||
| 466 | + } | ||
| 467 | + | ||
| 468 | + Collections.sort(listSheet, new ComparableSheet()); | ||
| 469 | + return listSheet; | ||
| 470 | + } | ||
| 471 | + | ||
| 472 | + | ||
| 473 | + private List<Sheet> calcSheetDdZdl(List<ScheduleRealInfo> lists,String line,String qdz,String zdz) { | ||
| 474 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | ||
| 475 | + SimpleDateFormat sdf_ = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 476 | + DecimalFormat df = new DecimalFormat("0.00"); | ||
| 477 | + List<Sheet> listSheet=new ArrayList<Sheet>(); | ||
| 478 | + List<ScheduleRealInfo> listjh0 = new ArrayList<ScheduleRealInfo>(); | ||
| 479 | + List<ScheduleRealInfo> listjh1 = new ArrayList<ScheduleRealInfo>(); | ||
| 480 | + List<ScheduleRealInfo> listsj0 = new ArrayList<ScheduleRealInfo>(); | ||
| 481 | + List<ScheduleRealInfo> listsj1 = new ArrayList<ScheduleRealInfo>(); | ||
| 482 | + long minFcsj = minFcsj(line); | ||
| 483 | + for (int j = 0; j < lists.size(); j++) { | ||
| 484 | + ScheduleRealInfo s = lists.get(j); | ||
| 485 | + boolean fage=true; | ||
| 486 | + if(s.getBcType().equals("region")){ | ||
| 487 | + if(s.getXlDir().equals("0")){ | ||
| 488 | + if(!s.getQdzName().equals(qdz)) | ||
| 489 | + fage=false; | ||
| 490 | + }else{ | ||
| 491 | + if(!s.getQdzName().equals(zdz)) | ||
| 492 | + fage=false; | ||
| 493 | + } | ||
| 494 | + } | ||
| 495 | + if (!isInOut(s) && fage) { | ||
| 496 | + String[] fcsj = s.getFcsj().split(":"); | ||
| 497 | + Long fcsjL = Long.parseLong(fcsj[0]) * 60 + Long.parseLong(fcsj[1]); | ||
| 498 | + Long fcsjT = 0L; | ||
| 499 | + if (fcsjL < minFcsj) { | ||
| 500 | + Calendar calendar = new GregorianCalendar(); | ||
| 501 | + calendar.setTime(s.getScheduleDate()); | ||
| 502 | + calendar.add(calendar.DATE, 1); | ||
| 503 | + Date date = calendar.getTime(); | ||
| 504 | + try { | ||
| 505 | + fcsjT = sdf.parse(sdf_.format(date) + " " + s.getFcsj()).getTime(); | ||
| 506 | + } catch (ParseException e) { | ||
| 507 | + // TODO Auto-generated catch block | ||
| 508 | + e.printStackTrace(); | ||
| 509 | + } | ||
| 510 | + } else { | ||
| 511 | + try { | ||
| 512 | + fcsjT = sdf.parse(s.getScheduleDateStr() + " " + s.getFcsj()).getTime(); | ||
| 513 | + } catch (ParseException e) { | ||
| 514 | + // TODO Auto-generated catch block | ||
| 515 | + e.printStackTrace(); | ||
| 516 | + } | ||
| 517 | + } | ||
| 518 | + //计划达到时间 | ||
| 519 | + Long ddsjT=0L; | ||
| 520 | + try { | ||
| 521 | + ddsjT = sdf.parse(s.getRealExecDate()+" "+s.getZdsj()).getTime(); | ||
| 522 | + } catch (ParseException e1) { | ||
| 523 | + // TODO Auto-generated catch block | ||
| 524 | + e1.printStackTrace(); | ||
| 525 | + } | ||
| 526 | + | ||
| 527 | + Long fcsjAcual = 0L; | ||
| 528 | + if (StringUtils.isEmpty(s.getFcsjActual())) { | ||
| 529 | + s.setFcsjActualTime(0L); | ||
| 530 | + s.setFcsjT(fcsjT); | ||
| 531 | + } else { | ||
| 532 | + try { | ||
| 533 | + fcsjAcual = sdf.parse(s.getRealExecDate() + " " + s.getFcsjActual()).getTime(); | ||
| 534 | + s.setFcsjActualTime(fcsjAcual); | ||
| 535 | + s.setFcsjT(fcsjT); | ||
| 536 | + } catch (ParseException e) { | ||
| 537 | + // TODO Auto-generated catch block | ||
| 538 | + e.printStackTrace(); | ||
| 539 | + } | ||
| 540 | + } | ||
| 541 | + if(fcsjT.longValue()>ddsjT.longValue()){ | ||
| 542 | + ddsjT=ddsjT+24*60*60*1000; | ||
| 543 | + } | ||
| 544 | + s.setZdsjT(ddsjT); | ||
| 545 | + if(StringUtils.isEmpty(s.getZdsjActual())){ | ||
| 546 | + s.setZdsjActualTime(0L); | ||
| 547 | + }else{ | ||
| 548 | + try { | ||
| 549 | + Long ddsjActualT = sdf.parse(s.getRealExecDate()+" "+s.getZdsjActual()).getTime(); | ||
| 550 | + if(Math.abs(ddsjActualT-ddsjT)/60000>1000){ | ||
| 551 | + if(ddsjActualT.longValue()>ddsjT.longValue()){ | ||
| 552 | + ddsjActualT=ddsjActualT-24*60*60*1000; | ||
| 553 | + }else{ | ||
| 554 | + ddsjActualT=ddsjActualT+24*60*60*1000; | ||
| 555 | + } | ||
| 556 | + } | ||
| 557 | + s.setZdsjActualTime(ddsjActualT); | ||
| 558 | + } catch (ParseException e) { | ||
| 559 | + // TODO Auto-generated catch block | ||
| 560 | + e.printStackTrace(); | ||
| 561 | + } | ||
| 562 | + } | ||
| 563 | + if (s.isSflj()) { | ||
| 564 | + if (s.getXlDir().equals("0")) { | ||
| 565 | + listsj0.add(s); | ||
| 566 | + } else { | ||
| 567 | + listsj1.add(s); | ||
| 568 | + } | ||
| 569 | + } else { | ||
| 570 | + if (s.getXlDir().equals("0")) { | ||
| 571 | + listsj0.add(s); | ||
| 572 | + listjh0.add(s); | ||
| 573 | + } else { | ||
| 574 | + listsj1.add(s); | ||
| 575 | + listjh1.add(s); | ||
| 576 | + } | ||
| 577 | + } | ||
| 578 | + } | ||
| 579 | + } | ||
| 580 | + Collections.sort(listjh0, new ComparableJhZd()); | ||
| 581 | + Collections.sort(listjh1, new ComparableJhZd()); | ||
| 582 | + Collections.sort(listsj0, new ComparableZdAcual()); | ||
| 583 | + Collections.sort(listsj1, new ComparableZdAcual()); | ||
| 584 | + Map<String, Object> mjh = new HashMap<String, Object>(); | ||
| 585 | + Map<String, Object> msj = new HashMap<String, Object>(); | ||
| 586 | + Sheet sheet; | ||
| 587 | + //获取上行所有准点班次 | ||
| 588 | + for (int k = 0; k < listjh0.size(); k++) { | ||
| 589 | + ScheduleRealInfo sJh = listjh0.get(k); | ||
| 590 | + for (int j = 0; j < listsj0.size(); j++) { | ||
| 591 | + ScheduleRealInfo sSj = listsj0.get(j); | ||
| 592 | + long sjc = sSj.getZdsjActualTime() - sJh.getZdsjT(); | ||
| 593 | + if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) { | ||
| 594 | + if (mjh.get(String.valueOf(sJh.getId())) == null && msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 595 | + sheet = new Sheet(); | ||
| 596 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 597 | + try { | ||
| 598 | + long abs=Math.abs(sdf.parse(sJh.getRealExecDate()+" "+sJh.getFcsj()).getTime()- | ||
| 599 | + sdf.parse(sJh.getRealExecDate()+" "+sJh.getZdsj()).getTime())/60000; | ||
| 600 | + if(abs>1000){ | ||
| 601 | + Calendar calendar = new GregorianCalendar(); | ||
| 602 | + calendar.setTime(sdf_.parse(sJh.getRealExecDate())); | ||
| 603 | + calendar.add(calendar.DATE, 1); | ||
| 604 | + Date date = calendar.getTime(); | ||
| 605 | + sheet.setRealDate(sdf_.format(date)); | ||
| 606 | + }else{ | ||
| 607 | + sheet.setRealDate(sJh.getRealExecDate()); | ||
| 608 | + } | ||
| 609 | + } catch (ParseException e) { | ||
| 610 | + // TODO Auto-generated catch block | ||
| 611 | + e.printStackTrace(); | ||
| 612 | + } | ||
| 613 | + sheet.setLine(sJh.getXlName()); | ||
| 614 | + sheet.setZdname(sJh.getQdzName()); | ||
| 615 | + sheet.setJhsj(sJh.getZdsj()); | ||
| 616 | + sheet.setSjsj(sSj.getZdsjActual()); | ||
| 617 | + sheet.setSfzd("准点"); | ||
| 618 | + sheet.setXlDir("0"); | ||
| 619 | + listSheet.add(sheet); | ||
| 620 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 621 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 622 | + } | ||
| 623 | + } | ||
| 624 | + } | ||
| 625 | + } | ||
| 626 | + // 获取上行所有不准点班次 | ||
| 627 | + for (int k = 0; k < listjh0.size(); k++) { | ||
| 628 | + ScheduleRealInfo sJh = listjh0.get(k); | ||
| 629 | + for (int j = 0; j < listsj0.size(); j++) { | ||
| 630 | + ScheduleRealInfo sSj = listsj0.get(j); | ||
| 631 | + if (mjh.get(String.valueOf(sJh.getId())) == null&&msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 632 | + sheet = new Sheet(); | ||
| 633 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 634 | + try { | ||
| 635 | + long abs=Math.abs(sdf.parse(sJh.getRealExecDate()+" "+sJh.getFcsj()).getTime()- | ||
| 636 | + sdf.parse(sJh.getRealExecDate()+" "+sJh.getZdsj()).getTime())/60000; | ||
| 637 | + if(abs>1000){ | ||
| 638 | + Calendar calendar = new GregorianCalendar(); | ||
| 639 | + calendar.setTime(sdf_.parse(sJh.getRealExecDate())); | ||
| 640 | + calendar.add(calendar.DATE, 1); | ||
| 641 | + Date date = calendar.getTime(); | ||
| 642 | + sheet.setRealDate(sdf_.format(date)); | ||
| 643 | + }else{ | ||
| 644 | + sheet.setRealDate(sJh.getRealExecDate()); | ||
| 645 | + } | ||
| 646 | + } catch (ParseException e) { | ||
| 647 | + // TODO Auto-generated catch block | ||
| 648 | + e.printStackTrace(); | ||
| 649 | + } | ||
| 650 | + sheet.setLine(sJh.getXlName()); | ||
| 651 | + sheet.setZdname(sJh.getQdzName()); | ||
| 652 | + sheet.setJhsj(sJh.getZdsj()); | ||
| 653 | + sheet.setSjsj(sSj.getZdsjActual()==null?"烂班":sSj.getZdsjActual()); | ||
| 654 | + sheet.setSfzd("不准点"); | ||
| 655 | + sheet.setXlDir("0"); | ||
| 656 | + listSheet.add(sheet); | ||
| 657 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 658 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 659 | + } | ||
| 660 | + | ||
| 661 | + } | ||
| 662 | + } | ||
| 663 | + // 获取下行所有准点班次 | ||
| 664 | + for (int k = 0; k < listjh1.size(); k++) { | ||
| 665 | + ScheduleRealInfo sJh = listjh1.get(k); | ||
| 666 | + for (int j = 0; j < listsj1.size(); j++) { | ||
| 667 | + ScheduleRealInfo sSj = listsj1.get(j); | ||
| 668 | + long sjc = sSj.getZdsjActualTime() - sJh.getZdsjT(); | ||
| 669 | + if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) { | ||
| 670 | + if (mjh.get(String.valueOf(sJh.getId())) == null && msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 671 | + sheet = new Sheet(); | ||
| 672 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 673 | + try { | ||
| 674 | + long abs=Math.abs(sdf.parse(sJh.getRealExecDate()+" "+sJh.getFcsj()).getTime()- | ||
| 675 | + sdf.parse(sJh.getRealExecDate()+" "+sJh.getZdsj()).getTime())/60000; | ||
| 676 | + if(abs>1000){ | ||
| 677 | + Calendar calendar = new GregorianCalendar(); | ||
| 678 | + calendar.setTime(sdf_.parse(sJh.getRealExecDate())); | ||
| 679 | + calendar.add(calendar.DATE, 1); | ||
| 680 | + Date date = calendar.getTime(); | ||
| 681 | + sheet.setRealDate(sdf_.format(date)); | ||
| 682 | + }else{ | ||
| 683 | + sheet.setRealDate(sJh.getRealExecDate()); | ||
| 684 | + } | ||
| 685 | + } catch (ParseException e) { | ||
| 686 | + // TODO Auto-generated catch block | ||
| 687 | + e.printStackTrace(); | ||
| 688 | + } | ||
| 689 | + | ||
| 690 | + sheet.setLine(sJh.getXlName()); | ||
| 691 | + sheet.setZdname(sJh.getQdzName()); | ||
| 692 | + sheet.setJhsj(sJh.getZdsj()); | ||
| 693 | + sheet.setSjsj(sSj.getZdsjActual()); | ||
| 694 | + sheet.setSfzd("准点"); | ||
| 695 | + sheet.setXlDir("1"); | ||
| 696 | + listSheet.add(sheet); | ||
| 697 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 698 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 699 | + } | ||
| 700 | + } | ||
| 701 | + } | ||
| 702 | + } | ||
| 703 | + | ||
| 704 | + // 获取下行所有不准点班次 | ||
| 705 | + for (int k = 0; k < listjh1.size(); k++) { | ||
| 706 | + ScheduleRealInfo sJh = listjh1.get(k); | ||
| 707 | + for (int j = 0; j < listsj1.size(); j++) { | ||
| 708 | + ScheduleRealInfo sSj = listsj1.get(j); | ||
| 709 | + if (mjh.get(String.valueOf(sJh.getId())) == null&&msj.get(String.valueOf(sSj.getId())) == null) { | ||
| 710 | + sheet = new Sheet(); | ||
| 711 | + sheet.setDate(sJh.getScheduleDateStr()); | ||
| 712 | + try { | ||
| 713 | + long abs=Math.abs(sdf.parse(sJh.getRealExecDate()+" "+sJh.getFcsj()).getTime()- | ||
| 714 | + sdf.parse(sJh.getRealExecDate()+" "+sJh.getZdsj()).getTime())/60000; | ||
| 715 | + if(abs>1000){ | ||
| 716 | + Calendar calendar = new GregorianCalendar(); | ||
| 717 | + calendar.setTime(sdf_.parse(sJh.getRealExecDate())); | ||
| 718 | + calendar.add(calendar.DATE, 1); | ||
| 719 | + Date date = calendar.getTime(); | ||
| 720 | + sheet.setRealDate(sdf_.format(date)); | ||
| 721 | + }else{ | ||
| 722 | + sheet.setRealDate(sJh.getRealExecDate()); | ||
| 723 | + } | ||
| 724 | + } catch (ParseException e) { | ||
| 725 | + // TODO Auto-generated catch block | ||
| 726 | + e.printStackTrace(); | ||
| 727 | + } | ||
| 728 | + sheet.setLine(sJh.getXlName()); | ||
| 729 | + sheet.setZdname(sJh.getQdzName()); | ||
| 730 | + sheet.setJhsj(sJh.getZdsj()); | ||
| 731 | + sheet.setSjsj(sSj.getZdsjActual()==null?"烂班":sSj.getZdsjActual()); | ||
| 732 | + sheet.setSfzd("不准点"); | ||
| 733 | + sheet.setXlDir("1"); | ||
| 734 | + listSheet.add(sheet); | ||
| 735 | + mjh.put(String.valueOf(sJh.getId()), sJh.getId()); | ||
| 736 | + msj.put(String.valueOf(sSj.getId()), sSj.getId()); | ||
| 737 | + } | ||
| 738 | + | ||
| 739 | + } | ||
| 740 | + } | ||
| 741 | + | ||
| 742 | + Collections.sort(listSheet, new ComparableSheet()); | ||
| 743 | + return listSheet; | ||
| 744 | + } | ||
| 745 | + private Long minFcsj(String line){ | ||
| 746 | + String minfcsj="02:00"; | ||
| 747 | + List<Line> lineList=lineRepository.findLineByCode(line); | ||
| 748 | + if(lineList.size()>0){ | ||
| 749 | + String sqlMinYysj="select start_opt from bsth_c_line_config where " | ||
| 750 | + + " id = (" | ||
| 751 | + + "select max(id) from bsth_c_line_config where line ='"+lineList.get(0).getId() +"'" | ||
| 752 | + + ")"; | ||
| 753 | + minfcsj= jdbcTemplate.queryForObject(sqlMinYysj, String.class); | ||
| 754 | + } | ||
| 755 | + String[] minSjs = minfcsj.split(":"); | ||
| 756 | + //车辆最早发车时间 用了过滤超第二天0点的数据 | ||
| 757 | + Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]); | ||
| 758 | + return minSj; | ||
| 759 | + } | ||
| 760 | + | ||
| 761 | + private static boolean isInOut(ScheduleRealInfo s){ | ||
| 762 | + boolean fage=false; | ||
| 763 | + if(s.getBcType().equals("in")){ | ||
| 764 | + fage=true; | ||
| 765 | + } | ||
| 766 | + if(s.getBcType().equals("out")){ | ||
| 767 | + fage=true; | ||
| 768 | + } | ||
| 769 | + if(s.getBcType().equals("ldks")){ | ||
| 770 | + fage=true; | ||
| 771 | + } | ||
| 772 | + if(s.isCcService()){ | ||
| 773 | + fage=true; | ||
| 774 | + } | ||
| 775 | + return fage; | ||
| 776 | + } | ||
| 777 | + @Override | ||
| 778 | + public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map) { | ||
| 779 | + final DecimalFormat df = new DecimalFormat("0.00"); | ||
| 780 | + String line=""; | ||
| 781 | + if(map.get("line")!=null){ | ||
| 782 | + line =map.get("line").toString().trim(); | ||
| 783 | + } | ||
| 784 | + String gs=""; | ||
| 785 | + if(map.get("gsdmTurn")!=null){ | ||
| 786 | + gs=map.get("gsdmTurn").toString().trim(); | ||
| 787 | + } | ||
| 788 | + String fgs=""; | ||
| 789 | + if(map.get("fgsdmTurn")!=null){ | ||
| 790 | + fgs=map.get("fgsdmTurn").toString().trim(); | ||
| 791 | + } | ||
| 792 | + String nature="0"; | ||
| 793 | + if(map.get("nature")!=null){ | ||
| 794 | + nature=map.get("nature").toString(); | ||
| 795 | + } | ||
| 796 | + Map<String, Boolean> lineMap=lineService.lineNature(); | ||
| 797 | + | ||
| 798 | + String startDate=map.get("startDate").toString(); | ||
| 799 | + String endDate=map.get("endDate").toString(); | ||
| 800 | + String date=startDate+"-"+endDate; | ||
| 801 | + if(startDate.equals(endDate)){ | ||
| 802 | + date=startDate; | ||
| 803 | + }else{ | ||
| 804 | + date=startDate+"-"+endDate; | ||
| 805 | + } | ||
| 806 | + String type=map.get("type").toString(); | ||
| 807 | + final String dates=date; | ||
| 808 | + String sql_=""; | ||
| 809 | + if(line.equals("")){ | ||
| 810 | + sql_= " and gsdm ='"+gs+"' and fgsdm like '%"+fgs+"%'"; | ||
| 811 | + }else{ | ||
| 812 | + sql_=" and xl='"+line+"'"; | ||
| 813 | + } | ||
| 814 | + String sql="select t.*,y.warrant_car as qzpcs from (" | ||
| 815 | + + " select gsdm,fgsdm,xl,xl_name,sum(jhcc) as jhcc,sum(sjcc) as sjcc," | ||
| 816 | + + " sum(sjcczgf) as sjcczgf,sum(jhbcs) as jhbcs,sum(sjbcs) as sjbcs " | ||
| 817 | + + " from bsth_c_calc_sheet where date >='"+startDate+"' and date <='"+endDate+"'" | ||
| 818 | + + sql_ | ||
| 819 | + + " group by gsdm,fgsdm,xl,xl_name ) " | ||
| 820 | + + " t LEFT JOIN bsth_c_line y " | ||
| 821 | + + " on t.xl=y.line_code order by fgsdm,xl_name"; | ||
| 822 | + List<Map<String, Object>> lists=jdbcTemplate.query(sql, | ||
| 823 | + new RowMapper<Map<String, Object>>(){ | ||
| 824 | + @Override | ||
| 825 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 826 | + Map<String, Object> s=new HashMap<String,Object>(); | ||
| 827 | + s.put("rq",dates); | ||
| 828 | + s.put("gsdm", rs.getString("gsdm")); | ||
| 829 | + s.put("fgsdm", rs.getString("fgsdm")); | ||
| 830 | + s.put("gsName", BasicData.businessCodeNameMap.get(rs.getString("gsdm"))); | ||
| 831 | + s.put("fgsName", BasicData.businessFgsCodeNameMap.get(rs.getString("fgsdm")+"_"+rs.getString("gsdm"))); | ||
| 832 | + s.put("xl", rs.getString("xl")); | ||
| 833 | + s.put("xlName", rs.getString("xl_name")); | ||
| 834 | + s.put("jhcc", rs.getInt("jhcc")); | ||
| 835 | + s.put("sjcc", rs.getInt("sjcc")); | ||
| 836 | + s.put("qzpcs",rs.getInt("qzpcs")); | ||
| 837 | + s.put("sjcczgf", rs.getInt("sjcczgf")); | ||
| 838 | + if(rs.getInt("jhcc")>0){ | ||
| 839 | + s.put("ccl",df.format((float)rs.getInt("sjcc")/rs.getInt("jhcc")*100)+"%"); | ||
| 840 | + s.put("cclzgf", df.format((float)rs.getInt("sjcczgf")/rs.getInt("jhcc")*100)+"%"); | ||
| 841 | + }else{ | ||
| 842 | + s.put("ccl", "0.00%"); | ||
| 843 | + s.put("cclzgf","0.00%"); | ||
| 844 | + } | ||
| 845 | + s.put("jhbc", rs.getInt("jhbcs")); | ||
| 846 | + s.put("sjbc", rs.getInt("sjbcs")); | ||
| 847 | + if(rs.getInt("jhbcs")>0){ | ||
| 848 | + s.put("zxl", df.format((float)rs.getInt("sjbcs")/rs.getInt("jhbcs")*100)+"%"); | ||
| 849 | + }else{ | ||
| 850 | + s.put("zxl", "0.00%"); | ||
| 851 | + } | ||
| 852 | + s.put("sm", ""); | ||
| 853 | + return s; | ||
| 854 | + } | ||
| 855 | + }); | ||
| 856 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 857 | + | ||
| 858 | + List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); | ||
| 859 | + int jhcc = 0, sjcc = 0,sjcczgf=0;; | ||
| 860 | + int jhbc = 0, sjbc = 0; | ||
| 861 | + int qz = 0; | ||
| 862 | + int count=0; | ||
| 863 | + Map<String, String> xlMap=new HashMap<String,String>(); | ||
| 864 | + for(Map<String, Object> m : lists){ | ||
| 865 | + if(nature.equals("0")){ | ||
| 866 | + list.add(m); | ||
| 867 | + jhcc += Integer.valueOf(m.get("jhcc").toString()); | ||
| 868 | + sjcc += Integer.valueOf(m.get("sjcc").toString()); | ||
| 869 | + jhbc += Integer.valueOf(m.get("jhbc").toString()); | ||
| 870 | + sjbc += Integer.valueOf(m.get("sjbc").toString()); | ||
| 871 | + sjcczgf +=Integer.valueOf(m.get("sjcczgf").toString()); | ||
| 872 | + qz += Integer.valueOf(m.get("qzpcs").toString()); | ||
| 873 | + if(xlMap.get(m.get("xl").toString())==null){ | ||
| 874 | + count++; | ||
| 875 | + xlMap.put(m.get("xl").toString(), m.get("xl").toString()); | ||
| 876 | + } | ||
| 877 | + }else if(nature.equals("1")){ | ||
| 878 | + if(lineMap.get(m.get("xl").toString())){ | ||
| 879 | + list.add(m); | ||
| 880 | + jhcc += Integer.valueOf(m.get("jhcc").toString()); | ||
| 881 | + sjcc += Integer.valueOf(m.get("sjcc").toString()); | ||
| 882 | + jhbc += Integer.valueOf(m.get("jhbc").toString()); | ||
| 883 | + sjbc += Integer.valueOf(m.get("sjbc").toString()); | ||
| 884 | + sjcczgf +=Integer.valueOf(m.get("sjcczgf").toString()); | ||
| 885 | + qz += Integer.valueOf(m.get("qzpcs").toString()); | ||
| 886 | + if(xlMap.get(m.get("xl").toString())==null){ | ||
| 887 | + count++; | ||
| 888 | + xlMap.put(m.get("xl").toString(), m.get("xl").toString()); | ||
| 889 | + } | ||
| 890 | + } | ||
| 891 | + }else{ | ||
| 892 | + if(!lineMap.get(m.get("xl").toString())){ | ||
| 893 | + list.add(m); | ||
| 894 | + jhcc += Integer.valueOf(m.get("jhcc").toString()); | ||
| 895 | + sjcc += Integer.valueOf(m.get("sjcc").toString()); | ||
| 896 | + jhbc += Integer.valueOf(m.get("jhbc").toString()); | ||
| 897 | + sjbc += Integer.valueOf(m.get("sjbc").toString()); | ||
| 898 | + sjcczgf +=Integer.valueOf(m.get("sjcczgf").toString()); | ||
| 899 | + qz += Integer.valueOf(m.get("qzpcs").toString()); | ||
| 900 | + if(xlMap.get(m.get("xl").toString())==null){ | ||
| 901 | + count++; | ||
| 902 | + xlMap.put(m.get("xl").toString(), m.get("xl").toString()); | ||
| 903 | + } | ||
| 904 | + } | ||
| 905 | + } | ||
| 906 | + | ||
| 907 | + } | ||
| 908 | + | ||
| 909 | + Map<String, Object> tempMap=new HashMap<String,Object>(); | ||
| 910 | + tempMap.put("rq", "分类汇总"); | ||
| 911 | + tempMap.put("line_", "共" + list.size() + "条线路"); | ||
| 912 | + tempMap.put("xlName", "共" +count + "条线路"); | ||
| 913 | + tempMap.put("jhcc", jhcc); | ||
| 914 | + tempMap.put("sjcc", sjcc); | ||
| 915 | + tempMap.put("sjcczgf", sjcczgf); | ||
| 916 | + tempMap.put("jhbc", jhbc); | ||
| 917 | + tempMap.put("sjbc", sjbc); | ||
| 918 | + tempMap.put("qzpcs", qz); | ||
| 919 | + tempMap.put("sm", ""); | ||
| 920 | + if(jhcc != 0 && sjcc != 0){ | ||
| 921 | + tempMap.put("ccl", df.format(((float)sjcc / jhcc)*100)+"%"); | ||
| 922 | + tempMap.put("cclzgf", df.format(((float)sjcczgf / jhcc)*100)+"%"); | ||
| 923 | + }else{ | ||
| 924 | + tempMap.put("ccl", "0.00%"); | ||
| 925 | + tempMap.put("cclzgf", "0.00%"); | ||
| 926 | + } | ||
| 927 | + if(jhbc != 0 && sjbc != 0){ | ||
| 928 | + tempMap.put("zxl", df.format(((float)sjbc / jhbc)*100)+"%"); | ||
| 929 | + }else{ | ||
| 930 | + tempMap.put("zxl", "0.00%"); | ||
| 931 | + } | ||
| 932 | + if (type.equals("export")) { | ||
| 933 | + String lineName=map.get("lineName").toString(); | ||
| 934 | + ReportUtils ee = new ReportUtils(); | ||
| 935 | + listI.add(list.iterator()); | ||
| 936 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 937 | + ee.excelReplace(listI, new Object[] { tempMap }, path + "mould/calcTurnoutrate.xls", path + "export/" | ||
| 938 | + + dates + "-" + lineName + "-营运线路出车率统计表.xls"); | ||
| 939 | + } | ||
| 940 | + list.add(tempMap); | ||
| 941 | + return list; | ||
| 942 | + } | ||
| 943 | +} | ||
| 944 | + | ||
| 945 | +class ComparableSheet implements Comparator<Sheet>{ | ||
| 946 | + @Override | ||
| 947 | + public int compare(Sheet o1, Sheet o2) { | ||
| 948 | + // TODO Auto-generated method stub | ||
| 949 | + return (o1.getXlDir()+o1.getRealDate()+o1.getJhsj()).compareTo((o2.getXlDir()+o2.getRealDate()+o2.getJhsj())); | ||
| 950 | + } | ||
| 951 | +} | ||
| 952 | + | ||
| 953 | +class ComparableZdAcual implements Comparator<ScheduleRealInfo>{ | ||
| 954 | + @Override | ||
| 955 | + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) { | ||
| 956 | + // TODO Auto-generated method stub | ||
| 957 | + return o1.getZdsjActualTime().compareTo(o2.getZdsjActualTime()); | ||
| 958 | + } | ||
| 959 | +} | ||
| 960 | + | ||
| 961 | +class ComparableJhZd implements Comparator<ScheduleRealInfo>{ | ||
| 962 | + @Override | ||
| 963 | + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) { | ||
| 964 | + // TODO Auto-generated method stub | ||
| 965 | + return o1.getZdsjT().compareTo(o2.getZdsjT()); | ||
| 966 | + } | ||
| 967 | +} |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| @@ -1084,14 +1084,21 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -1084,14 +1084,21 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 1084 | while (it.hasNext()) { | 1084 | while (it.hasNext()) { |
| 1085 | ChildTaskPlan childTaskPlan = it.next(); | 1085 | ChildTaskPlan childTaskPlan = it.next(); |
| 1086 | if(!childTaskPlan.isDestroy()){ | 1086 | if(!childTaskPlan.isDestroy()){ |
| 1087 | - if(childTaskPlan.getMileageType().equals("service")){ | ||
| 1088 | - ljyy =Arith.add(ljyy,childTaskPlan.getMileage()); | ||
| 1089 | - } | ||
| 1090 | - if(childTaskPlan.getMileageType().equals("empty")){ | ||
| 1091 | - if(childTaskPlan.getType2().equals("2")||childTaskPlan.getType2().equals("3")){ | ||
| 1092 | - ljjcc =Arith.add(ljjcc, childTaskPlan.getMileage()); | ||
| 1093 | - } | ||
| 1094 | - } | 1087 | + if(childTaskPlan.getCcId()==null){ |
| 1088 | + if(childTaskPlan.getMileageType().equals("service")){ | ||
| 1089 | + ljyy =Arith.add(ljyy,childTaskPlan.getMileage()); | ||
| 1090 | + } | ||
| 1091 | + if(childTaskPlan.getMileageType().equals("empty")){ | ||
| 1092 | + if(childTaskPlan.getType2().equals("2")||childTaskPlan.getType2().equals("3")){ | ||
| 1093 | + ljjcc =Arith.add(ljjcc, childTaskPlan.getMileage()); | ||
| 1094 | + } | ||
| 1095 | + } | ||
| 1096 | + if(childTaskPlan.getMileageType().equals("empty")){ | ||
| 1097 | + if(childTaskPlan.getType2().equals("1")){ | ||
| 1098 | + ljkfks =Arith.add(ljkfks, childTaskPlan.getMileage()); | ||
| 1099 | + } | ||
| 1100 | + } | ||
| 1101 | + } | ||
| 1095 | } | 1102 | } |
| 1096 | } | 1103 | } |
| 1097 | } | 1104 | } |
| @@ -1211,7 +1218,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -1211,7 +1218,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 1211 | // }else{ | 1218 | // }else{ |
| 1212 | if(childTaskPlan.getType2().equals("2")||childTaskPlan.getType2().equals("3")){ | 1219 | if(childTaskPlan.getType2().equals("2")||childTaskPlan.getType2().equals("3")){ |
| 1213 | if (!childTaskPlan.isDestroy()) { | 1220 | if (!childTaskPlan.isDestroy()) { |
| 1214 | - if(childTaskPlan.getReason().equals(item)){ | 1221 | + String reason=childTaskPlan.getReason()==null?"":childTaskPlan.getReason(); |
| 1222 | + if(reason.equals(item)){ | ||
| 1215 | zrwjcclc=Arith.add(zrwjcclc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); | 1223 | zrwjcclc=Arith.add(zrwjcclc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); |
| 1216 | } | 1224 | } |
| 1217 | } | 1225 | } |
| @@ -1607,5 +1615,55 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -1607,5 +1615,55 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 1607 | } | 1615 | } |
| 1608 | return ljgl; | 1616 | return ljgl; |
| 1609 | } | 1617 | } |
| 1618 | + | ||
| 1619 | + @Override | ||
| 1620 | + public double culateLjksgl(List<ScheduleRealInfo> lists) { | ||
| 1621 | + double ljks=0.0; | ||
| 1622 | + for (int i = 0; i < lists.size(); i++) { | ||
| 1623 | + ScheduleRealInfo t=lists.get(i); | ||
| 1624 | + if(t.isSflj()){ | ||
| 1625 | + if(isInOut(t)){ | ||
| 1626 | + Set<ChildTaskPlan> childTaskPlans = t.getcTasks(); | ||
| 1627 | + if(childTaskPlans.isEmpty()){ | ||
| 1628 | + if(!t.isDestroy()){ | ||
| 1629 | + ljks =Arith.add(ljks, t.getJhlc()); | ||
| 1630 | + } | ||
| 1631 | + | ||
| 1632 | + } | ||
| 1633 | + }else{ | ||
| 1634 | + Set<ChildTaskPlan> childTaskPlans = t.getcTasks(); | ||
| 1635 | + if(!childTaskPlans.isEmpty()){ | ||
| 1636 | + Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ||
| 1637 | + while (it.hasNext()) { | ||
| 1638 | + ChildTaskPlan childTaskPlan = it.next(); | ||
| 1639 | + if(!childTaskPlan.isDestroy()){ | ||
| 1640 | + if(childTaskPlan.getMileageType().equals("empty") && childTaskPlan.getCcId()==null){ | ||
| 1641 | + ljks =Arith.add(ljks, childTaskPlan.getMileage()); | ||
| 1642 | + } | ||
| 1643 | + } | ||
| 1644 | + } | ||
| 1645 | + } | ||
| 1646 | + } | ||
| 1647 | + }else{ | ||
| 1648 | + Set<ChildTaskPlan> childTaskPlans = t.getcTasks(); | ||
| 1649 | + if(!childTaskPlans.isEmpty()){ | ||
| 1650 | + Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ||
| 1651 | + while (it.hasNext()) { | ||
| 1652 | + ChildTaskPlan childTaskPlan = it.next(); | ||
| 1653 | + if(childTaskPlan.getCcId()==null){ | ||
| 1654 | + if("empty".equals(childTaskPlan.getMileageType())&&"临加".equals(childTaskPlan.getType1())){ | ||
| 1655 | + if (!childTaskPlan.isDestroy()) { | ||
| 1656 | + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | ||
| 1657 | + ljks=Arith.add(ljks,jhgl); | ||
| 1658 | + } | ||
| 1659 | + } | ||
| 1660 | + } | ||
| 1661 | + } | ||
| 1662 | + } | ||
| 1663 | + | ||
| 1664 | + } | ||
| 1665 | + } | ||
| 1666 | + return ljks; | ||
| 1667 | + } | ||
| 1610 | 1668 | ||
| 1611 | } | 1669 | } |
src/main/resources/static/pages/forms/mould/calcSheetList.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/calcSheetList1.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/calcTurnoutrate.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/statisticsDaily_2.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/statisticsDaily.html
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | <!-- <div> --> | 37 | <!-- <div> --> |
| 38 | <div class="portlet-title"> | 38 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action=""> | 39 | <form class="form-inline" action=""> |
| 40 | - <div style="display: inline-block; " id="gsdmDiv"> | 40 | + <div style="display: inline-block;margin-left: 29px; " id="gsdmDiv"> |
| 41 | <span class="item-label" style="width: 80px;">公司: </span> | 41 | <span class="item-label" style="width: 80px;">公司: </span> |
| 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 43 | </div> | 43 | </div> |
| @@ -45,11 +45,21 @@ | @@ -45,11 +45,21 @@ | ||
| 45 | <span class="item-label" style="width: 80px;">分公司: </span> | 45 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 46 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | 46 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> |
| 47 | </div> | 47 | </div> |
| 48 | - <div style="margin-top: 2px"></div> | ||
| 49 | - <div style="display: inline-block;"> | 48 | + <div style="display: inline-block;margin-left: 42px;"> |
| 50 | <span class="item-label" style="width: 80px;">线路: </span> | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| 51 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 50 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 52 | </div> | 51 | </div> |
| 52 | + <div style="margin-top: 3px"></div> | ||
| 53 | + <div style="display: inline-block;"> | ||
| 54 | + <span class="item-label" style="width: 80px;">线路性质: </span> | ||
| 55 | + <select | ||
| 56 | + class="form-control" name="nature" id="nature" | ||
| 57 | + style="width: 180px;"> | ||
| 58 | + <option value="0">全部线路</option> | ||
| 59 | + <option value="1" selected="selected">营运线路</option> | ||
| 60 | + <option value="2">非营运线路</option> | ||
| 61 | + </select> | ||
| 62 | + </div> | ||
| 53 | <div style="display: inline-block;margin-left: 15px;"> | 63 | <div style="display: inline-block;margin-left: 15px;"> |
| 54 | <span class="item-label" style="width: 80px;">开始时间: </span> | 64 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 55 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 65 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| @@ -70,11 +80,12 @@ | @@ -70,11 +80,12 @@ | ||
| 70 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 80 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 71 | <thead> | 81 | <thead> |
| 72 | <tr> | 82 | <tr> |
| 73 | - <th colspan="44"><label id="tjrq"></label> 线路统计日报</th> | 83 | + <th colspan="45"><label id="tjrq"></label> 线路统计日报</th> |
| 74 | </tr> | 84 | </tr> |
| 75 | <tr> | 85 | <tr> |
| 86 | + <td rowspan="3"><span >分公司</span></td> | ||
| 76 | <td rowspan="3"><span >路线名</span></td> | 87 | <td rowspan="3"><span >路线名</span></td> |
| 77 | - <td colspan="20">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> | 88 | + <td colspan="21">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> |
| 78 | <td colspan="15">全日营运班次</td> | 89 | <td colspan="15">全日营运班次</td> |
| 79 | <td colspan="9">大间隔情况</td> | 90 | <td colspan="9">大间隔情况</td> |
| 80 | </tr> | 91 | </tr> |
| @@ -89,7 +100,7 @@ | @@ -89,7 +100,7 @@ | ||
| 89 | <td rowspan="2"><span>少驶公里</span></td> | 100 | <td rowspan="2"><span>少驶公里</span></td> |
| 90 | <td rowspan="2"><span>少驶班次</span></td> | 101 | <td rowspan="2"><span>少驶班次</span></td> |
| 91 | <td colspan="11">少驶原因(公里)</td> | 102 | <td colspan="11">少驶原因(公里)</td> |
| 92 | - <td rowspan="2"><span >临加公里</span></td> | 103 | + <td colspan="2">临加公里</td> |
| 93 | <td colspan="3">计划班次</td> | 104 | <td colspan="3">计划班次</td> |
| 94 | <td colspan="3">实际班次</td> | 105 | <td colspan="3">实际班次</td> |
| 95 | <td colspan="3">临加班次</td> | 106 | <td colspan="3">临加班次</td> |
| @@ -97,7 +108,7 @@ | @@ -97,7 +108,7 @@ | ||
| 97 | <td colspan="3">调头班次</td> | 108 | <td colspan="3">调头班次</td> |
| 98 | <td colspan="3">发生次数</td> | 109 | <td colspan="3">发生次数</td> |
| 99 | <td rowspan="2">最大间隔时间(分)</td> | 110 | <td rowspan="2">最大间隔时间(分)</td> |
| 100 | - <td rowspan="2">原因</td> | 111 | + <td rowspan="2">原因</td> |
| 101 | </tr> | 112 | </tr> |
| 102 | <tr> | 113 | <tr> |
| 103 | <td><span >路阻</span></td> | 114 | <td><span >路阻</span></td> |
| @@ -111,6 +122,8 @@ | @@ -111,6 +122,8 @@ | ||
| 111 | <td><span>气候</span></td> | 122 | <td><span>气候</span></td> |
| 112 | <td><span>援外</span></td> | 123 | <td><span>援外</span></td> |
| 113 | <td><span>其他</span></td> | 124 | <td><span>其他</span></td> |
| 125 | + <td><span>营运</span></td> | ||
| 126 | + <td><span>空驶</span></td> | ||
| 114 | <td><span>全日</span></td> | 127 | <td><span>全日</span></td> |
| 115 | <td><span>早高峰</span></td> | 128 | <td><span>早高峰</span></td> |
| 116 | <td><span>晚高峰</span></td> | 129 | <td><span>晚高峰</span></td> |
| @@ -138,8 +151,6 @@ | @@ -138,8 +151,6 @@ | ||
| 138 | </div> | 151 | </div> |
| 139 | </div> | 152 | </div> |
| 140 | </div> | 153 | </div> |
| 141 | - </div> | ||
| 142 | -</div> | ||
| 143 | 154 | ||
| 144 | <script> | 155 | <script> |
| 145 | $(function(){ | 156 | $(function(){ |
| @@ -173,7 +184,7 @@ | @@ -173,7 +184,7 @@ | ||
| 173 | }); | 184 | }); |
| 174 | 185 | ||
| 175 | 186 | ||
| 176 | - var fage=false; | 187 | + var fage=true; |
| 177 | var obj = []; | 188 | var obj = []; |
| 178 | var xlList; | 189 | var xlList; |
| 179 | $.get('/report/lineList',function(result){ | 190 | $.get('/report/lineList',function(result){ |
| @@ -189,8 +200,10 @@ | @@ -189,8 +200,10 @@ | ||
| 189 | $("#gsdmDiv").css('display','none'); | 200 | $("#gsdmDiv").css('display','none'); |
| 190 | }else if(obj.length ==1){ | 201 | }else if(obj.length ==1){ |
| 191 | $("#gsdmDiv").css('display','none'); | 202 | $("#gsdmDiv").css('display','none'); |
| 192 | - if(obj[0].children.length == 1 || obj[0].children.length ==0) | 203 | + if(obj[0].children.length == 1 || obj[0].children.length ==0){ |
| 204 | + fage=false; | ||
| 193 | $('#fgsdmDiv').css('display','none'); | 205 | $('#fgsdmDiv').css('display','none'); |
| 206 | + } | ||
| 194 | } | 207 | } |
| 195 | $('#gsdm').html(options); | 208 | $('#gsdm').html(options); |
| 196 | updateCompany(); | 209 | updateCompany(); |
| @@ -200,6 +213,9 @@ | @@ -200,6 +213,9 @@ | ||
| 200 | function updateCompany(){ | 213 | function updateCompany(){ |
| 201 | var company = $('#gsdm').val(); | 214 | var company = $('#gsdm').val(); |
| 202 | var options = ''; | 215 | var options = ''; |
| 216 | + if(fage){ | ||
| 217 | + options = '<option value="">请选择</option>'; | ||
| 218 | + } | ||
| 203 | for(var i = 0; i < obj.length; i++){ | 219 | for(var i = 0; i < obj.length; i++){ |
| 204 | if(obj[i].companyCode == company){ | 220 | if(obj[i].companyCode == company){ |
| 205 | var children = obj[i].children; | 221 | var children = obj[i].children; |
| @@ -243,6 +259,7 @@ | @@ -243,6 +259,7 @@ | ||
| 243 | var temp = tempData[$("#line").val()].split(":"); | 259 | var temp = tempData[$("#line").val()].split(":"); |
| 244 | $("#gsdm").val(temp[0]); | 260 | $("#gsdm").val(temp[0]); |
| 245 | updateCompany(); | 261 | updateCompany(); |
| 262 | + $("#nature").val(0); | ||
| 246 | $("#fgsdm").val(temp[1]); | 263 | $("#fgsdm").val(temp[1]); |
| 247 | $("#gsdm").attr("disabled", true); | 264 | $("#gsdm").attr("disabled", true); |
| 248 | $("#fgsdm").attr("disabled", true); | 265 | $("#fgsdm").attr("disabled", true); |
| @@ -256,6 +273,7 @@ | @@ -256,6 +273,7 @@ | ||
| 256 | var date2 =""; | 273 | var date2 =""; |
| 257 | var gsdm=""; | 274 | var gsdm=""; |
| 258 | var fgsdm=""; | 275 | var fgsdm=""; |
| 276 | + var nature=""; | ||
| 259 | $("#query").on("click",function(){ | 277 | $("#query").on("click",function(){ |
| 260 | if($("#date").val() == null || $("#date").val().trim().length == 0){ | 278 | if($("#date").val() == null || $("#date").val().trim().length == 0){ |
| 261 | layer.msg("请选择时间范围!"); | 279 | layer.msg("请选择时间范围!"); |
| @@ -271,9 +289,12 @@ | @@ -271,9 +289,12 @@ | ||
| 271 | date2 =$("#date2").val(); | 289 | date2 =$("#date2").val(); |
| 272 | gsdm =$("#gsdm").val(); | 290 | gsdm =$("#gsdm").val(); |
| 273 | fgsdm=$("#fgsdm").val(); | 291 | fgsdm=$("#fgsdm").val(); |
| 292 | + nature=$("#nature").val(); | ||
| 274 | xlName = $("#select2-line-container").html(); | 293 | xlName = $("#select2-line-container").html(); |
| 275 | if(xlName == "全部线路") | 294 | if(xlName == "全部线路") |
| 276 | xlName = $('#fgsdm option:selected').text(); | 295 | xlName = $('#fgsdm option:selected').text(); |
| 296 | + if(xlName == "请选择") | ||
| 297 | + xlName = $('#gsdm option:selected').text(); | ||
| 277 | if(line=="请选择"){ | 298 | if(line=="请选择"){ |
| 278 | line=""; | 299 | line=""; |
| 279 | } | 300 | } |
| @@ -292,6 +313,7 @@ | @@ -292,6 +313,7 @@ | ||
| 292 | params['date'] = date; | 313 | params['date'] = date; |
| 293 | params['date2'] = date2; | 314 | params['date2'] = date2; |
| 294 | params['xlName'] = xlName; | 315 | params['xlName'] = xlName; |
| 316 | + params['nature'] = nature; | ||
| 295 | params['type'] = "query"; | 317 | params['type'] = "query"; |
| 296 | var i = layer.load(2); | 318 | var i = layer.load(2); |
| 297 | $get('/realSchedule/statisticsDailyTj',params,function(result){ | 319 | $get('/realSchedule/statisticsDailyTj',params,function(result){ |
| @@ -318,6 +340,7 @@ | @@ -318,6 +340,7 @@ | ||
| 318 | params['date'] = date; | 340 | params['date'] = date; |
| 319 | params['date2'] = date2; | 341 | params['date2'] = date2; |
| 320 | params['xlName'] = xlName; | 342 | params['xlName'] = xlName; |
| 343 | + params['nature'] = nature; | ||
| 321 | params['type'] = "export"; | 344 | params['type'] = "export"; |
| 322 | var i = layer.load(2); | 345 | var i = layer.load(2); |
| 323 | $get('/realSchedule/statisticsDailyTj',params,function(result){ | 346 | $get('/realSchedule/statisticsDailyTj',params,function(result){ |
| @@ -339,6 +362,7 @@ | @@ -339,6 +362,7 @@ | ||
| 339 | <script type="text/html" id="statisticsDaily"> | 362 | <script type="text/html" id="statisticsDaily"> |
| 340 | {{each list as obj i}} | 363 | {{each list as obj i}} |
| 341 | <tr {{if obj.zt==1}}style='color: red'{{/if}}> | 364 | <tr {{if obj.zt==1}}style='color: red'{{/if}}> |
| 365 | + <td>{{obj.fgsName}}</td> | ||
| 342 | <td>{{obj.xlName}}</td> | 366 | <td>{{obj.xlName}}</td> |
| 343 | <td>{{obj.jhzlc}}</td> | 367 | <td>{{obj.jhzlc}}</td> |
| 344 | <td>{{obj.jhlc}}</td> | 368 | <td>{{obj.jhlc}}</td> |
| @@ -360,6 +384,7 @@ | @@ -360,6 +384,7 @@ | ||
| 360 | <td>{{obj.ssgl_yw}}</td> | 384 | <td>{{obj.ssgl_yw}}</td> |
| 361 | <td>{{obj.ssgl_other}}</td> | 385 | <td>{{obj.ssgl_other}}</td> |
| 362 | <td>{{obj.ljgl}}</td> | 386 | <td>{{obj.ljgl}}</td> |
| 387 | + <td>{{obj.ljks}}</td> | ||
| 363 | <td>{{obj.jhbc}}</td> | 388 | <td>{{obj.jhbc}}</td> |
| 364 | <td>{{obj.jhbc_m}}</td> | 389 | <td>{{obj.jhbc_m}}</td> |
| 365 | <td>{{obj.jhbc_a}}</td> | 390 | <td>{{obj.jhbc_a}}</td> |
src/main/resources/static/pages/forms/statement/statisticsDailyCalc.html
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | 28 | ||
| 29 | <div class="page-head"> | 29 | <div class="page-head"> |
| 30 | <div class="page-title"> | 30 | <div class="page-title"> |
| 31 | - <h1>统计日报</h1> | 31 | + <h1>缁熻鏃ユ姤</h1> |
| 32 | </div> | 32 | </div> |
| 33 | </div> | 33 | </div> |
| 34 | 34 | ||
| @@ -38,97 +38,97 @@ | @@ -38,97 +38,97 @@ | ||
| 38 | <div class="portlet-title"> | 38 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action=""> | 39 | <form class="form-inline" action=""> |
| 40 | <div style="display: inline-block; " id="gsdmDiv"> | 40 | <div style="display: inline-block; " id="gsdmDiv"> |
| 41 | - <span class="item-label" style="width: 80px;">公司: </span> | 41 | + <span class="item-label" style="width: 80px;">鍏徃: </span> |
| 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 43 | </div> | 43 | </div> |
| 44 | <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> | 44 | <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv"> |
| 45 | - <span class="item-label" style="width: 80px;">分公司: </span> | 45 | + <span class="item-label" style="width: 80px;">鍒嗗叕鍙�: </span> |
| 46 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | 46 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> |
| 47 | </div> | 47 | </div> |
| 48 | <div style="margin-top: 2px"></div> | 48 | <div style="margin-top: 2px"></div> |
| 49 | <div style="display: inline-block;"> | 49 | <div style="display: inline-block;"> |
| 50 | - <span class="item-label" style="width: 80px;">线路: </span> | 50 | + <span class="item-label" style="width: 80px;">绾胯矾: </span> |
| 51 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 51 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 52 | </div> | 52 | </div> |
| 53 | <div style="display: inline-block;margin-left: 15px;"> | 53 | <div style="display: inline-block;margin-left: 15px;"> |
| 54 | - <span class="item-label" style="width: 80px;">开始时间: </span> | 54 | + <span class="item-label" style="width: 80px;">寮�濮嬫椂闂�: </span> |
| 55 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 55 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| 56 | </div> | 56 | </div> |
| 57 | <div style="display: inline-block;margin-left: 15px;"> | 57 | <div style="display: inline-block;margin-left: 15px;"> |
| 58 | - <span class="item-label" style="width: 80px;">结束时间: </span> | 58 | + <span class="item-label" style="width: 80px;">缁撴潫鏃堕棿: </span> |
| 59 | <input class="form-control" type="text" id="date2" style="width: 180px;"/> | 59 | <input class="form-control" type="text" id="date2" style="width: 180px;"/> |
| 60 | </div> | 60 | </div> |
| 61 | <div class="form-group"> | 61 | <div class="form-group"> |
| 62 | - <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 63 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | 62 | + <input class="btn btn-default" type="button" id="query" value="鏌ヨ"/> |
| 63 | + <input class="btn btn-default" type="button" id="export" value="瀵煎嚭"/> | ||
| 64 | </div> | 64 | </div> |
| 65 | </form> | 65 | </form> |
| 66 | </div> | 66 | </div> |
| 67 | <div class="portlet-body" id="tjrbBody" style="overflow:auto;height: calc(100% - 80px)"> | 67 | <div class="portlet-body" id="tjrbBody" style="overflow:auto;height: calc(100% - 80px)"> |
| 68 | <div class="table-container" style="margin-top: 10px;min-width: 906px"> | 68 | <div class="table-container" style="margin-top: 10px;min-width: 906px"> |
| 69 | - <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | 69 | + <label>鏃╅珮宄�:6:31~8:30 鏅氶珮宄�:16:01~18:00</label> |
| 70 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 70 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 71 | <thead> | 71 | <thead> |
| 72 | <tr> | 72 | <tr> |
| 73 | - <th colspan="44"><label id="tjrq"></label> 线路统计日报</th> | 73 | + <th colspan="44"><label id="tjrq"></label> 绾胯矾缁熻鏃ユ姤</th> |
| 74 | </tr> | 74 | </tr> |
| 75 | <tr> | 75 | <tr> |
| 76 | - <td rowspan="3"><span >路线名</span></td> | ||
| 77 | - <td colspan="20">全日营运里程(公里)</td> | ||
| 78 | - <td colspan="15">全日营运班次</td> | ||
| 79 | - <td colspan="9">大间隔情况</td> | 76 | + <td rowspan="3"><span >璺嚎鍚�</span></td> |
| 77 | + <td colspan="20">鍏ㄦ棩钀ヨ繍閲岀▼锛堝叕閲岋級</td> | ||
| 78 | + <td colspan="15">鍏ㄦ棩钀ヨ繍鐝</td> | ||
| 79 | + <td colspan="9">澶ч棿闅旀儏鍐�</td> | ||
| 80 | </tr> | 80 | </tr> |
| 81 | <tr> | 81 | <tr> |
| 82 | - <td rowspan="2"><label>计划总</label> | ||
| 83 | - <label>公里 </label></td> | ||
| 84 | - <td rowspan="2"><label>计划营</label><label>运公里</label></td> | ||
| 85 | - <td rowspan="2"><label>计划空</label><label>驶公里</label></td> | ||
| 86 | - <td rowspan="2"><label>实际</label><label>总公里</label></td> | ||
| 87 | - <td rowspan="2"><label>实际营</label><label>运公里</label></td> | ||
| 88 | - <td rowspan="2"><label>实际空</label><label>驶公里</label></td> | ||
| 89 | - <td rowspan="2"><span>少驶公里</span></td> | ||
| 90 | - <td rowspan="2"><span>少驶班次</span></td> | ||
| 91 | - <td colspan="11">少驶原因(公里)</td> | ||
| 92 | - <td rowspan="2"><span >临加公里</span></td> | ||
| 93 | - <td colspan="3">计划班次</td> | ||
| 94 | - <td colspan="3">实际班次</td> | ||
| 95 | - <td colspan="3">临加班次</td> | ||
| 96 | - <td colspan="3">放站班次</td> | ||
| 97 | - <td colspan="3">调头班次</td> | ||
| 98 | - <td colspan="3">发生次数</td> | ||
| 99 | - <td rowspan="2">最大间隔时间(分)</td> | ||
| 100 | - <td rowspan="2">原因</td> | 82 | + <td rowspan="2"><label>璁″垝鎬�</label> |
| 83 | + <label>鍏噷 </label></td> | ||
| 84 | + <td rowspan="2"><label>璁″垝钀�</label><label>杩愬叕閲�</label></td> | ||
| 85 | + <td rowspan="2"><label>璁″垝绌�</label><label>椹跺叕閲�</label></td> | ||
| 86 | + <td rowspan="2"><label>瀹為檯</label><label>鎬诲叕閲�</label></td> | ||
| 87 | + <td rowspan="2"><label>瀹為檯钀�</label><label>杩愬叕閲�</label></td> | ||
| 88 | + <td rowspan="2"><label>瀹為檯绌�</label><label>椹跺叕閲�</label></td> | ||
| 89 | + <td rowspan="2"><span>灏戦┒鍏噷</span></td> | ||
| 90 | + <td rowspan="2"><span>灏戦┒鐝</span></td> | ||
| 91 | + <td colspan="11">灏戦┒鍘熷洜锛堝叕閲岋級</td> | ||
| 92 | + <td rowspan="2"><span >涓村姞鍏噷</span></td> | ||
| 93 | + <td colspan="3">璁″垝鐝</td> | ||
| 94 | + <td colspan="3">瀹為檯鐝</td> | ||
| 95 | + <td colspan="3">涓村姞鐝</td> | ||
| 96 | + <td colspan="3">鏀剧珯鐝</td> | ||
| 97 | + <td colspan="3">璋冨ご鐝</td> | ||
| 98 | + <td colspan="3">鍙戠敓娆℃暟</td> | ||
| 99 | + <td rowspan="2">鏈�澶ч棿闅旀椂闂达紙鍒嗭級</td> | ||
| 100 | + <td rowspan="2">鍘熷洜</td> | ||
| 101 | </tr> | 101 | </tr> |
| 102 | <tr> | 102 | <tr> |
| 103 | - <td><span >路阻</span></td> | ||
| 104 | - <td><span>吊慢</span></td> | ||
| 105 | - <td><span >故障</span></td> | ||
| 106 | - <td><span >纠纷</span></td> | ||
| 107 | - <td><span >肇事</span></td> | ||
| 108 | - <td><span>缺人</span></td> | ||
| 109 | - <td><span>缺车</span></td> | ||
| 110 | - <td><span >客稀</span></td> | ||
| 111 | - <td><span>气候</span></td> | ||
| 112 | - <td><span>援外</span></td> | ||
| 113 | - <td><span>其他</span></td> | ||
| 114 | - <td><span>全日</span></td> | ||
| 115 | - <td><span>早高峰</span></td> | ||
| 116 | - <td><span>晚高峰</span></td> | ||
| 117 | - <td><span>全日</span></td> | ||
| 118 | - <td><span>早高峰</span></td> | ||
| 119 | - <td><span>晚高峰</span></td> | ||
| 120 | - <td><span>全日</span></td> | ||
| 121 | - <td><span>早高峰</span></td> | ||
| 122 | - <td><span>晚高峰</span></td> | ||
| 123 | - <td><span>全日</span></td> | ||
| 124 | - <td><span>早高峰</span></td> | ||
| 125 | - <td><span>晚高峰</span></td> | ||
| 126 | - <td><span>全日</span></td> | ||
| 127 | - <td><span>早高峰</span></td> | ||
| 128 | - <td><span>晚高峰</span></td> | ||
| 129 | - <td><span>全日</span></td> | ||
| 130 | - <td><span>早高峰</span></td> | ||
| 131 | - <td><span>晚高峰</span></td> | 103 | + <td><span >璺樆</span></td> |
| 104 | + <td><span>鍚婃參</span></td> | ||
| 105 | + <td><span >鏁呴殰</span></td> | ||
| 106 | + <td><span >绾犵悍</span></td> | ||
| 107 | + <td><span >鑲囦簨</span></td> | ||
| 108 | + <td><span>缂轰汉</span></td> | ||
| 109 | + <td><span>缂鸿溅</span></td> | ||
| 110 | + <td><span >瀹㈢█</span></td> | ||
| 111 | + <td><span>姘斿��</span></td> | ||
| 112 | + <td><span>鎻村</span></td> | ||
| 113 | + <td><span>鍏朵粬</span></td> | ||
| 114 | + <td><span>鍏ㄦ棩</span></td> | ||
| 115 | + <td><span>鏃╅珮宄�</span></td> | ||
| 116 | + <td><span>鏅氶珮宄�</span></td> | ||
| 117 | + <td><span>鍏ㄦ棩</span></td> | ||
| 118 | + <td><span>鏃╅珮宄�</span></td> | ||
| 119 | + <td><span>鏅氶珮宄�</span></td> | ||
| 120 | + <td><span>鍏ㄦ棩</span></td> | ||
| 121 | + <td><span>鏃╅珮宄�</span></td> | ||
| 122 | + <td><span>鏅氶珮宄�</span></td> | ||
| 123 | + <td><span>鍏ㄦ棩</span></td> | ||
| 124 | + <td><span>鏃╅珮宄�</span></td> | ||
| 125 | + <td><span>鏅氶珮宄�</span></td> | ||
| 126 | + <td><span>鍏ㄦ棩</span></td> | ||
| 127 | + <td><span>鏃╅珮宄�</span></td> | ||
| 128 | + <td><span>鏅氶珮宄�</span></td> | ||
| 129 | + <td><span>鍏ㄦ棩</span></td> | ||
| 130 | + <td><span>鏃╅珮宄�</span></td> | ||
| 131 | + <td><span>鏅氶珮宄�</span></td> | ||
| 132 | </tr> | 132 | </tr> |
| 133 | </thead> | 133 | </thead> |
| 134 | <tbody class="statisticsDailyCalc"> | 134 | <tbody class="statisticsDailyCalc"> |
| @@ -145,7 +145,7 @@ | @@ -145,7 +145,7 @@ | ||
| 145 | $(function(){ | 145 | $(function(){ |
| 146 | $('#export').attr('disabled', "true"); | 146 | $('#export').attr('disabled', "true"); |
| 147 | 147 | ||
| 148 | - // 关闭左侧栏 | 148 | + // 鍏抽棴宸︿晶鏍� |
| 149 | if (!$('body').hasClass('page-sidebar-closed')) | 149 | if (!$('body').hasClass('page-sidebar-closed')) |
| 150 | $('.menu-toggler.sidebar-toggler').click(); | 150 | $('.menu-toggler.sidebar-toggler').click(); |
| 151 | 151 | ||
| @@ -215,7 +215,7 @@ | @@ -215,7 +215,7 @@ | ||
| 215 | var tempData = {}; | 215 | var tempData = {}; |
| 216 | $.get('/report/lineList',function(xlList){ | 216 | $.get('/report/lineList',function(xlList){ |
| 217 | var data = []; | 217 | var data = []; |
| 218 | - data.push({id: " ", text: "全部线路"}); | 218 | + data.push({id: " ", text: "鍏ㄩ儴绾胯矾"}); |
| 219 | $.get('/user/companyData', function(result){ | 219 | $.get('/user/companyData', function(result){ |
| 220 | for(var i = 0; i < result.length; i++){ | 220 | for(var i = 0; i < result.length; i++){ |
| 221 | var companyCode = result[i].companyCode; | 221 | var companyCode = result[i].companyCode; |
| @@ -258,11 +258,11 @@ | @@ -258,11 +258,11 @@ | ||
| 258 | var fgsdm=""; | 258 | var fgsdm=""; |
| 259 | $("#query").on("click",function(){ | 259 | $("#query").on("click",function(){ |
| 260 | if($("#date").val() == null || $("#date").val().trim().length == 0){ | 260 | if($("#date").val() == null || $("#date").val().trim().length == 0){ |
| 261 | - layer.msg("请选择时间范围!"); | 261 | + layer.msg("璇烽�夋嫨鏃堕棿鑼冨洿锛�"); |
| 262 | return; | 262 | return; |
| 263 | } | 263 | } |
| 264 | if($("#date2").val() == null || $("#date2").val().trim().length == 0){ | 264 | if($("#date2").val() == null || $("#date2").val().trim().length == 0){ |
| 265 | - layer.msg("请选择时间范围!"); | 265 | + layer.msg("璇烽�夋嫨鏃堕棿鑼冨洿锛�"); |
| 266 | return; | 266 | return; |
| 267 | } | 267 | } |
| 268 | // $("#tjrbBody").height($(window).height()-100); | 268 | // $("#tjrbBody").height($(window).height()-100); |
| @@ -272,15 +272,15 @@ | @@ -272,15 +272,15 @@ | ||
| 272 | gsdm =$("#gsdm").val(); | 272 | gsdm =$("#gsdm").val(); |
| 273 | fgsdm=$("#fgsdm").val(); | 273 | fgsdm=$("#fgsdm").val(); |
| 274 | xlName = $("#select2-line-container").html(); | 274 | xlName = $("#select2-line-container").html(); |
| 275 | - if(xlName == "全部线路") | 275 | + if(xlName == "鍏ㄩ儴绾胯矾") |
| 276 | xlName = $('#fgsdm option:selected').text(); | 276 | xlName = $('#fgsdm option:selected').text(); |
| 277 | - if(line=="请选择"){ | 277 | + if(line=="璇烽�夋嫨"){ |
| 278 | line=""; | 278 | line=""; |
| 279 | } | 279 | } |
| 280 | if(date==null || date =="" ||date2==null || date2 ==""){ | 280 | if(date==null || date =="" ||date2==null || date2 ==""){ |
| 281 | - layer.msg('请选择时间段.'); | 281 | + layer.msg('璇烽�夋嫨鏃堕棿娈�.'); |
| 282 | }else{ | 282 | }else{ |
| 283 | - $("#tjrq").html(date+"至"+date2); | 283 | + $("#tjrq").html(date+"鑷�"+date2); |
| 284 | var params = {}; | 284 | var params = {}; |
| 285 | params['gsdm'] = gsdm; | 285 | params['gsdm'] = gsdm; |
| 286 | params['fgsdm'] =fgsdm ; | 286 | params['fgsdm'] =fgsdm ; |
| @@ -292,9 +292,9 @@ | @@ -292,9 +292,9 @@ | ||
| 292 | var i = layer.load(2); | 292 | var i = layer.load(2); |
| 293 | // $get('/realSchedule/statisticsDailyTj',params,function(result){ | 293 | // $get('/realSchedule/statisticsDailyTj',params,function(result){ |
| 294 | $get('/calcWaybill/statisticsDailyTj',params,function(result){ | 294 | $get('/calcWaybill/statisticsDailyTj',params,function(result){ |
| 295 | - // 把数据填充到模版中 | 295 | + // 鎶婃暟鎹~鍏呭埌妯$増涓� |
| 296 | var tbodyHtml = template('statisticsDailyCalc',{list:result}); | 296 | var tbodyHtml = template('statisticsDailyCalc',{list:result}); |
| 297 | - // 把渲染好的模版html文本追加到表格中 | 297 | + // 鎶婃覆鏌撳ソ鐨勬ā鐗坔tml鏂囨湰杩藉姞鍒拌〃鏍间腑 |
| 298 | $('#forms .statisticsDailyCalc').html(tbodyHtml); | 298 | $('#forms .statisticsDailyCalc').html(tbodyHtml); |
| 299 | layer.close(i); | 299 | layer.close(i); |
| 300 | 300 | ||
| @@ -327,7 +327,7 @@ | @@ -327,7 +327,7 @@ | ||
| 327 | +"-"+moment(date2).format("YYYYMMDD"); | 327 | +"-"+moment(date2).format("YYYYMMDD"); |
| 328 | } | 328 | } |
| 329 | window.open("/downloadFile/download?fileName=" | 329 | window.open("/downloadFile/download?fileName=" |
| 330 | - +dateTime+"-"+xlName+"-统计日报"); | 330 | + +dateTime+"-"+xlName+"-缁熻鏃ユ姤"); |
| 331 | layer.close(i); | 331 | layer.close(i); |
| 332 | }); | 332 | }); |
| 333 | }); | 333 | }); |
| @@ -382,7 +382,7 @@ | @@ -382,7 +382,7 @@ | ||
| 382 | {{/each}} | 382 | {{/each}} |
| 383 | {{if list.length == 0}} | 383 | {{if list.length == 0}} |
| 384 | <tr> | 384 | <tr> |
| 385 | - <td colspan="44"><h6 class="muted">没有找到相关数据</h6></td> | 385 | + <td colspan="44"><h6 class="muted">娌℃湁鎵惧埌鐩稿叧鏁版嵁</h6></td> |
| 386 | </tr> | 386 | </tr> |
| 387 | {{/if}} | 387 | {{/if}} |
| 388 | </script> | 388 | </script> |
| 389 | \ No newline at end of file | 389 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | <!-- <div> --> | 37 | <!-- <div> --> |
| 38 | <div class="portlet-title"> | 38 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action=""> | 39 | <form class="form-inline" action=""> |
| 40 | - <div style="display: inline-block; " id="gsdmDiv"> | 40 | + <div style="display: inline-block;margin-left: 29px; " id="gsdmDiv"> |
| 41 | <span class="item-label" style="width: 80px;">公司: </span> | 41 | <span class="item-label" style="width: 80px;">公司: </span> |
| 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | 42 | <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> |
| 43 | </div> | 43 | </div> |
| @@ -45,11 +45,21 @@ | @@ -45,11 +45,21 @@ | ||
| 45 | <span class="item-label" style="width: 80px;">分公司: </span> | 45 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 46 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | 46 | <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> |
| 47 | </div> | 47 | </div> |
| 48 | - <div style="margin-top: 2px"></div> | ||
| 49 | - <div style="display: inline-block;"> | 48 | + <div style="display: inline-block;margin-left: 42px;"> |
| 50 | <span class="item-label" style="width: 80px;">线路: </span> | 49 | <span class="item-label" style="width: 80px;">线路: </span> |
| 51 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 50 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 52 | </div> | 51 | </div> |
| 52 | + <div style="margin-top: 3px"></div> | ||
| 53 | + <div style="display: inline-block;"> | ||
| 54 | + <span class="item-label" style="width: 80px;">线路性质: </span> | ||
| 55 | + <select | ||
| 56 | + class="form-control" name="nature" id="nature" | ||
| 57 | + style="width: 180px;"> | ||
| 58 | + <option value="0">全部线路</option> | ||
| 59 | + <option value="1" selected="selected">营运线路</option> | ||
| 60 | + <option value="2">非营运线路</option> | ||
| 61 | + </select> | ||
| 62 | + </div> | ||
| 53 | <div style="display: inline-block;margin-left: 15px;"> | 63 | <div style="display: inline-block;margin-left: 15px;"> |
| 54 | <span class="item-label" style="width: 80px;">开始时间: </span> | 64 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 55 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 65 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| @@ -70,9 +80,10 @@ | @@ -70,9 +80,10 @@ | ||
| 70 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 80 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 71 | <thead> | 81 | <thead> |
| 72 | <tr> | 82 | <tr> |
| 73 | - <th colspan="44"><label id="tjrq"></label> 线路统计日报</th> | 83 | + <th colspan="45"><label id="tjrq"></label> 线路统计日报</th> |
| 74 | </tr> | 84 | </tr> |
| 75 | <tr> | 85 | <tr> |
| 86 | + <td rowspan="3"><span >分公司</span></td> | ||
| 76 | <td rowspan="3"><span >路线名</span></td> | 87 | <td rowspan="3"><span >路线名</span></td> |
| 77 | <td colspan="20">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> | 88 | <td colspan="20">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> |
| 78 | <td colspan="15">全日营运班次</td> | 89 | <td colspan="15">全日营运班次</td> |
| @@ -138,8 +149,6 @@ | @@ -138,8 +149,6 @@ | ||
| 138 | </div> | 149 | </div> |
| 139 | </div> | 150 | </div> |
| 140 | </div> | 151 | </div> |
| 141 | - </div> | ||
| 142 | -</div> | ||
| 143 | 152 | ||
| 144 | <script> | 153 | <script> |
| 145 | $(function(){ | 154 | $(function(){ |
| @@ -173,7 +182,7 @@ | @@ -173,7 +182,7 @@ | ||
| 173 | $("#date2").val(dateTime); | 182 | $("#date2").val(dateTime); |
| 174 | 183 | ||
| 175 | 184 | ||
| 176 | - var fage=false; | 185 | + var fage=true; |
| 177 | var obj = []; | 186 | var obj = []; |
| 178 | var xlList; | 187 | var xlList; |
| 179 | $.get('/report/lineList',function(result){ | 188 | $.get('/report/lineList',function(result){ |
| @@ -189,8 +198,10 @@ | @@ -189,8 +198,10 @@ | ||
| 189 | $("#gsdmDiv").css('display','none'); | 198 | $("#gsdmDiv").css('display','none'); |
| 190 | }else if(obj.length ==1){ | 199 | }else if(obj.length ==1){ |
| 191 | $("#gsdmDiv").css('display','none'); | 200 | $("#gsdmDiv").css('display','none'); |
| 192 | - if(obj[0].children.length == 1 || obj[0].children.length ==0) | 201 | + if(obj[0].children.length == 1 || obj[0].children.length ==0){ |
| 202 | + fage=false; | ||
| 193 | $('#fgsdmDiv').css('display','none'); | 203 | $('#fgsdmDiv').css('display','none'); |
| 204 | + } | ||
| 194 | } | 205 | } |
| 195 | $('#gsdm').html(options); | 206 | $('#gsdm').html(options); |
| 196 | updateCompany(); | 207 | updateCompany(); |
| @@ -200,6 +211,9 @@ | @@ -200,6 +211,9 @@ | ||
| 200 | function updateCompany(){ | 211 | function updateCompany(){ |
| 201 | var company = $('#gsdm').val(); | 212 | var company = $('#gsdm').val(); |
| 202 | var options = ''; | 213 | var options = ''; |
| 214 | + if(fage){ | ||
| 215 | + options = '<option value="">请选择</option>'; | ||
| 216 | + } | ||
| 203 | for(var i = 0; i < obj.length; i++){ | 217 | for(var i = 0; i < obj.length; i++){ |
| 204 | if(obj[i].companyCode == company){ | 218 | if(obj[i].companyCode == company){ |
| 205 | var children = obj[i].children; | 219 | var children = obj[i].children; |
| @@ -256,6 +270,7 @@ | @@ -256,6 +270,7 @@ | ||
| 256 | var date2 =""; | 270 | var date2 =""; |
| 257 | var gsdm=""; | 271 | var gsdm=""; |
| 258 | var fgsdm=""; | 272 | var fgsdm=""; |
| 273 | + var nature=""; | ||
| 259 | $("#query").on("click",function(){ | 274 | $("#query").on("click",function(){ |
| 260 | if($("#date").val() == null || $("#date").val().trim().length == 0){ | 275 | if($("#date").val() == null || $("#date").val().trim().length == 0){ |
| 261 | layer.msg("请选择时间范围!"); | 276 | layer.msg("请选择时间范围!"); |
| @@ -271,9 +286,12 @@ | @@ -271,9 +286,12 @@ | ||
| 271 | date2 =$("#date2").val(); | 286 | date2 =$("#date2").val(); |
| 272 | gsdm =$("#gsdm").val(); | 287 | gsdm =$("#gsdm").val(); |
| 273 | fgsdm=$("#fgsdm").val(); | 288 | fgsdm=$("#fgsdm").val(); |
| 289 | + nature=$("#nature").val(); | ||
| 274 | xlName = $("#select2-line-container").html(); | 290 | xlName = $("#select2-line-container").html(); |
| 275 | if(xlName == "全部线路") | 291 | if(xlName == "全部线路") |
| 276 | xlName = $('#fgsdm option:selected').text(); | 292 | xlName = $('#fgsdm option:selected').text(); |
| 293 | + if(xlName =='请选择') | ||
| 294 | + xlName = $('#gsdm option:selected').text(); | ||
| 277 | if(line=="请选择"){ | 295 | if(line=="请选择"){ |
| 278 | line=""; | 296 | line=""; |
| 279 | } | 297 | } |
| @@ -289,6 +307,7 @@ | @@ -289,6 +307,7 @@ | ||
| 289 | params['date2'] = date2; | 307 | params['date2'] = date2; |
| 290 | params['xlName'] = xlName; | 308 | params['xlName'] = xlName; |
| 291 | params['type'] = "query"; | 309 | params['type'] = "query"; |
| 310 | + params['nature']=nature; | ||
| 292 | var i = layer.load(2); | 311 | var i = layer.load(2); |
| 293 | // $get('/realSchedule/statisticsDailyTj',params,function(result){ | 312 | // $get('/realSchedule/statisticsDailyTj',params,function(result){ |
| 294 | $get('/calcWaybill/calcStatisticsDaily2',params,function(result){ | 313 | $get('/calcWaybill/calcStatisticsDaily2',params,function(result){ |
| @@ -315,7 +334,8 @@ | @@ -315,7 +334,8 @@ | ||
| 315 | params['date'] = date; | 334 | params['date'] = date; |
| 316 | params['date2'] = date2; | 335 | params['date2'] = date2; |
| 317 | params['xlName'] = xlName; | 336 | params['xlName'] = xlName; |
| 318 | - params['type'] = "export"; | 337 | + params['type'] = "export"; |
| 338 | + params['nature']=nature; | ||
| 319 | var i = layer.load(2); | 339 | var i = layer.load(2); |
| 320 | // $get('/realSchedule/statisticsDailyTj',params,function(result){ | 340 | // $get('/realSchedule/statisticsDailyTj',params,function(result){ |
| 321 | $get('/calcWaybill/calcStatisticsDaily2',params,function(result){ | 341 | $get('/calcWaybill/calcStatisticsDaily2',params,function(result){ |
| @@ -337,6 +357,7 @@ | @@ -337,6 +357,7 @@ | ||
| 337 | <script type="text/html" id="statisticsDailyCalc2"> | 357 | <script type="text/html" id="statisticsDailyCalc2"> |
| 338 | {{each list as obj i}} | 358 | {{each list as obj i}} |
| 339 | <tr {{if obj.zt==1}}style='color: red'{{/if}}> | 359 | <tr {{if obj.zt==1}}style='color: red'{{/if}}> |
| 360 | + <td>{{obj.fgsName}}</td> | ||
| 340 | <td>{{obj.xlName}}</td> | 361 | <td>{{obj.xlName}}</td> |
| 341 | <td>{{obj.jhzlc}}</td> | 362 | <td>{{obj.jhzlc}}</td> |
| 342 | <td>{{obj.jhlc}}</td> | 363 | <td>{{obj.jhlc}}</td> |
src/main/resources/static/pages/mforms/turnoutrates/calcTurnoutrate.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center;} | ||
| 15 | + | ||
| 16 | + .table > tbody + tbody { | ||
| 17 | + border-top: 1px solid; } | ||
| 18 | + .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; } | ||
| 19 | +.table-checkable tr > th:first-child, .table-checkable tr > td:first-child { | ||
| 20 | + text-align: center; | ||
| 21 | + max-width: initial; | ||
| 22 | + min-width: 40px; | ||
| 23 | + padding-left: 0; | ||
| 24 | + padding-right: 0; | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +</style> | ||
| 28 | + | ||
| 29 | +<div class="page-head"> | ||
| 30 | + <div class="page-title"> | ||
| 31 | + <h1>营运线路出车率统计表</h1> | ||
| 32 | + </div> | ||
| 33 | +</div> | ||
| 34 | + | ||
| 35 | +<div class="row"> | ||
| 36 | + <div class="col-md-12"> | ||
| 37 | + <div class="portlet light porttlet-fit bordered"> | ||
| 38 | + <div class="portlet-title"> | ||
| 39 | + <form class="form-inline" action="" method="post"> | ||
| 40 | + <div style="display: inline-block; margin-left: 20px;" id="gsdmDiv_turn"> | ||
| 41 | + <span class="item-label" style="width: 80px;margin-left: 11px;">公司: </span> | ||
| 42 | + <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select> | ||
| 43 | + </div> | ||
| 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> | ||
| 47 | + </div> | ||
| 48 | + <div style="display: inline-block; margin-left: 33px;"> | ||
| 49 | + <span class="item-label" style="width: 80px;margin-left: 11px;">线路: </span> | ||
| 50 | + <select class="form-control" name="line" id="line" style="width: 140px;"></select> | ||
| 51 | + </div> | ||
| 52 | + <div style="margin-top: 10px"></div> | ||
| 53 | + <div style="display: inline-block;"> | ||
| 54 | + <span class="item-label" style="width: 80px;">线路性质: </span> <select | ||
| 55 | + class="form-control" name="nature" id="nature" | ||
| 56 | + style="width: 140px;"> | ||
| 57 | + <option value="0">全部线路</option> | ||
| 58 | + <option value="1" selected="selected">营运线路</option> | ||
| 59 | + <option value="2">非营运线路</option> | ||
| 60 | + </select> | ||
| 61 | + </div> | ||
| 62 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 63 | + <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 64 | + <input class="form-control" type="text" id="startDate" style="width: 140px;"/> | ||
| 65 | + </div> | ||
| 66 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 67 | + <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 68 | + <input class="form-control" type="text" id="endDate" style="width: 140px;"/> | ||
| 69 | + </div> | ||
| 70 | + <div class="form-group"> | ||
| 71 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 72 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 73 | + </div> | ||
| 74 | + </form> | ||
| 75 | + </div> | ||
| 76 | + <div class="portlet-body"> | ||
| 77 | + <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | ||
| 78 | + <table class="table table-bordered table-hover table-checkable" id="forms1"> | ||
| 79 | + <thead> | ||
| 80 | + <tr> | ||
| 81 | + <th colspan="15">营运线路出车率统计表</th> | ||
| 82 | + </tr> | ||
| 83 | + <tr> | ||
| 84 | + <td rowspan="3" style=" padding-top: 20px;">日期</td> | ||
| 85 | + <td rowspan="3" style=" padding-top: 20px;">公司</td> | ||
| 86 | + <td rowspan="3" style=" padding-top: 20px;">直属公司</td> | ||
| 87 | + <td rowspan="3" style=" padding-top: 20px;">线路条数</td> | ||
| 88 | + <td colspan="4">出车数</td> | ||
| 89 | + <td colspan="2">出车率</td> | ||
| 90 | + <td colspan="2" >班次数</td> | ||
| 91 | + <td rowspan="3" style=" padding-top: 20px;">班次执行率</td> | ||
| 92 | + <td rowspan="3" style=" padding-top: 20px;">说明</td> | ||
| 93 | + </tr> | ||
| 94 | + <tr> | ||
| 95 | + <td rowspan="2">权证</td> | ||
| 96 | + <td rowspan="2">计划</td> | ||
| 97 | + <td colspan="2">实际</td> | ||
| 98 | + <td rowspan="2">全日</td> | ||
| 99 | + <td rowspan="2">早高峰</td> | ||
| 100 | + <td rowspan="2">计划</td> | ||
| 101 | + <td rowspan="2">实际</td> | ||
| 102 | + </tr> | ||
| 103 | + <tr> | ||
| 104 | + <td>全日</td> | ||
| 105 | + <td>早高峰</td> | ||
| 106 | + </tr> | ||
| 107 | + </thead> | ||
| 108 | + <tbody id="tbody"> | ||
| 109 | + | ||
| 110 | + </tbody> | ||
| 111 | + </table> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 115 | + </div> | ||
| 116 | +</div> | ||
| 117 | + | ||
| 118 | +<script> | ||
| 119 | + $(function(){ | ||
| 120 | + // 关闭左侧栏 | ||
| 121 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 122 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 123 | + | ||
| 124 | + | ||
| 125 | + var d = new Date(); | ||
| 126 | + d.setTime(d.getTime() - 1*1000*60*60*24); | ||
| 127 | + var year = d.getFullYear(); | ||
| 128 | + var month = d.getMonth() + 1; | ||
| 129 | + var day = d.getDate(); | ||
| 130 | + if(month < 10) | ||
| 131 | + month = "0" + month; | ||
| 132 | + if(day < 10) | ||
| 133 | + day = "0" + day; | ||
| 134 | + var dateTime = year + "-" + month + "-" + day; | ||
| 135 | + $("#startDate,#endDate").datetimepicker({ | ||
| 136 | + format : 'YYYY-MM-DD', | ||
| 137 | + locale : 'zh-cn', | ||
| 138 | + maxDate : dateTime | ||
| 139 | + }); | ||
| 140 | + $("#startDate").val(dateTime); | ||
| 141 | + $("#endDate").val(dateTime); | ||
| 142 | + | ||
| 143 | + var fage=true; | ||
| 144 | + var xlList; | ||
| 145 | + var obj = []; | ||
| 146 | + | ||
| 147 | + $.get('/report/lineList',function(result){ | ||
| 148 | + xlList=result; | ||
| 149 | + $.get('/user/companyData', function(result){ | ||
| 150 | + obj = result; | ||
| 151 | + var options = ''; | ||
| 152 | + for(var i = 0; i < obj.length; i++){ | ||
| 153 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + if(obj.length ==0){ | ||
| 157 | + $("#gsdmDiv_turn").css('display','none'); | ||
| 158 | + }else if(obj.length ==1){ | ||
| 159 | + $("#gsdmDiv_turn").css('display','none'); | ||
| 160 | + if(obj[0].children.length == 1 || obj[0].children.length ==0){ | ||
| 161 | + fage=false; | ||
| 162 | + $('#fgsdmDiv_turn').css('display','none'); | ||
| 163 | + | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + $('#gsdmTurn').html(options); | ||
| 167 | + updateCompany(); | ||
| 168 | + }); | ||
| 169 | + }) | ||
| 170 | + $("#gsdmTurn").on("change",updateCompany); | ||
| 171 | + function updateCompany(){ | ||
| 172 | + var company = $('#gsdmTurn').val(); | ||
| 173 | + var options = ''; | ||
| 174 | + if(fage){ | ||
| 175 | + options = '<option value="">请选择</option>'; | ||
| 176 | + } | ||
| 177 | + for(var i = 0; i < obj.length; i++){ | ||
| 178 | + if(obj[i].companyCode == company){ | ||
| 179 | + var children = obj[i].children; | ||
| 180 | + for(var j = 0; j < children.length; j++){ | ||
| 181 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 182 | + } | ||
| 183 | + } | ||
| 184 | + } | ||
| 185 | + $('#fgsdmTurn').html(options); | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + var tempData = {}; | ||
| 189 | + $.get('/report/lineList',function(xlList){ | ||
| 190 | + var data = []; | ||
| 191 | + data.push({id: " ", text: "全部线路"}); | ||
| 192 | + $.get('/user/companyData', function(result){ | ||
| 193 | + for(var i = 0; i < result.length; i++){ | ||
| 194 | + var companyCode = result[i].companyCode; | ||
| 195 | + var children = result[i].children; | ||
| 196 | + for(var j = 0; j < children.length; j++){ | ||
| 197 | + var code = children[j].code; | ||
| 198 | + for(var k=0;k < xlList.length;k++ ){ | ||
| 199 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | ||
| 200 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | ||
| 201 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | ||
| 202 | + } | ||
| 203 | + } | ||
| 204 | + } | ||
| 205 | + } | ||
| 206 | + initPinYinSelect2('#line',data,''); | ||
| 207 | + | ||
| 208 | + }); | ||
| 209 | + }); | ||
| 210 | + | ||
| 211 | + $("#line").on("change", function(){ | ||
| 212 | + if($("#line").val() == " "){ | ||
| 213 | + $("#gsdmTurn").attr("disabled", false); | ||
| 214 | + $("#fgsdmTurn").attr("disabled", false); | ||
| 215 | + } else { | ||
| 216 | + var temp = tempData[$("#line").val()].split(":"); | ||
| 217 | + $("#gsdmTurn").val(temp[0]); | ||
| 218 | + updateCompany(); | ||
| 219 | + $("#fgsdmTurn").val(temp[1]); | ||
| 220 | + $("#gsdmTurn").attr("disabled", true); | ||
| 221 | + $("#fgsdmTurn").attr("disabled", true); | ||
| 222 | + } | ||
| 223 | + }); | ||
| 224 | + | ||
| 225 | + var line; | ||
| 226 | + var startDate; | ||
| 227 | + var endDate; | ||
| 228 | + var gsdmTurn; | ||
| 229 | + var fgsdmTurn; | ||
| 230 | + var nature; | ||
| 231 | + $("#query").on("click",function(){ | ||
| 232 | + | ||
| 233 | + line = $("#line").val(); | ||
| 234 | + startDate=$("#startDate").val(); | ||
| 235 | + endDate=$("#endDate").val(); | ||
| 236 | + gsdmTurn=$("#gsdmTurn").val(); | ||
| 237 | + fgsdmTurn=$("#fgsdmTurn").val(); | ||
| 238 | + nature=$("#nature").val(); | ||
| 239 | + if(startDate!=''&&endDate!=''){ | ||
| 240 | + var i = layer.load(2); | ||
| 241 | + $get('/calcSheet/calcTurnoutrate', | ||
| 242 | + { gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn, line:line,startDate:startDate,endDate:endDate,nature:nature,type:'query'},function(result){ | ||
| 243 | +// var result=[]; | ||
| 244 | + // 把数据填充到模版中 | ||
| 245 | + var tbodyHtml = template('calcTurnoutrate',{list:result}); | ||
| 246 | + // 把渲染好的模版html文本追加到表格中 | ||
| 247 | + $('#tbody').html(tbodyHtml); | ||
| 248 | + layer.close(i); | ||
| 249 | + line = $("#line").val(); | ||
| 250 | + startDate = $("#startDate").val(); | ||
| 251 | + endDate = $("#endDate").val(); | ||
| 252 | + $("#sDate").text(startDate); | ||
| 253 | + $("#eDate").text(endDate); | ||
| 254 | + var temp = {}; | ||
| 255 | + var today_account = 0; | ||
| 256 | + | ||
| 257 | + temp["line"] = $("#line").text(); | ||
| 258 | + $.each(result, function(i, obj) { | ||
| 259 | + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 260 | + today_account++; | ||
| 261 | + } | ||
| 262 | + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 263 | + }); | ||
| 264 | + | ||
| 265 | + }); | ||
| 266 | + | ||
| 267 | + }else{ | ||
| 268 | + layer.msg("请选择时间范围!"); | ||
| 269 | + } | ||
| 270 | + }); | ||
| 271 | + | ||
| 272 | + $("#export").on("click",function(){ | ||
| 273 | + line = $("#line").val(); | ||
| 274 | + startDate=$("#startDate").val(); | ||
| 275 | + endDate=$("#endDate").val(); | ||
| 276 | + gsdmTurn=$("#gsdmTurn").val(); | ||
| 277 | + fgsdmTurn=$("#fgsdmTurn").val(); | ||
| 278 | + nature=$("#nature").val(); | ||
| 279 | + var lineName = $('#line option:selected').text(); | ||
| 280 | + if(lineName == "全部线路") | ||
| 281 | + lineName = $('#fgsdmTurn option:selected').text(); | ||
| 282 | + if(lineName =="请选择") | ||
| 283 | + lineName = $('#gsdmTurn option:selected').text(); | ||
| 284 | + var i = layer.load(2); | ||
| 285 | + $get('/calcSheet/calcTurnoutrate',{gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn,line:line,startDate:startDate,endDate:endDate,nature:nature,type:'export',lineName:lineName},function(result){ | ||
| 286 | + var dateTime = ""; | ||
| 287 | + if(startDate == endDate){ | ||
| 288 | + dateTime = startDate; | ||
| 289 | + } else { | ||
| 290 | + dateTime = startDate+"-"+endDate; | ||
| 291 | + } | ||
| 292 | + window.open("/downloadFile/download?fileName=" | ||
| 293 | + +dateTime+"-"+lineName+"-营运线路出车率统计表"); | ||
| 294 | + layer.close(i); | ||
| 295 | + }); | ||
| 296 | + }); | ||
| 297 | + }); | ||
| 298 | +</script> | ||
| 299 | +<script type="text/html" id="calcTurnoutrate"> | ||
| 300 | + {{each list as obj i}} | ||
| 301 | + <tr> | ||
| 302 | + {{if obj.rq == '分类汇总'}} | ||
| 303 | + <td colspan='3'>{{obj.rq}}</td> | ||
| 304 | + {{/if}} | ||
| 305 | + {{if obj.rq != '分类汇总'}} | ||
| 306 | + <td>{{obj.rq}}</td> | ||
| 307 | + <td>{{obj.gsName}}</td> | ||
| 308 | + <td>{{obj.fgsName}}</td> | ||
| 309 | + {{/if}} | ||
| 310 | + <td>{{obj.xlName}}</td> | ||
| 311 | + <td>{{obj.qzpcs}}</td> | ||
| 312 | + <td>{{obj.jhcc}}</td> | ||
| 313 | + <td>{{obj.sjcc}}</td> | ||
| 314 | + <td>{{obj.sjcczgf}}</td> | ||
| 315 | + <td>{{obj.ccl}}</td> | ||
| 316 | + <td>{{obj.cclzgf}}</td> | ||
| 317 | + <td>{{obj.jhbc}}</td> | ||
| 318 | + <td>{{obj.sjbc}}</td> | ||
| 319 | + <td>{{obj.zxl}}</td> | ||
| 320 | + <td>{{obj.sm}}</td> | ||
| 321 | + </tr> | ||
| 322 | + {{/each}} | ||
| 323 | + {{if list.length == 0}} | ||
| 324 | + <tr> | ||
| 325 | + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 326 | + </tr> | ||
| 327 | + {{/if}} | ||
| 328 | +</script> |
src/main/resources/static/pages/report/inoutstation/inoutstation.html
| @@ -25,25 +25,9 @@ | @@ -25,25 +25,9 @@ | ||
| 25 | <h1>站点停靠时间记录</h1> | 25 | <h1>站点停靠时间记录</h1> |
| 26 | </div> | 26 | </div> |
| 27 | </div> | 27 | </div> |
| 28 | - | ||
| 29 | -<div class="row"> | ||
| 30 | - <div class="col-md-12"> | ||
| 31 | - <div class="portlet light porttlet-fit bordered"> | 28 | + <div class="col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)"> |
| 32 | <div class="portlet-title"> | 29 | <div class="portlet-title"> |
| 33 | <form class="form-inline" action=""> | 30 | <form class="form-inline" action=""> |
| 34 | - <div> | ||
| 35 | - <!-- <div style="display: inline-block; margin-left: 33px;" | ||
| 36 | - id="gsdmDiv"> | ||
| 37 | - <span class="item-label" style="width: 80px;">公司: </span> <select | ||
| 38 | - class="form-control" name="company" id="gsdm" | ||
| 39 | - style="width: 180px;"></select> | ||
| 40 | - </div> | ||
| 41 | - <div style="display: inline-block; margin-left: 24px;" | ||
| 42 | - id="fgsdmDiv"> | ||
| 43 | - <span class="item-label" style="width: 80px;">分公司: </span> <select | ||
| 44 | - class="form-control" name="subCompany" id="fgsdm" | ||
| 45 | - style="width: 180px;"></select> | ||
| 46 | - </div> --> | ||
| 47 | <div style="display: inline-block; margin-left: 15px;"> | 31 | <div style="display: inline-block; margin-left: 15px;"> |
| 48 | <span class="item-label" style="width: 80px;">线路: </span> <select | 32 | <span class="item-label" style="width: 80px;">线路: </span> <select |
| 49 | class="form-control sreach-zd" name="line" id="line" | 33 | class="form-control sreach-zd" name="line" id="line" |
| @@ -72,12 +56,10 @@ | @@ -72,12 +56,10 @@ | ||
| 72 | <input class="btn btn-default" type="button" id="query" value="查询" /> | 56 | <input class="btn btn-default" type="button" id="query" value="查询" /> |
| 73 | <a class="btn btn-default" data-type="xls" href="javascript:;" id="export" >导出</a> | 57 | <a class="btn btn-default" data-type="xls" href="javascript:;" id="export" >导出</a> |
| 74 | </div> | 58 | </div> |
| 75 | - </div> | ||
| 76 | - | ||
| 77 | </form> | 59 | </form> |
| 78 | </div> | 60 | </div> |
| 79 | - <div class="portlet-body" > | ||
| 80 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 506px;"> | 61 | + <div class="portlet-body" style="overflow:auto;height: calc(100% - 80px)"> |
| 62 | + <div class="table-container" style="margin-top: 10px;min-width: 906px;"> | ||
| 81 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 63 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 82 | <tbody class="ludan_ll_1"> | 64 | <tbody class="ludan_ll_1"> |
| 83 | 65 | ||
| @@ -86,8 +68,7 @@ | @@ -86,8 +68,7 @@ | ||
| 86 | </div> | 68 | </div> |
| 87 | </div> | 69 | </div> |
| 88 | </div> | 70 | </div> |
| 89 | - </div> | ||
| 90 | -</div> | 71 | + |
| 91 | 72 | ||
| 92 | <script> | 73 | <script> |
| 93 | $(function(){ | 74 | $(function(){ |
src/main/resources/static/pages/report/sheet/calcList.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title" style="margin-left: 20px"> | ||
| 21 | + <button id="exportList">数据导出</button> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row" id="calcSheetList"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-body"> | ||
| 29 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px"> | ||
| 30 | + <table class="table table-bordered table-hover table-checkable" id="forms_2"> | ||
| 31 | + <thead> | ||
| 32 | + <tr> | ||
| 33 | + <td></td> | ||
| 34 | + <td>日期</td> | ||
| 35 | + <td>线路</td> | ||
| 36 | + <td>站点</td> | ||
| 37 | + <td>计划时间</td> | ||
| 38 | + <td>实际时间</td> | ||
| 39 | + <td>是否准点</td> | ||
| 40 | + </tr> | ||
| 41 | + </thead> | ||
| 42 | + | ||
| 43 | + <tbody> | ||
| 44 | + | ||
| 45 | + </tbody> | ||
| 46 | + </table> | ||
| 47 | + </div> | ||
| 48 | + </div> | ||
| 49 | + </div> | ||
| 50 | + </div> | ||
| 51 | +</div> | ||
| 52 | +<script src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script> | ||
| 53 | +<script> | ||
| 54 | + $(function(){ | ||
| 55 | + // 关闭左侧栏 | ||
| 56 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 57 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 58 | + var no=""; | ||
| 59 | + var dates=""; | ||
| 60 | + var dir=""; | ||
| 61 | + $("#calcSheetList").on('init', function (e, id) { | ||
| 62 | + no=id.split(",")[0]; | ||
| 63 | + dates = id.split(",")[1]; | ||
| 64 | + dir =id.split(",")[2]; | ||
| 65 | + var i = layer.load(2); | ||
| 66 | + $get('/calcSheet/calcSheet',{line:no,date:dates,dir:dir,type:'query'},function(result){ | ||
| 67 | + layer.close(i); | ||
| 68 | + var calcSheetList_2 = template('calcSheetList_2',{list:result}); | ||
| 69 | + $('#forms_2 tbody').html(calcSheetList_2); | ||
| 70 | + }); | ||
| 71 | + }) | ||
| 72 | + $("#exportList").on('click',function(){ | ||
| 73 | + var i = layer.load(2); | ||
| 74 | + var name=""; | ||
| 75 | + if(dir=="1"){ | ||
| 76 | + fileName="发车准点率"+dates; | ||
| 77 | + }else{ | ||
| 78 | + fileName="到站准点率"+dates; | ||
| 79 | + } | ||
| 80 | + $get('/calcSheet/calcSheet',{line:no,date:dates,dir:dir,type:'export'},function(result){ | ||
| 81 | + window.open("/downloadFile/download?fileName="+fileName); | ||
| 82 | + layer.close(i); | ||
| 83 | + }); | ||
| 84 | + }); | ||
| 85 | + | ||
| 86 | + | ||
| 87 | + }); | ||
| 88 | +</script> | ||
| 89 | +<script type="text/html" id="calcSheetList_2"> | ||
| 90 | + {{each list as obj i}} | ||
| 91 | + <tr {{if obj.sfzd!="准点"}}style="color: red" {{/if}}> | ||
| 92 | + <td>{{i+1}}</td> | ||
| 93 | + <td>{{obj.date}}</td> | ||
| 94 | + <td>{{obj.line}}</td> | ||
| 95 | + <td>{{obj.zdname}}</td> | ||
| 96 | + <td>{{obj.jhsj}}</td> | ||
| 97 | + <td>{{obj.sjsj}}</td> | ||
| 98 | + <td>{{obj.sfzd}}</td> | ||
| 99 | + </tr> | ||
| 100 | + {{/each}} | ||
| 101 | + {{if list.length == 0}} | ||
| 102 | + <tr> | ||
| 103 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 104 | + </tr> | ||
| 105 | + {{/if}} | ||
| 106 | +</script> | ||
| 0 | \ No newline at end of file | 107 | \ No newline at end of file |
src/main/resources/static/pages/report/sheet/calcList2.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title" style="margin-left: 20px"> | ||
| 21 | + <button id="exportList">数据导出</button> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row" id="calcSheetList"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-body"> | ||
| 29 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px"> | ||
| 30 | + <table class="table table-bordered table-hover table-checkable" id="forms_2"> | ||
| 31 | + <thead> | ||
| 32 | + <tr> | ||
| 33 | + <td></td> | ||
| 34 | + <td>日期</td> | ||
| 35 | + <td>线路</td> | ||
| 36 | + <td>站点</td> | ||
| 37 | + <td>计划时间</td> | ||
| 38 | + <td>实际时间</td> | ||
| 39 | + <td>是否准点</td> | ||
| 40 | + </tr> | ||
| 41 | + </thead> | ||
| 42 | + | ||
| 43 | + <tbody> | ||
| 44 | + | ||
| 45 | + </tbody> | ||
| 46 | + </table> | ||
| 47 | + </div> | ||
| 48 | + </div> | ||
| 49 | + </div> | ||
| 50 | + </div> | ||
| 51 | +</div> | ||
| 52 | +<script src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script> | ||
| 53 | +<script> | ||
| 54 | + $(function(){ | ||
| 55 | + // 关闭左侧栏 | ||
| 56 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 57 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 58 | + var no=""; | ||
| 59 | + var dates=""; | ||
| 60 | + $("#calcSheetList").on('init', function (e, id) { | ||
| 61 | + no=id.split(",")[0]; | ||
| 62 | + dates = id.split(",")[1]; | ||
| 63 | + var i = layer.load(2); | ||
| 64 | + $get('/calcSheet/calcSheet',{line:no,date:dates,type:'query'},function(result){ | ||
| 65 | + var calcSheetList_2 = template('calcSheetList_2',{list:result}); | ||
| 66 | + $('#forms_2 tbody').html(calcSheetList_2); | ||
| 67 | + layer.close(i); | ||
| 68 | + }); | ||
| 69 | + }) | ||
| 70 | + $("#exportList").on('click',function(){ | ||
| 71 | + var i = layer.load(2); | ||
| 72 | + $get('/calcSheet/calcSheet',{line:no,date:dates,type:'export'},function(result){ | ||
| 73 | + window.open("/downloadFile/download?fileName=发车准点率"+dates); | ||
| 74 | + layer.close(i); | ||
| 75 | + }); | ||
| 76 | + }); | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + }); | ||
| 80 | +</script> | ||
| 81 | +<script type="text/html" id="calcSheetList_2"> | ||
| 82 | + {{each list as obj i}} | ||
| 83 | + <tr {{if obj.sfzd!="准点"}}style="color: red" {{/if}}> | ||
| 84 | + <td>{{i+1}}</td> | ||
| 85 | + <td>{{obj.date}}</td> | ||
| 86 | + <td>{{obj.line}}</td> | ||
| 87 | + <td>{{obj.zdname}}</td> | ||
| 88 | + <td>{{obj.jhsj}}</td> | ||
| 89 | + <td>{{obj.sjsj}}</td> | ||
| 90 | + <td>{{obj.sfzd}}</td> | ||
| 91 | + </tr> | ||
| 92 | + {{/each}} | ||
| 93 | + {{if list.length == 0}} | ||
| 94 | + <tr> | ||
| 95 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 96 | + </tr> | ||
| 97 | + {{/if}} | ||
| 98 | +</script> | ||
| 0 | \ No newline at end of file | 99 | \ No newline at end of file |
src/main/resources/static/pages/report/sheet/calcSheetList.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title"> | ||
| 21 | + <h1>发车准点率</h1> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | + <div style="display: inline-block; margin-left: 61px;" id="gsdmDiv"> | ||
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> <select | ||
| 32 | + class="form-control" name="company" id="gsdm" | ||
| 33 | + style="width: 180px;"></select> | ||
| 34 | + </div> | ||
| 35 | + <div style="display: inline-block; margin-left: 38px;" | ||
| 36 | + id="fgsdmDiv"> | ||
| 37 | + <span class="item-label" style="width: 80px;">分公司: </span> <select | ||
| 38 | + class="form-control" name="subCompany" id="fgsdm" | ||
| 39 | + style="width: 180px;"></select> | ||
| 40 | + </div> | ||
| 41 | + | ||
| 42 | + <div style="display: inline-block; margin-left: 53px;"> | ||
| 43 | + <span class="item-label" style="width: 80px;">线路: </span> <select | ||
| 44 | + class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 45 | + </div> | ||
| 46 | + <div style="margin-top: 10px"></div> | ||
| 47 | + <div style="display: inline-block; margin-left: 33px;"> | ||
| 48 | + <span class="item-label" style="width: 80px;">线路性质: </span> <select | ||
| 49 | + class="form-control" name="nature" id="nature" | ||
| 50 | + style="width: 180px;"> | ||
| 51 | + <option value="0">全部线路</option> | ||
| 52 | + <option value="1" selected="selected">营运线路</option> | ||
| 53 | + <option value="2">非营运线路</option> | ||
| 54 | + </select> | ||
| 55 | + </div> | ||
| 56 | + <div style="display: inline-block;"> | ||
| 57 | + <span class="item-label" style="width: 80px; margin-left: 24px;">开始时间: | ||
| 58 | + </span> <input class="form-control" type="text" id="date" | ||
| 59 | + style="width: 180px;" /> | ||
| 60 | + </div> | ||
| 61 | + <div style="display: inline-block;"> | ||
| 62 | + <span class="item-label" style="width: 80px; margin-left: 24px;">结束时间: | ||
| 63 | + </span> <input class="form-control" type="text" id="endDate" | ||
| 64 | + style="width: 180px;" /> | ||
| 65 | + </div> | ||
| 66 | + | ||
| 67 | + <div class="form-group"> | ||
| 68 | + <input type="hidden" id="id" /> <input class="btn btn-default" | ||
| 69 | + type="button" id="query" value="查询" /> <input | ||
| 70 | + class="btn btn-default" type="button" id="export" value="导出" /> | ||
| 71 | + </div> | ||
| 72 | + </form> | ||
| 73 | + </div> | ||
| 74 | + <div class="portlet-body"> | ||
| 75 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 76 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | ||
| 77 | + <thead> | ||
| 78 | + <tr> | ||
| 79 | + <td>公司</td> | ||
| 80 | + <td>分公司</td> | ||
| 81 | + <td>线路</td> | ||
| 82 | + <td>班次数</td> | ||
| 83 | + <td>发车准点数</td> | ||
| 84 | + <td>发车准点率</td> | ||
| 85 | + <td>到站准点数</td> | ||
| 86 | + <td>到站准点率</td> | ||
| 87 | + <td>查看</td> | ||
| 88 | + </tr> | ||
| 89 | + </thead> | ||
| 90 | + | ||
| 91 | + <tbody> | ||
| 92 | + | ||
| 93 | + </tbody> | ||
| 94 | + </table> | ||
| 95 | + | ||
| 96 | + | ||
| 97 | + </div> | ||
| 98 | + | ||
| 99 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 100 | + <input class="btn btn-default hidden" type="button" id="export_1" value="导出"/> | ||
| 101 | + <table class="table table-bordered table-hover table-checkable" id="forms_1"> | ||
| 102 | + <thead> | ||
| 103 | + <tr class="hidden"> | ||
| 104 | + <td>公司</td> | ||
| 105 | + <td>分公司</td> | ||
| 106 | + <td>日期</td> | ||
| 107 | + <td>线路</td> | ||
| 108 | + <td>班次数</td> | ||
| 109 | + <td>发车准点次数</td> | ||
| 110 | + <td>发车准点率</td> | ||
| 111 | + <td>查看</td> | ||
| 112 | + <td>到站准点次数</td> | ||
| 113 | + <td>到站准点率</td> | ||
| 114 | + <td>查看</td> | ||
| 115 | + </tr> | ||
| 116 | + </thead> | ||
| 117 | + | ||
| 118 | + <tbody> | ||
| 119 | + | ||
| 120 | + </tbody> | ||
| 121 | + </table> | ||
| 122 | + | ||
| 123 | + </div> | ||
| 124 | + </div> | ||
| 125 | + </div> | ||
| 126 | + </div> | ||
| 127 | +</div> | ||
| 128 | +<script src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script> | ||
| 129 | +<script> | ||
| 130 | + $(function(){ | ||
| 131 | + // 关闭左侧栏 | ||
| 132 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 133 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 134 | + | ||
| 135 | + var d = new Date(); | ||
| 136 | + d.setTime(d.getTime() - 1*1000*60*60*24); | ||
| 137 | + var year = d.getFullYear(); | ||
| 138 | + var month = d.getMonth() + 1; | ||
| 139 | + var day = d.getDate(); | ||
| 140 | + if(month < 10) | ||
| 141 | + month = "0"+month; | ||
| 142 | + if(day < 10) | ||
| 143 | + day = "0"+day; | ||
| 144 | + var dateTime = year + "-" + month + "-" + day; | ||
| 145 | + $("#date").datetimepicker({ | ||
| 146 | + format : 'YYYY-MM-DD', | ||
| 147 | + locale : 'zh-cn', | ||
| 148 | + maxDate : dateTime | ||
| 149 | + }); | ||
| 150 | + $("#endDate").datetimepicker({ | ||
| 151 | + format : 'YYYY-MM-DD', | ||
| 152 | + locale : 'zh-cn', | ||
| 153 | + maxDate : dateTime | ||
| 154 | + }); | ||
| 155 | + $("#date").val(dateTime); | ||
| 156 | + $("#endDate").val(dateTime); | ||
| 157 | + | ||
| 158 | + var fage=true; | ||
| 159 | + var obj = []; | ||
| 160 | + var xlList; | ||
| 161 | + $.get('/report/lineList',function(result){ | ||
| 162 | + xlList=result; | ||
| 163 | + | ||
| 164 | + $.get('/user/companyData', function(result){ | ||
| 165 | + obj = result; | ||
| 166 | + var options = ''; | ||
| 167 | + for(var i = 0; i < obj.length; i++){ | ||
| 168 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 169 | + } | ||
| 170 | + if(obj.length ==0){ | ||
| 171 | + $("#gsdmDiv").css('display','none'); | ||
| 172 | + }else if(obj.length ==1){ | ||
| 173 | + $("#gsdmDiv").css('display','none'); | ||
| 174 | + if(obj[0].children.length == 1 || obj[0].children.length ==0){ | ||
| 175 | + $('#fgsdmDiv').css('display','none'); | ||
| 176 | + fage=false; | ||
| 177 | + } | ||
| 178 | + } | ||
| 179 | + $('#gsdm').html(options); | ||
| 180 | + | ||
| 181 | + updateCompany(); | ||
| 182 | + }); | ||
| 183 | + }); | ||
| 184 | + | ||
| 185 | + $("#gsdm").on("change",updateCompany); | ||
| 186 | + function updateCompany(){ | ||
| 187 | + var company = $('#gsdm').val(); | ||
| 188 | + var options =''; | ||
| 189 | + if(fage){ | ||
| 190 | + options = '<option value="">请选择</option>'; | ||
| 191 | + } | ||
| 192 | + for(var i = 0; i < obj.length; i++){ | ||
| 193 | + if(obj[i].companyCode == company){ | ||
| 194 | + var children = obj[i].children; | ||
| 195 | + for(var j = 0; j < children.length; j++){ | ||
| 196 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 197 | + } | ||
| 198 | + } | ||
| 199 | + } | ||
| 200 | + $('#fgsdm').html(options); | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + var tempData = {}; | ||
| 204 | + $.get('/report/lineList',function(xlList){ | ||
| 205 | + var data = []; | ||
| 206 | + data.push({id: " ", text: "全部线路"}); | ||
| 207 | + $.get('/user/companyData', function(result){ | ||
| 208 | + for(var i = 0; i < result.length; i++){ | ||
| 209 | + var companyCode = result[i].companyCode; | ||
| 210 | + var children = result[i].children; | ||
| 211 | + for(var j = 0; j < children.length; j++){ | ||
| 212 | + var code = children[j].code; | ||
| 213 | + for(var k=0;k < xlList.length;k++ ){ | ||
| 214 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | ||
| 215 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | ||
| 216 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | ||
| 217 | + } | ||
| 218 | + } | ||
| 219 | + } | ||
| 220 | + } | ||
| 221 | + initPinYinSelect2('#line',data,''); | ||
| 222 | + | ||
| 223 | + }); | ||
| 224 | + }); | ||
| 225 | + | ||
| 226 | + $("#line").on("change", function(){ | ||
| 227 | + if($("#line").val() == " "){ | ||
| 228 | + $("#gsdm").attr("disabled", false); | ||
| 229 | + $("#fgsdm").attr("disabled", false); | ||
| 230 | + } else { | ||
| 231 | + var temp = tempData[$("#line").val()].split(":"); | ||
| 232 | + $("#gsdm").val(temp[0]); | ||
| 233 | + updateCompany(); | ||
| 234 | + $("#fgsdm").val(temp[1]); | ||
| 235 | + $("#nature").val(0); | ||
| 236 | + $("#gsdm").attr("disabled", true); | ||
| 237 | + $("#fgsdm").attr("disabled", true); | ||
| 238 | + } | ||
| 239 | + }); | ||
| 240 | + | ||
| 241 | + $("#export").attr('disabled',"true"); | ||
| 242 | + | ||
| 243 | + //查询 | ||
| 244 | + $("#query").on('click',function(){ | ||
| 245 | + var line = $("#line").val(); | ||
| 246 | + var date = $("#date").val(); | ||
| 247 | + var endDate = $("#endDate").val(); | ||
| 248 | + var fgs=$('#fgsdm').val(); | ||
| 249 | + var gs=$('#gsdm').val(); | ||
| 250 | + var nature=$("#nature").val(); | ||
| 251 | + var i = layer.load(2); | ||
| 252 | + $get('/calcSheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,type:'query'},function(result){ | ||
| 253 | + layer.close(i); | ||
| 254 | + var calcSheetList = template('calcSheetList',{list:result}); | ||
| 255 | + $('#forms tbody').html(calcSheetList); | ||
| 256 | + $('.btn-calcSheetList').on('click', showcalcSheetList); | ||
| 257 | + | ||
| 258 | + if(result.length == 0) | ||
| 259 | + $("#export").attr('disabled',"true"); | ||
| 260 | + else | ||
| 261 | + $("#export").removeAttr("disabled"); | ||
| 262 | + }); | ||
| 263 | +// $post('/sheet/saveListSheet',function(result){ | ||
| 264 | +// }); | ||
| 265 | + }); | ||
| 266 | + function showcalcSheetList(){ | ||
| 267 | + var id = $(this).data('id'); | ||
| 268 | + var date = $("#date").val(); | ||
| 269 | + var endDate = $("#endDate").val(); | ||
| 270 | + $("#id").val(id); | ||
| 271 | + $get('/calcSheet/calcListSheet',{line:id,date:date,endDate:endDate,type:'query'},function(result){ | ||
| 272 | + var calcSheetList = template('calcSheetList_1',{list:result}); | ||
| 273 | + $('#forms_1 tbody').html(calcSheetList); | ||
| 274 | + $('.btn-calcSheetList_1').on('click', opencalcSheetList); | ||
| 275 | + $('.btn-calcSheetList_2').on('click', opencalcSheetList2); | ||
| 276 | + $("#forms_1 .hidden").removeClass("hidden"); | ||
| 277 | + $("html,body").animate({scrollTop:$("#forms_1").offset().top},1000); | ||
| 278 | + $("#export_1").removeClass("hidden"); | ||
| 279 | + }); | ||
| 280 | + } | ||
| 281 | + function opencalcSheetList(){ | ||
| 282 | + var id = $(this).data('id'); | ||
| 283 | + id += ","+$(this).data('date')+",1"; | ||
| 284 | + $.get('/pages/report/sheet/calcList.html', function (content) { | ||
| 285 | + layer.open({ | ||
| 286 | + type: 1, | ||
| 287 | + area: ['800px', '600px'], | ||
| 288 | + content: content, | ||
| 289 | + title: '线路准点率详细', | ||
| 290 | + shift: 5, | ||
| 291 | + scrollbar: false, | ||
| 292 | + success: function () { | ||
| 293 | + $('#calcSheetList').trigger('init', id); | ||
| 294 | + } | ||
| 295 | + }); | ||
| 296 | + }); | ||
| 297 | + } | ||
| 298 | + | ||
| 299 | + function opencalcSheetList2(){ | ||
| 300 | + var id = $(this).data('id'); | ||
| 301 | + id += ","+$(this).data('date')+",2"; | ||
| 302 | + $.get('/pages/report/sheet/calcList.html', function (content) { | ||
| 303 | + layer.open({ | ||
| 304 | + type: 1, | ||
| 305 | + area: ['800px', '600px'], | ||
| 306 | + content: content, | ||
| 307 | + title: '线路准点率详细', | ||
| 308 | + shift: 5, | ||
| 309 | + scrollbar: false, | ||
| 310 | + success: function () { | ||
| 311 | + $('#calcSheetList').trigger('init', id); | ||
| 312 | + } | ||
| 313 | + }); | ||
| 314 | + }); | ||
| 315 | + } | ||
| 316 | + $("#export").on("click",function(){ | ||
| 317 | + var line = $("#line").val(); | ||
| 318 | + var date = $("#date").val(); | ||
| 319 | + var endDate = $("#endDate").val(); | ||
| 320 | + var fgs=$('#fgsdm').val(); | ||
| 321 | + var gs=$('#gsdm').val(); | ||
| 322 | + var nature=$("#nature").val(); | ||
| 323 | + var lineName = $('#line option:selected').text(); | ||
| 324 | + if(lineName == "全部线路") | ||
| 325 | + lineName = $('#fgsdm option:selected').text(); | ||
| 326 | + if(lineName == "请选择") | ||
| 327 | + lineName =$('#gsdm option:selected').text(); | ||
| 328 | + var i = layer.load(2); | ||
| 329 | + $get('/calcSheet/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,type:'export'},function(result){ | ||
| 330 | + var dateTime = ""; | ||
| 331 | + if(date == endDate){ | ||
| 332 | + dateTime = moment(date).format("YYYYMMDD"); | ||
| 333 | + } else { | ||
| 334 | + dateTime = moment(date).format("YYYYMMDD")+"-"+ | ||
| 335 | + moment(endDate).format("YYYYMMDD"); | ||
| 336 | + } | ||
| 337 | + window.open("/downloadFile/download?fileName=" | ||
| 338 | + +dateTime+"-"+lineName+"-发车到站准点率"); | ||
| 339 | + layer.close(i); | ||
| 340 | + }); | ||
| 341 | +// $("#forms_h").table2excel({ | ||
| 342 | +// // 不被导出的表格行的CSS class类 | ||
| 343 | +// exclude: ".noExl", | ||
| 344 | +// // 导出的Excel文档的名称,(没看到作用) | ||
| 345 | +// name: "Excel Document Name.xlsx", | ||
| 346 | +// // Excel文件的名称 | ||
| 347 | +// filename: date+"-"+endDate+"班次准点率" | ||
| 348 | +// }); | ||
| 349 | + }); | ||
| 350 | + | ||
| 351 | + $("#export_1").on("click",function(){ | ||
| 352 | + var id = $("#id").val(); | ||
| 353 | + var date = $("#date").val(); | ||
| 354 | + var endDate = $("#endDate").val(); | ||
| 355 | + var i = layer.load(2); | ||
| 356 | + $get('/calcSheet/calcListSheet',{line:id,date:date,endDate:endDate,type:'export'},function(result){ | ||
| 357 | + window.open("/downloadFile/download?fileName=发车到站准点率"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); | ||
| 358 | + layer.close(i); | ||
| 359 | + }); | ||
| 360 | + }) | ||
| 361 | + | ||
| 362 | + }); | ||
| 363 | +</script> | ||
| 364 | +<script type="text/html" id="calcSheetList"> | ||
| 365 | + {{each list as obj i}} | ||
| 366 | + <tr> | ||
| 367 | + <td>{{obj.gsname}}</td> | ||
| 368 | + <td>{{obj.fgsname}}</td> | ||
| 369 | + <td>{{obj.xlName}}</td> | ||
| 370 | + <td>{{obj.jhszfcs}}</td> | ||
| 371 | + <td>{{obj.sjszfczds}}</td> | ||
| 372 | + <td>{{obj.szfczdl}}</td> | ||
| 373 | + <td>{{obj.sjszddzds}}</td> | ||
| 374 | + <td>{{obj.szddzdl}}</td> | ||
| 375 | + <td> | ||
| 376 | + <button type="button" class="btn btn-sm blue btn-calcSheetList" | ||
| 377 | + data-id="{{obj.xl}}">查看</button> | ||
| 378 | + </td> | ||
| 379 | + </tr> | ||
| 380 | + {{/each}} | ||
| 381 | + {{if list.length == 0}} | ||
| 382 | + <tr> | ||
| 383 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 384 | + </tr> | ||
| 385 | + {{/if}} | ||
| 386 | +</script> | ||
| 387 | + | ||
| 388 | + | ||
| 389 | + | ||
| 390 | +<script type="text/html" id="calcSheetList_1"> | ||
| 391 | + {{each list as obj i}} | ||
| 392 | + <tr> | ||
| 393 | + <td>{{obj.gsname}}</td> | ||
| 394 | + <td>{{obj.fgsname}}</td> | ||
| 395 | + <td>{{obj.xlName}}</td> | ||
| 396 | + <td>{{obj.date}}</td> | ||
| 397 | + <td>{{obj.jhszfcs}}</td> | ||
| 398 | + <td>{{obj.sjszfczds}}</td> | ||
| 399 | + <td>{{obj.szfczdl}}</td> | ||
| 400 | + <td> | ||
| 401 | + <button type="button" class="btn btn-sm blue btn-calcSheetList_1" | ||
| 402 | + data-id="{{obj.xl}}" data-date="{{obj.date}}">详细</button> | ||
| 403 | + </td> | ||
| 404 | + <td>{{obj.sjszddzds}}</td> | ||
| 405 | + <td>{{obj.szddzdl}}</td> | ||
| 406 | + <td> | ||
| 407 | + <button type="button" class="btn btn-sm blue btn-calcSheetList_2" | ||
| 408 | + data-id="{{obj.xl}}" data-date="{{obj.date}}" >详细</button> | ||
| 409 | + </td> | ||
| 410 | + </tr> | ||
| 411 | + {{/each}} | ||
| 412 | + {{if list.length == 0}} | ||
| 413 | + <tr> | ||
| 414 | + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 415 | + </tr> | ||
| 416 | + {{/if}} | ||
| 417 | +</script> | ||
| 418 | + |